@happyvertical/smrt-playground 0.30.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.
Files changed (43) hide show
  1. package/AGENTS.md +46 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +7 -0
  4. package/README.md +46 -0
  5. package/dist/chunks/discovery-C0r-nDQB.js +177 -0
  6. package/dist/chunks/discovery-C0r-nDQB.js.map +1 -0
  7. package/dist/chunks/runtime-BtfwY7PF.js +104 -0
  8. package/dist/chunks/runtime-BtfwY7PF.js.map +1 -0
  9. package/dist/discovery.d.ts +10 -0
  10. package/dist/discovery.d.ts.map +1 -0
  11. package/dist/index.d.ts +5 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +67 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/runtime.d.ts +6 -0
  16. package/dist/runtime.d.ts.map +1 -0
  17. package/dist/runtime.js +8 -0
  18. package/dist/runtime.js.map +1 -0
  19. package/dist/svelte/PlaygroundHost.svelte +563 -0
  20. package/dist/svelte/PlaygroundHost.svelte.d.ts +11 -0
  21. package/dist/svelte/PlaygroundHost.svelte.d.ts.map +1 -0
  22. package/dist/svelte/index.d.ts +2 -0
  23. package/dist/svelte/index.d.ts.map +1 -0
  24. package/dist/svelte/index.js +1 -0
  25. package/dist/svelte/runtime.d.ts +2 -0
  26. package/dist/svelte/runtime.d.ts.map +1 -0
  27. package/dist/svelte/runtime.js +1 -0
  28. package/dist/svelte/types.d.ts +2 -0
  29. package/dist/svelte/types.d.ts.map +1 -0
  30. package/dist/svelte/types.js +1 -0
  31. package/dist/templates.d.ts +4 -0
  32. package/dist/templates.d.ts.map +1 -0
  33. package/dist/types.d.ts +76 -0
  34. package/dist/types.d.ts.map +1 -0
  35. package/dist/types.js +2 -0
  36. package/dist/types.js.map +1 -0
  37. package/dist/utils.d.ts +4 -0
  38. package/dist/utils.d.ts.map +1 -0
  39. package/dist/vite.d.ts +6 -0
  40. package/dist/vite.d.ts.map +1 -0
  41. package/dist/vite.js +115 -0
  42. package/dist/vite.js.map +1 -0
  43. package/package.json +76 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAC9D,MAAM,MAAM,yBAAyB,GACjC,uBAAuB,GACvB;IACE,OAAO,EAAE,uBAAuB,CAAC;CAClC,CAAC;AACN,MAAM,MAAM,yBAAyB,GACnC,MAAM,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE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AAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare function titleCase(value: string): string;
