@slicemedia/create-devkit 0.1.1 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../src/scaffold.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,oBAAoB,sEAKvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,eAAO,MAAM,aAAa,8DAA+D,CAAC;AAE1F,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,gBAAgB,kCAAmC,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC3C,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,CAAC,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC3C,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC,YAAY,EAAE,QAAQ,CAAC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AAC,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAC3C,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC/C,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAocD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAyDxF"}
package/dist/scaffold.js CHANGED
@@ -89,7 +89,7 @@ export function createProjectSlider(
89
89
  integrationFile: "src/integrations/animations.ts",
90
90
  renderIntegration: () => `import { gsap } from "gsap";
91
91
 
92
- /** Project-owned GSAP entry point. Import this module from main.ts when the composition is ready. */
92
+ /** Project-owned GSAP integration. Import only from the addon/project entry that needs it. */
93
93
  export { gsap };
94
94
  `,
95
95
  },
@@ -117,6 +117,7 @@ export function createProjectTooltips(
117
117
  "DIGITALOCEAN_SPACES_ACCESS_KEY_ID",
118
118
  "DIGITALOCEAN_SPACES_SECRET_ACCESS_KEY",
119
119
  "DIGITALOCEAN_SPACES_SESSION_TOKEN",
120
+ "DIGITALOCEAN_TOKEN",
120
121
  ],
121
122
  integrationFile: "src/integrations/spaces-deployment.ts",
122
123
  renderIntegration: () => `import {
@@ -133,13 +134,14 @@ export interface ProjectSpacesPlanConfig {
133
134
  bucket: string;
134
135
  prefix: string;
135
136
  releaseVersion: string;
137
+ cdnEndpointId: string;
136
138
  }
137
139
 
138
- /** All deployment values are explicit; this helper supplies no account or project defaults. */
140
+ /** Stable URLs with scoped CDN invalidation; all account and project values are explicit. */
139
141
  export function createProjectDeploymentPlan(
140
142
  config: ProjectSpacesPlanConfig,
141
143
  ): Promise<SpacesDeploymentPlan> {
142
- return createDeploymentPlan(config);
144
+ return createDeploymentPlan({ ...config, mode: "stable" });
143
145
  }
144
146
 
145
147
  export { applyDeploymentPlan };
@@ -11,10 +11,33 @@ starter is deliberately neutral: no optional capability is imported by `src/main
11
11
  4. Import only the generated files under `src/integrations/` that the project is ready to compose.
12
12
  5. Run `pnpm typecheck` and `pnpm build`.
13
13
 
14
- The build emits one project-owned ES2018 IIFE at `dist/project.js` and, when styles are imported,
15
- `dist/project.css`. `pnpm catalog -- --json` inspects the single project entry. Use
14
+ Create each public browser entry in `src/addons/<name>.ts` or `src/addons/<name>/index.ts`.
15
+ The build emits separate standalone ES2018 scripts at `dist/addons/<name>.js` and optional
16
+ `dist/addons/<name>.css`. Shared helpers belong outside these entry paths or in `_`-prefixed files.
17
+ New addons are discovered automatically alongside entries configured in `devkit.config.json`.
18
+ `pnpm catalog -- --json` inspects all public entries. Use
16
19
  `pnpm devkit -- <command>` for other DevKit commands.
17
20
 
