@contractspec/lib.example-shared-ui 3.4.2 → 4.0.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.
@@ -0,0 +1,85 @@
1
+ // src/bundles/ExampleTemplateBundle.ts
2
+ import { defineModuleBundle } from "@contractspec/lib.surface-runtime/spec";
3
+ var ExampleTemplateBundle = defineModuleBundle({
4
+ meta: {
5
+ key: "example.template",
6
+ version: "0.1.0",
7
+ title: "Example Template",
8
+ description: "Adaptive template shell for ContractSpec examples",
9
+ owners: ["team-platform"],
10
+ tags: ["example", "template"],
11
+ stability: "experimental"
12
+ },
13
+ routes: [
14
+ {
15
+ routeId: "template",
16
+ path: "/sandbox",
17
+ defaultSurface: "template-shell"
18
+ }
19
+ ],
20
+ surfaces: {
21
+ "template-shell": {
22
+ surfaceId: "template-shell",
23
+ kind: "workbench",
24
+ title: "Template Shell",
25
+ slots: [
26
+ {
27
+ slotId: "header",
28
+ role: "header",
29
+ accepts: ["action-bar"],
30
+ cardinality: "many"
31
+ },
32
+ {
33
+ slotId: "primary",
34
+ role: "primary",
35
+ accepts: ["entity-section", "rich-doc", "form", "custom-widget"],
36
+ cardinality: "many"
37
+ },
38
+ {
39
+ slotId: "sidebar",
40
+ role: "secondary",
41
+ accepts: ["entity-section", "custom-widget"],
42
+ cardinality: "one"
43
+ }
44
+ ],
45
+ layouts: [
46
+ {
47
+ layoutId: "main-with-sidebar",
48
+ title: "Main with sidebar",
49
+ root: {
50
+ type: "panel-group",
51
+ direction: "horizontal",
52
+ persistKey: "example.template.main-sidebar",
53
+ children: [
54
+ {
55
+ type: "panel-group",
56
+ direction: "vertical",
57
+ persistKey: "example.template.content",
58
+ children: [
59
+ { type: "slot", slotId: "header" },
60
+ { type: "slot", slotId: "primary" }
61
+ ]
62
+ },
63
+ { type: "slot", slotId: "sidebar" }
64
+ ]
65
+ }
66
+ }
67
+ ],
68
+ data: [],
69
+ verification: {
70
+ dimensions: {
71
+ guidance: "Can reveal hints and walkthrough notes.",
72
+ density: "Can select compact or balanced layouts.",
73
+ dataDepth: "Controls content depth and expansion.",
74
+ control: "Shows advanced options when allowed.",
75
+ media: "Supports text-first and hybrid modes.",
76
+ pace: "Maps to motion tokens and transitions.",
77
+ narrative: "Can order summary before or after detail."
78
+ }
79
+ }
80
+ }
81
+ }
82
+ });
83
+ export {
84
+ ExampleTemplateBundle
85
+ };
@@ -2128,6 +2128,79 @@ function SaveToStudioButton({
2128
2128
  }, undefined, true, undefined, this);
2129
2129
  }
2130
2130
 