2
+ export declare function displayNameForSmrtPackage(packageName: string): string;
3
+ export declare function displayNameForScopedPackage(packageName: string): string;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAM/C;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEvE"}
package/dist/vite.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Plugin } from 'vite';
2
+ import { SmrtPlaygroundVitePluginOptions } from './types.js';
3
+ declare const VIRTUAL_PLAYGROUND_MODULE_ID = "virtual:smrt-playground/modules";
4
+ export declare function smrtPlaygroundVitePlugin(options?: SmrtPlaygroundVitePluginOptions): Plugin;
5
+ export { VIRTUAL_PLAYGROUND_MODULE_ID };
6
+ //# sourceMappingURL=vite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.d.ts","sourceRoot":"","sources":["../src/vite.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AAMlD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAElE,QAAA,MAAM,4BAA4B,oCAAoC,CAAC;AA2EvE,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,MAAM,CAiER;AAED,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
package/dist/vite.js ADDED
@@ -0,0 +1,115 @@
1
+ import { existsSync } from "node:fs";
2
+ import { resolve, isAbsolute } from "node:path";
3
+ import fg from "fast-glob";
4
+ import { normalizePath } from "vite";
5
+ import { a as detectPlaygroundMode, g as findWorkspaceRoot, b as discoverInstalledPlaygrounds } from "./chunks/discovery-C0r-nDQB.js";
6
+ const VIRTUAL_PLAYGROUND_MODULE_ID = "virtual:smrt-playground/modules";
7
+ const RESOLVED_VIRTUAL_PLAYGROUND_MODULE_ID = `\0${VIRTUAL_PLAYGROUND_MODULE_ID}`;
8
+ function toViteImportSpecifier(specifier) {
9
+ if (!isAbsolute(specifier)) {
10
+ return specifier;
11
+ }
12
+ return `/@fs/${normalizePath(specifier)}`;
13
+ }
14
+ function buildVirtualModuleCode(specifiers) {
15
+ const imports = specifiers.map(
16
+ (specifier, index) => `import module${index} from ${JSON.stringify(toViteImportSpecifier(specifier))};`
17
+ ).join("\n");
18
+ const moduleList = specifiers.map((_, index) => `...toModules(module${index})`).join(", ");
19
+ return `${imports}
20
+
21
+ const toModules = (value) => {
22
+ if (!value) return [];
23
+ if (Array.isArray(value)) return value.filter(Boolean);
24
+ if (Array.isArray(value.modules)) return value.modules.filter(Boolean);
25
+ return [value];
26
+ };
27
+
28
+ export const playgroundModules = [${moduleList}].filter(Boolean);
29
+ export default playgroundModules;
30
+ `;
31
+ }
32
+ async function discoverWorkspaceSpecifiers(projectRoot, options) {
33
+ const workspaceRoot = options.workspaceRoot || findWorkspaceRoot(projectRoot);
34
+ if (!workspaceRoot) {
35
+ return [];
36
+ }
37
+ const matches = await fg(
38
+ options.packagesPattern || "packages/*/src/svelte/playground.ts",
39
+ {
40
+ cwd: workspaceRoot,
41
+ absolute: true
42
+ }
43
+ );
44
+ return matches.sort().map((path) => normalizePath(path));
45
+ }
46
+ async function discoverConsumerSpecifiers(projectRoot, options) {
47
+ const installed = await discoverInstalledPlaygrounds(projectRoot);
48
+ const specifiers = installed.map((item) => item.importSpecifier);
49
+ const localPlayground = resolve(
50
+ projectRoot,
51
+ options.localPlaygroundPath || "src/playground.ts"
52
+ );
53
+ if (existsSync(localPlayground)) {
54
+ specifiers.push(normalizePath(localPlayground));
55
+ }
56
+ return specifiers;
57
+ }
58
+ function smrtPlaygroundVitePlugin(options = {}) {
59
+ let projectRoot = process.cwd();
60
+ return {
61
+ name: "smrt-playground-vite-plugin",
62
+ enforce: "pre",
63
+ configResolved(config) {
64
+ projectRoot = config.root ? resolve(config.root) : process.cwd();
65
+ },
66
+ resolveId(id) {
67
+ if (id === VIRTUAL_PLAYGROUND_MODULE_ID) {
68
+ return RESOLVED_VIRTUAL_PLAYGROUND_MODULE_ID;
69
+ }
70
+ return null;
71
+ },
72
+ async load(id) {
73
+ if (id !== RESOLVED_VIRTUAL_PLAYGROUND_MODULE_ID) {
74
+ return null;
75
+ }
76
+ const effectiveMode = options.mode === "auto" || !options.mode ? detectPlaygroundMode(projectRoot) : options.mode;
77
+ const specifiers = effectiveMode === "workspace" ? await discoverWorkspaceSpecifiers(projectRoot, options) : await discoverConsumerSpecifiers(projectRoot, options);
78
+ if (effectiveMode === "workspace") {
79
+ const workspaceRoot = options.workspaceRoot || findWorkspaceRoot(projectRoot);
80
+ if (workspaceRoot) {
81
+ const workspaceConfigPath = resolve(
82
+ workspaceRoot,
83
+ "pnpm-workspace.yaml"
84
+ );
85
+ if (existsSync(workspaceConfigPath)) {
86
+ this.addWatchFile(workspaceConfigPath);
87
+ }
88
+ }
89
+ } else {
90
+ const packageJsonPath = resolve(projectRoot, "package.json");
91
+ if (existsSync(packageJsonPath)) {
92
+ this.addWatchFile(packageJsonPath);
93
+ }
94
+ const localPlayground = resolve(
95
+ projectRoot,
96
+ options.localPlaygroundPath || "src/playground.ts"
97
+ );
98
+ if (existsSync(localPlayground)) {
99
+ this.addWatchFile(localPlayground);
100
+ }
101
+ }
102
+ for (const specifier of specifiers) {
103
+ if (isAbsolute(specifier)) {
104
+ this.addWatchFile(specifier);
105
+ }
106
+ }
107
+ return buildVirtualModuleCode(specifiers);
108
+ }
109
+ };
110
+ }
111
+ export {
112
+ VIRTUAL_PLAYGROUND_MODULE_ID,
113
+ smrtPlaygroundVitePlugin
114
+ };
115
+ //# sourceMappingURL=vite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite.js","sources":["../src/vite.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { isAbsolute, resolve } from 'node:path';\nimport fg from 'fast-glob';\nimport { normalizePath, type Plugin } from 'vite';\nimport {\n detectPlaygroundMode,\n discoverInstalledPlaygrounds,\n findWorkspaceRoot,\n} from './discovery.js';\nimport type { SmrtPlaygroundVitePluginOptions } from './types.js';\n\nconst VIRTUAL_PLAYGROUND_MODULE_ID = 'virtual:smrt-playground/modules';\nconst RESOLVED_VIRTUAL_PLAYGROUND_MODULE_ID = `\\0${VIRTUAL_PLAYGROUND_MODULE_ID}`;\n\nfunction toViteImportSpecifier(specifier: string): string {\n if (!isAbsolute(specifier)) {\n return specifier;\n }\n\n return `/@fs/${normalizePath(specifier)}`;\n}\n\nfunction buildVirtualModuleCode(specifiers: string[]): string {\n const imports = specifiers\n .map(\n (specifier, index) =>\n `import module${index} from ${JSON.stringify(toViteImportSpecifier(specifier))};`,\n )\n .join('\\n');\n\n const moduleList = specifiers\n .map((_, index) => `...toModules(module${index})`)\n .join(', ');\n\n return `${imports}\n\nconst toModules = (value) => {\n if (!value) return [];\n if (Array.isArray(value)) return value.filter(Boolean);\n if (Array.isArray(value.modules)) return value.modules.filter(Boolean);\n return [value];\n};\n\nexport const playgroundModules = [${moduleList}].filter(Boolean);\nexport default playgroundModules;\n`;\n}\n\nasync function discoverWorkspaceSpecifiers(\n projectRoot: string,\n options: SmrtPlaygroundVitePluginOptions,\n): Promise<string[]> {\n const workspaceRoot = options.workspaceRoot || findWorkspaceRoot(projectRoot);\n if (!workspaceRoot) {\n return [];\n }\n\n const matches = await fg(\n options.packagesPattern || 'packages/*/src/svelte/playground.ts',\n {\n cwd: workspaceRoot,\n absolute: true,\n },\n );\n\n return matches.sort().map((path) => normalizePath(path));\n}\n\nasync function discoverConsumerSpecifiers(\n projectRoot: string,\n options: SmrtPlaygroundVitePluginOptions,\n): Promise<string[]> {\n const installed = await discoverInstalledPlaygrounds(projectRoot);\n const specifiers = installed.map((item) => item.importSpecifier);\n const localPlayground = resolve(\n projectRoot,\n options.localPlaygroundPath || 'src/playground.ts',\n );\n\n if (existsSync(localPlayground)) {\n specifiers.push(normalizePath(localPlayground));\n }\n\n return specifiers;\n}\n\nexport function smrtPlaygroundVitePlugin(\n options: SmrtPlaygroundVitePluginOptions = {},\n): Plugin {\n let projectRoot = process.cwd();\n\n return {\n name: 'smrt-playground-vite-plugin',\n enforce: 'pre',\n configResolved(config) {\n projectRoot = config.root ? resolve(config.root) : process.cwd();\n },\n resolveId(id) {\n if (id === VIRTUAL_PLAYGROUND_MODULE_ID) {\n return RESOLVED_VIRTUAL_PLAYGROUND_MODULE_ID;\n }\n return null;\n },\n async load(id) {\n if (id !== RESOLVED_VIRTUAL_PLAYGROUND_MODULE_ID) {\n return null;\n }\n\n const effectiveMode =\n options.mode === 'auto' || !options.mode\n ? detectPlaygroundMode(projectRoot)\n : options.mode;\n\n const specifiers =\n effectiveMode === 'workspace'\n ? await discoverWorkspaceSpecifiers(projectRoot, options)\n : await discoverConsumerSpecifiers(projectRoot, options);\n\n if (effectiveMode === 'workspace') {\n const workspaceRoot =\n options.workspaceRoot || findWorkspaceRoot(projectRoot);\n if (workspaceRoot) {\n const workspaceConfigPath = resolve(\n workspaceRoot,\n 'pnpm-workspace.yaml',\n );\n if (existsSync(workspaceConfigPath)) {\n this.addWatchFile(workspaceConfigPath);\n }\n }\n } else {\n const packageJsonPath = resolve(projectRoot, 'package.json');\n if (existsSync(packageJsonPath)) {\n this.addWatchFile(packageJsonPath);\n }\n const localPlayground = resolve(\n projectRoot,\n options.localPlaygroundPath || 'src/playground.ts',\n );\n if (existsSync(localPlayground)) {\n this.addWatchFile(localPlayground);\n }\n }\n\n for (const specifier of specifiers) {\n if (isAbsolute(specifier)) {\n this.addWatchFile(specifier);\n }\n }\n\n return buildVirtualModuleCode(specifiers);\n },\n };\n}\n\nexport { VIRTUAL_PLAYGROUND_MODULE_ID };\n"],"names":[],"mappings":";;;;;AAWA,MAAM,+BAA+B;AACrC,MAAM,wCAAwC,KAAK,4BAA4B;AAE/E,SAAS,sBAAsB,WAA2B;AACxD,MAAI,CAAC,WAAW,SAAS,GAAG;AAC1B,WAAO;AAAA,EACT;AAEA,SAAO,QAAQ,cAAc,SAAS,CAAC;AACzC;AAEA,SAAS,uBAAuB,YAA8B;AAC5D,QAAM,UAAU,WACb;AAAA,IACC,CAAC,WAAW,UACV,gBAAgB,KAAK,SAAS,KAAK,UAAU,sBAAsB,SAAS,CAAC,CAAC;AAAA,EAAA,EAEjF,KAAK,IAAI;AAEZ,QAAM,aAAa,WAChB,IAAI,CAAC,GAAG,UAAU,sBAAsB,KAAK,GAAG,EAChD,KAAK,IAAI;AAEZ,SAAO,GAAG,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCASiB,UAAU;AAAA;AAAA;AAG9C;AAEA,eAAe,4BACb,aACA,SACmB;AACnB,QAAM,gBAAgB,QAAQ,iBAAiB,kBAAkB,WAAW;AAC5E,MAAI,CAAC,eAAe;AAClB,WAAO,CAAA;AAAA,EACT;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AK,aAAa,mBAAmB;AAAA,UACvC;AAAA,QACF;AAAA,MACF,OAAO;AACL,cAAM,kBAAkB,QAAQ,aAAa,cAAc;AAC3D,YAAI,WAAW,eAAe,GAAG;AAC/B,eAAK,aAAa,eAAe;AAAA,QACnC;AACA,cAAM,kBAAkB;AAAA,UACtB;AAAA,UACA,QAAQ,uBAAuB;AAAA,QAAA;AAEjC,YAAI,WAAW,eAAe,GAAG;AAC/B,eAAK,aAAa,eAAe;AAAA,QACnC;AAAA,MACF;AAEA,iBAAW,aAAa,YAAY;AAClC,YAAI,WAAW,SAAS,GAAG;AACzB,eAAK,aAAa,SAAS;AAAA,QAC7B;AAAA,MACF;AAEA,aAAO,uBAAuB,UAAU;AAAA,IAC1C;AAAA,EAAA;AAEJ;"}
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@happyvertical/smrt-playground",
3
+ "version": "0.30.0",
4
+ "description": "Shared playground discovery, runtime, and host components for SMRT UI packages",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "files": [
9
+ "CLAUDE.md",
10
+ "README.md",
11
+ "dist",
12
+ "AGENTS.md"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "types": "./dist/index.d.ts",
17
+ "import": "./dist/index.js"
18
+ },
19
+ "./vite": {
20
+ "types": "./dist/vite.d.ts",
21
+ "import": "./dist/vite.js"
22
+ },
23
+ "./svelte": {
24
+ "types": "./dist/svelte/index.d.ts",
25
+ "svelte": "./dist/svelte/index.js",
26
+ "import": "./dist/svelte/index.js"
27
+ }
28
+ },
29
+ "dependencies": {
30
+ "fast-glob": "3.3.3",
31
+ "tsx": "^4.21.0",
32
+ "@happyvertical/smrt-ui": "0.30.0"
33
+ },
34
+ "peerDependencies": {
35
+ "svelte": "^5.18.0",
36
+ "vite": "^7.0.0"
37
+ },
38
+ "peerDependenciesMeta": {
39
+ "svelte": {
40
+ "optional": true
41
+ },
42
+ "vite": {
43
+ "optional": true
44
+ }
45
+ },
46
+ "devDependencies": {
47
+ "@sveltejs/package": "^2.5.7",
48
+ "@sveltejs/vite-plugin-svelte": "^6.2.4",
49
+ "@types/node": "25.0.9",
50
+ "svelte": "^5.46.4",
51
+ "svelte-check": "^4.3.5",
52
+ "typescript": "^5.9.3",
53
+ "vite": "^7.3.1"
54
+ },
55
+ "publishConfig": {
56
+ "registry": "https://registry.npmjs.org",
57
+ "access": "public"
58
+ },
59
+ "license": "MIT",
60
+ "author": "HappyVertical",
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "https://github.com/happyvertical/smrt.git",
64
+ "directory": "packages/smrt-playground"
65
+ },
66
+ "scripts": {
67
+ "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json",
68
+ "build:watch": "vite build --mode library --watch",
69
+ "clean": "rm -rf dist",
70
+ "dev": "npm run build:watch",
71
+ "check": "pnpm exec svelte-check --tsconfig ./tsconfig.svelte.json",
72
+ "typecheck": "tsc --noEmit && node ../../scripts/svelte-check-a11y.mjs --tsconfig ./tsconfig.svelte.json",
73
+ "test": "vitest run",
74
+ "verify:pack": "node ../../scripts/verify-package-types-exports.js ."
75
+ }
76
+ }