@hirobius/design-system 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/LICENSE/main.tsx +21 -0
  2. package/README.md +124 -0
  3. package/dist/chunks/TokenDisplayContext-B3gxyQN7.js +95 -0
  4. package/dist/chunks/form-DnGRy27o.js +63 -0
  5. package/dist/cn.js +8 -0
  6. package/dist/contexts.js +133 -0
  7. package/dist/form.js +62 -0
  8. package/dist/hirobius-ui.js +5611 -0
  9. package/dist/manifest.js +28 -0
  10. package/dist/tokens.css +1 -0
  11. package/dist/tokens.js +693 -0
  12. package/dist/types/src/app/components/activity-feed.d.ts +43 -0
  13. package/dist/types/src/app/components/alert.d.ts +18 -0
  14. package/dist/types/src/app/components/asset-img.d.ts +54 -0
  15. package/dist/types/src/app/components/avatar.d.ts +23 -0
  16. package/dist/types/src/app/components/badge.d.ts +20 -0
  17. package/dist/types/src/app/components/breadcrumb.d.ts +26 -0
  18. package/dist/types/src/app/components/button.d.ts +37 -0
  19. package/dist/types/src/app/components/callout.d.ts +23 -0
  20. package/dist/types/src/app/components/card.d.ts +119 -0
  21. package/dist/types/src/app/components/checkbox.d.ts +20 -0
  22. package/dist/types/src/app/components/cinematic-link.d.ts +13 -0
  23. package/dist/types/src/app/components/code-block.d.ts +29 -0
  24. package/dist/types/src/app/components/combobox.d.ts +46 -0
  25. package/dist/types/src/app/components/component-instance-matrix.d.ts +21 -0
  26. package/dist/types/src/app/components/container.d.ts +31 -0
  27. package/dist/types/src/app/components/dialog.d.ts +73 -0
  28. package/dist/types/src/app/components/disclosure.d.ts +32 -0
  29. package/dist/types/src/app/components/divider.d.ts +21 -0
  30. package/dist/types/src/app/components/doc-link-card.d.ts +26 -0
  31. package/dist/types/src/app/components/empty-state.d.ts +24 -0
  32. package/dist/types/src/app/components/error-boundary.d.ts +25 -0
  33. package/dist/types/src/app/components/error-pattern.d.ts +9 -0
  34. package/dist/types/src/app/components/field.d.ts +25 -0
  35. package/dist/types/src/app/components/form.d.ts +106 -0
  36. package/dist/types/src/app/components/foundation-swatch.d.ts +39 -0
  37. package/dist/types/src/app/components/grid.d.ts +65 -0
  38. package/dist/types/src/app/components/heading-stack.d.ts +42 -0
  39. package/dist/types/src/app/components/history-card.d.ts +12 -0
  40. package/dist/types/src/app/components/icon-button.d.ts +23 -0
  41. package/dist/types/src/app/components/icon.d.ts +30 -0
  42. package/dist/types/src/app/components/info-page.d.ts +10 -0
  43. package/dist/types/src/app/components/inline-code.d.ts +12 -0
  44. package/dist/types/src/app/components/inline-link.d.ts +17 -0
  45. package/dist/types/src/app/components/input.d.ts +46 -0
  46. package/dist/types/src/app/components/lab/tokenUtils.d.ts +38 -0
  47. package/dist/types/src/app/components/menu.d.ts +56 -0
  48. package/dist/types/src/app/components/nav-group.d.ts +24 -0
  49. package/dist/types/src/app/components/nav-item.d.ts +21 -0
  50. package/dist/types/src/app/components/not-found-pattern.d.ts +1 -0
  51. package/dist/types/src/app/components/page.d.ts +43 -0
  52. package/dist/types/src/app/components/pagination.d.ts +24 -0
  53. package/dist/types/src/app/components/popover.d.ts +44 -0
  54. package/dist/types/src/app/components/progress.d.ts +25 -0
  55. package/dist/types/src/app/components/radio.d.ts +18 -0
  56. package/dist/types/src/app/components/segmented-control.d.ts +33 -0
  57. package/dist/types/src/app/components/skeleton.d.ts +25 -0
  58. package/dist/types/src/app/components/sketch.d.ts +13 -0
  59. package/dist/types/src/app/components/slider.d.ts +22 -0
  60. package/dist/types/src/app/components/spinner.d.ts +20 -0
  61. package/dist/types/src/app/components/stack.d.ts +39 -0
  62. package/dist/types/src/app/components/stat.d.ts +24 -0
  63. package/dist/types/src/app/components/status-list-item.d.ts +25 -0
  64. package/dist/types/src/app/components/status-tile.d.ts +22 -0
  65. package/dist/types/src/app/components/stepper-field.d.ts +13 -0
  66. package/dist/types/src/app/components/surface-padding.d.ts +18 -0
  67. package/dist/types/src/app/components/surface.d.ts +30 -0
  68. package/dist/types/src/app/components/table.d.ts +40 -0
  69. package/dist/types/src/app/components/tabs.d.ts +27 -0
  70. package/dist/types/src/app/components/tag.d.ts +32 -0
  71. package/dist/types/src/app/components/text-lockup.d.ts +38 -0
  72. package/dist/types/src/app/components/text.d.ts +26 -0
  73. package/dist/types/src/app/components/tile-grid.d.ts +17 -0
  74. package/dist/types/src/app/components/toast.d.ts +56 -0
  75. package/dist/types/src/app/components/toggle.d.ts +18 -0
  76. package/dist/types/src/app/components/token.d.ts +59 -0
  77. package/dist/types/src/app/components/tooltip.d.ts +33 -0
  78. package/dist/types/src/app/context/DemoStateContext.d.ts +21 -0
  79. package/dist/types/src/app/context/FontContext.d.ts +4 -0
  80. package/dist/types/src/app/context/LanguageContext.d.ts +23 -0
  81. package/dist/types/src/app/context/RouterContext.d.ts +61 -0
  82. package/dist/types/src/app/context/TenantContext.d.ts +29 -0
  83. package/dist/types/src/app/context/ThemeContext.d.ts +18 -0
  84. package/dist/types/src/app/context/TokenDisplayContext.d.ts +11 -0
  85. package/dist/types/src/app/context/index.d.ts +19 -0
  86. package/dist/types/src/app/data/manifest-types.d.ts +128 -0
  87. package/dist/types/src/app/design-system/generated-token-refs.d.ts +586 -0
  88. package/dist/types/src/app/design-system/generated-token-values.d.ts +223 -0
  89. package/dist/types/src/app/design-system/theme.d.ts +32 -0
  90. package/dist/types/src/app/design-system/tokens.d.ts +333 -0
  91. package/dist/types/src/app/hooks/useFocusVisible.d.ts +9 -0
  92. package/dist/types/src/app/hooks/useInteractionState.d.ts +27 -0
  93. package/dist/types/src/app/layouts/CaseStudyLayout.d.ts +21 -0
  94. package/dist/types/src/app/layouts/DocLayout.d.ts +16 -0
  95. package/dist/types/src/app/layouts/EmbeddedDocLayoutContext.d.ts +6 -0
  96. package/dist/types/src/app/lib/nav-active.d.ts +16 -0
  97. package/dist/types/src/app/lib/navLevels.d.ts +4 -0
  98. package/dist/types/src/app/pages/hds/HdsSystemDocLayout.d.ts +7 -0
  99. package/dist/types/src/form/hds-form.d.ts +61 -0
  100. package/dist/types/src/form/index.d.ts +30 -0
  101. package/dist/types/src/form/use-hds-form.d.ts +23 -0
  102. package/dist/types/src/index.d.ts +2276 -0
  103. package/dist/types/src/lib/deprecation.d.ts +4 -0
  104. package/dist/types/src/lib/manifest-entry.d.ts +3 -0
  105. package/dist/types/src/lib/utils.d.ts +3 -0
  106. package/dist/variables.css +461 -0
  107. package/hirobius.tokens.json +2220 -0
  108. package/package.json +366 -0
  109. package/protocol/envelope.mjs +201 -0
  110. package/protocol/figma-snapshot.schema.json +190 -0
  111. package/public/hds-manifest.json +11230 -0
