@fldr/ui 0.3.1 → 0.3.3
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/CHANGELOG.md +28 -28
- package/THEMING.md +88 -0
- package/ai/component-registry.json +0 -2
- package/ai/component-registry.md +2 -2
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +18 -18
- package/dist/catalog.d.ts +1 -1
- package/dist/chunks/{dropdown-m5a8nwer5hpvnkfk.js → dropdown-fhgq30b9vhvnfs7y.js} +1 -1
- package/dist/chunks/{layer-dialog-ejtz9s7bbfhjk1md.js → layer-dialog-i5nklzokbe9hdt84.js} +1 -1
- package/dist/chunks/{pagination-lmogkvvtu19mnr7f.js → pagination-f51ruwvphw2urykm.js} +1 -1
- package/dist/chunks/{select-lnekz415wm4v6d6m.js → select-ji2rbk6l2ed7ts4c.js} +1 -1
- package/dist/components/clipboard-text.d.ts +1 -1
- package/dist/components/code.d.ts +1 -1
- package/dist/components/code.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.d.ts +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/layer-dialog.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/registry.d.ts +1 -1
- package/dist/styles/kumo-standalone.css +1 -1
- package/package.json +62 -1
- package/scripts/component-registry/index.ts +1 -1
- package/scripts/publish-fldr.ts +22 -104
- /package/dist/chunks/{code-hp2x28uiufmk3elz.js → code-jtbk2mo5hmdbk8bu.js} +0 -0
- /package/dist/{index-pjdgauIH.d.ts → index-B6JNUfG9.d.ts} +0 -0
- /package/dist/{index-ClS-eFxE.d.ts → index-B6Wo_iiN.d.ts} +0 -0
- /package/dist/{index-CReGk3Dc.d.ts → index-DHj_enN9.d.ts} +0 -0
- /package/dist/{index-CNL6VDYZ.d.ts → index-Dsbm8Gcm.d.ts} +0 -0
- /package/dist/{index-BD-gTiEv.d.ts → index-kSN0sS2W.d.ts} +0 -0
- /package/dist/{types-CdzJnnIl.d.ts → types-CBwdSmf-.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fldr/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "fldr's design system: Cloudflare Kumo with a theme authoring API and PandaCSS preset",
|
|
6
6
|
"keywords": [
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"templates",
|
|
29
29
|
"scripts",
|
|
30
30
|
"README.md",
|
|
31
|
+
"THEMING.md",
|
|
31
32
|
"LICENSE",
|
|
32
33
|
"CHANGELOG.md"
|
|
33
34
|
],
|
|
@@ -466,6 +467,40 @@
|
|
|
466
467
|
"react-day-picker": "^9.13.2",
|
|
467
468
|
"use-sync-external-store": "^1.6.0"
|
|
468
469
|
},
|
|
470
|
+
"devDependencies": {
|
|
471
|
+
"@arethetypeswrong/core": "^0.18.5",
|
|
472
|
+
"@oxlint/plugins": "=1.73.0",
|
|
473
|
+
"@tailwindcss/cli": "^4.1.17",
|
|
474
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
475
|
+
"@testing-library/react": "16.3.1",
|
|
476
|
+
"@testing-library/user-event": "14.6.1",
|
|
477
|
+
"@types/d3-geo": "^3.1.0",
|
|
478
|
+
"@types/glob": "9.0.0",
|
|
479
|
+
"@types/node": "^22.10.2",
|
|
480
|
+
"@types/react": "19.2.4",
|
|
481
|
+
"@types/react-dom": "19.2.3",
|
|
482
|
+
"@types/svg-path-parser": "^1.1.6",
|
|
483
|
+
"@vitejs/plugin-react": "~6.0.3",
|
|
484
|
+
"@vitest/browser-playwright": "4.1.10",
|
|
485
|
+
"@vitest/ui": "4.1.10",
|
|
486
|
+
"esbuild": "0.27.2",
|
|
487
|
+
"glob": "13.0.0",
|
|
488
|
+
"happy-dom": "^20.8.8",
|
|
489
|
+
"playwright": "^1.57.0",
|
|
490
|
+
"plop": "4.0.4",
|
|
491
|
+
"publint": "^0.3.21",
|
|
492
|
+
"svg-path-parser": "^1.1.0",
|
|
493
|
+
"tailwindcss": "^4.1.17",
|
|
494
|
+
"ts-json-schema-generator": "2.4.0",
|
|
495
|
+
"tsx": "^4.19.2",
|
|
496
|
+
"typescript": "^5.9.2",
|
|
497
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
|
|
498
|
+
"vite-plus": "0.3.1",
|
|
499
|
+
"vitest": "4.1.10",
|
|
500
|
+
"vitest-browser-react": "^2.0.5",
|
|
501
|
+
"wrangler": "4.127.1",
|
|
502
|
+
"zod": "^4.0.0"
|
|
503
|
+
},
|
|
469
504
|
"peerDependencies": {
|
|
470
505
|
"@phosphor-icons/react": "^2.1.10",
|
|
471
506
|
"echarts": "^6.0.0",
|
|
@@ -480,5 +515,31 @@
|
|
|
480
515
|
"echarts": {
|
|
481
516
|
"optional": true
|
|
482
517
|
}
|
|
518
|
+
},
|
|
519
|
+
"scripts": {
|
|
520
|
+
"build": "pnpm run codegen:registry && tsx scripts/css-build.ts && vp pack && tsx src/command-line/build-cli.ts",
|
|
521
|
+
"dev": "vp pack --watch",
|
|
522
|
+
"new:component": "plop component",
|
|
523
|
+
"clean": "rm -rf dist",
|
|
524
|
+
"codegen": "pnpm run codegen:primitives && pnpm run codegen:themes && pnpm run codegen:registry",
|
|
525
|
+
"publish:fldr": "tsx scripts/publish-fldr.ts",
|
|
526
|
+
"codegen:themes": "tsx scripts/theme-generator/index.ts",
|
|
527
|
+
"migrate:tokens": "tsx scripts/theme-generator/migrate.ts",
|
|
528
|
+
"codegen:primitives": "tsx scripts/generate-primitives.ts",
|
|
529
|
+
"codegen:registry": "pnpm --filter @cloudflare/kumo-docs-astro codegen:demos && tsx scripts/component-registry/index.ts",
|
|
530
|
+
"lint": "pnpm run lint:oxlint",
|
|
531
|
+
"lint:oxlint": "vp lint src/",
|
|
532
|
+
"test": "CI=true vp test run --project=unit",
|
|
533
|
+
"test:ui": "vp test --ui",
|
|
534
|
+
"test:run": "vp test run",
|
|
535
|
+
"test:unit": "vp test run --project=unit",
|
|
536
|
+
"test:coverage": "vp test run --coverage",
|
|
537
|
+
"test:exports": "vp test run --project=unit tests/imports/export-path-validation.test.ts",
|
|
538
|
+
"test:watch": "vp test run --project=unit --watch",
|
|
539
|
+
"typecheck": "tsc --noEmit",
|
|
540
|
+
"validate:build": "vp test run --project=unit tests/imports/export-path-validation.test.ts",
|
|
541
|
+
"validate:changeset": "tsx ../../ci/scripts/validate-kumo-changeset.ts",
|
|
542
|
+
"test:browser": "vp test --config=vitest.browser.config.ts",
|
|
543
|
+
"test:visual-contracts": "vp test run --config=vitest.visual-contracts.config.ts"
|
|
483
544
|
}
|
|
484
545
|
}
|
|
@@ -103,7 +103,7 @@ function loadDemoExamples(): Map<string, { aiExamples: string[] }> {
|
|
|
103
103
|
`Warning: demo-metadata.json not found at ${demoMetadataPath}`,
|
|
104
104
|
);
|
|
105
105
|
console.warn(
|
|
106
|
-
"Run 'pnpm --filter @
|
|
106
|
+
"Run 'pnpm --filter @cloudflare/kumo-docs-astro codegen:demos' first",
|
|
107
107
|
);
|
|
108
108
|
return new Map();
|
|
109
109
|
}
|
package/scripts/publish-fldr.ts
CHANGED
|
@@ -1,130 +1,48 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Publish the
|
|
3
|
-
*
|
|
4
|
-
* The repo keeps the upstream name (@fldr/ui) so merges from
|
|
5
|
-
* cloudflare/kumo stay clean. This stages the publishable files, renames the
|
|
6
|
-
* package (and its self-references in docs and the CLI), and publishes from
|
|
7
|
-
* the staging dir.
|
|
2
|
+
* Publish @fldr/ui to npm. Sets the version, publishes, then restores package.json.
|
|
8
3
|
*
|
|
9
4
|
* pnpm build
|
|
10
|
-
* pnpm publish:fldr
|
|
11
|
-
* pnpm publish:fldr 0.
|
|
12
|
-
* pnpm publish:fldr patch # latest on npm + 0.0.1
|
|
5
|
+
* pnpm publish:fldr patch --dry-run # latest on npm + 0.0.1
|
|
6
|
+
* pnpm publish:fldr 0.4.0
|
|
13
7
|
*/
|
|
14
8
|
import { spawnSync } from "node:child_process";
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
existsSync,
|
|
18
|
-
mkdtempSync,
|
|
19
|
-
readFileSync,
|
|
20
|
-
readdirSync,
|
|
21
|
-
statSync,
|
|
22
|
-
writeFileSync,
|
|
23
|
-
} from "node:fs";
|
|
24
|
-
import { tmpdir } from "node:os";
|
|
25
|
-
import { extname, join, resolve } from "node:path";
|
|
9
|
+
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { join, resolve } from "node:path";
|
|
26
11
|
import { fileURLToPath } from "node:url";
|
|
27
12
|
|
|
28
|
-
const NAME = "@fldr/ui";
|
|
29
|
-
const UPSTREAM_NAME = "@fldr/ui";
|
|
30
|
-
const TEXT_EXTENSIONS = new Set([
|
|
31
|
-
".js",
|
|
32
|
-
".mjs",
|
|
33
|
-
".cjs",
|
|
34
|
-
".ts",
|
|
35
|
-
".mts",
|
|
36
|
-
".json",
|
|
37
|
-
".md",
|
|
38
|
-
".css",
|
|
39
|
-
".txt",
|
|
40
|
-
]);
|
|
41
|
-
|
|
42
13
|
const pkgDir = resolve(fileURLToPath(import.meta.url), "../..");
|
|
14
|
+
const pkgPath = join(pkgDir, "package.json");
|
|
15
|
+
const original = readFileSync(pkgPath, "utf8");
|
|
16
|
+
const pkg = JSON.parse(original) as { name: string; version: string };
|
|
17
|
+
|
|
43
18
|
const args = process.argv.slice(2);
|
|
44
19
|
const requested = args.find((arg) => !arg.startsWith("-"));
|
|
45
|
-
const version = requested === "patch" ? await nextPatch() : requested;
|
|
46
20
|
const dryRun = args.includes("--dry-run");
|
|
47
|
-
const otp = args.find((arg) => arg.startsWith("--otp="));
|
|
48
|
-
|
|
49
|
-
if (!version || !/^\d+\.\d+\.\d+(-[\w.]+)?$/.test(version)) {
|
|
50
|
-
console.error("Usage: pnpm publish:fldr <version|patch> [--dry-run]");
|
|
51
|
-
process.exit(1);
|
|
52
|
-
}
|
|
53
|
-
if (!existsSync(join(pkgDir, "dist/index.js"))) {
|
|
54
|
-
console.error("dist/ is missing. Run `pnpm build` first.");
|
|
55
|
-
process.exit(1);
|
|
56
|
-
}
|
|
57
21
|
|
|
58
22
|
async function nextPatch(): Promise<string> {
|
|
59
|
-
const res = await fetch(`https://registry.npmjs.org/${
|
|
23
|
+
const res = await fetch(`https://registry.npmjs.org/${pkg.name}/latest`);
|
|
60
24
|
if (!res.ok) throw new Error(`npm registry: ${res.status}`);
|
|
61
25
|
const { version: latest } = (await res.json()) as { version: string };
|
|
62
26
|
const [major, minor, patch] = latest.split("-")[0].split(".").map(Number);
|
|
63
27
|
return `${major}.${minor}.${patch + 1}`;
|
|
64
28
|
}
|
|
65
29
|
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const src = join(pkgDir, entry);
|
|
71
|
-
if (existsSync(src)) cpSync(src, join(stage, entry), { recursive: true });
|
|
30
|
+
const version = requested === "patch" ? await nextPatch() : requested;
|
|
31
|
+
if (!version || !/^\d+\.\d+\.\d+(-[\w.]+)?$/.test(version)) {
|
|
32
|
+
console.error("Usage: pnpm publish:fldr <version|patch> [--dry-run]");
|
|
33
|
+
process.exit(1);
|
|
72
34
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
function rewrite(dir: string) {
|
|
77
|
-
for (const name of readdirSync(dir)) {
|
|
78
|
-
const path = join(dir, name);
|
|
79
|
-
if (statSync(path).isDirectory()) {
|
|
80
|
-
rewrite(path);
|
|
81
|
-
} else if (TEXT_EXTENSIONS.has(extname(name))) {
|
|
82
|
-
const text = readFileSync(path, "utf8");
|
|
83
|
-
if (text.includes(UPSTREAM_NAME))
|
|
84
|
-
writeFileSync(path, text.replaceAll(UPSTREAM_NAME, NAME));
|
|
85
|
-
}
|
|
86
|
-
}
|
|
35
|
+
if (!existsSync(join(pkgDir, "dist/index.js"))) {
|
|
36
|
+
console.error("dist/ is missing. Run `pnpm build` first.");
|
|
37
|
+
process.exit(1);
|
|
87
38
|
}
|
|
88
|
-
rewrite(stage);
|
|
89
|
-
|
|
90
|
-
const { scripts: _scripts, devDependencies: _dev, ...rest } = pkg;
|
|
91
|
-
const published = {
|
|
92
|
-
...rest,
|
|
93
|
-
name: NAME,
|
|
94
|
-
version,
|
|
95
|
-
description:
|
|
96
|
-
"fldr's design system: Cloudflare Kumo with a theme authoring API and PandaCSS preset",
|
|
97
|
-
keywords: [
|
|
98
|
-
"fldr",
|
|
99
|
-
"kumo",
|
|
100
|
-
"components",
|
|
101
|
-
"design-system",
|
|
102
|
-
"react",
|
|
103
|
-
"ui",
|
|
104
|
-
"pandacss",
|
|
105
|
-
],
|
|
106
|
-
repository: {
|
|
107
|
-
type: "git",
|
|
108
|
-
url: "git+https://github.com/mergd/fldr-ui.git",
|
|
109
|
-
directory: "packages/kumo",
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
writeFileSync(
|
|
113
|
-
join(stage, "package.json"),
|
|
114
|
-
`${JSON.stringify(published, null, 2)}\n`,
|
|
115
|
-
);
|
|
116
39
|
|
|
117
|
-
|
|
40
|
+
writeFileSync(pkgPath, original.replace(`"version": "${pkg.version}"`, `"version": "${version}"`));
|
|
41
|
+
console.log(`Publishing ${pkg.name}@${version}`);
|
|
118
42
|
const result = spawnSync(
|
|
119
43
|
"pnpm",
|
|
120
|
-
[
|
|
121
|
-
|
|
122
|
-
"--access",
|
|
123
|
-
"public",
|
|
124
|
-
"--no-git-checks",
|
|
125
|
-
...(dryRun ? ["--dry-run"] : []),
|
|
126
|
-
...(otp ? [otp] : []),
|
|
127
|
-
],
|
|
128
|
-
{ cwd: stage, stdio: "inherit" },
|
|
44
|
+
["publish", "--access", "public", "--no-git-checks", "--ignore-scripts", ...(dryRun ? ["--dry-run"] : [])],
|
|
45
|
+
{ cwd: pkgDir, stdio: "inherit" },
|
|
129
46
|
);
|
|
47
|
+
writeFileSync(pkgPath, original);
|
|
130
48
|
process.exit(result.status ?? 1);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|