@lssm-tech/lib.ui-kit-core 3.8.9 → 6.0.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.
- package/README.md +50 -7
- package/package.json +706 -88
- package/dist/browser/index.js +0 -1
- package/dist/browser/interfaces/collections.js +0 -0
- package/dist/browser/interfaces/common.js +0 -0
- package/dist/browser/interfaces/feedback.js +0 -0
- package/dist/browser/interfaces/forms.js +0 -0
- package/dist/browser/interfaces/index.js +0 -1
- package/dist/browser/interfaces/layout.js +0 -0
- package/dist/browser/interfaces/marketing.js +0 -0
- package/dist/browser/interfaces/registry.js +0 -1
- package/dist/browser/interfaces/visualization.js +0 -0
- package/dist/browser/ui-kit-core.feature.js +0 -1
- package/dist/browser/utils.js +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -2
- package/dist/interfaces/collections.d.ts +0 -102
- package/dist/interfaces/collections.js +0 -1
- package/dist/interfaces/common.d.ts +0 -30
- package/dist/interfaces/common.js +0 -1
- package/dist/interfaces/feedback.d.ts +0 -29
- package/dist/interfaces/feedback.js +0 -1
- package/dist/interfaces/forms.d.ts +0 -66
- package/dist/interfaces/forms.js +0 -1
- package/dist/interfaces/index.d.ts +0 -8
- package/dist/interfaces/index.js +0 -2
- package/dist/interfaces/layout.d.ts +0 -17
- package/dist/interfaces/layout.js +0 -1
- package/dist/interfaces/marketing.d.ts +0 -26
- package/dist/interfaces/marketing.js +0 -1
- package/dist/interfaces/registry.d.ts +0 -2
- package/dist/interfaces/registry.js +0 -2
- package/dist/interfaces/visualization.d.ts +0 -7
- package/dist/interfaces/visualization.js +0 -1
- package/dist/ui-kit-core.feature.d.ts +0 -1
- package/dist/ui-kit-core.feature.js +0 -2
- package/dist/utils.d.ts +0 -2
- package/dist/utils.js +0 -2
package/README.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @lssm-tech/lib.ui-kit-core
|
|
2
2
|
|
|
3
|
-
`@
|
|
3
|
+
`@lssm-tech/lib.ui-kit-core` is the shared foundation for the UI packages. It provides the low-level `cn()` utility plus the canonical shared interface layer used by `ui-kit` and `ui-kit-web`.
|
|
4
4
|
|
|
5
5
|
Website: https://contractspec.io
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
`bun add @
|
|
9
|
+
`bun add @lssm-tech/lib.ui-kit-core`
|
|
10
10
|
|
|
11
11
|
or
|
|
12
12
|
|
|
13
|
-
`npm install @
|
|
13
|
+
`npm install @lssm-tech/lib.ui-kit-core`
|
|
14
14
|
|
|
15
15
|
## What belongs here
|
|
16
16
|
|
|
@@ -25,16 +25,47 @@ This package is intentionally small:
|
|
|
25
25
|
- root export: `.`
|
|
26
26
|
- shared interfaces subpath: `./interfaces`
|
|
27
27
|
- utility subpath: `./utils`
|
|
28
|
+
- command theme class contract: `./command-theme`
|
|
28
29
|
- core function: `cn(...inputs)`
|
|
29
30
|
|
|
30
31
|
## Operational semantics and gotchas
|
|
31
32
|
|
|
32
33
|
- This package is intentionally tiny.
|
|
33
34
|
- `./interfaces` is the shared compatibility layer for semantically matching `ui-kit` and `ui-kit-web` exports.
|
|
35
|
+
- `./command-theme` is a narrow shared class contract for command palette/search-trigger color states. It exists only to keep native, web, and design-system command surfaces aligned on semantic theme tokens; it is not a general design-token bucket.
|
|
34
36
|
- `cn()` composes `clsx` with `tailwind-merge`.
|
|
35
37
|
- Changes here ripple into all UI packages even though the file count is small.
|
|
36
38
|
- This package should stay boring and predictable.
|
|
37
39
|
|
|
40
|
+
## Compatibility guard
|
|
41
|
+
|
|
42
|
+
`ui-kit-core` also owns the registry used to compare the native and web UI kit lanes. Run the repo-level guard before adding or changing shared `./ui/*` surfaces:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
bun run ui-kit:compat
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The guard compares `packages/libs/ui-kit` and `packages/libs/ui-kit-web` exported `./ui/*` subpaths, exported symbols, and shared prop-shape contracts. Existing drift is recorded in `scripts/ui-kit-compatibility-baseline.json`; new drift should be fixed or deliberately accepted by refreshing that baseline in the same reviewed change. Shared component contracts should be declared here first under `./interfaces`, then consumed from both UI kit packages.
|
|
49
|
+
|
|
50
|
+
## Layout contract split
|
|
51
|
+
|
|
52
|
+
`./interfaces` separates neutral wrapper semantics from directional stack
|
|
53
|
+
semantics so the web and native lanes can migrate `Box` safely:
|
|
54
|
+
|
|
55
|
+
- `SharedBoxProps` is the shared semantic wrapper contract. It intentionally
|
|
56
|
+
carries only `className` today; consumers should not depend on `Box` for flex
|
|
57
|
+
direction, default gap, or default alignment.
|
|
58
|
+
- `SharedFlexStackProps` owns the cross-platform stack subset:
|
|
59
|
+
`gap`, `align`, `justify`, and `wrap`.
|
|
60
|
+
- `HStack` and `VStack` should consume `SharedFlexStackProps`; new shared UI
|
|
61
|
+
should pick one of them whenever direction matters.
|
|
62
|
+
- `SharedStackProps` remains exported for compatibility while the staged Box
|
|
63
|
+
neutral-default migration is underway.
|
|
64
|
+
|
|
65
|
+
Changing `gap`, `align`, `justify`, `wrap`, `as`, or the Box/stack split is a
|
|
66
|
+
public compatibility decision. Update package docs, release capsules, and guard
|
|
67
|
+
evidence in the same reviewed change.
|
|
68
|
+
|
|
38
69
|
## When not to use this package
|
|
39
70
|
|
|
40
71
|
- Do not use it for components.
|
|
@@ -43,11 +74,23 @@ This package is intentionally small:
|
|
|
43
74
|
|
|
44
75
|
## Related packages
|
|
45
76
|
|
|
46
|
-
- `@
|
|
47
|
-
- `@
|
|
48
|
-
- `@
|
|
77
|
+
- `@lssm-tech/lib.ui-kit`
|
|
78
|
+
- `@lssm-tech/lib.ui-kit-web`
|
|
79
|
+
- `@lssm-tech/lib.ui-link`
|
|
49
80
|
|
|
50
81
|
## Local commands
|
|
51
82
|
|
|
52
83
|
- `bun run lint:check`
|
|
53
84
|
- `bun run typecheck`
|
|
85
|
+
|
|
86
|
+
## Graph & Timeline Primitives
|
|
87
|
+
|
|
88
|
+
`@lssm-tech/lib.ui-kit-core` now exports platform-agnostic graph and timeline hooks and interfaces — pure TypeScript, no React or react-native imports.
|
|
89
|
+
|
|
90
|
+
**Hooks**: `useGraphFilter`, `useGraphLayout`, `useGraphSelection`, `useAdaptiveGraphRenderer`, `useTimelineRange`, `useTimelineZoom`
|
|
91
|
+
|
|
92
|
+
**Interfaces**: `GraphNode`, `GraphEdge`, `GraphSelection`, `GraphCanvasProps`, `TimelineEvent`, `TimelineRange`, `TimelineProps`, `TimelineGraphProps`, `GraphLayoutKind`
|
|
93
|
+
|
|
94
|
+
`useAdaptiveGraphRenderer` returns `"svg"` or `"reactflow"` based on a bounded node/edge threshold (default 300 nodes / 500 edges), enabling lazy-loading of `GraphCanvasAdvanced` in the web lane.
|
|
95
|
+
|
|
96
|
+
See [AGENTS.md](./AGENTS.md#graph--timeline-primitives) for full details.
|