@@ -0,0 +1,190 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "figma-snapshot.schema.json",
4
+ "title": "FigmaSnapshot",
5
+ "description": "10f-1: Read-only normalized snapshot of a Figma document. Same field shapes as the p6-1 selection serializer, extended to cover the full document: all pages, variable collections/modes, all local components/styles.",
6
+ "type": "object",
7
+ "required": ["snapshotAt", "pages", "variables", "styles"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "snapshotAt": {
11
+ "type": "string",
12
+ "format": "date-time",
13
+ "description": "ISO-8601 timestamp (UTC) when the snapshot was taken by the plugin."
14
+ },
15
+ "documentName": {
16
+ "type": "string",
17
+ "description": "Figma document name (figma.root.name)."
18
+ },
19
+ "pages": {
20
+ "type": "array",
21
+ "description": "One entry per page in the document.",
22
+ "items": { "$ref": "#/definitions/PageSummary" }
23
+ },
24
+ "variables": {
25
+ "type": "object",
26
+ "description": "Variable collections keyed by HDS collection name (HDS Primitive | HDS Semantic | HDS Component). Non-HDS collections are omitted.",
27
+ "additionalProperties": { "$ref": "#/definitions/VariableCollection" }
28
+ },
29
+ "styles": {
30
+ "type": "object",
31
+ "description": "Local Figma styles grouped by kind.",
32
+ "required": ["paint", "text", "effect", "grid"],
33
+ "additionalProperties": false,
34
+ "properties": {
35
+ "paint": { "type": "array", "items": { "$ref": "#/definitions/StyleSummary" } },
36
+ "text": { "type": "array", "items": { "$ref": "#/definitions/StyleSummary" } },
37
+ "effect": { "type": "array", "items": { "$ref": "#/definitions/StyleSummary" } },
38
+ "grid": { "type": "array", "items": { "$ref": "#/definitions/StyleSummary" } }
39
+ }
40
+ },
41
+ "components": {
42
+ "type": "array",
43
+ "description": "All local COMPONENT and COMPONENT_SET nodes in the document (flattened list, not scoped per-page).",
44
+ "items": { "$ref": "#/definitions/ComponentSummary" }
45
+ }
46
+ },
47
+ "definitions": {
48
+ "PageSummary": {
49
+ "type": "object",
50
+ "required": ["id", "name", "type"],
51
+ "additionalProperties": false,
52
+ "properties": {
53
+ "id": { "type": "string" },
54
+ "name": { "type": "string" },
55
+ "type": { "type": "string", "const": "PAGE" },
56
+ "frames": {
57
+ "type": "array",
58
+ "description": "Top-level FRAME and COMPONENT_SET children of this page, serialized with the p6-1 extractNodeTree shape (max depth 4).",
59
+ "items": { "$ref": "#/definitions/SerializedNode" }
60
+ }
61
+ }
62
+ },
63
+ "VariableCollection": {
64
+ "type": "object",
65
+ "required": ["id", "name", "modes", "variables"],
66
+ "additionalProperties": false,
67
+ "properties": {
68
+ "id": { "type": "string" },
69
+ "name": { "type": "string" },
70
+ "modes": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "required": ["modeId", "name"],
75
+ "additionalProperties": false,
76
+ "properties": {
77
+ "modeId": { "type": "string" },
78
+ "name": { "type": "string" }
79
+ }
80
+ }
81
+ },
82
+ "variables": {
83
+ "type": "array",
84
+ "items": { "$ref": "#/definitions/VariableSummary" }
85
+ }
86
+ }
87
+ },
88
+ "VariableSummary": {
89
+ "type": "object",
90
+ "required": ["id", "name", "resolvedType", "tokenPath"],
91
+ "additionalProperties": false,
92
+ "properties": {
93
+ "id": { "type": "string" },
94
+ "name": { "type": "string", "description": "Raw Figma variable name (slash/dash separated)." },
95
+ "tokenPath": { "type": "string", "description": "Dot-notation canonical path, e.g. 'semantic.color.surface.raised'." },
96
+ "resolvedType": { "type": "string", "enum": ["COLOR", "FLOAT", "STRING", "BOOLEAN"] },
97
+ "valuesByMode": {
98
+ "type": "object",
99
+ "description": "Map of modeId → resolved value. COLOR values are serialized as hex strings (#rrggbb or #rrggbbaa). FLOAT/STRING/BOOLEAN are primitives.",
100
+ "additionalProperties": {}
101
+ },
102
+ "scopes": {
103
+ "type": "array",
104
+ "items": { "type": "string" },
105
+ "description": "Figma scopes (e.g. FILL_COLOR, CORNER_RADIUS). Omitted when empty."
106
+ }
107
+ }
108
+ },
109
+ "StyleSummary": {
110
+ "type": "object",
111
+ "required": ["id", "name", "type"],
112
+ "additionalProperties": false,
113
+ "properties": {
114
+ "id": { "type": "string" },
115
+ "name": { "type": "string" },
116
+ "type": { "type": "string" },
117
+ "description": { "type": "string" }
118
+ }
119
+ },
120
+ "ComponentSummary": {
121
+ "type": "object",
122
+ "required": ["id", "name", "type"],
123
+ "additionalProperties": false,
124
+ "properties": {
125
+ "id": { "type": "string" },
126
+ "name": { "type": "string" },
127
+ "type": { "type": "string", "enum": ["COMPONENT", "COMPONENT_SET"] },
128
+ "componentName": {
129
+ "type": "string",
130
+ "description": "Resolved manifest spec key (from p6-1 resolveComponentName), if matched."
131
+ },
132
+ "variants": {
133
+ "type": "array",
134
+ "description": "Variant names for COMPONENT_SET nodes.",
135
+ "items": { "type": "string" }
136
+ },
137
+ "properties": {
138
+ "type": "object",
139
+ "description": "Component property descriptors (Figma ComponentPropertyDefinitions).",
140
+ "additionalProperties": {}
141
+ },
142
+ "pageId": { "type": "string", "description": "ID of the page that owns this component." },
143
+ "a11y": { "$ref": "#/definitions/A11yMeta" }
144
+ }
145
+ },
146
+ "SerializedNode": {
147
+ "description": "p6-1 extractNodeTree shape, extended with slot bindings. Mirrors the selection serializer output exactly so downstream validators receive the same contract whether the input came from a selection or a full-page walk.",
148
+ "type": "object",
149
+ "required": ["id", "name", "type"],
150
+ "additionalProperties": true,
151
+ "properties": {
152
+ "id": { "type": "string" },
153
+ "name": { "type": "string" },
154
+ "type": { "type": "string" },
155
+ "width": { "type": "number" },
156
+ "height": { "type": "number" },
157
+ "x": { "type": "number" },
158
+ "y": { "type": "number" },
159
+ "fills": {},
160
+ "boundVariables": {},
161
+ "componentName": { "type": "string" },
162
+ "tokenPaths": { "type": "object", "additionalProperties": {} },
163
+ "a11y": { "$ref": "#/definitions/A11yMeta" },
164
+ "slotBindings": { "$ref": "#/definitions/SlotBindings" },
165
+ "children": {
166
+ "type": "array",
167
+ "items": { "$ref": "#/definitions/SerializedNode" }
168
+ }
169
+ }
170
+ },
171
+ "A11yMeta": {
172
+ "type": "object",
173
+ "additionalProperties": false,
174
+ "properties": {
175
+ "name": { "type": "string" },
176
+ "role": { "type": "string" },
177
+ "description": { "type": "string" }
178
+ }
179
+ },
180
+ "SlotBindings": {
181
+ "type": "object",
182
+ "description": "Asset/portfolio slot assignments stored as plugin data on the node (hdsSlot key).",
183
+ "additionalProperties": false,
184
+ "properties": {
185
+ "slot": { "type": "string", "description": "Slot identifier, e.g. 'hero-01'." },
186
+ "assetId": { "type": "string" }
187
+ }
188
+ }
189
+ }
190
+ }