@contractspec/lib.example-shared-ui 6.0.5 → 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 (82) hide show
  1. package/.turbo/turbo-build.log +90 -84
  2. package/AGENTS.md +43 -25
  3. package/CHANGELOG.md +11 -0
  4. package/README.md +63 -35
  5. package/dist/EvolutionDashboard.js +9 -9
  6. package/dist/EvolutionSidebar.js +15 -15
  7. package/dist/LocalDataIndicator.js +3 -3
  8. package/dist/MarkdownView.d.ts +0 -7
  9. package/dist/MarkdownView.js +76 -172
  10. package/dist/PersonalizationInsights.js +12 -12
  11. package/dist/SaveToStudioButton.js +2 -2
  12. package/dist/SpecDrivenTemplateShell.d.ts +1 -1
  13. package/dist/SpecDrivenTemplateShell.js +10 -10
  14. package/dist/SpecEditorPanel.js +3 -3
  15. package/dist/TemplateShell.js +10 -10
  16. package/dist/browser/EvolutionDashboard.js +9 -9
  17. package/dist/browser/EvolutionSidebar.js +15 -15
  18. package/dist/browser/LocalDataIndicator.js +3 -3
  19. package/dist/browser/MarkdownView.js +76 -172
  20. package/dist/browser/PersonalizationInsights.js +12 -12
  21. package/dist/browser/SaveToStudioButton.js +2 -2
  22. package/dist/browser/SpecDrivenTemplateShell.js +10 -10
  23. package/dist/browser/SpecEditorPanel.js +3 -3
  24. package/dist/browser/TemplateShell.js +10 -10
  25. package/dist/browser/hooks/index.js +29 -29
  26. package/dist/browser/index.js +193 -286
  27. package/dist/browser/lib/component-registry.js +1 -1
  28. package/dist/browser/markdown/formatPresentationName.js +9 -0
  29. package/dist/browser/markdown/useMarkdownPresentation.js +65 -0
  30. package/dist/hooks/index.d.ts +3 -3
  31. package/dist/hooks/index.js +29 -29
  32. package/dist/index.d.ts +12 -11
  33. package/dist/index.js +193 -286
  34. package/dist/lib/component-registry.js +1 -1
  35. package/dist/markdown/formatPresentationName.d.ts +1 -0
  36. package/dist/markdown/formatPresentationName.js +10 -0
  37. package/dist/markdown/useMarkdownPresentation.d.ts +21 -0
  38. package/dist/markdown/useMarkdownPresentation.js +66 -0
  39. package/dist/node/EvolutionDashboard.js +9 -9
  40. package/dist/node/EvolutionSidebar.js +15 -15
  41. package/dist/node/LocalDataIndicator.js +3 -3
  42. package/dist/node/MarkdownView.js +76 -172
  43. package/dist/node/PersonalizationInsights.js +12 -12
  44. package/dist/node/SaveToStudioButton.js +2 -2
  45. package/dist/node/SpecDrivenTemplateShell.js +10 -10
  46. package/dist/node/SpecEditorPanel.js +3 -3
  47. package/dist/node/TemplateShell.js +10 -10
  48. package/dist/node/hooks/index.js +29 -29
  49. package/dist/node/index.js +193 -286
  50. package/dist/node/lib/component-registry.js +1 -1
  51. package/dist/node/markdown/formatPresentationName.js +9 -0
  52. package/dist/node/markdown/useMarkdownPresentation.js +65 -0
  53. package/dist/utils/index.d.ts +1 -1
  54. package/package.json +40 -13
  55. package/src/EvolutionDashboard.tsx +415 -415
  56. package/src/EvolutionSidebar.tsx +245 -245
  57. package/src/LocalDataIndicator.tsx +28 -28
  58. package/src/MarkdownView.tsx +119 -372
  59. package/src/OverlayContextProvider.tsx +272 -272
  60. package/src/PersonalizationInsights.tsx +232 -232
  61. package/src/SaveToStudioButton.tsx +51 -51
  62. package/src/SpecDrivenTemplateShell.tsx +59 -59
  63. package/src/SpecEditorPanel.tsx +138 -138
  64. package/src/TemplateShell.tsx +50 -50
  65. package/src/bundles/ExampleTemplateBundle.ts +78 -78
  66. package/src/hooks/index.ts +3 -3
  67. package/src/hooks/useBehaviorTracking.ts +252 -252
  68. package/src/hooks/useEvolution.ts +437 -437
  69. package/src/hooks/useRegistryTemplates.ts +42 -42
  70. package/src/hooks/useSpecContent.ts +214 -214
  71. package/src/hooks/useWorkflowComposer.ts +567 -567
  72. package/src/index.ts +12 -11
  73. package/src/lib/component-registry.tsx +40 -40
  74. package/src/lib/runtime-context.tsx +31 -31
  75. package/src/lib/types.ts +57 -57
  76. package/src/markdown/formatPresentationName.ts +9 -0
  77. package/src/markdown/useMarkdownPresentation.ts +107 -0
  78. package/src/overlay-types.ts +15 -15
  79. package/src/utils/fetchPresentationData.ts +13 -13
  80. package/src/utils/generateSpecFromTemplate.ts +29 -29
  81. package/src/utils/index.ts +1 -1
  82. 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';