@histoire/app 1.0.0-beta.2 → 1.0.0-beta.3

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 (137) hide show
  1. package/dist/app/style/theme.css +8 -0
  2. package/dist/bundled/app.css +2 -2
  3. package/dist/bundled/chunks/{AboutSection-D3IIVsiV.js → AboutSection-mX7J6xrz.js} +2 -2
  4. package/dist/bundled/chunks/{AgentCursor-Cg5SLa2H.js → AgentCursor-DcVxonMC.js} +2 -2
  5. package/dist/bundled/chunks/{AgentPlanApproval-D4hnGlYs.js → AgentPlanApproval-22I_Lbhn.js} +1 -1
  6. package/dist/bundled/chunks/{AgentsSection-CJGS9C2q.js → AgentsSection-DWmUKCX-.js} +1 -1
  7. package/dist/bundled/chunks/{AiPanel-B9QWRuSg.js → AiPanel-BICtbtCE.js} +4 -4
  8. package/dist/bundled/chunks/{AppearanceSection-DMjmDr1Y.js → AppearanceSection-maVgcfMk.js} +6 -6
  9. package/dist/bundled/chunks/{BasePopover-CQQ8wKev.js → BasePopover-B3Y5H1gd.js} +1 -1
  10. package/dist/bundled/chunks/{CommentsCanvasOverlay-UX-oYgnx.js → CommentsCanvasOverlay-DhqtbJNX.js} +5 -5
  11. package/dist/bundled/chunks/{DevBrowseStatus-D2rIG8uC.js → DevBrowseStatus-B6cLRu19.js} +2 -2
  12. package/dist/bundled/chunks/{DocsTab-BR3BktyF.js → DocsTab-PpFKAC6Q.js} +4 -4
  13. package/dist/bundled/chunks/{EventsTab-BP0hCGqL.js → EventsTab-DLVYcX1N.js} +3 -3
  14. package/dist/bundled/chunks/{GeneralSection-CT_-32qT.js → GeneralSection-dvmJUgqN.js} +1 -1
  15. package/dist/bundled/chunks/{InspectionPanel-C6kUdJj9.js → InspectionPanel-DDuT3guJ.js} +2 -2
  16. package/dist/bundled/chunks/{InspectorGuideLink-Bqlz1aaY.js → InspectorGuideLink-7Ui_Y2Wd.js} +1 -1
  17. package/dist/bundled/chunks/{MarkdownPage-DD7XyGkq.js → MarkdownPage-D_LpsCvG.js} +3 -3
  18. package/dist/bundled/chunks/{MarketplaceUpdateBody-B1cn_zeo.js → MarketplaceUpdateBody-BtLPpA7F.js} +2 -2
  19. package/dist/bundled/chunks/{MarketplaceView-eDPLtc_x.js → MarketplaceView-C1sVFRsq.js} +39 -10
  20. package/dist/bundled/chunks/{MatrixInspector-eIr_N5eH.js → MatrixInspector-wqkJJnuf.js} +3 -3
  21. package/dist/bundled/chunks/{MatrixView-CDmN-Kl9.js → MatrixView-D-Snu47M.js} +82 -40
  22. package/dist/bundled/chunks/{MatrixVisualActions-Cx3QzDTD.js → MatrixVisualActions-D3b-cp7N.js} +2 -2
  23. package/dist/bundled/chunks/{McpActivity-CiK3jUTY.js → McpActivity-r2CFr-ny.js} +1 -1
  24. package/dist/bundled/chunks/{McpSection-DRGzPGXO.js → McpSection-swh7qlM0.js} +1 -1
  25. package/dist/bundled/chunks/{NeedsAttention-C5zjd6RT.js → NeedsAttention-Cf6ihlT0.js} +2 -2
  26. package/dist/bundled/chunks/{PermissionPrompt-i5VbZCCJ.js → PermissionPrompt-CXTPfiIu.js} +1 -1
  27. package/dist/bundled/chunks/{PluginsSection-B3ZWAjrk.js → PluginsSection-Dhv2haa3.js} +6 -3
  28. package/dist/bundled/chunks/{ScreenshotPopover-DWcV_NAf.js → ScreenshotPopover-BZ37-dfK.js} +4 -4
  29. package/dist/bundled/chunks/{SettingsPage-BvT1FOl7.js → SettingsPage-D6ZOAgS9.js} +11 -11
  30. package/dist/bundled/chunks/{ShortcutsSection-D3-4e5Ug.js → ShortcutsSection-EK2-e56v.js} +1 -1
  31. package/dist/bundled/chunks/{StoryInspector-BJKzoeHc.js → StoryInspector-DCNgw0x8.js} +14 -11
  32. package/dist/bundled/chunks/{TestsPanel-CpBld3wM.js → TestsPanel-D1USqA8I.js} +5 -5
  33. package/dist/bundled/chunks/{TestsSection-CEXW49Ge.js → TestsSection-CIkkHlyK.js} +1 -1
  34. package/dist/bundled/chunks/{TestsTab-B-ZNDgGi.js → TestsTab-ykf9zwmG.js} +3 -3
  35. package/dist/bundled/chunks/{ThreadMessage-CPRLVXXQ.js → ThreadMessage-DxrvoIea.js} +5 -5
  36. package/dist/bundled/chunks/{ToolbarPopover-Nd-us4Fg.js → ToolbarPopover-CXizdbQq.js} +3 -3
  37. package/dist/bundled/chunks/{ViewportsSection-3EWu6WSc.js → ViewportsSection-D6mpKTSM.js} +1 -1
  38. package/dist/bundled/chunks/{VisualViewer-DV5mNFT8.js → VisualViewer-BQqfw1ov.js} +2 -2
  39. package/dist/bundled/chunks/{WorkbenchPanelAction-Cl68QrDs.js → WorkbenchPanelAction-SLby10Vh.js} +6 -2
  40. package/dist/bundled/chunks/{WorkbenchVirtualList-CUTamRgO.js → WorkbenchVirtualList-HCZiNo7p.js} +1 -1
  41. package/dist/bundled/chunks/{background-CG5-SPiv.js → background-CUUIkZVL.js} +7 -1
  42. package/dist/bundled/chunks/{canvas-settings-EP62RnvB.js → canvas-settings-Cw7AXzFG.js} +31 -13
  43. package/dist/bundled/chunks/{capture-SFV9pF9b.js → capture-DxD6llwl.js} +1 -1
  44. package/dist/bundled/chunks/{color-scheme-mhmCnofm.js → color-scheme-zLURTKoT.js} +1 -0
  45. package/dist/bundled/chunks/{content-view-Bpn8As7f.js → content-view-ChEpdsxh.js} +2 -2
  46. package/dist/bundled/chunks/{controls-view-COcHf8Pm.js → controls-view-CtDADD0e.js} +3 -3
  47. package/dist/bundled/chunks/{explorer-view-5gTgnjcf.js → explorer-view-B717fDtg.js} +6 -4
  48. package/dist/bundled/chunks/{extensions-DUXM9uEy.js → extensions-BtOjYv3e.js} +11 -2
  49. package/dist/bundled/chunks/{frame-ledger-BHZ0nJjD.js → frame-ledger-C67dpCuY.js} +160 -45
  50. package/dist/bundled/chunks/{frame-screenshot-D9R_xDns.js → frame-screenshot-IEmQR7TR.js} +1 -1
  51. package/dist/bundled/chunks/{icons-Bd36WZPu.js → icons-DoUVE4X3.js} +2 -2
  52. package/dist/bundled/chunks/{local-mount-CCa2jcqi.js → local-mount-CQ14I_16.js} +2 -1
  53. package/dist/bundled/chunks/{marketplace-DKeNfni-.js → marketplace-BE5IMmf3.js} +9 -3
  54. package/dist/bundled/chunks/{measurement-DfNeNMZe.js → measurement-BPE7RMeb.js} +1 -1
  55. package/dist/bundled/chunks/{model-DhvdMZzS.js → model-CIFxQfDH.js} +1 -1
  56. package/dist/bundled/chunks/{navigation-view-GU5-aPWL.js → navigation-view-Co43QbrR.js} +2 -2
  57. package/dist/bundled/chunks/{ownership-004rrffQ.js → ownership-BVQ3d672.js} +1 -1
  58. package/dist/bundled/chunks/{selection-DQJWdqhl.js → selection-BTc1fRMu.js} +1 -1
  59. package/dist/bundled/chunks/{settings-DC0gilMg.js → settings-BbefKI5N.js} +1 -1
  60. package/dist/bundled/chunks/{src-BazVZNon.js → src-CDZfcmuw.js} +7 -1
  61. package/dist/bundled/chunks/{tests-view-B9J9Gvpt.js → tests-view-RYpujVD_.js} +2 -2
  62. package/dist/bundled/chunks/{use-install-plan-ChZg4Xyq.js → use-install-plan-D0tiW2wu.js} +1 -1
  63. package/dist/bundled/chunks/{visual-CId9zv09.js → visual-nnXRPOP8.js} +1 -1
  64. package/dist/bundled/index.js +580 -313
  65. package/dist/embed/EmbedDocument.vue_vue_type_script_setup_true_lang.js +6 -1
  66. package/dist/embed/adapters/explorer-session.js +2 -1
  67. package/dist/embed/adapters/explorer-view.js +1 -0
  68. package/dist/embed/adapters/local-mount.js +2 -1
  69. package/dist/embed/adapters/runtime-frame.js +7 -1
  70. package/dist/embed/adapters/sandbox-urls.d.ts +2 -0
  71. package/dist/embed/adapters/sandbox-urls.js +1 -0
  72. package/dist/embed/app.css +2 -2
  73. package/dist/embed/handshake.js +5 -2
  74. package/dist/embed/packages/histoire-vue/src/components/embed/HistoireEmbed.js +6 -0
  75. package/dist/embed/packages/histoire-vue/src/components/preview/surface.js +11 -2
  76. package/dist/embed/surfaces.d.ts +2 -0
  77. package/dist/style.css +57 -13
  78. package/package.json +8 -8
  79. package/src/app/components/base/overflow/BaseOverflowToolbar.vue +1 -1
  80. package/src/app/components/base/overflow/BaseOverflowToolbarItem.vue +1 -1
  81. package/src/app/components/base/popover/BasePopover.vue +1 -1
  82. package/src/app/components/canvas/CanvasFrame.vue +47 -8
  83. package/src/app/components/canvas/CanvasReplicaPreview.vue +3 -1
  84. package/src/app/components/canvas/CanvasSingleVariant.vue +10 -5
  85. package/src/app/components/canvas/CanvasStatus.vue +6 -2
  86. package/src/app/components/canvas/CanvasViewport.vue +29 -10
  87. package/src/app/components/canvas/FramePaddingAligners.vue +44 -0
  88. package/src/app/components/canvas/SingleVariantResizeHandles.vue +3 -0
  89. package/src/app/components/canvas/frame-layout.ts +44 -23
  90. package/src/app/components/canvas/frame-props-override.ts +16 -2
  91. package/src/app/components/canvas/matrix/MatrixCell.vue +19 -6
  92. package/src/app/components/canvas/matrix/MatrixView.vue +10 -8
  93. package/src/app/components/canvas/matrix/matrix-layout.ts +32 -14
  94. package/src/app/components/canvas/matrix/matrix-registration.ts +4 -4
  95. package/src/app/components/canvas/single-resize.ts +4 -2
  96. package/src/app/components/canvas/single-viewport.ts +5 -0
  97. package/src/app/components/canvas/story-frame-size.ts +15 -0
  98. package/src/app/components/canvas/toolbar/ArrangeSwitch.vue +1 -1
  99. package/src/app/components/canvas/toolbar/CanvasToolbar.vue +1 -1
  100. package/src/app/components/canvas/toolbar/SearchMatchStepper.vue +1 -1
  101. package/src/app/components/canvas/toolbar/ToolSwitch.vue +1 -1
  102. package/src/app/components/canvas/toolbar/ViewportMenu.vue +46 -16
  103. package/src/app/components/canvas/toolbar/ZoomMenu.vue +13 -11
  104. package/src/app/components/canvas/toolbar/viewport-size.ts +14 -0
  105. package/src/app/components/canvas/useCanvasVariantSize.ts +24 -6
  106. package/src/app/components/canvas/useSingleVariantGeometry.ts +7 -4
  107. package/src/app/components/comments/prompt/AttachMenuPanel.vue +1 -1
  108. package/src/app/components/comments/prompt/PromptSuggestions.vue +1 -1
  109. package/src/app/components/embed/EmbedMenu.vue +8 -6
  110. package/src/app/components/inspector/InspectorTabs.vue +1 -1
  111. package/src/app/components/inspector/inspection/plugin.ts +1 -1
  112. package/src/app/components/marketplace/browse/CatalogState.vue +3 -0
  113. package/src/app/components/marketplace/detail/DetailHeader.vue +13 -5
  114. package/src/app/components/marketplace/install/use-install-wizard.ts +7 -2
  115. package/src/app/components/menu/ContextMenu.vue +1 -1
  116. package/src/app/components/menu/SubMenu.vue +1 -1
  117. package/src/app/components/pages/settings/PluginsSection.vue +4 -0
  118. package/src/app/components/pages/settings/plugins/use-plugin-updates.ts +3 -3
  119. package/src/app/components/shell/WorkbenchApp.vue +2 -2
  120. package/src/app/components/shell/WorkbenchPanelAction.vue +5 -3
  121. package/src/app/composables/canvas-settings.ts +23 -9
  122. package/src/app/standalone/workbench.ts +2 -0
  123. package/src/app/stores/canvas.ts +47 -7
  124. package/src/app/stores/marketplace.ts +1 -0
  125. package/src/app/stores/story-canvas-views.ts +15 -2
  126. package/src/app/style/theme.css +8 -0
  127. package/src/app/util/background.ts +7 -0
  128. package/src/app/util/frame-actions.ts +6 -0
  129. package/src/app/util/marketplace-client.ts +5 -2
  130. package/src/embed/EmbedDocument.vue +1 -1
  131. package/src/embed/adapters/explorer-session.ts +2 -2
  132. package/src/embed/adapters/explorer-view.ts +1 -1
  133. package/src/embed/adapters/local-mount.ts +1 -1
  134. package/src/embed/adapters/runtime-frame.ts +6 -1
  135. package/src/embed/adapters/sandbox-urls.ts +3 -0
  136. package/src/embed/handshake.ts +4 -2
  137. package/src/embed/surfaces.ts +2 -0
