@dalexto/lexsys-registry 0.0.2

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 (206) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +98 -0
  3. package/dist/index.d.ts +25 -0
  4. package/dist/index.js +2164 -0
  5. package/dist/install-layer.d.ts +4 -0
  6. package/dist/items/accordion.d.ts +7 -0
  7. package/dist/items/alert-dialog.d.ts +7 -0
  8. package/dist/items/alert.d.ts +7 -0
  9. package/dist/items/auth-form.d.ts +7 -0
  10. package/dist/items/autocomplete.d.ts +7 -0
  11. package/dist/items/avatar.d.ts +7 -0
  12. package/dist/items/badge.d.ts +7 -0
  13. package/dist/items/button.d.ts +7 -0
  14. package/dist/items/card.d.ts +7 -0
  15. package/dist/items/checkbox-group.d.ts +7 -0
  16. package/dist/items/checkbox.d.ts +7 -0
  17. package/dist/items/collapsible.d.ts +7 -0
  18. package/dist/items/combobox.d.ts +7 -0
  19. package/dist/items/command-palette.d.ts +7 -0
  20. package/dist/items/context-menu.d.ts +7 -0
  21. package/dist/items/dashboard-shell.d.ts +7 -0
  22. package/dist/items/dialog.d.ts +7 -0
  23. package/dist/items/drawer.d.ts +7 -0
  24. package/dist/items/field.d.ts +7 -0
  25. package/dist/items/fieldset.d.ts +7 -0
  26. package/dist/items/form-field.d.ts +7 -0
  27. package/dist/items/form.d.ts +7 -0
  28. package/dist/items/index.d.ts +49 -0
  29. package/dist/items/input.d.ts +7 -0
  30. package/dist/items/menu.d.ts +7 -0
  31. package/dist/items/menubar.d.ts +7 -0
  32. package/dist/items/meter.d.ts +7 -0
  33. package/dist/items/navigation-menu.d.ts +7 -0
  34. package/dist/items/number-field.d.ts +7 -0
  35. package/dist/items/otp-field.d.ts +7 -0
  36. package/dist/items/popover.d.ts +7 -0
  37. package/dist/items/preview-card.d.ts +7 -0
  38. package/dist/items/progress.d.ts +7 -0
  39. package/dist/items/radio-group.d.ts +7 -0
  40. package/dist/items/scroll-area.d.ts +7 -0
  41. package/dist/items/select.d.ts +7 -0
  42. package/dist/items/separator.d.ts +7 -0
  43. package/dist/items/settings-panel.d.ts +7 -0
  44. package/dist/items/sidebar.d.ts +7 -0
  45. package/dist/items/slider.d.ts +7 -0
  46. package/dist/items/switch.d.ts +7 -0
  47. package/dist/items/tabs.d.ts +7 -0
  48. package/dist/items/textarea.d.ts +7 -0
  49. package/dist/items/toast.d.ts +7 -0
  50. package/dist/items/toggle-group.d.ts +7 -0
  51. package/dist/items/toggle.d.ts +7 -0
  52. package/dist/items/toolbar.d.ts +7 -0
  53. package/dist/items/tooltip.d.ts +7 -0
  54. package/dist/registry.types.d.ts +40 -0
  55. package/dist/styles/theme.d.ts +2 -0
  56. package/dist/utilities/cn.d.ts +2 -0
  57. package/dist/validate-registry-composition.d.ts +2 -0
  58. package/dist/validate-registry-item.d.ts +2 -0
  59. package/dist/validate-registry-template-imports.d.ts +4 -0
  60. package/dist/validate-registry.d.ts +9 -0
  61. package/package.json +52 -0
  62. package/templates/blocks/AuthForm/AuthForm.tsx +109 -0
  63. package/templates/blocks/AuthForm/AuthForm.types.ts +34 -0
  64. package/templates/blocks/AuthForm/AuthForm.variants.ts +11 -0
  65. package/templates/blocks/CommandPalette/CommandPalette.tsx +245 -0
  66. package/templates/blocks/CommandPalette/CommandPalette.types.ts +73 -0
  67. package/templates/blocks/CommandPalette/CommandPalette.variants.ts +26 -0
  68. package/templates/blocks/FormField/FormField.tsx +83 -0
  69. package/templates/blocks/FormField/FormField.types.ts +26 -0
  70. package/templates/blocks/FormField/FormField.variants.ts +9 -0
  71. package/templates/blocks/SettingsPanel/SettingsPanel.tsx +104 -0
  72. package/templates/blocks/SettingsPanel/SettingsPanel.types.ts +31 -0
  73. package/templates/blocks/SettingsPanel/SettingsPanel.variants.ts +9 -0
  74. package/templates/blocks/Sidebar/Sidebar.tsx +414 -0
  75. package/templates/blocks/Sidebar/Sidebar.types.ts +99 -0
  76. package/templates/blocks/Sidebar/Sidebar.variants.ts +84 -0
  77. package/templates/primitives/Accordion/Accordion.tsx +102 -0
  78. package/templates/primitives/Accordion/Accordion.types.ts +20 -0
  79. package/templates/primitives/Accordion/Accordion.variants.ts +32 -0
  80. package/templates/primitives/Alert/Alert.tsx +62 -0
  81. package/templates/primitives/Alert/Alert.types.ts +35 -0
  82. package/templates/primitives/Alert/Alert.variants.ts +41 -0
  83. package/templates/primitives/AlertDialog/AlertDialog.tsx +168 -0
  84. package/templates/primitives/AlertDialog/AlertDialog.types.ts +30 -0
  85. package/templates/primitives/AlertDialog/AlertDialog.variants.ts +57 -0
  86. package/templates/primitives/Autocomplete/Autocomplete.tsx +394 -0
  87. package/templates/primitives/Autocomplete/Autocomplete.types.ts +82 -0
  88. package/templates/primitives/Autocomplete/Autocomplete.variants.ts +154 -0
  89. package/templates/primitives/Avatar/Avatar.tsx +56 -0
  90. package/templates/primitives/Avatar/Avatar.types.ts +31 -0
  91. package/templates/primitives/Avatar/Avatar.variants.ts +40 -0
  92. package/templates/primitives/Badge/Badge.tsx +30 -0
  93. package/templates/primitives/Badge/Badge.types.ts +30 -0
  94. package/templates/primitives/Badge/Badge.variants.ts +81 -0
  95. package/templates/primitives/Button/Button.tsx +53 -0
  96. package/templates/primitives/Button/Button.types.ts +25 -0
  97. package/templates/primitives/Button/Button.variants.ts +69 -0
  98. package/templates/primitives/Card/Card.tsx +85 -0
  99. package/templates/primitives/Card/Card.types.ts +54 -0
  100. package/templates/primitives/Card/Card.variants.ts +46 -0
  101. package/templates/primitives/Checkbox/Checkbox.tsx +72 -0
  102. package/templates/primitives/Checkbox/Checkbox.types.ts +28 -0
  103. package/templates/primitives/Checkbox/Checkbox.variants.ts +39 -0
  104. package/templates/primitives/CheckboxGroup/CheckboxGroup.tsx +32 -0
  105. package/templates/primitives/CheckboxGroup/CheckboxGroup.types.ts +17 -0
  106. package/templates/primitives/CheckboxGroup/CheckboxGroup.variants.ts +25 -0
  107. package/templates/primitives/Collapsible/Collapsible.tsx +74 -0
  108. package/templates/primitives/Collapsible/Collapsible.types.ts +28 -0
  109. package/templates/primitives/Collapsible/Collapsible.variants.ts +44 -0
  110. package/templates/primitives/Combobox/Combobox.tsx +450 -0
  111. package/templates/primitives/Combobox/Combobox.types.ts +99 -0
  112. package/templates/primitives/Combobox/Combobox.variants.ts +180 -0
  113. package/templates/primitives/ContextMenu/ContextMenu.tsx +375 -0
  114. package/templates/primitives/ContextMenu/ContextMenu.types.ts +57 -0
  115. package/templates/primitives/ContextMenu/ContextMenu.variants.ts +39 -0
  116. package/templates/primitives/Dialog/Dialog.tsx +148 -0
  117. package/templates/primitives/Dialog/Dialog.types.ts +29 -0
  118. package/templates/primitives/Dialog/Dialog.variants.ts +56 -0
  119. package/templates/primitives/Drawer/Drawer.tsx +266 -0
  120. package/templates/primitives/Drawer/Drawer.types.ts +77 -0
  121. package/templates/primitives/Drawer/Drawer.variants.ts +175 -0
  122. package/templates/primitives/Field/Field.tsx +132 -0
  123. package/templates/primitives/Field/Field.types.ts +43 -0
  124. package/templates/primitives/Field/Field.variants.ts +77 -0
  125. package/templates/primitives/Fieldset/Fieldset.tsx +36 -0
  126. package/templates/primitives/Fieldset/Fieldset.types.ts +26 -0
  127. package/templates/primitives/Fieldset/Fieldset.variants.ts +37 -0
  128. package/templates/primitives/Form/Form.tsx +24 -0
  129. package/templates/primitives/Form/Form.types.ts +13 -0
  130. package/templates/primitives/Form/Form.variants.ts +11 -0
  131. package/templates/primitives/Input/Input.tsx +36 -0
  132. package/templates/primitives/Input/Input.types.ts +27 -0
  133. package/templates/primitives/Input/Input.variants.ts +41 -0
  134. package/templates/primitives/Menu/Menu.tsx +352 -0
  135. package/templates/primitives/Menu/Menu.types.ts +56 -0
  136. package/templates/primitives/Menu/Menu.variants.ts +73 -0
  137. package/templates/primitives/Menubar/Menubar.tsx +25 -0
  138. package/templates/primitives/Menubar/Menubar.types.ts +12 -0
  139. package/templates/primitives/Menubar/Menubar.variants.ts +22 -0
  140. package/templates/primitives/Meter/Meter.tsx +123 -0
  141. package/templates/primitives/Meter/Meter.types.ts +45 -0
  142. package/templates/primitives/Meter/Meter.variants.ts +47 -0
  143. package/templates/primitives/NavigationMenu/NavigationMenu.tsx +256 -0
  144. package/templates/primitives/NavigationMenu/NavigationMenu.types.ts +58 -0
  145. package/templates/primitives/NavigationMenu/NavigationMenu.variants.ts +40 -0
  146. package/templates/primitives/NumberField/NumberField.tsx +168 -0
  147. package/templates/primitives/NumberField/NumberField.types.ts +51 -0
  148. package/templates/primitives/NumberField/NumberField.variants.ts +92 -0
  149. package/templates/primitives/OtpField/OtpField.tsx +65 -0
  150. package/templates/primitives/OtpField/OtpField.types.ts +29 -0
  151. package/templates/primitives/OtpField/OtpField.variants.ts +45 -0
  152. package/templates/primitives/Popover/Popover.tsx +193 -0
  153. package/templates/primitives/Popover/Popover.types.ts +35 -0
  154. package/templates/primitives/Popover/Popover.variants.ts +68 -0
  155. package/templates/primitives/PreviewCard/PreviewCard.tsx +153 -0
  156. package/templates/primitives/PreviewCard/PreviewCard.types.ts +42 -0
  157. package/templates/primitives/PreviewCard/PreviewCard.variants.ts +24 -0
  158. package/templates/primitives/Progress/Progress.tsx +95 -0
  159. package/templates/primitives/Progress/Progress.types.ts +39 -0
  160. package/templates/primitives/Progress/Progress.variants.ts +39 -0
  161. package/templates/primitives/RadioGroup/RadioGroup.tsx +66 -0
  162. package/templates/primitives/RadioGroup/RadioGroup.types.ts +34 -0
  163. package/templates/primitives/RadioGroup/RadioGroup.variants.ts +59 -0
  164. package/templates/primitives/ScrollArea/ScrollArea.tsx +135 -0
  165. package/templates/primitives/ScrollArea/ScrollArea.types.ts +34 -0
  166. package/templates/primitives/ScrollArea/ScrollArea.variants.ts +38 -0
  167. package/templates/primitives/Select/Select.tsx +319 -0
  168. package/templates/primitives/Select/Select.types.ts +74 -0
  169. package/templates/primitives/Select/Select.variants.ts +94 -0
  170. package/templates/primitives/Separator/Separator.tsx +30 -0
  171. package/templates/primitives/Separator/Separator.types.ts +13 -0
  172. package/templates/primitives/Separator/Separator.variants.ts +19 -0
  173. package/templates/primitives/Slider/Slider.tsx +124 -0
  174. package/templates/primitives/Slider/Slider.types.ts +51 -0
  175. package/templates/primitives/Slider/Slider.variants.ts +38 -0
  176. package/templates/primitives/Switch/Switch.tsx +61 -0
  177. package/templates/primitives/Switch/Switch.types.ts +29 -0
  178. package/templates/primitives/Switch/Switch.variants.ts +48 -0
  179. package/templates/primitives/Tabs/Tabs.tsx +70 -0
  180. package/templates/primitives/Tabs/Tabs.types.ts +23 -0
  181. package/templates/primitives/Tabs/Tabs.variants.ts +29 -0
  182. package/templates/primitives/Textarea/Textarea.tsx +42 -0
  183. package/templates/primitives/Textarea/Textarea.types.ts +31 -0
  184. package/templates/primitives/Textarea/Textarea.variants.ts +46 -0
  185. package/templates/primitives/Toast/Toast.tsx +195 -0
  186. package/templates/primitives/Toast/Toast.types.ts +52 -0
  187. package/templates/primitives/Toast/Toast.variants.ts +88 -0
  188. package/templates/primitives/Toggle/Toggle.tsx +24 -0
  189. package/templates/primitives/Toggle/Toggle.types.ts +19 -0
  190. package/templates/primitives/Toggle/Toggle.variants.ts +32 -0
  191. package/templates/primitives/ToggleGroup/ToggleGroup.tsx +34 -0
  192. package/templates/primitives/ToggleGroup/ToggleGroup.types.ts +19 -0
  193. package/templates/primitives/ToggleGroup/ToggleGroup.variants.ts +32 -0
  194. package/templates/primitives/Toolbar/Toolbar.tsx +118 -0
  195. package/templates/primitives/Toolbar/Toolbar.types.ts +32 -0
  196. package/templates/primitives/Toolbar/Toolbar.variants.ts +84 -0
  197. package/templates/primitives/Tooltip/Tooltip.tsx +98 -0
  198. package/templates/primitives/Tooltip/Tooltip.types.ts +22 -0
  199. package/templates/primitives/Tooltip/Tooltip.variants.ts +24 -0
  200. package/templates/shared/utils/cn.ts +46 -0
  201. package/templates/styles/theme.css +311 -0
  202. package/templates/styles/tokens.css +1445 -0
  203. package/templates/templates/DashboardShell/DashboardShell.tsx +124 -0
  204. package/templates/templates/DashboardShell/DashboardShell.types.ts +37 -0
  205. package/templates/templates/DashboardShell/DashboardShell.variants.ts +25 -0
  206. package/templates/tsconfig.json +5 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LexSys
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # @dalexto/lexsys-registry
2
+
3
+ **Audience:** Maintainers, contributors, and agents
4
+ **Type:** Package README
5
+ **Source of truth for:** Package role, public exports, item structure, template sync
6
+ **Verified against:** `packages/registry/src/`
7
+
8
+ ---
9
+
10
+ ## Package Role
11
+
12
+ `packages/registry` is the install source of truth for the Lexsys CLI.
13
+
14
+ This package owns:
15
+
16
+ - registry item metadata (what gets installed, where, with which dependencies)
17
+ - installable template files (the actual files copied into consumer projects)
18
+ - registry styles and utility metadata
19
+ - registry validation logic
20
+ - the registry manifest consumed by the CLI
21
+
22
+ This package does not own:
23
+
24
+ - component reference implementations (owned by `@dalexto/lexsys-ui`)
25
+ - CLI install behavior (owned by `packages/cli`)
26
+ - design token source or generated CSS (owned by `@dalexto/lexsys-tokens`)
27
+
28
+ ---
29
+
30
+ ## Public Exports
31
+
32
+ From the package root (`.`):
33
+
34
+ | Export | Type | Purpose |
35
+ | ----------------------- | ------------------- | ------------------------------------------------ |
36
+ | `registryManifest` | `RegistryManifest` | Full registry: items, styles, utilities, version |
37
+ | `registryItems` | `RegistryItem[]` | All installable component/utility/style items |
38
+ | `registryStyles` | `RegistryStyle[]` | All style descriptors (`theme`) |
39
+ | `registryUtilities` | `RegistryUtility[]` | All shared utility descriptors (`cn`) |
40
+ | `registryVersion` | `string` | Package version string |
41
+ | `themeRegistryStyle` | `RegistryStyle` | Theme style metadata |
42
+ | `cnRegistryUtility` | `RegistryUtility` | `cn` utility metadata |
43
+ | `validateRegistry` | `function` | Validate the full registry manifest |
44
+ | `validateRegistryItem` | `function` | Validate a single registry item |
45
+ | Individual item exports | `RegistryItem` | e.g. `buttonRegistryItem`, `badgeRegistryItem` |
46
+
47
+ Types exported: `RegistryFile`, `RegistryItem`, `RegistryItemCategory`,
48
+ `RegistryItemType`, `RegistryStyle`, `RegistryStyleFile`, `RegistryUtility`.
49
+
50
+ Templates are resolved via the `./templates/*` export path, not the `.` entry:
51
+
52
+ ```ts
53
+ import.meta
54
+ .resolve("@dalexto/lexsys-registry/templates/components/Button/Button.tsx")
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Registry Item Structure
60
+
61
+ Each item in `src/items/` declares the full install contract (required fields, optional `remoteFiles`, category values, and what makes an item complete). Full contract: [docs/reference/registry/REGISTRY.md](../../docs/reference/registry/REGISTRY.md).
62
+
63
+ ---
64
+
65
+ ## Templates
66
+
67
+ Installable templates live under `packages/registry/templates/` — component files, shared utilities, and token CSS styles. Component templates are synced from `packages/ui/src/components`; style templates from `@dalexto/lexsys-tokens` via `generate:styles`. Templates MUST NOT be manually edited.
68
+
69
+ Template sync rules, the `cn` import transform, and drift validation: [docs/reference/registry/REGISTRY.md](../../docs/reference/registry/REGISTRY.md).
70
+
71
+ ---
72
+
73
+ ## Validation
74
+
75
+ Two validation functions are exported:
76
+
77
+ - `validateRegistryItem(item)` — validates a single item against the `RegistryItem` schema
78
+ - `validateRegistry(manifest)` — validates the full registry manifest
79
+
80
+ Tests live in `packages/registry/test/`:
81
+
82
+ - `validate-registry.test.ts` — manifest and template validation
83
+ - `registry-styles-sync.test.ts` — style template drift compare helpers
84
+
85
+ Full inventory: [docs/operations/TESTING.md](../../docs/operations/TESTING.md).
86
+
87
+ ---
88
+
89
+ ## Development
90
+
91
+ ```sh
92
+ pnpm registry:build
93
+ pnpm registry:check
94
+ pnpm registry:sync
95
+ pnpm tokens:generate:styles
96
+ ```
97
+
98
+ Full script reference: [docs/operations/SCRIPTS.md](../../docs/operations/SCRIPTS.md).
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Public entry point for @dalexto/lexsys-registry.
3
+ *
4
+ * This package contains registry metadata used by the Lexsys CLI.
5
+ */
6
+ export type { RegistryFile, RegistryItem, RegistryItemCategory, RegistryItemType, RegistryStyle, RegistryStyleFile, RegistryUtility, } from "./registry.types.js";
7
+ export { getInstallLayer } from "./install-layer.js";
8
+ export type { InstallLayer } from "./install-layer.js";
9
+ import type { RegistryStyle, RegistryUtility } from "./registry.types.js";
10
+ export * from "./items/index.js";
11
+ export { themeRegistryStyle } from "./styles/theme.js";
12
+ export { cnRegistryUtility } from "./utilities/cn.js";
13
+ import { registryItems } from "./items/index.js";
14
+ export declare const registryVersion = "0.0.1";
15
+ export interface RegistryManifest {
16
+ version: string;
17
+ items: typeof registryItems;
18
+ styles: RegistryStyle[];
19
+ utilities: RegistryUtility[];
20
+ }
21
+ export declare const registryStyles: RegistryStyle[];
22
+ export declare const registryUtilities: RegistryUtility[];
23
+ export declare const registryManifest: RegistryManifest;
24
+ export { validateRegistryItem } from "./validate-registry-item.js";
25
+ export { validateRegistry } from "./validate-registry.js";