@nextop-os/ui-system 0.0.17 → 0.0.18

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 (40) hide show
  1. package/AGENTS.md +30 -8
  2. package/README.md +11 -14
  3. package/agent/install-skill.mjs +65 -5
  4. package/agent/nextop-ui-system/SKILL.md +119 -8
  5. package/agent/nextop-ui-system/references/extract-base-component.md +50 -6
  6. package/agent/nextop-ui-system/references/maintain-inventory.md +5 -0
  7. package/agent/nextop-ui-system/references/promote-business-component.md +94 -208
  8. package/dist/chunk-GE5YVRTV.js +859 -0
  9. package/dist/chunk-GE5YVRTV.js.map +1 -0
  10. package/dist/chunk-KJQ366TA.js +70 -0
  11. package/dist/chunk-KJQ366TA.js.map +1 -0
  12. package/dist/chunk-LVHEV755.js +2553 -0
  13. package/dist/chunk-LVHEV755.js.map +1 -0
  14. package/dist/components/index.d.ts +162 -11
  15. package/dist/components/index.js +62 -2
  16. package/dist/date-format.d.ts +6 -0
  17. package/dist/date-format.js +11 -0
  18. package/dist/date-format.js.map +1 -0
  19. package/dist/dev-vite.js +12 -5
  20. package/dist/dev-vite.js.map +1 -1
  21. package/dist/icons/index.d.ts +90 -47
  22. package/dist/icons/index.js +91 -11
  23. package/dist/index.d.ts +3 -2
  24. package/dist/index.js +159 -11
  25. package/dist/metadata/components.json +1320 -265
  26. package/dist/metadata/components.schema.json +4 -0
  27. package/dist/metadata/index.d.ts +3 -1
  28. package/dist/metadata/index.js +1320 -265
  29. package/dist/metadata/index.js.map +1 -1
  30. package/dist/styles/base.css +85 -0
  31. package/dist/styles/index.css +1 -0
  32. package/dist/styles/semantic.css +7 -0
  33. package/dist/styles/theme.css +82 -1
  34. package/package.json +10 -3
  35. package/ui-system.md +640 -0
  36. package/UI_SYSTEM_GUIDELINES.md +0 -148
  37. package/dist/chunk-FT633NLJ.js +0 -1159
  38. package/dist/chunk-FT633NLJ.js.map +0 -1
  39. package/dist/chunk-NFSMZKML.js +0 -208
  40. package/dist/chunk-NFSMZKML.js.map +0 -1