@@ -1,6 +1,6 @@
1
1
  import type { HistoireBridgeAck, HistoireBridgeIdentity, HistoireSnapshot, HistoireSurface } from '@histoire/protocol'
2
2
  import type { EmbedSourceConnection } from './types.js'
3
- import { HistoireSdkError, negotiateHistoireProtocol, parseEmbedPresentation, validateEmbedOrigin, validateHistoireHello } from '@histoire/protocol'
3
+ import { HistoireSdkError, negotiateHistoireProtocol, parseEmbedPadding, parseEmbedPresentation, validateEmbedOrigin, validateHistoireHello } from '@histoire/protocol'
4
4
  import { createBridgePort, getBridgeSurfaceRole } from '@histoire/sdk/internal'
5
5
  import { dispatchEmbedCommand, projectEmbedDescriptor } from './commands.js'
6
6
  import { createEmbedDocumentLifecycle } from './lifecycle.js'
@@ -48,6 +48,8 @@ export function installEmbedHandshake(sourcePromise: Promise<EmbedSourceConnecti
48
48
  }
49
49
  const presentation = parseEmbedPresentation(hints)
50
50
  if (presentation && surface !== 'explorer') throw new HistoireSdkError('INVALID_ARGUMENT', 'Embed presentation requires explorer surface')
