@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
@@ -251,7 +251,7 @@ function createPluginUpdates(store, dev) {
251
251
  async function refresh(force = false) {
252
252
  if (!connected || disposed || !dev) return;
253
253
  const key = preferenceKey.value;
254
- if (!force && (cached === key || loading.value)) return;
254
+ if (!force && (loading.value || cached?.key === key && Date.now() - cached.refreshedAt < 36e5)) return;
255
255
  controller?.abort();
256
256
  const current = controller = new AbortController();
257
257
  loading.value = true;
@@ -260,7 +260,10 @@ function createPluginUpdates(store, dev) {
260
260
  const value = await store.client.updates(store.prefs.value, { signal: current.signal });
261
261
  if (!current.signal.aborted) {
262
262
  entries.value = value;
263
- cached = key;
263
+ cached = {
264
+ key,
265
+ refreshedAt: Date.now()
266
+ };
264
267
  }
265
268
  } catch (cause) {
266
269
  if (!current.signal.aborted) error.value = cause instanceof Error ? cause.message : "Could not check updates";
@@ -624,9 +627,11 @@ function createMarketplaceClient(options = {}) {
624
627
  },
625
628
  /** Read declarative plugin details. */
626
629
  detail(id, prefs, requestOptions) {
630
+ const version = requestOptions?.version;
627
631
  return transport.available() ? request("histoire:ui:marketplace-detail", "histoire:ui:marketplace-detail-result", "detail", {
628
632
  id,
629
- prefs
633
+ prefs,
634
+ ...version ? { version } : {}
630
635
  }, requestOptions) : offlineDetail(id, requestOptions);
631
636
  },
632
637
  /** Read compatible target notes and migrations from the development server. */
@@ -796,6 +801,7 @@ function createMarketplaceStore(options) {
796
801
  if (!open.value) {
797
802
  const active = target ?? (typeof document !== "undefined" && document.activeElement instanceof HTMLElement ? document.activeElement : void 0);
798
803
  opener.value = active ? markRaw(active) : void 0;
804
+ updates.refresh();
799
805
  }
800
806
  setView(value);
801
807
  open.value = true;
@@ -1,6 +1,6 @@
1
1
  import { A as useLoadingDelay, j as LoadingDelayBoundary } from "./controls-DpdwHd4q.js";
2
2
  import { i as useExtensionHost } from "./extensions-DY0LLiE_.js";
3
- import { n as ExtensionView_default } from "./icons-Bd36WZPu.js";
3
+ import { n as ExtensionView_default } from "./icons-DoUVE4X3.js";
4
4
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, onBeforeUnmount, openBlock, ref, renderList, renderSlot, unref, withCtx } from "@histoire/vendors/vue";
5
5
  import { BUILTIN_INSPECTOR_TABS, BUILTIN_NAMESPACE, createContributionKeys, parseQualifiedId } from "@histoire/plugin-kit";
6
6
  // src/app/components/inspector/state.ts
@@ -1,4 +1,4 @@
1
- import { N as useHistoireContext } from "./extensions-DUXM9uEy.js";
1
+ import { N as useHistoireContext } from "./extensions-BtOjYv3e.js";
2
2
  import { HISTOIRE_UNHANDLED_ERROR_NAME, createHistoireTestSummary, formatTestError } from "@histoire/shared";
3
3
  import { computed, inject, provide, shallowRef, watch } from "@histoire/vendors/vue";
4
4
  import { HistoireSdkError, getHistoireTargetKey, validateProjectTestCollection } from "@histoire/protocol";
@@ -1,5 +1,5 @@
1
- import { d as HistoireToolbar, g as HistoireEvents, m as HistoireSearch, u as HistoireStoryTree } from "./extensions-DUXM9uEy.js";
2
- import { t as HistoireProvider } from "./src-BazVZNon.js";
1
+ import { d as HistoireToolbar, g as HistoireEvents, m as HistoireSearch, u as HistoireStoryTree } from "./extensions-BtOjYv3e.js";
2
+ import { t as HistoireProvider } from "./src-CDZfcmuw.js";
3
3
  import { createApp, h } from "@histoire/vendors/vue";
4
4
  // src/embed/adapters/navigation-view.ts
5
5
  /** Independent data parts share parent proxy; no router, active session, or story loader. */
@@ -1,4 +1,4 @@
1
- import { P as useHistoireResource } from "./extensions-DUXM9uEy.js";
1
+ import { P as useHistoireResource } from "./extensions-BtOjYv3e.js";
2
2
  import { getHistoireTargetKey } from "@histoire/protocol";
3
3
  // src/app/components/pages/home/ownership.ts
4
4
  /** Target-only identities never authorize completion against a newer source publication. */
@@ -1,4 +1,4 @@
1
- import { N as useHistoireContext, j as useHistoireSnapshot } from "./extensions-DUXM9uEy.js";
1
+ import { N as useHistoireContext, j as useHistoireSnapshot } from "./extensions-BtOjYv3e.js";
2
2
  import { computed } from "@histoire/vendors/vue";
3
3
  // src/app/composables/selection.ts
4
4
  /** Workbench selection reads canonical snapshots from its exact provider session. */
@@ -1,4 +1,4 @@
1
- import { t as checkerboardTheme } from "./background-CG5-SPiv.js";
1
+ import { t as checkerboardTheme } from "./background-CUUIkZVL.js";
2
2
  // src/app/components/canvas/toolbar/settings.ts
3
3
  /** Validate user dimensions before mutating canonical preview settings. */
4
4
  function parseViewportSize(width, height) {
@@ -1,5 +1,5 @@
1
1
  import { F as provideHistoireControls, n as HstButton, p as HstSelect } from "./controls-DpdwHd4q.js";
2
- import { D as HistoireControls, M as histoireContextKey, N as useHistoireContext, P as useHistoireResource, T as HistoireDocs, a as bindPluginShortcuts, f as provideNativeWorkbenchComponents, g as HistoireEvents, h as HistoireSource, j as useHistoireSnapshot, n as histoireExtensionsKey, r as provideHistoireExtensions, t as createProviderExtensions, v as HistoirePreview } from "./extensions-DUXM9uEy.js";
2
+ import { D as HistoireControls, M as histoireContextKey, N as useHistoireContext, P as useHistoireResource, T as HistoireDocs, a as bindPluginShortcuts, f as provideNativeWorkbenchComponents, g as HistoireEvents, h as HistoireSource, j as useHistoireSnapshot, n as histoireExtensionsKey, r as provideHistoireExtensions, t as createProviderExtensions, v as HistoirePreview } from "./extensions-BtOjYv3e.js";
3
3
  import { computed, defineComponent, h, inject, markRaw, onBeforeUnmount, onMounted, provide, readonly, shallowReadonly, shallowRef, toRaw, useId, watch } from "@histoire/vendors/vue";
4
4
  import { HistoireSdkError, getHistoireColorChannels, getHistoireSemanticThemeOverrides, getHistoireTargetKey, parseColor, validateEmbedPanels } from "@histoire/protocol";
5
5
  import { getHistoireSessionDescriptor } from "@histoire/sdk/internal";
@@ -110,6 +110,11 @@ var HistoireEmbed = defineComponent({
110
110
  panels: {
111
111
  type: Array,
112
112
  default: () => ["controls"]
113
+ },
114
+ /** Gutter in CSS pixels around the variant, replacing the story and project padding. */
115
+ padding: {
116
+ type: Number,
117
+ default: void 0
113
118
  }
114
119
  },
115
120
  emits: ["ready", "error"],
@@ -171,6 +176,7 @@ var HistoireEmbed = defineComponent({
171
176
  "class": "histoire-embed-canvas",
172
177
  "aria-label": "Canvas"
173
178
  }, [h(HistoirePreview, {
179
+ padding: props.padding,
174
180
  onReady: () => active && emit("ready"),
175
181
  onError: error
176
182
  }, slots.canvas)]), panels.value.length ? h(EmbedPanels, {
@@ -1,5 +1,5 @@
1
- import { c as provideHistoireTestsModel, o as HistoireTests, s as createHistoireTestsModel } from "./extensions-DUXM9uEy.js";
2
- import { t as HistoireProvider } from "./src-BazVZNon.js";
1
+ import { c as provideHistoireTestsModel, o as HistoireTests, s as createHistoireTestsModel } from "./extensions-BtOjYv3e.js";
2
+ import { t as HistoireProvider } from "./src-CDZfcmuw.js";
3
3
  import { t as createHistoireTestsCollector } from "./internal-BOzwU0KU.js";
4
4
  import { createApp, defineComponent, h } from "@histoire/vendors/vue";
5
5
  // src/embed/adapters/tests-view.ts
@@ -1,6 +1,6 @@
1
1
  import { U as WorkbenchEmptyState_default } from "./sandbox-shared-CwPQj187.js";
2
2
  import { c as HstCopyIcon, t as BuiltinIcon } from "./controls-DpdwHd4q.js";
3
- import { r as useMarketplaceStore } from "./marketplace-DKeNfni-.js";
3
+ import { r as useMarketplaceStore } from "./marketplace-BE5IMmf3.js";
4
4
  import { n as BaseChip_default } from "./PluginTile-CfplGy7m.js";
5
5
  import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, onScopeDispose, openBlock, ref, renderList, resolveDynamicComponent, shallowRef, toDisplayString, unref, watch, withCtx } from "@histoire/vendors/vue";
6
6
  // src/app/components/marketplace/update/ReleaseNotes.vue?vue&type=script&setup=true&lang.ts
@@ -1,5 +1,5 @@
1
1
  import { a as sendUiEvent, i as onUiReconnect, n as onUiDisconnect, r as onUiEvent } from "./ui-channel-BPYj8uw2.js";
2
- import { t as useCaptureDiscoveryPause } from "./capture-SFV9pF9b.js";
2
+ import { t as useCaptureDiscoveryPause } from "./capture-DxD6llwl.js";
3
3
  import { VISUAL_APPROVAL_BATCH_LIMIT } from "@histoire/shared";
4
4
  import { computed, inject, provide, ref, shallowRef, watch } from "@histoire/vendors/vue";
5
5
  // src/app/stores/visual-approval.ts