2131
+ // src/SpecDrivenTemplateShell.tsx
2132
+ import { BundleProvider, BundleRenderer } from "@contractspec/lib.surface-runtime/react";
2133
+ import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
2134
+ function SpecDrivenTemplateShell({
2135
+ plan,
2136
+ title,
2137
+ description,
2138
+ sidebar,
2139
+ actions,
2140
+ showSaveAction = true,
2141
+ saveProps,
2142
+ children
2143
+ }) {
2144
+ const headerContent = /* @__PURE__ */ jsxDEV8("header", {
2145
+ className: "border-border bg-card rounded-2xl border p-6 shadow-sm",
2146
+ children: [
2147
+ /* @__PURE__ */ jsxDEV8("div", {
2148
+ className: "flex flex-wrap items-center justify-between gap-4",
2149
+ children: [
2150
+ /* @__PURE__ */ jsxDEV8("div", {
2151
+ children: [
2152
+ /* @__PURE__ */ jsxDEV8("p", {
2153
+ className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase",
2154
+ children: "ContractSpec Templates"
2155
+ }, undefined, false, undefined, this),
2156
+ /* @__PURE__ */ jsxDEV8("h1", {
2157
+ className: "text-3xl font-bold",
2158
+ children: title
2159
+ }, undefined, false, undefined, this),
2160
+ description ? /* @__PURE__ */ jsxDEV8("p", {
2161
+ className: "text-muted-foreground mt-2 max-w-2xl text-sm",
2162
+ children: description
2163
+ }, undefined, false, undefined, this) : null
2164
+ ]
2165
+ }, undefined, true, undefined, this),
2166
+ /* @__PURE__ */ jsxDEV8("div", {
2167
+ className: "flex flex-col items-end gap-2",
2168
+ children: [
2169
+ /* @__PURE__ */ jsxDEV8(LocalDataIndicator, {}, undefined, false, undefined, this),
2170
+ showSaveAction ? /* @__PURE__ */ jsxDEV8(SaveToStudioButton, {
2171
+ ...saveProps
2172
+ }, undefined, false, undefined, this) : null
2173
+ ]
2174
+ }, undefined, true, undefined, this)
2175
+ ]
2176
+ }, undefined, true, undefined, this),
2177
+ actions ? /* @__PURE__ */ jsxDEV8("div", {
2178
+ className: "mt-4",
2179
+ children: actions
2180
+ }, undefined, false, undefined, this) : null
2181
+ ]
2182
+ }, undefined, true, undefined, this);
2183
+ const slotContent = {
2184
+ header: headerContent,
2185
+ primary: /* @__PURE__ */ jsxDEV8("main", {
2186
+ className: "space-y-4 p-2",
2187
+ children
2188
+ }, undefined, false, undefined, this)
2189
+ };
2190
+ if (sidebar != null) {
2191
+ slotContent.sidebar = /* @__PURE__ */ jsxDEV8("aside", {
2192
+ className: "border-border bg-card rounded-2xl border p-4",
2193
+ children: sidebar
2194
+ }, undefined, false, undefined, this);
2195
+ }
2196
+ return /* @__PURE__ */ jsxDEV8(BundleProvider, {
2197
+ plan,
2198
+ children: /* @__PURE__ */ jsxDEV8(BundleRenderer, {
2199
+ slotContent
2200
+ }, undefined, false, undefined, this)
2201
+ }, undefined, false, undefined, this);
2202
+ }
2203
+
2131
2204
  // src/utils/generateSpecFromTemplate.ts
