@pantoken/scaffold-base 0.1.0 → 0.2.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/dist/index.d.mts CHANGED
@@ -5,7 +5,7 @@ declare const options: {
5
5
  name: z.ZodDefault<z.ZodString>;
6
6
  };
7
7
  /** Shared options every pantoken scaffold platform Preset takes in. */
8
- declare const base: Base<typeof options>;
8
+ export declare const base: Base<typeof options>;
9
9
  //#endregion
10
10
  //#region src/preset.d.ts
11
11
  interface PresetInput {
@@ -19,11 +19,11 @@ interface PresetInput {
19
19
  * @param input - Preset configuration with name, base, and optional blocks
20
20
  * @returns Properly typed Bingo Preset
21
21
  */
22
- declare function createPreset(input: PresetInput): Preset$1;
22
+ export declare function createPreset(input: PresetInput): Preset$1;
23
23
  //#endregion
24
24
  //#region src/blocks/cssdoc.d.ts
25
25
  /** Writes the shared `cssdoc.json` schema file, unmodified by platform or options. */
26
- declare const blockCssdoc: BlockWithoutAddons<{
26
+ export declare const blockCssdoc: BlockWithoutAddons<{
27
27
  name: string;
28
28
  }>;
29
29
  //#endregion
@@ -33,18 +33,18 @@ declare const blockCssdoc: BlockWithoutAddons<{
33
33
  * `format: "html"` covers plain HTML/Angular templates (`class="..."`); `"jsx"` covers React/Next
34
34
  * (`className="..."`).
35
35
  */
36
- declare function renderWrapperContainer(format: "html" | "jsx", depth?: number): string;
36
+ export declare function renderWrapperContainer(format: "html" | "jsx", depth?: number): string;
37
37
  /** The wrapper layout's root class name (applied to the real document `<body>` or component root). */
38
- declare function wrapperRootClassName(): string;
38
+ export declare function wrapperRootClassName(): string;
39
39
  /**
40
40
  * The wrapper layout markup/tokens every platform Preset feeds into its own Handlebars context —
41
41
  * `{{projectName}}` inside the rendered markup is left as-is, for the platform's own template to
42
42
  * resolve.
43
43
  */
44
- declare function getWrapperContext(): {
44
+ export declare function getWrapperContext(): {
45
45
  wrapperRootClass: string;
46
46
  wrapperContainerHtml: (depth?: number) => string;
47
47
  wrapperContainerJsx: (depth?: number) => string;
48
48
  };
49
49
  //#endregion
50
- export { type Preset, base, blockCssdoc, createPreset, getWrapperContext, renderWrapperContainer, wrapperRootClassName };
50
+ export type { Preset };
package/dist/index.mjs CHANGED
@@ -102,6 +102,7 @@ function parseSelector(selector) {
102
102
  optional
103
103
  };
104
104
  }
105
+ /** Recursively parse CSS rule bodies into a tree of {@link WrapperNode}s. */
105
106
  function parseNodes(css) {
106
107
  const nodes = [];
107
108
  for (const { selector, body } of splitRules(css)) for (const single of selector.split(",")) {
@@ -146,6 +147,7 @@ function attrName(format) {
146
147
  function comment(format, text) {
147
148
  return format === "jsx" ? `{/* ${text} */}` : `<!-- ${text} -->`;
148
149
  }
150
+ /** Render a {@link WrapperNode} (and its children) as indented HTML or JSX markup. */
149
151
  function renderNode(node, format, depth) {
150
152
  const pad = " ".repeat(depth);
151
153
  if (node.comment) return `${pad}${comment(format, node.comment)}`;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@pantoken/scaffold-base",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Shared bingo-stratum Base for pantoken's scaffold presets: common options, the cssdoc.json block, and wrapper-layout markup context.",
5
- "homepage": "https://pantoken.iywahl.com",
5
+ "homepage": "https://pantoken.app",
6
6
  "bugs": "https://github.com/thedannywahl/pantoken/issues",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -20,18 +20,22 @@
20
20
  "./package.json": "./package.json"
21
21
  },
22
22
  "publishConfig": {
23
- "access": "public"
23
+ "access": "public",
24
+ "provenance": true
24
25
  },
25
26
  "dependencies": {
26
- "@pantoken/plugin-layouts": "0.1.6",
27
+ "@pantoken/plugin-layouts": "0.3.0",
27
28
  "bingo-stratum": "^0.5.13",
28
- "zod": "^3.24.2"
29
+ "zod": "^3.25.76"
29
30
  },
30
31
  "devDependencies": {
31
- "@types/node": "^26.3.0",
32
+ "@types/node": "^26.5.0",
32
33
  "typescript": "^7.0.2",
33
- "vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
34
- "vite-plus": "0.3.0"
34
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
35
+ "vite-plus": "0.3.1"
36
+ },
37
+ "engines": {
38
+ "node": ">=22.18.0"
35
39
  },
36
40
  "scripts": {
37
41
  "generate": "node scripts/generate.ts",