@contractspec/lib.example-shared-ui 6.0.6 → 6.0.7

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.
Files changed (81) hide show
  1. package/.turbo/turbo-build.log +90 -84
  2. package/AGENTS.md +43 -25
  3. package/README.md +63 -35
  4. package/dist/EvolutionDashboard.js +9 -9
  5. package/dist/EvolutionSidebar.js +15 -15
  6. package/dist/LocalDataIndicator.js +3 -3
  7. package/dist/MarkdownView.d.ts +0 -7
  8. package/dist/MarkdownView.js +76 -172
  9. package/dist/PersonalizationInsights.js +12 -12
  10. package/dist/SaveToStudioButton.js +2 -2
  11. package/dist/SpecDrivenTemplateShell.d.ts +1 -1
  12. package/dist/SpecDrivenTemplateShell.js +10 -10
  13. package/dist/SpecEditorPanel.js +3 -3
  14. package/dist/TemplateShell.js +10 -10
  15. package/dist/browser/EvolutionDashboard.js +9 -9
  16. package/dist/browser/EvolutionSidebar.js +15 -15
  17. package/dist/browser/LocalDataIndicator.js +3 -3
  18. package/dist/browser/MarkdownView.js +76 -172
  19. package/dist/browser/PersonalizationInsights.js +12 -12
  20. package/dist/browser/SaveToStudioButton.js +2 -2
  21. package/dist/browser/SpecDrivenTemplateShell.js +10 -10
  22. package/dist/browser/SpecEditorPanel.js +3 -3
  23. package/dist/browser/TemplateShell.js +10 -10
  24. package/dist/browser/hooks/index.js +29 -29
  25. package/dist/browser/index.js +193 -286
  26. package/dist/browser/lib/component-registry.js +1 -1
  27. package/dist/browser/markdown/formatPresentationName.js +9 -0
  28. package/dist/browser/markdown/useMarkdownPresentation.js +65 -0
  29. package/dist/hooks/index.d.ts +3 -3
  30. package/dist/hooks/index.js +29 -29
  31. package/dist/index.d.ts +12 -11
  32. package/dist/index.js +193 -286
  33. package/dist/lib/component-registry.js +1 -1
  34. package/dist/markdown/formatPresentationName.d.ts +1 -0
  35. package/dist/markdown/formatPresentationName.js +10 -0
  36. package/dist/markdown/useMarkdownPresentation.d.ts +21 -0
  37. package/dist/markdown/useMarkdownPresentation.js +66 -0
  38. package/dist/node/EvolutionDashboard.js +9 -9
  39. package/dist/node/EvolutionSidebar.js +15 -15
  40. package/dist/node/LocalDataIndicator.js +3 -3
  41. package/dist/node/MarkdownView.js +76 -172
  42. package/dist/node/PersonalizationInsights.js +12 -12
  43. package/dist/node/SaveToStudioButton.js +2 -2
  44. package/dist/node/SpecDrivenTemplateShell.js +10 -10
  45. package/dist/node/SpecEditorPanel.js +3 -3
  46. package/dist/node/TemplateShell.js +10 -10
  47. package/dist/node/hooks/index.js +29 -29
  48. package/dist/node/index.js +193 -286
  49. package/dist/node/lib/component-registry.js +1 -1
  50. package/dist/node/markdown/formatPresentationName.js +9 -0
  51. package/dist/node/markdown/useMarkdownPresentation.js +65 -0
  52. package/dist/utils/index.d.ts +1 -1
  53. package/package.json +38 -11
  54. package/src/EvolutionDashboard.tsx +415 -415
  55. package/src/EvolutionSidebar.tsx +245 -245
  56. package/src/LocalDataIndicator.tsx +28 -28
  57. package/src/MarkdownView.tsx +119 -372
  58. package/src/OverlayContextProvider.tsx +272 -272
  59. package/src/PersonalizationInsights.tsx +232 -232
  60. package/src/SaveToStudioButton.tsx +51 -51
  61. package/src/SpecDrivenTemplateShell.tsx +59 -59
  62. package/src/SpecEditorPanel.tsx +138 -138
  63. package/src/TemplateShell.tsx +50 -50
  64. package/src/bundles/ExampleTemplateBundle.ts +78 -78
  65. package/src/hooks/index.ts +3 -3
  66. package/src/hooks/useBehaviorTracking.ts +252 -252
  67. package/src/hooks/useEvolution.ts +437 -437
  68. package/src/hooks/useRegistryTemplates.ts +42 -42
  69. package/src/hooks/useSpecContent.ts +214 -214
  70. package/src/hooks/useWorkflowComposer.ts +567 -567
  71. package/src/index.ts +12 -11
  72. package/src/lib/component-registry.tsx +40 -40
  73. package/src/lib/runtime-context.tsx +31 -31
  74. package/src/lib/types.ts +57 -57
  75. package/src/markdown/formatPresentationName.ts +9 -0
  76. package/src/markdown/useMarkdownPresentation.ts +107 -0
  77. package/src/overlay-types.ts +15 -15
  78. package/src/utils/fetchPresentationData.ts +13 -13
  79. package/src/utils/generateSpecFromTemplate.ts +29 -29
  80. package/src/utils/index.ts +1 -1
  81. package/tsconfig.json +8 -8
@@ -6,86 +6,86 @@
6
6
  import { defineModuleBundle } from '@contractspec/lib.surface-runtime/spec';
7
7
 
