@inkandswitch/patchwork-pkg-base 0.0.108 → 0.0.110

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 (24) hide show
  1. package/module-settings-url +1 -1
  2. package/package.json +1 -1
  3. package/packages/add-doc-to-sidebar-button/button.js +141 -25
  4. package/packages/add-doc-to-sidebar-button/button.test.js +114 -0
  5. package/packages/sideboard/dist/chunk-H6GFMJFM.js +15 -0
  6. package/packages/sideboard/dist/chunk-H6GFMJFM.js.map +7 -0
  7. package/packages/sideboard/dist/{document-list-panel-VFY2RV33.js → document-list-panel-SEKNECHI.js} +2 -2
  8. package/packages/sideboard/dist/index.js +1 -1
  9. package/packages/sideboard/dist/sideboard/sideboard.js +1 -1
  10. package/packages/threepane/dist/IsolatedDocumentArea-5WRK3TWL.js +2 -0
  11. package/packages/threepane/dist/PatchworkFrame-22UEOQ6E.js +2 -0
  12. package/packages/threepane/dist/PatchworkFrame-22UEOQ6E.js.map +7 -0
  13. package/packages/threepane/dist/{chunk-XOKWELWP.js → chunk-U4IJVHXK.js} +10 -5
  14. package/packages/threepane/dist/chunk-U4IJVHXK.js.map +7 -0
  15. package/packages/threepane/dist/index.js +1 -1
  16. package/plugin-registry-url +1 -1
  17. package/packages/sideboard/dist/chunk-WPHECYLJ.js +0 -15
  18. package/packages/sideboard/dist/chunk-WPHECYLJ.js.map +0 -7
  19. package/packages/threepane/dist/IsolatedDocumentArea-UTNJADQ7.js +0 -2
  20. package/packages/threepane/dist/PatchworkFrame-U2TVLGCZ.js +0 -2
  21. package/packages/threepane/dist/PatchworkFrame-U2TVLGCZ.js.map +0 -7
  22. package/packages/threepane/dist/chunk-XOKWELWP.js.map +0 -7
  23. /package/packages/sideboard/dist/{document-list-panel-VFY2RV33.js.map → document-list-panel-SEKNECHI.js.map} +0 -0
  24. /package/packages/threepane/dist/{IsolatedDocumentArea-UTNJADQ7.js.map → IsolatedDocumentArea-5WRK3TWL.js.map} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/PatchworkFrame.tsx", "../src/components/SidebarWidgets.tsx", "../src/components/Tray.tsx", "../src/account/ensureThreepaneConfig.ts", "../src/account/loadDatatypeWhenReady.ts", "../src/account/seedExampleDocuments.ts", "../src/hooks/useHandleDoc.ts"],
