Skip to content

Commit c217c17

Browse files
Merge pull request #610 from ShiboSoftwareDev/main
replace PcbSxValue visible with visibility to follow web convension
2 parents 019dc1d + 7adca04 commit c217c17

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

generated/COMPONENT_TYPES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ export interface PcbSxValue {
735735
fontSize?: string | number
736736
pcbX?: string | number
737737
pcbY?: string | number
738-
visible?: boolean
738+
visibility?: "hidden" | "visible" | "inherit"
739739
}
740740
export type PcbSx = PcbSxBase & {
741741
[K in PcbSxSelector]?: PcbSxValue
@@ -744,7 +744,7 @@ export const pcbSxValue = z.object({
744744
fontSize: length.optional(),
745745
pcbX: pcbCoordinate.optional(),
746746
pcbY: pcbCoordinate.optional(),
747-
visible: z.boolean().optional(),
747+
visibility: z.enum(["hidden", "visible", "inherit"]).optional(),
748748
})
749749
```
750750

generated/PROPS_OVERVIEW.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ export interface PcbSxValue {
13601360
fontSize?: string | number
13611361
pcbX?: string | number
13621362
pcbY?: string | number
1363-
visible?: boolean
1363+
visibility?: "hidden" | "visible" | "inherit"
13641364
}
13651365

13661366

lib/common/pcbSx.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface PcbSxValue {
1212
fontSize?: string | number
1313
pcbX?: string | number
1414
pcbY?: string | number
15-
visible?: boolean
15+
visibility?: "hidden" | "visible" | "inherit"
1616
}
1717

1818
type PcbSxBase = Record<string, PcbSxValue>
@@ -25,7 +25,7 @@ export const pcbSxValue = z.object({
2525
fontSize: length.optional(),
2626
pcbX: pcbCoordinate.optional(),
2727
pcbY: pcbCoordinate.optional(),
28-
visible: z.boolean().optional(),
28+
visibility: z.enum(["hidden", "visible", "inherit"]).optional(),
2929
})
3030

3131
export const pcbSx = z.record(

tests/fabrication-note.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ test("fabrication note text accepts pcbSx fabrication note text visibility", ()
8989
text: "FAB NOTE",
9090
pcbSx: {
9191
"& fabricationnotetext": {
92-
visible: true,
92+
visibility: "hidden",
9393
},
9494
},
9595
})
9696

97-
expect(parsed.pcbSx?.["& fabricationnotetext"]?.visible).toBe(true)
97+
expect(parsed.pcbSx?.["& fabricationnotetext"]?.visibility).toBe("hidden")
9898
})

0 commit comments

Comments
 (0)