@@ -1,148 +0,0 @@
1
- # Nextop UI System Guidelines
2
-
3
- This document is the shared component-library rulebook for
4
- `@nextop-os/ui-system`. Both `packages/ui/system/AGENTS.md` and the bundled
5
- `packages/ui/system/agent/nextop-ui-system` skill should point here before
6
- component extraction, reuse, metadata, or storyboard work.
7
-
8
- ## Role
9
-
10
- `@nextop-os/ui-system` owns host-agnostic UI foundations:
11
-
12
- - CSS tokens and theme styles
13
- - icon exports
14
- - shadcn-derived and Radix-backed base primitives
15
- - reusable business display components
16
- - component metadata and storyboard inventory
17
- - small utilities that directly support primitives
18
-
19
- It does not own business logic, app-specific workflows, daemon or Electron
20
- calls, routing, persistence, query/cache mutation, filesystem access, global
21
- store ownership, or workflow orchestration.
22
-
23
- ## Stable Public Imports
24
-
25
- Use only these public imports from consumers:
26
-
27
- - `@nextop-os/ui-system`
28
- - `@nextop-os/ui-system/components`
29
- - `@nextop-os/ui-system/metadata`
30
- - `@nextop-os/ui-system/icons`
31
- - `@nextop-os/ui-system/styles.css`
32
- - `@nextop-os/ui-system/utils`
33
-
34
- Do not import from `@nextop-os/ui-system/src/*` or per-file component paths.
35
- When a new export is needed, prefer an existing barrel before adding a new
36
- public subpath. If public exports change, update package exports and the
37
- UI-boundary check script together.
38
-
39
- ## Component Layers
40
-
41
- `base` components are low-level presentation or interaction primitives. Their
42
- public API should avoid domain nouns and focus on variants, refs, slots,
43
- children, class names, accessibility, and generic interaction.
44
-
45
- `business` components are reusable display surfaces for shared business
46
- concepts. They may expose domain display props such as workspace, file, task,
47
- agent, run, status, permission, labels, and callbacks. They must stay
48
- host-agnostic and side-effect-free.
49
-
50
- Business components should compose `base` primitives instead of recreating
51
- buttons, fields, dialogs, cards, icons, menus, or overlays.
52
-
53
- ## Primitive Acquisition
54
-
55
- Treat this package as the shared shadcn and Radix host package.
56
-
57
- - When a primitive exists in the shadcn registry, acquire it through shadcn CLI
58
- targeted at `packages/ui/system`.
59
- - Keep `components.json` and package aliases usable enough that CLI download
60
- remains the default path for shared primitives.
61
- - After CLI acquisition, limit edits to package-specific adaptation such as
62
- icon routing, import aliases, stable exports, token alignment, metadata, and
63
- boundary-check fixes.
64
-
65
- ## Visual And Token Rules
66
-
67
- - Keep CSS variables as the source of truth for token values.
68
- - Prefer semantic token names over raw palette leakage in public APIs.
69
- - Build primitives for a calm workbench shell, not for marketing-card
70
- theatrics.
71
- - Reusable packages outside `packages/ui/*` should consume
72
- `@nextop-os/ui-system` primitives and token-backed Tailwind utilities before
73
- adding package-local CSS.
74
- - If repeated package-local CSS needs emerge, move the shared foundation into
75
- `@nextop-os/ui-system`.
76
-
77
- ## Metadata And Storyboard
78
-
79
- Every public UI-system component, icon, utility, or style entry must have
80
- metadata with:
81
-
82
- - stable readable `id`
83
- - `layer` as `base` or `business`
84
- - `source` under `packages/ui/system/src`
85
- - stable public `from` entrypoint
86
-
87
- Keep component ids globally unique and kebab-case. Storyboard inventory should
88
- stay grouped by `Foundation`, `Base Components`, and `Business Components`.
89
- Visible component stories should support copying the component id.
90
-
91
- For business components, add storyboard examples for normal, empty, disabled,
92
- loading, and error-like states when those states exist in the public contract.
93
-
94
- ## Promotion Checklist
95
-
96
- Before promoting local UI into this package, scan the source usage and create a
97
- preflight state preview:
98
-
99
- - inspect the source component, call sites, conditional rendering, props, types,
100
- tests, mocks, and relevant i18n keys
101
- - build a state matrix from code evidence; for each state, record the state
102
- name, source file or branch, props or data needed, host-owned behavior, and
103
- whether it belongs in the shared component contract
104
- - generate a temporary preview outside the repository, such as under
105
- `$TMPDIR/nextop-ui-system-preview-<component-id>/`
106
- - start the UI-system dev server with
107
- `pnpm --filter @nextop-os/ui-system dev:server`, or verify an existing server
108
- by probing `/health`
109
- - configure the temporary Vite preview with
110
- `nextopUISystemDev({ serverUrl })` from `@nextop-os/ui-system/dev-vite`
111
- instead of hardcoding checkout paths
112
- - import UI-system components, icons, styles, and utilities through stable
113
- public entrypoints; use the local state matrix file or `/components` for
114
- metadata context
115
- - render all candidate states in that preview using a draft component or copied
116
- visual surface
117
- - start a local preview URL and get user confirmation before writing the
118
- component into `packages/ui/system`
119
-
120
- Do not put draft preview files in the Nextop checkout. The temporary preview is
121
- a visual review gate, not part of the package source.
122
-
123
- Before promotion, identify:
124
-
125
- - component `id` and `layer`
126
- - source usage being replaced
127
- - intended reuse surfaces
128
- - public props and callbacks
129
- - host-owned state and side effects that remain outside the component
130
- - state matrix summary and temporary preview URL
131
- - export path, metadata entry, storyboard states, and validation commands
132
-
133
- Prefer existing metadata entries before creating a component. Replace only the
134
- visual surface with stable UI-system imports; keep host state, data loading,
135
- routing, daemon calls, i18n keys, and business transforms in the caller.
136
-
137
- ## Validation
138
-
139
- Run the smallest relevant checks and report exact commands and results:
140
-
141
- ```bash
142
- node tools/scripts/check-ui-metadata.mjs
143
- pnpm check:ui-boundaries
144
- pnpm --filter @nextop-os/ui-storyboard typecheck
145
- ```
146
-
147
- If runtime component code changed, also run the relevant package typecheck or
148
- build for the consumer that was migrated.