8
8
  export const ExampleTemplateBundle = defineModuleBundle({
9
- meta: {
10
- key: 'example.template',
11
- version: '0.1.0',
12
- title: 'Example Template',
13
- description: 'Adaptive template shell for ContractSpec examples',
14
- owners: ['team-platform'],
15
- tags: ['example', 'template'],
16
- stability: 'experimental',
17
- },
9
+ meta: {
10
+ key: 'example.template',
11
+ version: '0.1.0',
12
+ title: 'Example Template',
13
+ description: 'Adaptive template shell for ContractSpec examples',
14
+ owners: ['team-platform'],
15
+ tags: ['example', 'template'],
16
+ stability: 'experimental',
17
+ },
18
18
 
19
- routes: [
20
- {
21
- routeId: 'template',
22
- path: '/sandbox',
23
- defaultSurface: 'template-shell',
24
- },
25
- ],
19
+ routes: [
20
+ {
21
+ routeId: 'template',
22
+ path: '/sandbox',
23
+ defaultSurface: 'template-shell',
24
+ },
25
+ ],
26
26
 
27
- surfaces: {
28
- 'template-shell': {
29
- surfaceId: 'template-shell',
30
- kind: 'workbench',
31
- title: 'Template Shell',
32
- slots: [
33
- {
34
- slotId: 'header',
35
- role: 'header',
36
- accepts: ['action-bar'],
37
- cardinality: 'many',
38
- },
39
- {
40
- slotId: 'primary',
41
- role: 'primary',
42
- accepts: ['entity-section', 'rich-doc', 'form', 'custom-widget'],
43
- cardinality: 'many',
44
- },
45
- {
46
- slotId: 'sidebar',
47
- role: 'secondary',
48
- accepts: ['entity-section', 'custom-widget'],
49
- cardinality: 'one',
50
- },
51
- ],
27
+ surfaces: {
28
+ 'template-shell': {
29
+ surfaceId: 'template-shell',
30
+ kind: 'workbench',
31
+ title: 'Template Shell',
32
+ slots: [
33
+ {
34
+ slotId: 'header',
35
+ role: 'header',
36
+ accepts: ['action-bar'],
37
+ cardinality: 'many',
38
+ },
39
+ {
40
+ slotId: 'primary',
41
+ role: 'primary',
42
+ accepts: ['entity-section', 'rich-doc', 'form', 'custom-widget'],
43
+ cardinality: 'many',
44
+ },
45
+ {
46
+ slotId: 'sidebar',
47
+ role: 'secondary',
48
+ accepts: ['entity-section', 'custom-widget'],
49
+ cardinality: 'one',
50
+ },
51
+ ],
52
52
 
53
- layouts: [
54
- {
55
- layoutId: 'main-with-sidebar',
56
- title: 'Main with sidebar',
57
- root: {
58
- type: 'panel-group',
59
- direction: 'horizontal',
60
- persistKey: 'example.template.main-sidebar',
61
- children: [
62
- {
63
- type: 'panel-group',
64
- direction: 'vertical',
65
- persistKey: 'example.template.content',
66
- children: [
67
- { type: 'slot', slotId: 'header' },
68
- { type: 'slot', slotId: 'primary' },
69
- ],
70
- },
71
- { type: 'slot', slotId: 'sidebar' },
72
- ],
73
- },
74
- },
75
- ],
76
- data: [],
53
+ layouts: [
54
+ {
55
+ layoutId: 'main-with-sidebar',
56
+ title: 'Main with sidebar',
57
+ root: {
58
+ type: 'panel-group',
59
+ direction: 'horizontal',
60
+ persistKey: 'example.template.main-sidebar',
61
+ children: [
62
+ {
63
+ type: 'panel-group',
64
+ direction: 'vertical',
65
+ persistKey: 'example.template.content',
66
+ children: [
67
+ { type: 'slot', slotId: 'header' },
68
+ { type: 'slot', slotId: 'primary' },
69
+ ],
70
+ },
71
+ { type: 'slot', slotId: 'sidebar' },
72
+ ],
73
+ },
74
+ },
75
+ ],
76
+ data: [],
77
77
 
78
- verification: {
79
- dimensions: {
80
- guidance: 'Can reveal hints and walkthrough notes.',
81
- density: 'Can select compact or balanced layouts.',
82
- dataDepth: 'Controls content depth and expansion.',
83
- control: 'Shows advanced options when allowed.',
84
- media: 'Supports text-first and hybrid modes.',
85
- pace: 'Maps to motion tokens and transitions.',
86
- narrative: 'Can order summary before or after detail.',
87
- },
88
- },
89
- },
90
- },
78
+ verification: {
79
+ dimensions: {
80
+ guidance: 'Can reveal hints and walkthrough notes.',
81
+ density: 'Can select compact or balanced layouts.',
82
+ dataDepth: 'Controls content depth and expansion.',
83
+ control: 'Shows advanced options when allowed.',
84
+ media: 'Supports text-first and hybrid modes.',
85
+ pace: 'Maps to motion tokens and transitions.',
86
+ narrative: 'Can order summary before or after detail.',
87
+ },
88
+ },
89
+ },
90
+ },
91
91
  });
@@ -1,5 +1,5 @@
1
- export * from './useSpecContent';
2
- export * from './useEvolution';
3
1
  export * from './useBehaviorTracking';
4
- export * from './useWorkflowComposer';
2
+ export * from './useEvolution';
5
3
  export * from './useRegistryTemplates';
4
+ export * from './useSpecContent';
5
+ export * from './useWorkflowComposer';