51
+ const padding = parseEmbedPadding(hints)
52
+ if (padding !== undefined && surface !== 'preview' && !presentation) throw new HistoireSdkError('INVALID_ARGUMENT', 'Embed padding requires a preview surface or an explorer embed presentation')
51
53
  const descriptor = projectEmbedDescriptor(source.descriptor, parentOrigin, window.location.origin, source.allowedOrigins)
52
54
  const owner: HistoireBridgeIdentity = { protocolVersion, sessionId: hello.sessionId, mountId: hello.mountId, connectionId: surface ? `${hello.mountId}:connection` : `${hello.mountId}:connection:${hello.nonce}`, sourceId: descriptor.sourceId, epoch: descriptor.epoch, revision: descriptor.revision }
53
55
  let view: ReturnType<typeof createParentViewSession> | undefined
@@ -69,7 +71,7 @@ export function installEmbedHandshake(sourcePromise: Promise<EmbedSourceConnecti
69
71
  if (request.command === 'view.sync' && view && surface) {
70
72
  view.synchronize(request.payload as HistoireSnapshot)
71
73
  if (!instance) {
72
- instance = mountEmbedSurface(surface, { container: window.document.body, session: view.session, bridge, descriptor, signal: lifecycle.signal, controlsCustomOnly, sourceBase: new URL('./', window.location.href).href, presentation })
74
+ instance = mountEmbedSurface(surface, { container: window.document.body, session: view.session, bridge, descriptor, signal: lifecycle.signal, controlsCustomOnly, sourceBase: new URL('./', window.location.href).href, presentation, padding })
73
75
  lifecycle.add(() => instance?.close())
74
76
  const capture = { ...bridge.getOwner(), target: view.session.getSnapshot().selection ?? undefined }
75
77
  /** First readiness cannot adopt a later source, target or document. */
@@ -7,6 +7,8 @@ export interface EmbedSurfaceContext {
7
7
  standalone?: boolean
8
8
  /** Scoped explorer UI, independent of parent bridge authority. */
9
9
  presentation?: HistoireEmbedPresentation
10
+ /** Variant gutter override in CSS pixels, replacing the story and project padding. */
11
+ padding?: number
10
12
  /** Explicit source base for local standalone mounts whose route changes independently. */
11
13
  sourceBase?: string
12
14
  /** Native provider renders generic editors locally; independent iframe defaults to full panel. */