@primebrick/ui 0.0.0-stage → 3.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Michael Sogos
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 CHANGED
@@ -1,3 +1,37 @@
1
- # Temporary Holding Version
1
+ # @primebrick/ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared Svelte 5 component library for Primebrick v3 — components, composables,
4
+ primitives and utilities consumed by the core frontend app and remote module
5
+ pages.
6
+
7
+ Distributed via `svelte-package`: `src/lib` ships as `.svelte` sources +
8
+ `.d.ts` — consumers compile with their own Svelte 5 compiler (remote ESM module
9
+ pages bundle their own copy; rune state is bundle-local by design).
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ pnpm add @primebrick/ui
15
+ ```
16
+
17
+ Requires `svelte ^5` (peer dependency).
18
+
19
+ ## Usage
20
+
21
+ ```ts
22
+ import { cn, type WithElementRef } from "@primebrick/ui";
23
+ ```
24
+
25
+ ## Contents (v3.0.0 — bootstrap)
26
+
27
+ | Export | Purpose |
28
+ |--------|---------|
29
+ | `cn` | `clsx` + `tailwind-merge` class combiner |
30
+ | `WithoutChild` / `WithoutChildren` / `WithoutChildrenOrChild` / `WithElementRef` | prop-helper types for component composition |
31
+
32
+ Components migrate here from `primebrick-fe-v3` as the shared-library extraction
33
+ lands (entity list system, ui primitives, composables).
34
+
35
+ ## License
36
+
37
+ MIT — see [LICENSE](./LICENSE).
@@ -0,0 +1,3 @@
1
+ export * from '@primebrick/core';
2
+ export * from './utils/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAEA,cAAc,kBAAkB,CAAC;AAEjC,cAAc,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+ // Canonical shared contracts — re-exported so the FE (and remote module
2
+ // pages) get entity-meta/list/decimal types through this package.
3
+ export * from '@primebrick/core';
4
+ export * from './utils/index.js';
@@ -0,0 +1,4 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /** Merge conditional class names with Tailwind-conflict resolution. */
3
+ export declare function cn(...inputs: ClassValue[]): string;
4
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/lib/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAC;AAG7C,uEAAuE;AACvE,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,6 @@
1
+ import { clsx } from 'clsx';
2
+ import { twMerge } from 'tailwind-merge';
3
+ /** Merge conditional class names with Tailwind-conflict resolution. */
4
+ export function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
@@ -0,0 +1,3 @@
1
+ export { cn } from './cn.js';
2
+ export type { WithoutChild, WithoutChildren, WithoutChildrenOrChild, WithElementRef, } from './types.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,YAAY,EACX,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,cAAc,GACd,MAAM,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export { cn } from './cn.js';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Component-prop helper types shared by every ui component.
3
+ * Mirror of the FE conventions (shadcn-svelte lineage).
4
+ */
5
+ /** Props minus a `child` field — used by as-child composition patterns. */
6
+ export type WithoutChild<T> = T extends {
7
+ child?: unknown;
8
+ } ? Omit<T, 'child'> : T;
9
+ /** Props minus `children`. */
10
+ export type WithoutChildren<T> = T extends {
11
+ children?: unknown;
12
+ } ? Omit<T, 'children'> : T;
13
+ /** Props minus both `children` and `child`. */
14
+ export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
15
+ /** Props extended with a bindable element `ref`. */
16
+ export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & {
17
+ ref?: U | null;
18
+ };
19
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/utils/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2EAA2E;AAC3E,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AAEnF,8BAA8B;AAC9B,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;AAE5F,+CAA+C;AAC/C,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzE,oDAAoD;AACpD,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,WAAW,GAAG,WAAW,IAAI,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Component-prop helper types shared by every ui component.
3
+ * Mirror of the FE conventions (shadcn-svelte lineage).
4
+ */
5
+ export {};
package/package.json CHANGED
@@ -1,6 +1,73 @@
1
1
  {
2
2
  "name": "@primebrick/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "3.0.0",
4
+ "description": "Shared Svelte 5 component library for Primebrick v3 — reusable components, composables, primitives and utilities consumed by the core frontend app and remote module pages.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "engines": {
8
+ "node": "24"
9
+ },
10
+ "author": "Michael Sogos",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/michaelsogos/primebrick-v3-ui.git"
14
+ },
15
+ "homepage": "https://github.com/michaelsogos/primebrick-v3-ui#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/michaelsogos/primebrick-v3-ui/issues"
18
+ },
19
+ "svelte": "./dist/index.js",
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "svelte": "./dist/index.js",
26
+ "default": "./dist/index.js"
27
+ },
28
+ "./utils": {
29
+ "types": "./dist/utils/index.d.ts",
30
+ "svelte": "./dist/utils/index.js",
31
+ "default": "./dist/utils/index.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist/"
36
+ ],
37
+ "scripts": {
38
+ "version:auto": "node scripts/version-sync.mjs",
39
+ "prebuild": "node scripts/version-sync.mjs && pnpm check:standards && pnpm extract-docs",
40
+ "build": "svelte-package",
41
+ "prepare": "svelte-package",
42
+ "test": "pnpm check:standards && vitest run",
43
+ "test:watch": "vitest",
44
+ "check": "svelte-check --tsconfig tsconfig.json",
45
+ "extract-docs": "node scripts/extract-component-docs.mjs",
46
+ "check:standards": "node tools/check-standards.ts src --profile=lib"
47
+ },
48
+ "peerDependencies": {
49
+ "svelte": "^5.56.4"
50
+ },
51
+ "dependencies": {
52
+ "@primebrick/core": "3.0.0",
53
+ "clsx": "2.1.1",
54
+ "tailwind-merge": "3.6.0"
55
+ },
56
+ "devDependencies": {
57
+ "@sveltejs/package": "3.0.0",
58
+ "@sveltejs/vite-plugin-svelte": "7.2.0",
59
+ "@tsconfig/svelte": "5.0.8",
60
+ "@types/node": "24.13.3",
61
+ "svelte": "5.56.4",
62
+ "svelte-check": "4.7.2",
63
+ "sveld": "0.36.0",
64
+ "typescript": "6.0.3",
65
+ "vite": "8.1.5",
66
+ "vitest": "4.1.10"
67
+ },
68
+ "publishConfig": {
69
+ "access": "public",
70
+ "registry": "https://registry.npmjs.org"
71
+ },
72
+ "packageManager": "pnpm@9.15.9"
73
+ }