2132
2205
  function generateSpecFromTemplate(template) {
2133
2206
  const templateId = template?.id ?? "unknown";
@@ -2697,7 +2770,7 @@ function useSpecContent(templateId) {
2697
2770
  import { useCallback as useCallback8, useEffect as useEffect5 } from "react";
2698
2771
  import { Button as Button5, LoaderBlock as LoaderBlock3 } from "@contractspec/lib.design-system";
2699
2772
  import { Badge as Badge5 } from "@contractspec/lib.ui-kit-web/ui/badge";
2700
- import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
2773
+ import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
2701
2774
  "use client";
2702
2775
  function SpecEditorPanel({
2703
2776
  templateId,
@@ -2739,54 +2812,54 @@ function SpecEditorPanel({
2739
2812
  onLog?.("Spec reset to template defaults");
2740
2813
  }, [reset, onLog]);
2741
2814
  if (loading) {
2742
- return /* @__PURE__ */ jsxDEV8(LoaderBlock3, {
2815
+ return /* @__PURE__ */ jsxDEV9(LoaderBlock3, {
2743
2816
  label: "Loading spec..."
2744
2817
  }, undefined, false, undefined, this);
2745
2818
  }
2746
- return /* @__PURE__ */ jsxDEV8("div", {
2819
+ return /* @__PURE__ */ jsxDEV9("div", {
2747
2820
  className: "space-y-4",
2748
2821
  children: [
2749
- /* @__PURE__ */ jsxDEV8("div", {
2822
+ /* @__PURE__ */ jsxDEV9("div", {
2750
2823
  className: "flex items-center justify-between",
2751
2824
  children: [
2752
- /* @__PURE__ */ jsxDEV8("div", {
2825
+ /* @__PURE__ */ jsxDEV9("div", {
2753
2826
  className: "flex items-center gap-2",
2754
2827
  children: [
2755
- /* @__PURE__ */ jsxDEV8(Button5, {
2828
+ /* @__PURE__ */ jsxDEV9(Button5, {
2756
2829
  variant: "default",
2757
2830
  size: "sm",
2758
2831
  onClick: handleSave,
2759
2832
  children: "Save"
2760
2833
  }, undefined, false, undefined, this),
2761
- /* @__PURE__ */ jsxDEV8(Button5, {
2834
+ /* @__PURE__ */ jsxDEV9(Button5, {
2762
2835
  variant: "outline",
2763
2836
  size: "sm",
2764
2837
  onClick: handleValidate,
2765
2838
  children: "Validate"
2766
2839
  }, undefined, false, undefined, this),
2767
- isDirty && /* @__PURE__ */ jsxDEV8(Badge5, {
2840
+ isDirty && /* @__PURE__ */ jsxDEV9(Badge5, {
2768
2841
  variant: "secondary",
2769
2842
  className: "border-amber-500/30 bg-amber-500/20 text-amber-400",
2770
2843
  children: "Unsaved changes"
2771
2844
  }, undefined, false, undefined, this),
2772
- validation && /* @__PURE__ */ jsxDEV8(Badge5, {
2845
+ validation && /* @__PURE__ */ jsxDEV9(Badge5, {
2773
2846
  variant: validation.valid ? "default" : "destructive",
2774
2847
  className: validation.valid ? "border-green-500/30 bg-green-500/20 text-green-400" : "",
2775
2848
  children: validation.valid ? "Valid" : `${validation.errors.filter((e) => e.severity === "error").length} errors`
2776
2849
  }, undefined, false, undefined, this)
2777
2850
  ]
2778
2851
  }, undefined, true, undefined, this),
2779
- /* @__PURE__ */ jsxDEV8("div", {
2852
+ /* @__PURE__ */ jsxDEV9("div", {
2780
2853
  className: "flex items-center gap-2",
2781
2854
  children: [
2782
- lastSaved && /* @__PURE__ */ jsxDEV8("span", {
2855
+ lastSaved && /* @__PURE__ */ jsxDEV9("span", {
2783
2856
  className: "text-muted-foreground text-xs",
2784
2857
  children: [
2785
2858
  "Last saved: ",
2786
2859
  new Date(lastSaved).toLocaleTimeString()
2787
2860
  ]
2788
2861
  }, undefined, true, undefined, this),
2789
- /* @__PURE__ */ jsxDEV8(Button5, {
2862
+ /* @__PURE__ */ jsxDEV9(Button5, {
2790
2863
  variant: "ghost",
2791
2864
  size: "sm",
2792
2865
  onPress: handleReset,
@@ -2796,16 +2869,16 @@ function SpecEditorPanel({
2796
2869
  }, undefined, true, undefined, this)
2797
2870
  ]
2798
2871
  }, undefined, true, undefined, this),
2799
- validation && validation.errors.length > 0 && /* @__PURE__ */ jsxDEV8("div", {
2872
+ validation && validation.errors.length > 0 && /* @__PURE__ */ jsxDEV9("div", {
2800
2873
  className: "rounded-lg border border-amber-500/50 bg-amber-500/10 p-3",
2801
2874
  children: [
2802
- /* @__PURE__ */ jsxDEV8("p", {
2875
+ /* @__PURE__ */ jsxDEV9("p", {
2803
2876
  className: "mb-2 text-xs font-semibold text-amber-400 uppercase",
2804
2877
  children: "Validation Issues"
2805
2878
  }, undefined, false, undefined, this),
2806
- /* @__PURE__ */ jsxDEV8("ul", {
2879
+ /* @__PURE__ */ jsxDEV9("ul", {
2807
2880
  className: "space-y-1",
2808
- children: validation.errors.map((error, index) => /* @__PURE__ */ jsxDEV8("li", {
2881
+ children: validation.errors.map((error, index) => /* @__PURE__ */ jsxDEV9("li", {
2809
2882
  className: `text-xs ${error.severity === "error" ? "text-red-400" : "text-amber-400"}`,
2810
2883
  children: [
2811
2884
  "Line ",
@@ -2817,9 +2890,9 @@ function SpecEditorPanel({
2817
2890
  }, undefined, false, undefined, this)
2818
2891
  ]
2819
2892
  }, undefined, true, undefined, this),
2820
- /* @__PURE__ */ jsxDEV8("div", {
2893
+ /* @__PURE__ */ jsxDEV9("div", {
2821
2894
  className: "border-border bg-card rounded-2xl border p-4",
2822
- children: /* @__PURE__ */ jsxDEV8(SpecEditor, {
2895
+ children: /* @__PURE__ */ jsxDEV9(SpecEditor, {
2823
2896
  projectId: "sandbox",
2824
2897
  type: "CAPABILITY",
2825
2898
  content,
@@ -2834,7 +2907,7 @@ function SpecEditorPanel({
2834
2907
  }
2835
2908
 
2836
2909
  // src/TemplateShell.tsx
2837
- import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
2910
+ import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
2838
2911
  var TemplateShell = ({
2839
2912
  title,
2840
2913
  description,
@@ -2843,56 +2916,56 @@ var TemplateShell = ({
2843
2916
  showSaveAction = true,
2844
2917
  saveProps,
2845
2918
  children
2846
- }) => /* @__PURE__ */ jsxDEV9("div", {
2919
+ }) => /* @__PURE__ */ jsxDEV10("div", {
2847
2920
  className: "space-y-6",
2848
2921
  children: [
2849
- /* @__PURE__ */ jsxDEV9("header", {
2922
+ /* @__PURE__ */ jsxDEV10("header", {
2850
2923
  className: "border-border bg-card rounded-2xl border p-6 shadow-sm",
2851
2924
  children: [
2852
- /* @__PURE__ */ jsxDEV9("div", {
2925
+ /* @__PURE__ */ jsxDEV10("div", {
2853
2926
  className: "flex flex-wrap items-center justify-between gap-4",
2854
2927
  children: [
2855
- /* @__PURE__ */ jsxDEV9("div", {
2928
+ /* @__PURE__ */ jsxDEV10("div", {
2856
2929
  children: [
2857
- /* @__PURE__ */ jsxDEV9("p", {
2930
+ /* @__PURE__ */ jsxDEV10("p", {
2858
2931
  className: "text-muted-foreground text-sm font-semibold tracking-wide uppercase",
2859
2932
  children: "ContractSpec Templates"
2860
2933
  }, undefined, false, undefined, this),
2861
- /* @__PURE__ */ jsxDEV9("h1", {
2934
+ /* @__PURE__ */ jsxDEV10("h1", {
2862
2935
  className: "text-3xl font-bold",
2863
2936
  children: title
2864
2937
  }, undefined, false, undefined, this),
2865
- description ? /* @__PURE__ */ jsxDEV9("p", {
2938
+ description ? /* @__PURE__ */ jsxDEV10("p", {
2866
2939
  className: "text-muted-foreground mt-2 max-w-2xl text-sm",
2867
2940
  children: description
2868
2941
  }, undefined, false, undefined, this) : null
2869
2942
  ]
2870
2943
  }, undefined, true, undefined, this),
2871
- /* @__PURE__ */ jsxDEV9("div", {
2944
+ /* @__PURE__ */ jsxDEV10("div", {
2872
2945
  className: "flex flex-col items-end gap-2",
2873
2946
  children: [
2874
- /* @__PURE__ */ jsxDEV9(LocalDataIndicator, {}, undefined, false, undefined, this),
2875
- showSaveAction ? /* @__PURE__ */ jsxDEV9(SaveToStudioButton, {
2947
+ /* @__PURE__ */ jsxDEV10(LocalDataIndicator, {}, undefined, false, undefined, this),
2948
+ showSaveAction ? /* @__PURE__ */ jsxDEV10(SaveToStudioButton, {
2876
2949
  ...saveProps
2877
2950
  }, undefined, false, undefined, this) : null
2878
2951
  ]
2879
2952
  }, undefined, true, undefined, this)
2880
2953
  ]
2881
2954
  }, undefined, true, undefined, this),
2882
- actions ? /* @__PURE__ */ jsxDEV9("div", {
2955
+ actions ? /* @__PURE__ */ jsxDEV10("div", {
2883
2956
  className: "mt-4",
2884
2957
  children: actions
2885
2958
  }, undefined, false, undefined, this) : null
2886
2959
  ]
2887
2960
  }, undefined, true, undefined, this),
2888
- /* @__PURE__ */ jsxDEV9("div", {
2961
+ /* @__PURE__ */ jsxDEV10("div", {
2889
2962
  className: sidebar ? "grid gap-6 lg:grid-cols-[minmax(0,1fr)_320px]" : "w-full",
2890
2963
  children: [
2891
- /* @__PURE__ */ jsxDEV9("main", {
2964
+ /* @__PURE__ */ jsxDEV10("main", {
2892
2965
  className: "space-y-4 p-2",
2893
2966
  children
2894
2967
  }, undefined, false, undefined, this),
2895
- sidebar ? /* @__PURE__ */ jsxDEV9("aside", {
2968
+ sidebar ? /* @__PURE__ */ jsxDEV10("aside", {
2896
2969
  className: "border-border bg-card rounded-2xl border p-4",
2897
2970
  children: sidebar
2898
2971
  }, undefined, false, undefined, this) : null
@@ -3486,6 +3559,7 @@ export {
3486
3559
  TemplateRuntimeContext,
3487
3560
  TemplateComponentRegistry,
3488
3561
  SpecEditorPanel,
3562
+ SpecDrivenTemplateShell,
3489
3563
  SaveToStudioButton,
3490
3564
  PersonalizationInsights,
3491
3565
  OverlayContextProvider,
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Minimal bundle spec for example template shells.
3
+ * Requires @contractspec/lib.surface-runtime when used.
4
+ */
5
+ export declare const ExampleTemplateBundle: {
6
+ readonly meta: {
7
+ readonly key: "example.template";
8
+ readonly version: "0.1.0";
9
+ readonly title: "Example Template";
10
+ readonly description: "Adaptive template shell for ContractSpec examples";
11
+ readonly owners: ["team-platform"];
12
+ readonly tags: ["example", "template"];
13
+ readonly stability: "experimental";
14
+ };
15
+ readonly routes: [{
16
+ readonly routeId: "template";
17
+ readonly path: "/sandbox";
18
+ readonly defaultSurface: "template-shell";
19
+ }];
20
+ readonly surfaces: {
21
+ readonly 'template-shell': {
22
+ readonly surfaceId: "template-shell";
23
+ readonly kind: "workbench";
24
+ readonly title: "Template Shell";
25
+ readonly slots: [{
26
+ readonly slotId: "header";
27
+ readonly role: "header";
28
+ readonly accepts: ["action-bar"];
29
+ readonly cardinality: "many";
30
+ }, {
31
+ readonly slotId: "primary";
32
+ readonly role: "primary";
33
+ readonly accepts: ["entity-section", "rich-doc", "form", "custom-widget"];
34
+ readonly cardinality: "many";
35
+ }, {
36
+ readonly slotId: "sidebar";
37
+ readonly role: "secondary";
38
+ readonly accepts: ["entity-section", "custom-widget"];
39
+ readonly cardinality: "one";
40
+ }];
41
+ readonly layouts: [{
42
+ readonly layoutId: "main-with-sidebar";
43
+ readonly title: "Main with sidebar";
44
+ readonly root: {
45
+ readonly type: "panel-group";
46
+ readonly direction: "horizontal";
47
+ readonly persistKey: "example.template.main-sidebar";
48
+ readonly children: [{
49
+ readonly type: "panel-group";
50
+ readonly direction: "vertical";
51
+ readonly persistKey: "example.template.content";
52
+ readonly children: [{
53
+ readonly type: "slot";
54
+ readonly slotId: "header";
55
+ }, {
56
+ readonly type: "slot";
57
+ readonly slotId: "primary";
58
+ }];
59
+ }, {
60
+ readonly type: "slot";
61
+ readonly slotId: "sidebar";
62
+ }];
63
+ };
64
+ }];
65
+ readonly data: [];
66
+ readonly verification: {
67
+ readonly dimensions: {
68
+ readonly guidance: "Can reveal hints and walkthrough notes.";
69
+ readonly density: "Can select compact or balanced layouts.";
70
+ readonly dataDepth: "Controls content depth and expansion.";
71
+ readonly control: "Shows advanced options when allowed.";
72
+ readonly media: "Supports text-first and hybrid modes.";
73
+ readonly pace: "Maps to motion tokens and transitions.";
74
+ readonly narrative: "Can order summary before or after detail.";
75
+ };
76
+ };
77
+ };
78
+ };
79
+ };
@@ -0,0 +1,86 @@
1
+ // @bun
2
+ // src/bundles/ExampleTemplateBundle.ts
3
+ import { defineModuleBundle } from "@contractspec/lib.surface-runtime/spec";
4
+ var ExampleTemplateBundle = defineModuleBundle({
5
+ meta: {
6
+ key: "example.template",
7
+ version: "0.1.0",
8
+ title: "Example Template",
9
+ description: "Adaptive template shell for ContractSpec examples",
10
+ owners: ["team-platform"],
11
+ tags: ["example", "template"],
12
+ stability: "experimental"
13
+ },
14
+ routes: [
15
+ {
16
+ routeId: "template",
17
+ path: "/sandbox",
18
+ defaultSurface: "template-shell"
19
+ }
20
+ ],
21
+ surfaces: {
22
+ "template-shell": {
23
+ surfaceId: "template-shell",
24
+ kind: "workbench",
25
+ title: "Template Shell",
26
+ slots: [
27
+ {
28
+ slotId: "header",
29
+ role: "header",
30
+ accepts: ["action-bar"],
31
+ cardinality: "many"
32
+ },
33
+ {
34
+ slotId: "primary",
35
+ role: "primary",
36
+ accepts: ["entity-section", "rich-doc", "form", "custom-widget"],
37
+ cardinality: "many"
38
+ },
39
+ {
40
+ slotId: "sidebar",
41
+ role: "secondary",
42
+ accepts: ["entity-section", "custom-widget"],
43
+ cardinality: "one"
44
+ }
45
+ ],
46
+ layouts: [
47
+ {
48
+ layoutId: "main-with-sidebar",
49
+ title: "Main with sidebar",
50
+ root: {
51
+ type: "panel-group",
52
+ direction: "horizontal",
53
+ persistKey: "example.template.main-sidebar",
54
+ children: [
55
+ {
56
+ type: "panel-group",
57
+ direction: "vertical",
58
+ persistKey: "example.template.content",
59
+ children: [
60
+ { type: "slot", slotId: "header" },
61
+ { type: "slot", slotId: "primary" }
62
+ ]
63
+ },
64
+ { type: "slot", slotId: "sidebar" }
65
+ ]
66
+ }
67
+ }
68
+ ],
69
+ data: [],
70
+ verification: {
71
+ dimensions: {
72
+ guidance: "Can reveal hints and walkthrough notes.",
73
+ density: "Can select compact or balanced layouts.",
74
+ dataDepth: "Controls content depth and expansion.",
75
+ control: "Shows advanced options when allowed.",
76
+ media: "Supports text-first and hybrid modes.",
77
+ pace: "Maps to motion tokens and transitions.",
78
+ narrative: "Can order summary before or after detail."
79
+ }
80
+ }
81
+ }
82
+ }
83
+ });
84
+ export {
85
+ ExampleTemplateBundle
86
+ };
@@ -0,0 +1 @@
1
+ export { ExampleTemplateBundle } from './ExampleTemplateBundle';
@@ -0,0 +1,86 @@
1
+ // @bun
2
+ // src/bundles/ExampleTemplateBundle.ts
3
+ import { defineModuleBundle } from "@contractspec/lib.surface-runtime/spec";
4
+ var ExampleTemplateBundle = defineModuleBundle({
5
+ meta: {
6
+ key: "example.template",
7
+ version: "0.1.0",
8
+ title: "Example Template",
9
+ description: "Adaptive template shell for ContractSpec examples",
10
+ owners: ["team-platform"],
11
+ tags: ["example", "template"],
12
+ stability: "experimental"
13
+ },
14
+ routes: [
15
+ {
16
+ routeId: "template",
17
+ path: "/sandbox",
18
+ defaultSurface: "template-shell"
19
+ }
20
+ ],
21
+ surfaces: {
22
+ "template-shell": {
23
+ surfaceId: "template-shell",
24
+ kind: "workbench",
25
+ title: "Template Shell",
26
+ slots: [
27
+ {
28
+ slotId: "header",
29
+ role: "header",
30
+ accepts: ["action-bar"],
31
+ cardinality: "many"
32
+ },
33
+ {
34
+ slotId: "primary",
35
+ role: "primary",
36
+ accepts: ["entity-section", "rich-doc", "form", "custom-widget"],
37
+ cardinality: "many"
38
+ },
39
+ {
40
+ slotId: "sidebar",
41
+ role: "secondary",
42
+ accepts: ["entity-section", "custom-widget"],
43
+ cardinality: "one"
44
+ }
45
+ ],
46
+ layouts: [
47
+ {
48
+ layoutId: "main-with-sidebar",
49
+ title: "Main with sidebar",
50
+ root: {
51
+ type: "panel-group",
52
+ direction: "horizontal",
53
+ persistKey: "example.template.main-sidebar",
54
+ children: [
55
+ {
56
+ type: "panel-group",
57
+ direction: "vertical",
58
+ persistKey: "example.template.content",
59
+ children: [
60
+ { type: "slot", slotId: "header" },
61
+ { type: "slot", slotId: "primary" }
62
+ ]
63
+ },
64
+ { type: "slot", slotId: "sidebar" }
65
+ ]
66
+ }
67
+ }
68
+ ],
69
+ data: [],
70
+ verification: {
71
+ dimensions: {
72
+ guidance: "Can reveal hints and walkthrough notes.",
73
+ density: "Can select compact or balanced layouts.",
74
+ dataDepth: "Controls content depth and expansion.",
75
+ control: "Shows advanced options when allowed.",
76
+ media: "Supports text-first and hybrid modes.",
77
+ pace: "Maps to motion tokens and transitions.",
78
+ narrative: "Can order summary before or after detail."
79
+ }
80
+ }
81
+ }
82
+ }
83
+ });
84
+ export {
85
+ ExampleTemplateBundle
86
+ };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './TemplateShell';
2
+ export * from './SpecDrivenTemplateShell';
2
3
  export * from './LocalDataIndicator';
3
4
  export * from './SaveToStudioButton';
4
5
  export * from './overlay-types';