4
- "sourcesContent": ["import { template as _$template } from \"solid-js/web\";\nimport { delegateEvents as _$delegateEvents } from \"solid-js/web\";\nimport { memo as _$memo } from \"solid-js/web\";\nimport { setStyleProperty as _$setStyleProperty } from \"solid-js/web\";\nimport { setAttribute as _$setAttribute } from \"solid-js/web\";\nimport { effect as _$effect } from \"solid-js/web\";\nimport { getOwner as _$getOwner } from \"solid-js/web\";\nimport { use as _$use } from \"solid-js/web\";\nimport { insert as _$insert } from \"solid-js/web\";\nimport { createComponent as _$createComponent } from \"solid-js/web\";\nvar _tmpl$ = /*#__PURE__*/_$template(`<div class=frame-shell><aside class=frame-warning-banner>research grade software. do not share links. sharing a doc is sharing your account.</aside><div class=frame><patchwork-view component=patchwork-selected-doc-provider><patchwork-view component=patchwork-account-provider><patchwork-view component=patchwork-tool-storage-provider><patchwork-view component=patchwork-worker-provider>`, true, false, false),\n _tmpl$2 = /*#__PURE__*/_$template(`<div style=display:contents>`),\n _tmpl$3 = /*#__PURE__*/_$template(`<div class=main-area>`),\n _tmpl$4 = /*#__PURE__*/_$template(`<div class=frame__popover-backdrop><div class=frame__popover role=dialog aria-modal=true><div class=frame__popover-toolbar><patchwork-view tool-id=doc-openwith></patchwork-view></div><div class=frame__popover-body><patchwork-view>`, true, false, false),\n _tmpl$5 = /*#__PURE__*/_$template(`<button type=button class=\"frame__sidebar-toggle frame__left-toggle\">`),\n _tmpl$6 = /*#__PURE__*/_$template(`<div class=threepane-sidebar><div class=threepane-sidebar__footer><footer class=threepane-account-bar><button type=button class=threepane-account-bar__button>Settings`),\n _tmpl$7 = /*#__PURE__*/_$template(`<div class=frame__tray-dock>`),\n _tmpl$8 = /*#__PURE__*/_$template(`<button type=button class=\"threepane-account-bar__button threepane-account-bar__avatar\"title=Account aria-label=Account><patchwork-view tool-id=contact-avatar>`, true, false, false),\n _tmpl$9 = /*#__PURE__*/_$template(`<button type=button class=threepane-account-bar__button>Packages`),\n _tmpl$0 = /*#__PURE__*/_$template(`<svg xmlns=http://www.w3.org/2000/svg width=18 height=18 viewBox=\"0 0 24 24\"fill=none stroke=var(--studio-chrome-line) stroke-width=1.75 stroke-linecap=round stroke-linejoin=round><rect width=18 height=18 x=3 y=3 rx=2></rect><path d=\"M9 3v18\">`);\nimport \"@inkandswitch/patchwork-elements\";\nimport { useDocHandle } from \"solid-automerge\";\nimport { subscribe } from \"@inkandswitch/patchwork-providers\";\nimport { useSidebarState, useSidebarResize, useMainDocMounted, SIDEBAR_KEYS, COLLAPSE_CONTEXT_SIDEBAR_EVENT, getStoredNumber, getStoredBoolean, DEFAULT_SIDEBAR_WIDTH } from \"./hooks\";\nimport { Sidebar } from \"./components/Sidebar\";\nimport { SidebarWidgets } from \"./components/SidebarWidgets\";\nimport { DocumentAreaRoot } from \"./components/DocumentAreaRoot\";\nimport { IsolatedDocumentArea } from \"./components/IsolatedDocumentArea\";\nimport { MainDocumentView } from \"./components/MainDocumentView\";\nimport { Tray } from \"./components/Tray\";\nimport { createEffect, createMemo, createSignal, onCleanup, onMount, Show } from \"solid-js\";\nimport { render } from \"solid-js/web\";\nimport { ensureThreepaneConfig } from \"./account/ensureThreepaneConfig\";\nimport { seedExampleDocuments } from \"./account/seedExampleDocuments\";\nimport { ensureFrameStyles } from \"./ensureFrameStyles\";\nimport { useHandleDoc } from \"./hooks/useHandleDoc\";\nconst useFrameProviderReady = (componentId, element) => {\n const [isReady, setReady] = createSignal(false);\n createEffect(() => {\n const el = element();\n if (!el) return;\n setReady(false);\n const onMounted = event => {\n const detail = event.detail;\n if (detail?.componentId !== componentId) return;\n setReady(true);\n };\n el.addEventListener(\"patchwork:mounted\", onMounted);\n onCleanup(() => el.removeEventListener(\"patchwork:mounted\", onMounted));\n });\n return isReady;\n};\nfunction dispatchOpen(el, detail) {\n el.dispatchEvent(new CustomEvent(\"patchwork:open-document\", {\n detail,\n bubbles: true,\n composed: true\n }));\n}\nexport function PatchworkFrame({\n handle,\n repo,\n ...props\n}) {\n ensureFrameStyles();\n const accountDocUrl = handle.url;\n const [accountProviderElement, setAccountProviderElement] = createSignal();\n const isAccountProviderReady = useFrameProviderReady(\"patchwork-account-provider\", accountProviderElement);\n const [toolStorageProviderElement, setToolStorageProviderElement] = createSignal();\n const isToolStorageProviderReady = useFrameProviderReady(\"patchwork-tool-storage-provider\", toolStorageProviderElement);\n const [selectedDocProviderElement, setSelectedDocProviderElement] = createSignal();\n const isSelectedDocProviderReady = useFrameProviderReady(\"patchwork-selected-doc-provider\", selectedDocProviderElement);\n const areProvidersReady = createMemo(() => isSelectedDocProviderReady() && isAccountProviderReady() && isToolStorageProviderReady());\n return (() => {\n var _el$ = _tmpl$(),\n _el$2 = _el$.firstChild,\n _el$3 = _el$2.firstChild,\n _el$4 = _el$2.nextSibling,\n _el$5 = _el$4.firstChild,\n _el$6 = _el$5.firstChild,\n _el$7 = _el$6.firstChild,\n _el$8 = _el$7.firstChild;\n _$insert(_el$2, _$createComponent(Show, {\n get when() {\n return props.isolation;\n },\n get children() {\n return [\" \", \"isolation is highly experimental. if things are broken, switch back to wild west.\"];\n }\n }), null);\n _$use(setSelectedDocProviderElement, _el$5);\n _el$5._$owner = _$getOwner();\n _$use(setAccountProviderElement, _el$6);\n _el$6.docUrl = accountDocUrl;\n _el$6._$owner = _$getOwner();\n _$use(setToolStorageProviderElement, _el$7);\n _el$7.docUrl = accountDocUrl;\n _el$7._$owner = _$getOwner();\n _el$8._$owner = _$getOwner();\n _$insert(_el$8, _$createComponent(Show, {\n get when() {\n return areProvidersReady();\n },\n get children() {\n return _$createComponent(PatchworkFrameInner, {\n handle: handle,\n repo: repo,\n get isolation() {\n return props.isolation;\n }\n });\n }\n }));\n return _el$;\n })();\n}\nfunction PatchworkFrameInner(props) {\n const accountDocHandle = useDocHandle(() => props.handle.url, {\n repo: props.repo\n });\n void (async () => {\n await ensureThreepaneConfig(props.handle, props.repo);\n await seedExampleDocuments(props.handle, props.repo);\n })().catch(err => {\n console.error(\"frame: account bootstrap failed\", err);\n });\n const accountDoc = useHandleDoc(accountDocHandle);\n const accountDocUrl = props.handle.url;\n const threepaneUrl = () => accountDoc()?.tools?.[\"threepane\"];\n const threepaneConfigHandle = useDocHandle(() => threepaneUrl(), {\n repo: props.repo\n });\n const threepaneConfig = useHandleDoc(threepaneConfigHandle);\n const doctitleSlots = () => threepaneConfig()?.doctitle?.tools;\n const sidebarWidgets = () => threepaneConfig()?.sidebar?.widgets ?? [];\n const traySlots = () => threepaneConfig()?.tray ?? [];\n const rootFolderUrl = () => accountDoc()?.rootFolderUrl;\n const sidebarState = useSidebarState();\n const sidebarResize = useSidebarResize(\"left\", {\n isCollapsed: sidebarState.isSidebarCollapsed,\n setCollapsed: sidebarState.setIsSidebarCollapsed,\n setWidth: sidebarState.setLeftSidebarWidth\n });\n let element;\n const [selectedView, setSelectedView] = createSignal(null);\n const [popoverView, setPopoverView] = createSignal(null);\n onMount(() => {\n const unsubscribeSelectedView = subscribe(element, {\n type: \"patchwork:selected-view\"\n }, view => setSelectedView(view));\n onCleanup(unsubscribeSelectedView);\n });\n const selectedDocUrl = () => selectedView()?.url;\n const selectedToolId = () => selectedView()?.toolId ?? void 0;\n const initialRightWidth = () => getStoredNumber(SIDEBAR_KEYS.rightWidth, DEFAULT_SIDEBAR_WIDTH);\n const initialRightCollapsed = () => getStoredBoolean(SIDEBAR_KEYS.rightCollapsed);\n const [mainDocElement, setMainDocElement] = createSignal();\n const isMainDocMounted = useMainDocMounted(mainDocElement, selectedDocUrl);\n const [widgetsReady, setWidgetsReady] = createSignal(false);\n createEffect(() => {\n if (widgetsReady()) return;\n if (props.isolation || !selectedDocUrl() || isMainDocMounted()) setWidgetsReady(true);\n });\n return (() => {\n var _el$9 = _tmpl$2();\n var _ref$ = element;\n typeof _ref$ === \"function\" ? _$use(_ref$, _el$9) : element = _el$9;\n _$insert(_el$9, _$createComponent(FrameLayout, {\n accountDocUrl: accountDocUrl,\n sidebarState: sidebarState,\n sidebarResize: sidebarResize,\n sidebarWidgets: sidebarWidgets,\n traySlots: traySlots,\n configHandle: threepaneConfigHandle,\n rootFolderUrl: rootFolderUrl,\n widgetsReady: widgetsReady,\n contactUrl: () => accountDoc()?.contactUrl,\n moduleSettingsUrl: () => accountDoc()?.moduleSettingsUrl,\n get isolation() {\n return props.isolation;\n },\n onInterceptOpen: setPopoverView,\n get children() {\n return _$createComponent(Show, {\n get when() {\n return selectedDocUrl();\n },\n get fallback() {\n return (() => {\n var _el$0 = _tmpl$3();\n _$insert(_el$0, _$createComponent(MainDocumentView, {\n viewKey: selectedDocUrl,\n selectedDocUrl: selectedDocUrl,\n toolId: selectedToolId,\n ref: setMainDocElement\n }));\n return _el$0;\n })();\n },\n get children() {\n return _$createComponent(Show, {\n get when() {\n return props.isolation;\n },\n get fallback() {\n return _$createComponent(DocumentAreaRoot, {\n setMainDocElement: setMainDocElement,\n selectedDocUrl: selectedDocUrl,\n selectedToolId: selectedToolId,\n doctitleSlots: doctitleSlots,\n get isLeftCollapsed() {\n return sidebarState.isSidebarCollapsed;\n },\n initialRightWidth: initialRightWidth,\n initialRightCollapsed: initialRightCollapsed\n });\n },\n get children() {\n return _$createComponent(IsolatedDocumentArea, {\n get contactUrl() {\n return accountDoc()?.contactUrl;\n },\n selectedDocUrl: selectedDocUrl,\n selectedToolId: selectedToolId,\n doctitleSlots: doctitleSlots,\n get isLeftCollapsed() {\n return sidebarState.isSidebarCollapsed;\n },\n initialRightWidth: initialRightWidth,\n initialRightCollapsed: initialRightCollapsed\n });\n }\n });\n }\n });\n }\n }), null);\n _$insert(_el$9, _$createComponent(Show, {\n get when() {\n return popoverView();\n },\n children: view => _$createComponent(FramePopover, {\n get view() {\n return view();\n },\n onClose: () => setPopoverView(null)\n })\n }), null);\n return _el$9;\n })();\n}\nfunction FramePopover(props) {\n const [toolId, setToolId] = createSignal(props.view.toolId ?? void 0);\n createEffect(() => setToolId(props.view.toolId ?? void 0));\n let popoverEl;\n onMount(() => {\n const onKey = e => {\n if (e.key === \"Escape\") props.onClose();\n };\n window.addEventListener(\"keydown\", onKey);\n onCleanup(() => window.removeEventListener(\"keydown\", onKey));\n const el = popoverEl;\n if (!el) return;\n const onOpen = event => {\n const {\n url,\n toolId: nextToolId\n } = event.detail;\n if (!url) return;\n event.stopPropagation();\n setToolId(nextToolId ?? void 0);\n };\n el.addEventListener(\"patchwork:open-document\", onOpen);\n onCleanup(() => el.removeEventListener(\"patchwork:open-document\", onOpen));\n });\n return (() => {\n var _el$1 = _tmpl$4(),\n _el$10 = _el$1.firstChild,\n _el$11 = _el$10.firstChild,\n _el$12 = _el$11.firstChild,\n _el$13 = _el$11.nextSibling,\n _el$14 = _el$13.firstChild;\n _el$1.$$click = () => props.onClose();\n _el$10.$$click = e => e.stopPropagation();\n var _ref$2 = popoverEl;\n typeof _ref$2 === \"function\" ? _$use(_ref$2, _el$10) : popoverEl = _el$10;\n _el$12._$owner = _$getOwner();\n _el$14._$owner = _$getOwner();\n _$effect(_p$ => {\n var _v$ = props.view.url,\n _v$2 = props.view.url,\n _v$3 = toolId();\n _v$ !== _p$.e && (_el$12.docUrl = _p$.e = _v$);\n _v$2 !== _p$.t && (_el$14.docUrl = _p$.t = _v$2);\n _v$3 !== _p$.a && (_el$14.toolId = _p$.a = _v$3);\n return _p$;\n }, {\n e: undefined,\n t: undefined,\n a: undefined\n });\n return _el$1;\n })();\n}\nexport function FrameLayout(props) {\n const isCollapsed = props.sidebarState.isSidebarCollapsed;\n const hasTray = () => props.traySlots().length > 0;\n let sidebarContentEl;\n let footerEl;\n createEffect(() => {\n if (isCollapsed()) return;\n const el = sidebarContentEl;\n if (!el) return;\n const footer = footerEl;\n const onOpen = event => {\n const {\n url,\n toolId\n } = event.detail;\n if (props.isolation && url && footer && event.composedPath().includes(footer)) {\n event.stopPropagation();\n props.onInterceptOpen?.({\n url,\n toolId: toolId ?? null\n });\n return;\n }\n if (el.getBoundingClientRect().width <= window.innerWidth * 0.75) return;\n props.sidebarState.setIsSidebarCollapsed(true);\n window.dispatchEvent(new CustomEvent(COLLAPSE_CONTEXT_SIDEBAR_EVENT));\n };\n el.addEventListener(\"patchwork:open-document\", onOpen);\n onCleanup(() => el.removeEventListener(\"patchwork:open-document\", onOpen));\n });\n return [(() => {\n var _el$15 = _tmpl$5();\n _el$15.$$click = () => props.sidebarState.setIsSidebarCollapsed(v => !v);\n _$insert(_el$15, _$createComponent(PanelLeftIcon, {}));\n _$effect(_p$ => {\n var _v$4 = isCollapsed() ? \"Show sidebar\" : \"Hide sidebar\",\n _v$5 = isCollapsed() ? \"Show sidebar\" : \"Hide sidebar\",\n _v$6 = !isCollapsed();\n _v$4 !== _p$.e && _$setAttribute(_el$15, \"title\", _p$.e = _v$4);\n _v$5 !== _p$.t && _$setAttribute(_el$15, \"aria-label\", _p$.t = _v$5);\n _v$6 !== _p$.a && _$setAttribute(_el$15, \"aria-pressed\", _p$.a = _v$6);\n return _p$;\n }, {\n e: undefined,\n t: undefined,\n a: undefined\n });\n return _el$15;\n })(), _$createComponent(Sidebar, {\n side: \"left\",\n isCollapsed: isCollapsed,\n get width() {\n return props.sidebarState.leftSidebarWidth;\n },\n get onMouseDown() {\n return props.sidebarResize.handleMouseDown;\n },\n get onToggleClick() {\n return props.sidebarResize.handleToggleClick;\n },\n get children() {\n var _el$16 = _tmpl$6(),\n _el$17 = _el$16.firstChild,\n _el$18 = _el$17.firstChild,\n _el$19 = _el$18.firstChild;\n var _ref$3 = sidebarContentEl;\n typeof _ref$3 === \"function\" ? _$use(_ref$3, _el$16) : sidebarContentEl = _el$16;\n _$insert(_el$16, _$createComponent(SidebarWidgets, {\n get widgets() {\n return props.sidebarWidgets;\n },\n get configHandle() {\n return props.configHandle;\n },\n get rootFolderUrl() {\n return props.rootFolderUrl;\n },\n get ready() {\n return props.widgetsReady;\n }\n }), _el$17);\n var _ref$4 = footerEl;\n typeof _ref$4 === \"function\" ? _$use(_ref$4, _el$17) : footerEl = _el$17;\n _$insert(_el$18, _$createComponent(Show, {\n get when() {\n return props.contactUrl();\n },\n children: contactUrl => (() => {\n var _el$21 = _tmpl$8(),\n _el$22 = _el$21.firstChild;\n _el$21.$$click = e => dispatchOpen(e.currentTarget, {\n url: props.accountDocUrl,\n toolId: \"account-picker\"\n });\n _el$22._$owner = _$getOwner();\n _$effect(() => _el$22.docUrl = contactUrl());\n return _el$21;\n })()\n }), _el$19);\n _$insert(_el$18, _$createComponent(Show, {\n get when() {\n return props.moduleSettingsUrl();\n },\n children: moduleSettingsUrl => (() => {\n var _el$23 = _tmpl$9();\n _el$23.$$click = e => dispatchOpen(e.currentTarget, {\n url: moduleSettingsUrl(),\n toolId: \"packages\"\n });\n return _el$23;\n })()\n }), _el$19);\n _el$19.$$click = e => dispatchOpen(e.currentTarget, {\n url: props.accountDocUrl,\n toolId: \"frame-configurator\"\n });\n _$effect(() => _el$16.classList.toggle(\"threepane-sidebar--has-tray\", !!hasTray()));\n return _el$16;\n }\n }), _$createComponent(Show, {\n get when() {\n return hasTray();\n },\n get children() {\n var _el$20 = _tmpl$7();\n _$insert(_el$20, _$createComponent(Tray, {\n get slots() {\n return props.traySlots;\n }\n }));\n _$effect(_p$ => {\n var _v$7 = !!isCollapsed(),\n _v$8 = `${props.sidebarState.leftSidebarWidth()}px`;\n _v$7 !== _p$.e && _el$20.classList.toggle(\"frame__tray-dock--collapsed\", _p$.e = _v$7);\n _v$8 !== _p$.t && _$setStyleProperty(_el$20, \"width\", _p$.t = _v$8);\n return _p$;\n }, {\n e: undefined,\n t: undefined\n });\n return _el$20;\n }\n }), _$memo(() => props.children)];\n}\nfunction PanelLeftIcon() {\n return _tmpl$0();\n}\nexport function renderPatchworkFrame(isolation) {\n return (handle, element) => {\n return render(() => _$createComponent(PatchworkFrame, {\n handle: handle,\n get repo() {\n return element.repo;\n },\n isolation: isolation\n }), element);\n };\n}\n_$delegateEvents([\"click\"]);", "import { template as _$template } from \"solid-js/web\";\nimport { delegateEvents as _$delegateEvents } from \"solid-js/web\";\nimport { memo as _$memo } from \"solid-js/web\";\nimport { insert as _$insert } from \"solid-js/web\";\nimport { createComponent as _$createComponent } from \"solid-js/web\";\nvar _tmpl$ = /*#__PURE__*/_$template(`<div class=threepane-widgets>`),\n _tmpl$2 = /*#__PURE__*/_$template(`<div class=threepane-widgets__empty><button type=button class=threepane-widgets__add>\uFF0B Add document list`),\n _tmpl$3 = /*#__PURE__*/_$template(`<div class=threepane-widget>`);\nimport { For, Show } from \"solid-js\";\nimport { SlotView } from \"./SlotView\";\nimport { DOCUMENT_LIST_TOOL } from \"../datatypes\";\nexport function SidebarWidgets(props) {\n const addDocumentList = () => {\n const root = props.rootFolderUrl();\n const handle = props.configHandle();\n if (!root || !handle) return;\n handle.change(doc => {\n doc.sidebar.widgets.push([DOCUMENT_LIST_TOOL, root]);\n });\n };\n return (() => {\n var _el$ = _tmpl$();\n _$insert(_el$, _$createComponent(Show, {\n get when() {\n return props.ready();\n },\n get children() {\n return _$createComponent(Show, {\n get when() {\n return props.widgets().length;\n },\n get fallback() {\n return (// While the config/root folder are still loading we can't add a\n // widget yet \u2014 show nothing rather than a disabled button.\n _$createComponent(Show, {\n get when() {\n return _$memo(() => !!props.rootFolderUrl())() && props.configHandle();\n },\n get children() {\n var _el$2 = _tmpl$2(),\n _el$3 = _el$2.firstChild;\n _el$3.$$click = addDocumentList;\n return _el$2;\n }\n })\n );\n },\n get children() {\n return _$createComponent(For, {\n get each() {\n return props.widgets();\n },\n children: widget => (() => {\n var _el$4 = _tmpl$3();\n _$insert(_el$4, _$createComponent(SlotView, {\n slot: widget\n }));\n return _el$4;\n })()\n });\n }\n });\n }\n }));\n return _el$;\n })();\n}\n_$delegateEvents([\"click\"]);", "import { template as _$template } from \"solid-js/web\";\nimport { setAttribute as _$setAttribute } from \"solid-js/web\";\nimport { effect as _$effect } from \"solid-js/web\";\nimport { insert as _$insert } from \"solid-js/web\";\nimport { createComponent as _$createComponent } from \"solid-js/web\";\nvar _tmpl$ = /*#__PURE__*/_$template(`<div class=frame-tray>`),\n _tmpl$2 = /*#__PURE__*/_$template(`<div class=frame-tray__item>`);\nimport { For, Show } from \"solid-js\";\nimport { SlotView, slotId, uniqueSlots } from \"./SlotView\";\nexport function Tray(props) {\n return _$createComponent(Show, {\n get when() {\n return props.slots().length;\n },\n get children() {\n var _el$ = _tmpl$();\n _$insert(_el$, _$createComponent(For, {\n get each() {\n return uniqueSlots(props.slots());\n },\n children: slot => (() => {\n var _el$2 = _tmpl$2();\n _$insert(_el$2, _$createComponent(SlotView, {\n slot: slot\n }));\n _$effect(() => _$setAttribute(_el$2, \"data-tray-id\", slotId(slot)));\n return _el$2;\n })()\n }));\n return _el$;\n }\n });\n}", "import type { AutomergeUrl, DocHandle, Repo } from \"@automerge/automerge-repo/slim\";\nimport { createDocOfDatatype2 } from \"@inkandswitch/patchwork-plugins\";\nimport type { AccountDoc, ThreepaneConfigDoc, ToolRef, ToolSlot } from \"../types\";\nimport {\n DEFAULT_DOCTITLE_TOOLS,\n DEFAULT_TRAY_TOOLS,\n DOCUMENT_LIST_TOOL,\n THREEPANE_CONFIG_VERSION,\n} from \"../datatypes\";\nimport { loadDatatypeWhenReady } from \"./loadDatatypeWhenReady\";\nimport { slotId, uniqueSlots } from \"../components/SlotView\";\n\n// Title + spacer are intrinsic to the frame's top bar, never configured tools.\nconst INTRINSIC_DOCTITLE_TOOLS = new Set([\"document-title\", \"spacer\"]);\n\n/** The default sidebar widgets for a fresh (or empty) account. */\nfunction defaultSidebarWidgets(rootFolderUrl?: AutomergeUrl): ToolRef[] {\n return rootFolderUrl ? [[DOCUMENT_LIST_TOOL, rootFolderUrl]] : [];\n}\n\n/**\n * Bring a config doc made before versioning up to THREEPANE_CONFIG_VERSION:\n * fill in the default document list, tray and doctitle tools it's missing, and\n * drop duplicate tray slots. Runs once per doc. After that the doc is the\n * person's to edit, and anything they remove stays removed.\n */\nexport function migrateThreepaneConfig(\n doc: ThreepaneConfigDoc,\n rootFolderUrl?: AutomergeUrl\n) {\n if ((doc.version ?? 0) >= THREEPANE_CONFIG_VERSION) return;\n\n if (!doc.sidebar) doc.sidebar = { widgets: [] };\n if (rootFolderUrl && !doc.sidebar.widgets?.length) {\n doc.sidebar.widgets = defaultSidebarWidgets(rootFolderUrl);\n }\n\n if (!doc.tray) {\n doc.tray = DEFAULT_TRAY_TOOLS.slice();\n } else {\n // Append default tray tools the saved tray is missing, like\n // llm-config-tray. slotId compares across the string and tuple forms.\n const unique = uniqueSlots(doc.tray);\n if (unique.length !== doc.tray.length) doc.tray = unique;\n const present = new Set(doc.tray.map((s) => slotId(s)));\n for (const id of DEFAULT_TRAY_TOOLS) {\n if (!present.has(id)) {\n doc.tray.push(id);\n present.add(id);\n }\n }\n }\n\n // A doctitle lane that ended up empty (nothing to migrate from the legacy\n // field) gets the defaults rather than a bare top bar.\n if (!doc.doctitle?.tools?.length) {\n doc.doctitle = { ...doc.doctitle, tools: DEFAULT_DOCTITLE_TOOLS.slice() };\n }\n\n // Can't seed the document list until the account has a root folder, so leave\n // the migration pending and try again on the next mount.\n if (!doc.sidebar.widgets?.length && !rootFolderUrl) return;\n\n doc.version = THREEPANE_CONFIG_VERSION;\n}\n\n/**\n * Lazily create the threepane layout config doc and point `account.tools.threepane`\n * at it, migrating the legacy `account.documentToolbarToolIds` into its\n * `doctitle` lane and seeding the sidebar with a document list pinned to the\n * account's root folder.\n *\n * Defaults are written only when the config doc is created, or once when an\n * older doc is migrated (see `migrateThreepaneConfig`), never on every mount.\n *\n * Non-destructive: the old `documentToolbarToolIds` / `accountSidebarToolId`\n * fields are left untouched so older builds keep working. Run the (separate,\n * opt-in) cleanupLegacyAccountFields script to remove them later.\n */\nexport async function ensureThreepaneConfig(\n accountHandle: DocHandle<AccountDoc>,\n repo: Repo\n) {\n const rootFolderUrl = accountHandle.doc()?.rootFolderUrl;\n const existingConfigUrl = accountHandle.doc()?.tools?.[\"threepane\"];\n\n if (existingConfigUrl) {\n const configHandle = await repo.find<ThreepaneConfigDoc>(existingConfigUrl);\n if ((configHandle.doc()?.version ?? 0) >= THREEPANE_CONFIG_VERSION) return;\n configHandle.change((doc) => migrateThreepaneConfig(doc, rootFolderUrl));\n return;\n }\n\n const datatype = await loadDatatypeWhenReady<ThreepaneConfigDoc>(\n \"threepane:config\"\n );\n if (!datatype) {\n console.warn(\"frame: threepane:config datatype never registered\");\n return;\n }\n\n // Re-check after the await in case another tab migrated concurrently.\n if (accountHandle.doc()?.tools?.[\"threepane\"]) return;\n\n const account = accountHandle.doc();\n\n // doctitle tools migrate as bare ids: the frame always points them at the\n // selected main-view doc, so a slot tuple's docid would be ignored \u2014 keep\n // them as plain strings.\n const doctitleTools: ToolSlot[] = (account?.documentToolbarToolIds ?? [])\n .filter((id) => !INTRINSIC_DOCTITLE_TOOLS.has(id));\n\n const configHandle = await createDocOfDatatype2<ThreepaneConfigDoc>(\n datatype,\n repo\n );\n configHandle.change((doc) => {\n if (doctitleTools.length) doc.doctitle.tools = doctitleTools;\n doc.sidebar.widgets = defaultSidebarWidgets(account?.rootFolderUrl);\n if (!doc.tray) doc.tray = DEFAULT_TRAY_TOOLS.slice();\n // No root folder yet means no document list yet: leave the doc unversioned\n // so the next mount's migration seeds it.\n if (account?.rootFolderUrl) doc.version = THREEPANE_CONFIG_VERSION;\n else delete doc.version;\n });\n\n accountHandle.change((acc) => {\n if (!acc.tools) acc.tools = {};\n if (!acc.tools[\"threepane\"]) acc.tools[\"threepane\"] = configHandle.url;\n });\n}\n", "import {\n getRegistry,\n type DatatypeDescription,\n type LoadedDatatype,\n} from \"@inkandswitch/patchwork-plugins\";\n\nexport function loadDatatypeWhenReady<D>(\n id: string\n): Promise<LoadedDatatype<D>> {\n return getRegistry<DatatypeDescription>(\n \"patchwork:datatype\"\n ).loadWhenReady(id) as Promise<LoadedDatatype<D>>;\n}\n", "import debug from \"debug\";\nimport type { DocHandle, Repo } from \"@automerge/automerge-repo/slim\";\nimport { createDocOfDatatype2 } from \"@inkandswitch/patchwork-plugins\";\nimport type { FolderDoc } from \"@inkandswitch/patchwork-filesystem\";\nimport type { AccountDoc } from \"../types\";\nimport { loadDatatypeWhenReady } from \"./loadDatatypeWhenReady\";\n\nconst log = debug(\"patchwork:threepane:examples\");\n\n/**\n * Seed a fresh account with example documents by running each static module\n * bundle's generated `init.js` (emitted by that repo's scripts/bundle.mjs next\n * to its modules.json). Every init script receives the same Examples folder\n * handle, so multiple bundles merge their examples into one folder.\n *\n * Runs at most once per account: the account doc's `exampleDocsSeededAt`\n * marker is claimed *before* seeding (a race between two tabs can at worst\n * skip the examples, never duplicate them), and a deleted Examples folder is\n * never recreated. Accounts that already have documents get the marker but no\n * examples \u2014 only truly fresh accounts are seeded.\n */\nexport async function seedExampleDocuments(\n accountHandle: DocHandle<AccountDoc>,\n repo: Repo\n) {\n const account = accountHandle.doc();\n if (!account?.rootFolderUrl) {\n log(\"skipped \u2014 account has no rootFolderUrl\");\n return;\n }\n if (account.exampleDocsSeededAt) {\n log(\n \"skipped \u2014 already ran for this account at\",\n new Date(account.exampleDocsSeededAt).toISOString()\n );\n return;\n }\n\n log(\"claiming marker on account\", accountHandle.url);\n accountHandle.change((doc) => {\n if (!doc.exampleDocsSeededAt) doc.exampleDocsSeededAt = Date.now();\n });\n\n const rootFolder = await repo.find<FolderDoc>(account.rootFolderUrl);\n const existingDocs = rootFolder.doc()?.docs?.length ?? 0;\n if (existingDocs) {\n log(\n `skipped \u2014 root folder already has ${existingDocs} doc(s); only fresh accounts are seeded`\n );\n return;\n }\n\n const gaios = window.location.hostname.includes(\"gaios\");\n const initUrls = gaios ? [] : await bundleInitScriptUrls();\n log(gaios ? \"gaios examples\" : \"bundle init scripts:\", initUrls);\n if (!gaios && !initUrls.length) {\n log(\"skipped \u2014 no static module bundles to ask\");\n return;\n }\n\n const folderDatatype = await loadDatatypeWhenReady<FolderDoc>(\"folder\");\n if (!folderDatatype) {\n log(\"folder datatype never registered; giving up\");\n return;\n }\n const folder = await createDocOfDatatype2<FolderDoc>(\n folderDatatype,\n repo,\n (doc) => {\n doc.title = \"Examples\";\n }\n );\n\n if (gaios) {\n const { seedGaiosExamples } = await import(\"./gaiosExamples\");\n await seedGaiosExamples(repo, folder);\n }\n\n for (const url of initUrls) {\n try {\n const mod = await import(/* @vite-ignore */ url);\n await mod.default?.(repo, folder);\n log(\"ran init script\", url);\n } catch (err) {\n // A bundle that ships no init script 404s here \u2014 normal, not an error.\n log(\"init script unavailable or failed\", url, err);\n }\n }\n\n const seeded = folder.doc()?.docs?.length ?? 0;\n if (!seeded) {\n // Don't leave an empty Examples folder if no bundle contributed anything.\n log(\"no bundle contributed any documents\");\n return;\n }\n\n rootFolder.change((doc) => {\n doc.docs.unshift({ name: \"Examples\", type: \"folder\", url: folder.url });\n });\n log(`seeded ${seeded} document(s) into Examples folder`, folder.url);\n}\n\ntype ModuleWatcherLike = {\n urls?: Record<string, string>;\n doneLoading?: Promise<void>;\n};\n\n/**\n * The patchwork-tools bundle isn't in every site's default module sources\n * (some boot from an automerge module-settings doc, which has no init.js),\n * but its examples should seed everywhere \u2014 so it's always consulted, unless\n * the site asks for only its own examples (see siteExamplesOnly).\n */\nconst TOOLS_BUNDLE_INIT_URL = \"https://patchwork-tools.netlify.app/init.js\";\n\n/**\n * Fallback for shells with no static manifest at all (automerge-doc module\n * sources only): the deployed patchwork-base bundle. Not consulted when any\n * static manifest is configured, because that manifest is usually a copy of\n * this very bundle (e.g. a localhost dev serve) and URL-dedupe can't tell \u2014\n * always adding it would seed base's examples twice.\n */\nconst BASE_BUNDLE_INIT_URL = \"https://patchwork-base.netlify.app/init.js\";\n\n/**\n * A site that wants only its own examples says so on its root element \u2014\n * `<html data-examples=\"site\">` \u2014 and the hardcoded bundles above are left\n * out: just the init.js next to each of its own static manifests runs.\n */\nfunction siteExamplesOnly() {\n return document.documentElement.getAttribute(\"data-examples\") === \"site\";\n}\n\n/**\n * The `init.js` URL next to every static (http) module manifest the host is\n * watching, plus the hardcoded bundles above (unless the site opts out of\n * them). Automerge module-settings docs have no init script. Waits for the\n * watcher's initial load so the bundles' plugins are registered before any\n * example runs.\n */\nasync function bundleInitScriptUrls(): Promise<string[]> {\n const siteOnly = siteExamplesOnly();\n const watcher = (\n window as { patchwork?: { packages?: ModuleWatcherLike } }\n ).patchwork?.packages;\n if (!watcher?.urls) {\n return siteOnly ? [] : [BASE_BUNDLE_INIT_URL, TOOLS_BUNDLE_INIT_URL];\n }\n await watcher.doneLoading;\n const fromManifests = Object.values(watcher.urls)\n .filter((url) => typeof url === \"string\" && !url.startsWith(\"automerge:\"))\n .map((url) => new URL(\"init.js\", new URL(url, document.baseURI)).href);\n if (siteOnly) return [...new Set(fromManifests)];\n const base = fromManifests.length ? [] : [BASE_BUNDLE_INIT_URL];\n return [...new Set([...fromManifests, ...base, TOOLS_BUNDLE_INIT_URL])];\n}\n", "import type { DocHandle } from \"@automerge/automerge-repo/slim\";\nimport {\n createEffect,\n createMemo,\n createSignal,\n onCleanup,\n type Accessor,\n} from \"solid-js\";\n\n/**\n * The current doc of a handle, recomputed on every change. Reads through a\n * version counter instead of useDocument, because its store proxying conflicts\n * with Automerge array splices.\n */\nexport function useHandleDoc<T>(\n handle: Accessor<DocHandle<T> | undefined>\n): Accessor<T | undefined> {\n const [version, setVersion] = createSignal(0);\n createEffect(() => {\n const h = handle();\n if (!h) return;\n const onChange = () => setVersion((v) => v + 1);\n h.on(\"change\", onChange);\n onCleanup(() => h.off(\"change\", onChange));\n });\n return createMemo(() => {\n version();\n return handle()?.doc();\n });\n}\n"],
5
- "mappings": "mRAAA,OAAS,YAAYA,MAAkB,eACvC,OAAS,kBAAkBC,OAAwB,eACnD,OAAS,QAAQC,OAAc,eAC/B,OAAS,oBAAoBC,OAA0B,eACvD,OAAS,gBAAgBC,MAAsB,eAC/C,OAAS,UAAUC,MA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ASiJ,GAAqBC,EAAW,CAC9C,MAAO,CAACnI,EAAQZ,IACPgJ,GAAO,IAAM3G,EAAkB1B,GAAgB,CACpD,OAAQC,EACR,IAAI,MAAO,CACT,OAAOZ,EAAQ,IACjB,EACA,UAAW+I,CACb,CAAC,EAAG/I,CAAO,CAEf,CACAiJ,GAAiB,CAAC,OAAO,CAAC",
6
- "names": ["_$template", "_$delegateEvents", "_$memo", "_$setStyleProperty", "_$setAttribute", "_$effect", "_$getOwner", "_$use", "_$insert", "_$createComponent", "subscribe", "_$template", "_$delegateEvents", "_$memo", "_$insert", "_$createComponent", "For", "Show", "_tmpl$", "_$template", "_tmpl$2", "_tmpl$3", "SidebarWidgets", "props", "addDocumentList", "root", "handle", "doc", "DOCUMENT_LIST_TOOL", "_el$", "_$insert", "_$createComponent", "Show", "_$memo", "_el$2", "_el$3", "For", "widget", "_el$4", "SlotView", "_$delegateEvents", "_$template", "_$setAttribute", "_$effect", "_$insert", "_$createComponent", "For", "Show", "_tmpl$", "_$template", "_tmpl$2", "Tray", "props", "_$createComponent", "Show", "_el$", "_$insert", "For", "uniqueSlots", "slot", "_el$2", "SlotView", "_$effect", "_$setAttribute", "slotId", "createEffect", "createMemo", "createSignal", "onCleanup", "onMount", "Show", "render", "createDocOfDatatype2", "getRegistry", "loadDatatypeWhenReady", "id", "INTRINSIC_DOCTITLE_TOOLS", "defaultSidebarWidgets", "rootFolderUrl", "DOCUMENT_LIST_TOOL", "migrateThreepaneConfig", "doc", "DEFAULT_TRAY_TOOLS", "unique", "uniqueSlots", "present", "s", "slotId", "id", "DEFAULT_DOCTITLE_TOOLS", "ensureThreepaneConfig", "accountHandle", "repo", "existingConfigUrl", "configHandle", "datatype", "loadDatatypeWhenReady", "account", "doctitleTools", "createDocOfDatatype2", "acc", "import_debug", "createDocOfDatatype2", "log", "debug", "seedExampleDocuments", "accountHandle", "repo", "account", "doc", "rootFolder", "existingDocs", "gaios", "initUrls", "bundleInitScriptUrls", "folderDatatype", "loadDatatypeWhenReady", "folder", "createDocOfDatatype2", "seedGaiosExamples", "url", "err", "seeded", "TOOLS_BUNDLE_INIT_URL", "BASE_BUNDLE_INIT_URL", "siteExamplesOnly", "siteOnly", "watcher", "fromManifests", "base", "createEffect", "createMemo", "createSignal", "onCleanup", "useHandleDoc", "handle", "version", "setVersion", "h", "onChange", "v", "_tmpl$", "_$template", "_tmpl$2", "_tmpl$3", "_tmpl$4", "_tmpl$5", "_tmpl$6", "_tmpl$7", "_tmpl$8", "_tmpl$9", "_tmpl$0", "useFrameProviderReady", "componentId", "element", "isReady", "setReady", "createSignal", "createEffect", "el", "onMounted", "event", "onCleanup", "dispatchOpen", "detail", "PatchworkFrame", "handle", "repo", "props", "ensureFrameStyles", "accountDocUrl", "accountProviderElement", "setAccountProviderElement", "isAccountProviderReady", "toolStorageProviderElement", "setToolStorageProviderElement", "isToolStorageProviderReady", "selectedDocProviderElement", "setSelectedDocProviderElement", "isSelectedDocProviderReady", "areProvidersReady", "createMemo", "_el$", "_el$2", "_el$3", "_el$4", "_el$5", "_el$6", "_el$7", "_el$8", "_$insert", "_$createComponent", "Show", "_$use", "_$getOwner", "PatchworkFrameInner", "accountDocHandle", "useDocHandle", "ensureThreepaneConfig", "seedExampleDocuments", "err", "accountDoc", "useHandleDoc", "threepaneUrl", "threepaneConfigHandle", "threepaneConfig", "doctitleSlots", "sidebarWidgets", "traySlots", "rootFolderUrl", "sidebarState", "useSidebarState", "sidebarResize", "useSidebarResize", "selectedView", "setSelectedView", "popoverView", "setPopoverView", "onMount", "unsubscribeSelectedView", "subscribe", "view", "selectedDocUrl", "selectedToolId", "initialRightWidth", "getStoredNumber", "SIDEBAR_KEYS", "DEFAULT_SIDEBAR_WIDTH", "initialRightCollapsed", "getStoredBoolean", "mainDocElement", "setMainDocElement", "isMainDocMounted", "useMainDocMounted", "widgetsReady", "setWidgetsReady", "_el$9", "_ref$", "FrameLayout", "_el$0", "MainDocumentView", "DocumentAreaRoot", "IsolatedDocumentArea", "FramePopover", "toolId", "setToolId", "popoverEl", "onKey", "e", "onOpen", "url", "nextToolId", "_el$1", "_el$10", "_el$11", "_el$12", "_el$13", "_el$14", "_ref$2", "_$effect", "_p$", "_v$", "_v$2", "_v$3", "isCollapsed", "hasTray", "sidebarContentEl", "footerEl", "footer", "COLLAPSE_CONTEXT_SIDEBAR_EVENT", "_el$15", "v", "PanelLeftIcon", "_v$4", "_v$5", "_v$6", "_$setAttribute", "Sidebar", "_el$16", "_el$17", "_el$18", "_el$19", "_ref$3", "SidebarWidgets", "_ref$4", "contactUrl", "_el$21", "_el$22", "moduleSettingsUrl", "_el$23", "_el$20", "Tray", "_v$7", "_v$8", "_$setStyleProperty", "_$memo", "renderPatchworkFrame", "isolation", "render", "_$delegateEvents"]
7
- }