@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.
- package/dist/app/style/theme.css +8 -0
- package/dist/bundled/app.css +2 -2
- package/dist/bundled/chunks/{AboutSection-D3IIVsiV.js → AboutSection-mX7J6xrz.js} +2 -2
- package/dist/bundled/chunks/{AgentCursor-Cg5SLa2H.js → AgentCursor-DcVxonMC.js} +2 -2
- package/dist/bundled/chunks/{AgentPlanApproval-D4hnGlYs.js → AgentPlanApproval-22I_Lbhn.js} +1 -1
- package/dist/bundled/chunks/{AgentsSection-CJGS9C2q.js → AgentsSection-DWmUKCX-.js} +1 -1
- package/dist/bundled/chunks/{AiPanel-B9QWRuSg.js → AiPanel-BICtbtCE.js} +4 -4
- package/dist/bundled/chunks/{AppearanceSection-DMjmDr1Y.js → AppearanceSection-maVgcfMk.js} +6 -6
- package/dist/bundled/chunks/{BasePopover-CQQ8wKev.js → BasePopover-B3Y5H1gd.js} +1 -1
- package/dist/bundled/chunks/{CommentsCanvasOverlay-UX-oYgnx.js → CommentsCanvasOverlay-DhqtbJNX.js} +5 -5
- package/dist/bundled/chunks/{DevBrowseStatus-D2rIG8uC.js → DevBrowseStatus-B6cLRu19.js} +2 -2
- package/dist/bundled/chunks/{DocsTab-BR3BktyF.js → DocsTab-PpFKAC6Q.js} +4 -4
- package/dist/bundled/chunks/{EventsTab-BP0hCGqL.js → EventsTab-DLVYcX1N.js} +3 -3
- package/dist/bundled/chunks/{GeneralSection-CT_-32qT.js → GeneralSection-dvmJUgqN.js} +1 -1
- package/dist/bundled/chunks/{InspectionPanel-C6kUdJj9.js → InspectionPanel-DDuT3guJ.js} +2 -2
- package/dist/bundled/chunks/{InspectorGuideLink-Bqlz1aaY.js → InspectorGuideLink-7Ui_Y2Wd.js} +1 -1
- package/dist/bundled/chunks/{MarkdownPage-DD7XyGkq.js → MarkdownPage-D_LpsCvG.js} +3 -3
- package/dist/bundled/chunks/{MarketplaceUpdateBody-B1cn_zeo.js → MarketplaceUpdateBody-BtLPpA7F.js} +2 -2
- package/dist/bundled/chunks/{MarketplaceView-eDPLtc_x.js → MarketplaceView-C1sVFRsq.js} +39 -10
- package/dist/bundled/chunks/{MatrixInspector-eIr_N5eH.js → MatrixInspector-wqkJJnuf.js} +3 -3
- package/dist/bundled/chunks/{MatrixView-CDmN-Kl9.js → MatrixView-D-Snu47M.js} +82 -40
- package/dist/bundled/chunks/{MatrixVisualActions-Cx3QzDTD.js → MatrixVisualActions-D3b-cp7N.js} +2 -2
- package/dist/bundled/chunks/{McpActivity-CiK3jUTY.js → McpActivity-r2CFr-ny.js} +1 -1
- package/dist/bundled/chunks/{McpSection-DRGzPGXO.js → McpSection-swh7qlM0.js} +1 -1
- package/dist/bundled/chunks/{NeedsAttention-C5zjd6RT.js → NeedsAttention-Cf6ihlT0.js} +2 -2
- package/dist/bundled/chunks/{PermissionPrompt-i5VbZCCJ.js → PermissionPrompt-CXTPfiIu.js} +1 -1
- package/dist/bundled/chunks/{PluginsSection-B3ZWAjrk.js → PluginsSection-Dhv2haa3.js} +6 -3
- package/dist/bundled/chunks/{ScreenshotPopover-DWcV_NAf.js → ScreenshotPopover-BZ37-dfK.js} +4 -4
- package/dist/bundled/chunks/{SettingsPage-BvT1FOl7.js → SettingsPage-D6ZOAgS9.js} +11 -11
- package/dist/bundled/chunks/{ShortcutsSection-D3-4e5Ug.js → ShortcutsSection-EK2-e56v.js} +1 -1
- package/dist/bundled/chunks/{StoryInspector-BJKzoeHc.js → StoryInspector-DCNgw0x8.js} +14 -11
- package/dist/bundled/chunks/{TestsPanel-CpBld3wM.js → TestsPanel-D1USqA8I.js} +5 -5
- package/dist/bundled/chunks/{TestsSection-CEXW49Ge.js → TestsSection-CIkkHlyK.js} +1 -1
- package/dist/bundled/chunks/{TestsTab-B-ZNDgGi.js → TestsTab-ykf9zwmG.js} +3 -3
- package/dist/bundled/chunks/{ThreadMessage-CPRLVXXQ.js → ThreadMessage-DxrvoIea.js} +5 -5
- package/dist/bundled/chunks/{ToolbarPopover-Nd-us4Fg.js → ToolbarPopover-CXizdbQq.js} +3 -3
- package/dist/bundled/chunks/{ViewportsSection-3EWu6WSc.js → ViewportsSection-D6mpKTSM.js} +1 -1
- package/dist/bundled/chunks/{VisualViewer-DV5mNFT8.js → VisualViewer-BQqfw1ov.js} +2 -2
- package/dist/bundled/chunks/{WorkbenchPanelAction-Cl68QrDs.js → WorkbenchPanelAction-SLby10Vh.js} +6 -2
- package/dist/bundled/chunks/{WorkbenchVirtualList-CUTamRgO.js → WorkbenchVirtualList-HCZiNo7p.js} +1 -1
- package/dist/bundled/chunks/{background-CG5-SPiv.js → background-CUUIkZVL.js} +7 -1
- package/dist/bundled/chunks/{canvas-settings-EP62RnvB.js → canvas-settings-Cw7AXzFG.js} +31 -13
- package/dist/bundled/chunks/{capture-SFV9pF9b.js → capture-DxD6llwl.js} +1 -1
- package/dist/bundled/chunks/{color-scheme-mhmCnofm.js → color-scheme-zLURTKoT.js} +1 -0
- package/dist/bundled/chunks/{content-view-Bpn8As7f.js → content-view-ChEpdsxh.js} +2 -2
- package/dist/bundled/chunks/{controls-view-COcHf8Pm.js → controls-view-CtDADD0e.js} +3 -3
- package/dist/bundled/chunks/{explorer-view-5gTgnjcf.js → explorer-view-B717fDtg.js} +6 -4
- package/dist/bundled/chunks/{extensions-DUXM9uEy.js → extensions-BtOjYv3e.js} +11 -2
- package/dist/bundled/chunks/{frame-ledger-BHZ0nJjD.js → frame-ledger-C67dpCuY.js} +160 -45
- package/dist/bundled/chunks/{frame-screenshot-D9R_xDns.js → frame-screenshot-IEmQR7TR.js} +1 -1
- package/dist/bundled/chunks/{icons-Bd36WZPu.js → icons-DoUVE4X3.js} +2 -2
- package/dist/bundled/chunks/{local-mount-CCa2jcqi.js → local-mount-CQ14I_16.js} +2 -1
- package/dist/bundled/chunks/{marketplace-DKeNfni-.js → marketplace-BE5IMmf3.js} +9 -3
- package/dist/bundled/chunks/{measurement-DfNeNMZe.js → measurement-BPE7RMeb.js} +1 -1
- package/dist/bundled/chunks/{model-DhvdMZzS.js → model-CIFxQfDH.js} +1 -1
- package/dist/bundled/chunks/{navigation-view-GU5-aPWL.js → navigation-view-Co43QbrR.js} +2 -2
- package/dist/bundled/chunks/{ownership-004rrffQ.js → ownership-BVQ3d672.js} +1 -1
- package/dist/bundled/chunks/{selection-DQJWdqhl.js → selection-BTc1fRMu.js} +1 -1
- package/dist/bundled/chunks/{settings-DC0gilMg.js → settings-BbefKI5N.js} +1 -1
- package/dist/bundled/chunks/{src-BazVZNon.js → src-CDZfcmuw.js} +7 -1
- package/dist/bundled/chunks/{tests-view-B9J9Gvpt.js → tests-view-RYpujVD_.js} +2 -2
- package/dist/bundled/chunks/{use-install-plan-ChZg4Xyq.js → use-install-plan-D0tiW2wu.js} +1 -1
- package/dist/bundled/chunks/{visual-CId9zv09.js → visual-nnXRPOP8.js} +1 -1
- package/dist/bundled/index.js +580 -313
- package/dist/embed/EmbedDocument.vue_vue_type_script_setup_true_lang.js +6 -1
- package/dist/embed/adapters/explorer-session.js +2 -1
- package/dist/embed/adapters/explorer-view.js +1 -0
- package/dist/embed/adapters/local-mount.js +2 -1
- package/dist/embed/adapters/runtime-frame.js +7 -1
- package/dist/embed/adapters/sandbox-urls.d.ts +2 -0
- package/dist/embed/adapters/sandbox-urls.js +1 -0
- package/dist/embed/app.css +2 -2
- package/dist/embed/handshake.js +5 -2
- package/dist/embed/packages/histoire-vue/src/components/embed/HistoireEmbed.js +6 -0
- package/dist/embed/packages/histoire-vue/src/components/preview/surface.js +11 -2
- package/dist/embed/surfaces.d.ts +2 -0
- package/dist/style.css +57 -13
- package/package.json +8 -8
- package/src/app/components/base/overflow/BaseOverflowToolbar.vue +1 -1
- package/src/app/components/base/overflow/BaseOverflowToolbarItem.vue +1 -1
- package/src/app/components/base/popover/BasePopover.vue +1 -1
- package/src/app/components/canvas/CanvasFrame.vue +47 -8
- package/src/app/components/canvas/CanvasReplicaPreview.vue +3 -1
- package/src/app/components/canvas/CanvasSingleVariant.vue +10 -5
- package/src/app/components/canvas/CanvasStatus.vue +6 -2
- package/src/app/components/canvas/CanvasViewport.vue +29 -10
- package/src/app/components/canvas/FramePaddingAligners.vue +44 -0
- package/src/app/components/canvas/SingleVariantResizeHandles.vue +3 -0
- package/src/app/components/canvas/frame-layout.ts +44 -23
- package/src/app/components/canvas/frame-props-override.ts +16 -2
- package/src/app/components/canvas/matrix/MatrixCell.vue +19 -6
- package/src/app/components/canvas/matrix/MatrixView.vue +10 -8
- package/src/app/components/canvas/matrix/matrix-layout.ts +32 -14
- package/src/app/components/canvas/matrix/matrix-registration.ts +4 -4
- package/src/app/components/canvas/single-resize.ts +4 -2
- package/src/app/components/canvas/single-viewport.ts +5 -0
- package/src/app/components/canvas/story-frame-size.ts +15 -0
- package/src/app/components/canvas/toolbar/ArrangeSwitch.vue +1 -1
- package/src/app/components/canvas/toolbar/CanvasToolbar.vue +1 -1
- package/src/app/components/canvas/toolbar/SearchMatchStepper.vue +1 -1
- package/src/app/components/canvas/toolbar/ToolSwitch.vue +1 -1
- package/src/app/components/canvas/toolbar/ViewportMenu.vue +46 -16
- package/src/app/components/canvas/toolbar/ZoomMenu.vue +13 -11
- package/src/app/components/canvas/toolbar/viewport-size.ts +14 -0
- package/src/app/components/canvas/useCanvasVariantSize.ts +24 -6
- package/src/app/components/canvas/useSingleVariantGeometry.ts +7 -4
- package/src/app/components/comments/prompt/AttachMenuPanel.vue +1 -1
- package/src/app/components/comments/prompt/PromptSuggestions.vue +1 -1
- package/src/app/components/embed/EmbedMenu.vue +8 -6
- package/src/app/components/inspector/InspectorTabs.vue +1 -1
- package/src/app/components/inspector/inspection/plugin.ts +1 -1
- package/src/app/components/marketplace/browse/CatalogState.vue +3 -0
- package/src/app/components/marketplace/detail/DetailHeader.vue +13 -5
- package/src/app/components/marketplace/install/use-install-wizard.ts +7 -2
- package/src/app/components/menu/ContextMenu.vue +1 -1
- package/src/app/components/menu/SubMenu.vue +1 -1
- package/src/app/components/pages/settings/PluginsSection.vue +4 -0
- package/src/app/components/pages/settings/plugins/use-plugin-updates.ts +3 -3
- package/src/app/components/shell/WorkbenchApp.vue +2 -2
- package/src/app/components/shell/WorkbenchPanelAction.vue +5 -3
- package/src/app/composables/canvas-settings.ts +23 -9
- package/src/app/standalone/workbench.ts +2 -0
- package/src/app/stores/canvas.ts +47 -7
- package/src/app/stores/marketplace.ts +1 -0
- package/src/app/stores/story-canvas-views.ts +15 -2
- package/src/app/style/theme.css +8 -0
- package/src/app/util/background.ts +7 -0
- package/src/app/util/frame-actions.ts +6 -0
- package/src/app/util/marketplace-client.ts +5 -2
- package/src/embed/EmbedDocument.vue +1 -1
- package/src/embed/adapters/explorer-session.ts +2 -2
- package/src/embed/adapters/explorer-view.ts +1 -1
- package/src/embed/adapters/local-mount.ts +1 -1
- package/src/embed/adapters/runtime-frame.ts +6 -1
- package/src/embed/adapters/sandbox-urls.ts +3 -0
- package/src/embed/handshake.ts +4 -2
- package/src/embed/surfaces.ts +2 -0
package/src/embed/handshake.ts
CHANGED
|
@@ -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. */
|
package/src/embed/surfaces.ts
CHANGED
|
@@ -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. */
|