@syntrologie/adapt-guide 0.0.0-stage → 2.8.0-canary.621

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.
@@ -0,0 +1,26 @@
1
+ import { LitElement, nothing } from 'lit';
2
+ export declare const GUIDE_PAGE_TAG = "syntro-guide-page";
3
+ export declare class GuidePageWidget extends LitElement {
4
+ static styles: import("lit").CSSResult;
5
+ static properties: {
6
+ templates: {
7
+ attribute: boolean;
8
+ };
9
+ };
10
+ /** The store's own list of templates (the tile's props); null means every drawable one. */
11
+ templates: readonly string[] | null;
12
+ private _transport;
13
+ private _hints;
14
+ private _brand;
15
+ /** Nothing to draw for the life of this tile: unpublished, down, or no way to load it. */
16
+ private _gone;
17
+ constructor();
18
+ connectedCallback(): void;
19
+ render(): typeof nothing | import("lit-html").TemplateResult<1>;
20
+ /** The first view is painted: the section takes its height now, never before. */
21
+ private _show;
22
+ /** Draw nothing and take no room, so the store's page reads as if the tile were not there. */
23
+ private _collapse;
24
+ }
25
+ export declare function registerGuidePageElement(): void;
26
+ //# sourceMappingURL=guide-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guide-widget.d.ts","sourceRoot":"","sources":["../src/guide-widget.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAa,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAErD,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAElD,qBAAa,eAAgB,SAAQ,UAAU;IAC7C,OAAgB,MAAM,0BAwBpB;IAEF,OAAgB,UAAU;;;;MAExB;IAEF,2FAA2F;IACnF,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAE5C,OAAO,CAAC,UAAU,CAA4B;IAC9C,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAM;IACpB,0FAA0F;IAC1F,OAAO,CAAC,KAAK,CAAS;;IAOb,iBAAiB,IAAI,IAAI;IA+BzB,MAAM;IAgBf,iFAAiF;IACjF,OAAO,CAAC,KAAK,CAEX;IAEF,8FAA8F;IAC9F,OAAO,CAAC,SAAS,CAKf;CACH;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAI/C"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * adaptive-guide — Runtime manifest
3
+ *
4
+ * Registers <syntro-guide-page> as a side effect of importing this module and
5
+ * exposes the mountable the runtime's WidgetRegistry uses for
6
+ * `adaptive-guide:page`.
7
+ */
8
+ import { type MountPlumbing } from '@syntrologie/sdk-contracts';
9
+ import type { GuidePageProps } from './schema';
10
+ /** The tile card adds `chromeless` to the props it passes down; the page has no use for it. */
11
+ type MountedProps = GuidePageProps & MountPlumbing & {
12
+ chromeless?: boolean;
13
+ };
14
+ export declare const GuidePageMountable: {
15
+ mount(container: HTMLElement, config?: MountedProps | null): () => void;
16
+ /** A refetch or republish keeps the same page, so the shopper keeps their place in it. */
17
+ update(container: HTMLElement, config?: MountedProps | null): void;
18
+ };
19
+ export declare const runtime: {
20
+ id: string;
21
+ version: string;
22
+ name: string;
23
+ description: string;
24
+ /** No DOM-mutation executors: this tile renders only. */
25
+ executors: never[];
26
+ widgets: {
27
+ id: string;
28
+ component: {
29
+ mount(container: HTMLElement, config?: MountedProps | null): () => void;
30
+ /** A refetch or republish keeps the same page, so the shopper keeps their place in it. */
31
+ update(container: HTMLElement, config?: MountedProps | null): void;
32
+ };
33
+ metadata: {
34
+ name: string;
35
+ description: string;
36
+ icon: string;
37
+ };
38
+ }[];
39
+ };
40
+ export default runtime;
41
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAsB,MAAM,4BAA4B,CAAC;AAGpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,+FAA+F;AAC/F,KAAK,YAAY,GAAG,cAAc,GAAG,aAAa,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE9E,eAAO,MAAM,kBAAkB;qBACZ,WAAW,WAAW,YAAY,GAAG,IAAI;IAW1D,0FAA0F;sBACxE,WAAW,WAAW,YAAY,GAAG,IAAI;CAO5D,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;IAMlB,yDAAyD;;;;;6BA3BxC,WAAW,WAAW,YAAY,GAAG,IAAI;YAW1D,0FAA0F;8BACxE,WAAW,WAAW,YAAY,GAAG,IAAI;;;;;;;;CA6B5D,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,12 @@
1
+ import {
2
+ GuidePageMountable,
3
+ runtime,
4
+ runtime_default
5
+ } from "./chunk-BVOACKL5.js";
6
+ import "./chunk-IGIU6S7P.js";
7
+ export {
8
+ GuidePageMountable,
9
+ runtime_default as default,
10
+ runtime
11
+ };
12
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * adaptive-guide — Zod schema (source of truth for the tile's props)
3
+ *
4
+ * The guided page tile draws the store's published guide (the config's
5
+ * top-level `guide` block, which runtime-backend reads; the SDK never does).
6
+ * Its only prop is the store's own list of templates.
7
+ *
8
+ * This module is loaded by the schema generator in Node, so it never imports
9
+ * the page itself (that registers custom elements); the template names are
10
+ * listed here and a test holds them to the page's own registry.
11
+ */
12
+ import { z } from 'zod';
13
+ export declare const TEMPLATES: readonly ["pick_from_pictures", "what_you_need", "compare", "hero_pick", "product_detail"];
14
+ export declare const guidePagePropsSchema: z.ZodObject<{
15
+ templates: z.ZodOptional<z.ZodArray<z.ZodEnum<["pick_from_pictures", "what_you_need", "compare", "hero_pick", "product_detail"]>, "many">>;
16
+ }, "strict", z.ZodTypeAny, {
17
+ templates?: ("pick_from_pictures" | "what_you_need" | "compare" | "hero_pick" | "product_detail")[] | undefined;
18
+ }, {
19
+ templates?: ("pick_from_pictures" | "what_you_need" | "compare" | "hero_pick" | "product_detail")[] | undefined;
20
+ }>;
21
+ export type GuidePageProps = z.infer<typeof guidePagePropsSchema>;
22
+ export declare const tileWidgets: {
23
+ widget: string;
24
+ defName: string;
25
+ propsSchema: z.ZodObject<{
26
+ templates: z.ZodOptional<z.ZodArray<z.ZodEnum<["pick_from_pictures", "what_you_need", "compare", "hero_pick", "product_detail"]>, "many">>;
27
+ }, "strict", z.ZodTypeAny, {
28
+ templates?: ("pick_from_pictures" | "what_you_need" | "compare" | "hero_pick" | "product_detail")[] | undefined;
29
+ }, {
30
+ templates?: ("pick_from_pictures" | "what_you_need" | "compare" | "hero_pick" | "product_detail")[] | undefined;
31
+ }>;
32
+ }[];
33
+ export declare const CAPABILITIES_DOCUMENTATION: {
34
+ packageId: string;
35
+ plannerSummary: string;
36
+ description: string;
37
+ whenToUse: {
38
+ goal: string;
39
+ action: string;
40
+ }[];
41
+ conventions: {
42
+ name: string;
43
+ description: string;
44
+ }[];
45
+ events: never[];
46
+ };
47
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,SAAS,4FAMsB,CAAC;AAE7C,eAAO,MAAM,oBAAoB;;;;;;EAa9B,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,WAAW;;;;;;;;;;GAEvB,CAAC;AAMF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;CA0BtC,CAAC"}
package/dist/schema.js ADDED
@@ -0,0 +1,51 @@
1
+ import {
2
+ external_exports
3
+ } from "./chunk-IGIU6S7P.js";
4
+
5
+ // src/schema.ts
6
+ var TEMPLATES = [
7
+ "pick_from_pictures",
8
+ "what_you_need",
9
+ "compare",
10
+ "hero_pick",
11
+ "product_detail"
12
+ ];
13
+ var guidePagePropsSchema = external_exports.object({
14
+ templates: external_exports.array(external_exports.enum(TEMPLATES)).min(1).optional().describe(
15
+ "The store's own list of templates the guide may show. Absent: every template the page can draw."
16
+ )
17
+ }).strict().describe(
18
+ "The guided page: the store's published guide, drawn full width in an inline slot anchored to the store's guided page block."
19
+ );
20
+ var tileWidgets = [
21
+ { widget: "adaptive-guide:page", defName: "guidePageProps", propsSchema: guidePagePropsSchema }
22
+ ];
23
+ var CAPABILITIES_DOCUMENTATION = {
24
+ packageId: "adaptive-guide",
25
+ plannerSummary: "The store's guided page, drawn from its published guide block. Not a planner choice: the store's plan carries the tile and its inline slot.",
26
+ description: "The guided page as a tile: shoppers tap pictures to say what they need, then pick products for what they are missing. It draws the config's published guide block in an inline slot anchored to the store's guided page block.",
27
+ whenToUse: [
28
+ {
29
+ goal: "Show the store's published guide on the page that carries its guided page block",
30
+ action: 'Declare an inline slot anchored at [data-syntro-guide] and add a chromeless tile with widget: "adaptive-guide:page" in that slot'
31
+ }
32
+ ],
33
+ conventions: [
34
+ {
35
+ name: "Content comes from the guide block",
36
+ description: "Every picture, product and word comes from the config's top-level guide block, read by the server. The tile carries only the template list."
37
+ },
38
+ {
39
+ name: "Inline, never covering",
40
+ description: "The guide is a section of the page after its anchor, as tall as the viewport at most; its feed scrolls inside. Without the anchor, or when the guide is not published or is down, it takes no room."
41
+ }
42
+ ],
43
+ events: []
44
+ };
45
+ export {
46
+ CAPABILITIES_DOCUMENTATION,
47
+ TEMPLATES,
48
+ guidePagePropsSchema,
49
+ tileWidgets
50
+ };
51
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/schema.ts"],
4
+ "sourcesContent": ["/**\n * adaptive-guide \u2014 Zod schema (source of truth for the tile's props)\n *\n * The guided page tile draws the store's published guide (the config's\n * top-level `guide` block, which runtime-backend reads; the SDK never does).\n * Its only prop is the store's own list of templates.\n *\n * This module is loaded by the schema generator in Node, so it never imports\n * the page itself (that registers custom elements); the template names are\n * listed here and a test holds them to the page's own registry.\n */\n\nimport type { TemplateName } from '@syntrologie/canvas-postcard-guide/page';\nimport { z } from 'zod';\n\nexport const TEMPLATES = [\n 'pick_from_pictures',\n 'what_you_need',\n 'compare',\n 'hero_pick',\n 'product_detail',\n] as const satisfies readonly TemplateName[];\n\nexport const guidePagePropsSchema = z\n .object({\n templates: z\n .array(z.enum(TEMPLATES))\n .min(1)\n .optional()\n .describe(\n \"The store's own list of templates the guide may show. Absent: every template the page can draw.\"\n ),\n })\n .strict()\n .describe(\n \"The guided page: the store's published guide, drawn full width in an inline slot anchored to the store's guided page block.\"\n );\n\nexport type GuidePageProps = z.infer<typeof guidePagePropsSchema>;\n\nexport const tileWidgets = [\n { widget: 'adaptive-guide:page', defName: 'guidePageProps', propsSchema: guidePagePropsSchema },\n];\n\n// ============================================================================\n// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-guide',\n plannerSummary:\n \"The store's guided page, drawn from its published guide block. Not a planner choice: the store's plan carries the tile and its inline slot.\",\n description:\n \"The guided page as a tile: shoppers tap pictures to say what they need, then pick products for what they are missing. It draws the config's published guide block in an inline slot anchored to the store's guided page block.\",\n whenToUse: [\n {\n goal: \"Show the store's published guide on the page that carries its guided page block\",\n action:\n 'Declare an inline slot anchored at [data-syntro-guide] and add a chromeless tile with widget: \"adaptive-guide:page\" in that slot',\n },\n ],\n conventions: [\n {\n name: 'Content comes from the guide block',\n description:\n \"Every picture, product and word comes from the config's top-level guide block, read by the server. The tile carries only the template list.\",\n },\n {\n name: 'Inline, never covering',\n description:\n 'The guide is a section of the page after its anchor, as tall as the viewport at most; its feed scrolls inside. Without the anchor, or when the guide is not published or is down, it takes no room.',\n },\n ],\n events: [],\n};\n"],
5
+ "mappings": ";;;;;AAeO,IAAM,YAAY;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,uBAAuB,iBACjC,OAAO;AAAA,EACN,WAAW,iBACR,MAAM,iBAAE,KAAK,SAAS,CAAC,EACvB,IAAI,CAAC,EACL,SAAS,EACT;AAAA,IACC;AAAA,EACF;AACJ,CAAC,EACA,OAAO,EACP;AAAA,EACC;AACF;AAIK,IAAM,cAAc;AAAA,EACzB,EAAE,QAAQ,uBAAuB,SAAS,kBAAkB,aAAa,qBAAqB;AAChG;AAMO,IAAM,6BAA6B;AAAA,EACxC,WAAW;AAAA,EACX,gBACE;AAAA,EACF,aACE;AAAA,EACF,WAAW;AAAA,IACT;AAAA,MACE,MAAM;AAAA,MACN,QACE;AAAA,IACJ;AAAA,EACF;AAAA,EACA,aAAa;AAAA,IACX;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,EACF;AAAA,EACA,QAAQ,CAAC;AACX;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,57 @@
1
1
  {
2
2
  "name": "@syntrologie/adapt-guide",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.8.0-canary.621",
4
+ "description": "Adaptive Guide: the store's guided page as a tile, drawn in an inline slot on the store's own page.",
5
+ "license": "Proprietary",
6
+ "private": false,
7
+ "author": "Syntrologie <eng@syntrologie.com>",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/SyntropyForge/amazing-demos.git",
11
+ "directory": "packages/adaptives/adaptive-guide"
12
+ },
13
+ "publishConfig": {
14
+ "access": "public"
15
+ },
16
+ "syntrologie": {
17
+ "bundlingMode": "cdn-only"
18
+ },
19
+ "type": "module",
20
+ "exports": {
21
+ "./runtime": {
22
+ "types": "./dist/runtime.d.ts",
23
+ "import": "./dist/runtime.js"
24
+ },
25
+ "./schema": {
26
+ "types": "./dist/schema.d.ts",
27
+ "import": "./dist/schema.js"
28
+ },
29
+ "./cdn": {
30
+ "types": "./dist/cdn.d.ts",
31
+ "import": "./dist/cdn.js"
32
+ }
33
+ },
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "scripts": {
38
+ "build": "tsc --emitDeclarationOnly && node ../scripts/build-lib.mjs",
39
+ "typecheck": "tsc --noEmit",
40
+ "clean": "rm -rf dist",
41
+ "test": "vitest run",
42
+ "test:watch": "vitest",
43
+ "lint": "biome check ."
44
+ },
45
+ "peerDependencies": {
46
+ "lit": "3.3.2"
47
+ },
48
+ "devDependencies": {
49
+ "@syntrologie/canvas-postcard-guide": "*",
50
+ "@syntrologie/sdk-contracts": "*",
51
+ "jsdom": "26.1.0",
52
+ "lit": "3.3.2",
53
+ "typescript": "5.9.3",
54
+ "vitest": "4.0.18",
55
+ "zod": "3.25.76"
56
+ }
57
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.