21
+ Run `pnpm devkit -- explain <name>` for an addon's Webflow setup guide and local testing tags. Add
22
+ `--public-base-url` with the deployed asset base URL for production JS/CSS tags. Load only the
23
+ scripts needed on each page. The optional neutral `src/main.ts` entry builds separately to
24
+ `dist/projects/project.js` and optional CSS; remove its config entry if no shared project script
25
+ is needed. It does not import or collect addon entries.
26
+
27
+ Each addon entry explicitly initializes its behavior and registers its API with the shared
28
+ DevKit runtime. Inline scripts can then use `window.slicemediaDevKit.counter.refresh()` or
29
+ `window.slicemediaDevKit.whenReady("counter", callback)`. Keep package definitions inert; put
30
+ browser initialization in the public entry. The build also writes `dist/webflow-scripts.json`
31
+ with the actual script and stylesheet paths.
32
+
33
+ `pnpm build -- --sourcemap` generates private JavaScript maps in `.slicemedia/sourcemaps/`, outside
34
+ `dist/`. Deploy only `dist/`; keep debugging artifacts private. The production bundle contains no
35
+ map references. Browser JavaScript itself remains publicly inspectable.
36
+
37
+ The repository documentation includes an optional worked example at
38
+ [`docs/examples/on-demand-counter`](https://github.com/slicemedia/devkit/tree/main/docs/examples/on-demand-counter).
39
+ Example features are not copied into generated projects.
40
+
18
41
  The project-owned `WEBFLOW_PROJECT.md` is always present. If agent targets were selected, run
19
42
  `pnpm agents:generate` after installation. Slice Media Agent Kit preserves that guide and creates
20
43
  only the requested Codex, Claude, Cursor, Copilot, or Webflow files; it is maintained in a separate
@@ -1,13 +1,19 @@
1
1
  # Webflow project guidance
2
2
 
3
3
  Webflow owns editable structure, components, styles, CMS content, forms, and native interactions.
4
- This project owns only the browser enhancements explicitly composed in `src/main.ts`.
4
+ This project owns only explicitly authored browser enhancements. Put each public addon entry in
5
+ `src/addons/<name>.ts` or `src/addons/<name>/index.ts`; each builds to its own
6
+ `dist/addons/<name>.js` and optional stylesheet. Load only the scripts needed on each Webflow page.
7
+ Use `src/main.ts` or `src/projects/` only for optional, deliberately composed project behavior.
5
8
 
6
9
  - Prefer native Webflow features before adding code.
7
10
  - Use documented, scoped `data-wft-*` hooks instead of generated classes or guessed identifiers.
8
11
  - Keep optional files under `src/integrations/` disconnected until their markup contract is ready.
9
12
  - Make initialization idempotent and restore owned DOM, attributes, listeners, observers, and timers
10
13
  during teardown.
14
+ - Install the shared DevKit runtime explicitly and register each public addon API after successful
15
+ initialization. Inline scripts can use `window.slicemediaDevKit.whenReady(name, callback)` and
16
+ direct named access such as `window.slicemediaDevKit.counter.refresh()`.
11
17
  - Inspect before remote work. Webflow writes and publishing require an explicit request, review,
12
18
  read-back, and verification through the official Webflow MCP server.
13
19
 
@@ -2,13 +2,30 @@
2
2
  "entries": [
3
3
  {
4
4
  "name": "project",
5
+ "kind": "project",
5
6
  "input": "src/main.ts",
6
7
  "version": "0.1.0",
7
- "description": "Project-owned Webflow browser entry.",
8
+ "description": "Optional project-wide browser entry; addons build independently.",
8
9
  "placement": "body-end",
9
10
  "dependencies": [],
10
11
  "attributes": [],
11
12
  "scriptAttributes": {},
13
+ "bundle": {
14
+ "input": "src/main.ts",
15
+ "scriptFile": "projects/project.js",
16
+ "cssFile": "projects/project.css"
17
+ },
18
+ "usage": {
19
+ "setup": [
20
+ "Author the required markup and data-wft-* hooks in Webflow.",
21
+ "Create standalone browser entries under src/addons/ and document their contracts.",
22
+ "Use src/project.ts only for deliberately shared project behavior; it is optional.",
23
+ "Run the local dev server and test only the scripts needed on an approved Webflow testing page."
24
+ ],
25
+ "notes": [
26
+ "The starter has no feature behavior. Remove this entry if no project-wide script is needed; addon discovery remains active."
27
+ ]
28
+ },
12
29
  "api": {
13
30
  "entry": "webflow-project",
14
31
  "capabilities": []
@@ -6,7 +6,7 @@
6
6
  "type": "module",
7
7
  "packageManager": "pnpm@11.21.0",
8
8
  "scripts": {
9
- "build": "slicemedia-devkit build --entry src/main.ts --out-dir dist --script-file project.js --css-file project.css",
9
+ "build": "slicemedia-devkit build",
10
10
  "catalog": "slicemedia-devkit catalog --root .",
11
11
  "dev": "slicemedia-devkit dev",
12
12
  "sanitize": "slicemedia-devkit sanitize --root .",
@@ -1,9 +1,9 @@
1
1
  /** Generated by scripts/sync-versions.mjs. Do not edit by hand. */
2
- export declare const DEVKIT_PACKAGE_VERSION = "0.1.1";
3
- export declare const DEFAULT_DEVKIT_VERSION_RANGE = "^0.1.1";
2
+ export declare const DEVKIT_PACKAGE_VERSION = "0.3.0";
3
+ export declare const DEFAULT_DEVKIT_VERSION_RANGE = "^0.3.0";
4
4
  export declare const EXTERNAL_PRODUCT_VERSION_RANGES: {
5
- readonly agentKit: "^0.1.0";
5
+ readonly agentKit: "^0.2.0";
6
6
  readonly swiperAdapter: "^0.1.0";
7
- readonly spacesDeployer: "^0.1.0";
7
+ readonly spacesDeployer: "^0.2.0";
8
8
  };
9
9
  //# sourceMappingURL=versions.generated.d.ts.map
@@ -1,8 +1,8 @@
1
1
  /** Generated by scripts/sync-versions.mjs. Do not edit by hand. */
2
- export const DEVKIT_PACKAGE_VERSION = "0.1.1";
3
- export const DEFAULT_DEVKIT_VERSION_RANGE = "^0.1.1";
2
+ export const DEVKIT_PACKAGE_VERSION = "0.3.0";
3
+ export const DEFAULT_DEVKIT_VERSION_RANGE = "^0.3.0";
4
4
  export const EXTERNAL_PRODUCT_VERSION_RANGES = {
5
- agentKit: "^0.1.0",
5
+ agentKit: "^0.2.0",
6
6
  swiperAdapter: "^0.1.0",
7
- spacesDeployer: "^0.1.0",
7
+ spacesDeployer: "^0.2.0",
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slicemedia/create-devkit",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Interactive project wizard for Slice Media DevKit.",
5
5
  "author": "Slice Media",
6
6
  "repository": {