@panomc/theme-core 1.0.0-dev.40 → 1.0.0-dev.41
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/bin/new.js +8 -8
- package/bin/theme-core.js +7 -8
- package/package.json +1 -1
package/bin/new.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* theme-core new — scaffold a working Pano theme.
|
|
4
4
|
*
|
|
5
|
-
* bunx theme-core new my-theme npm-published core (default)
|
|
6
|
-
* bunx theme-core new my-theme --local file: links into a local theme-core
|
|
5
|
+
* bunx @panomc/theme-core new my-theme npm-published core (default)
|
|
6
|
+
* bunx @panomc/theme-core new my-theme --local file: links into a local theme-core
|
|
7
7
|
* checkout (this workspace)
|
|
8
8
|
*
|
|
9
9
|
* The result runs immediately and looks like vanilla; the author's job starts
|
|
@@ -26,7 +26,7 @@ const name = args.find((a) => !a.startsWith("-"));
|
|
|
26
26
|
const local = args.includes("--local") || corePkg.version === "0.0.0-development";
|
|
27
27
|
|
|
28
28
|
if (!name || !/^[a-z][a-z0-9-]*$/.test(name)) {
|
|
29
|
-
console.error("usage: theme-core new <kebab-case-name> [--local]");
|
|
29
|
+
console.error("usage: bunx @panomc/theme-core new <kebab-case-name> [--local]");
|
|
30
30
|
process.exit(1);
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -46,7 +46,7 @@ const title = name
|
|
|
46
46
|
// Local mode links straight into the workspace checkout so the scaffold works
|
|
47
47
|
// before the packages exist on npm; published mode uses semver ranges.
|
|
48
48
|
let coreDep = `^${corePkg.version}`;
|
|
49
|
-
let sdkDep =
|
|
49
|
+
let sdkDep = `^${corePkg.version}`;
|
|
50
50
|
if (local) {
|
|
51
51
|
const sdkDir = dirname(require.resolve("@panomc/sdk/package.json"));
|
|
52
52
|
coreDep = `file:${corePkgDir}`;
|
|
@@ -107,7 +107,7 @@ const FILES = {
|
|
|
107
107
|
*
|
|
108
108
|
* Tier 1: edit src/styles/tokens.scss and ship — this file stays empty.
|
|
109
109
|
* Tier 2: eject a view, register it here:
|
|
110
|
-
* bunx theme-core eject-view LoginView
|
|
110
|
+
* bunx @panomc/theme-core eject-view LoginView
|
|
111
111
|
* Extra settings your views edit are declared in settingsSchema (see the
|
|
112
112
|
* theme-core author guide).
|
|
113
113
|
*/
|
|
@@ -255,7 +255,7 @@ bun run build && bun run package
|
|
|
255
255
|
\`\`\`
|
|
256
256
|
|
|
257
257
|
- Tier 1: edit \`src/styles/tokens.scss\`.
|
|
258
|
-
- Tier 2: \`bunx theme-core eject-view <ViewName>\` (see \`theme-core list-views\`).
|
|
258
|
+
- Tier 2: \`bunx @panomc/theme-core eject-view <ViewName>\` (see \`theme-core list-views\`).
|
|
259
259
|
`,
|
|
260
260
|
};
|
|
261
261
|
|
|
@@ -277,5 +277,5 @@ Next steps:
|
|
|
277
277
|
|
|
278
278
|
Make it yours:
|
|
279
279
|
src/styles/tokens.scss colors / fonts / radius (Tier 1)
|
|
280
|
-
bunx theme-core list-views what you can override
|
|
281
|
-
bunx theme-core eject-view HomeView own a page's markup (Tier 2)`);
|
|
280
|
+
bunx @panomc/theme-core list-views what you can override
|
|
281
|
+
bunx @panomc/theme-core eject-view HomeView own a page's markup (Tier 2)`);
|
package/bin/theme-core.js
CHANGED
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* theme-core CLI — the theme author's single entry point.
|
|
4
4
|
*
|
|
5
|
-
* bunx theme-core sync regenerate route shims + host-provides stubs
|
|
6
|
-
* bunx theme-core eject-view <ViewName>
|
|
5
|
+
* bunx @panomc/theme-core sync regenerate route shims + host-provides stubs
|
|
6
|
+
* bunx @panomc/theme-core eject-view <ViewName>
|
|
7
7
|
* copy a core default view into src/views/ and
|
|
8
8
|
* register it in theme.config.js
|
|
9
|
-
* bunx theme-core check contract lint (view registry, svelte pin,
|
|
9
|
+
* bunx @panomc/theme-core check contract lint (view registry, svelte pin,
|
|
10
10
|
* settings keys, mandatory slots)
|
|
11
|
-
* bunx theme-core package reproducible zip of build/ (the zip sha256
|
|
11
|
+
* bunx @panomc/theme-core package reproducible zip of build/ (the zip sha256
|
|
12
12
|
* is the premium license identity)
|
|
13
13
|
*
|
|
14
|
-
* Scaffolding a NEW theme lives in `bunx @panomc/create-pano-theme` (P4).
|
|
15
14
|
*/
|
|
16
15
|
import { spawnSync } from "node:child_process";
|
|
17
16
|
import { existsSync, readFileSync, writeFileSync, copyFileSync, mkdirSync } from "node:fs";
|
|
@@ -49,7 +48,7 @@ switch (cmd) {
|
|
|
49
48
|
`\nRegistry components (chrome + plugin-facing):\n ${contract.registry_components.join(", ")}`,
|
|
50
49
|
);
|
|
51
50
|
console.log(
|
|
52
|
-
"\nEject one with: bunx theme-core eject-view <ViewName>\n(the file's header documents every prop in detail)",
|
|
51
|
+
"\nEject one with: bunx @panomc/theme-core eject-view <ViewName>\n(the file's header documents every prop in detail)",
|
|
53
52
|
);
|
|
54
53
|
break;
|
|
55
54
|
}
|
|
@@ -62,7 +61,7 @@ switch (cmd) {
|
|
|
62
61
|
case "eject-view": {
|
|
63
62
|
const name = args[0];
|
|
64
63
|
if (!name || !/^[A-Z][A-Za-z0-9]*View$/.test(name)) {
|
|
65
|
-
console.error("usage: theme-core eject-view <ViewName> (e.g. LoginView)");
|
|
64
|
+
console.error("usage: bunx @panomc/theme-core eject-view <ViewName> (e.g. LoginView)");
|
|
66
65
|
process.exit(1);
|
|
67
66
|
}
|
|
68
67
|
const source = join(binDir, "..", "src", "lib", "views", `${name}.svelte`);
|
|
@@ -98,6 +97,6 @@ switch (cmd) {
|
|
|
98
97
|
break;
|
|
99
98
|
}
|
|
100
99
|
default:
|
|
101
|
-
console.error("usage: theme-core <new|sync|check|list-views|eject-view|package>");
|
|
100
|
+
console.error("usage: bunx @panomc/theme-core <new|sync|check|list-views|eject-view|package>");
|
|
102
101
|
process.exit(1);
|
|
103
102
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panomc/theme-core",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.41",
|
|
4
4
|
"description": "The Pano theme engine: hooks factories, plugin engine, headless page controllers, default views and the theme CLI. Themes depend on this package instead of forking vanilla-theme.",
|
|
5
5
|
"author": "PanoMC",
|
|
6
6
|
"license": "MIT",
|