camox 0.43.0 → 0.45.0
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/bin/camox.mjs +9 -1
- package/dist/components/AuthGate.js +0 -6
- package/dist/components/DeviceSelector.js +96 -0
- package/dist/components/PlatformLabel.js +20 -24
- package/dist/core/components/lexical/HighlightNode.js +1 -1
- package/dist/core/components/lexical/InlineContentEditable.js +15 -19
- package/dist/core/components/lexical/InlineLexicalEditor.js +54 -74
- package/dist/core/components/lexical/InlineStylesPlugin.js +57 -41
- package/dist/core/components/lexical/MaxLengthPlugin.js +59 -0
- package/dist/core/components/lexical/SelectionBroadcaster.js +55 -56
- package/dist/core/components/lexical/SidebarLexicalEditor.js +327 -234
- package/dist/core/components/lexical/SummaryToggleGuard.js +42 -0
- package/dist/core/components/lexical/TextLinkPopover.js +169 -180
- package/dist/core/createApp.d.ts +254 -299
- package/dist/core/createApp.js +123 -29
- package/dist/core/createBlock.d.ts +5 -5
- package/dist/core/createBlock.js +399 -152
- package/dist/core/createCollection.d.ts +55 -0
- package/dist/core/createCollection.js +93 -0
- package/dist/core/createLayout.d.ts +197 -61
- package/dist/core/createLayout.js +114 -56
- package/dist/core/defineDocument.d.ts +3 -5
- package/dist/core/derivedRoutes.js +49 -1
- package/dist/core/dom.d.ts +13 -4
- package/dist/core/dom.js +44 -1
- package/dist/core/editing/BlockEditingRuntime.d.ts +16 -0
- package/dist/core/editing/BlockEditingRuntime.js +6 -15
- package/dist/core/editing/CompleteBlockEditingRuntime.js +28 -23
- package/dist/core/editing/createEditableBlock.d.ts +820 -565
- package/dist/core/editing/createEditableBlock.js +2153 -971
- package/dist/core/editing/referenceWrites.js +51 -0
- package/dist/core/editing/useLatestRecord.js +90 -0
- package/dist/core/hooks/useArtifactHost.js +139 -0
- package/dist/core/hooks/useFieldSelection.js +43 -18
- package/dist/core/hooks/useIsEditable.js +12 -10
- package/dist/core/hooks/useOverlayMessage.js +15 -19
- package/dist/core/lib/artifact.d.ts +21 -0
- package/dist/core/lib/artifact.js +154 -0
- package/dist/core/lib/artifactColors.js +123 -0
- package/dist/core/lib/artifactData.d.ts +1 -0
- package/dist/core/lib/artifactData.js +131 -0
- package/dist/core/lib/artifactHost.js +205 -0
- package/dist/core/lib/artifactRuntime.js +36 -0
- package/dist/core/lib/artifactTheme.js +57 -0
- package/dist/core/lib/contentType.d.ts +304 -103
- package/dist/core/lib/contentType.js +207 -168
- package/dist/core/lib/fieldTypes.js +4 -0
- package/dist/core/lib/iconTypes.d.ts +13 -0
- package/dist/core/lib/icons.d.ts +6 -0
- package/dist/core/lib/icons.js +126 -0
- package/dist/core/lib/imagePlaceholder.js +177 -0
- package/dist/core/lib/imageTransform.js +1 -1
- package/dist/core/lib/lexicalReact.d.ts +3 -1
- package/dist/core/lib/lexicalState.js +7 -7
- package/dist/core/lib/modifierFormats.js +1 -1
- package/dist/core/lib/previewPaused.js +9 -0
- package/dist/core/lib/recordScope.js +316 -0
- package/dist/core/lib/reference.d.ts +81 -0
- package/dist/core/lib/reference.js +29 -0
- package/dist/core/lib/textLinks.js +7 -5
- package/dist/core/lib/textStyles.d.ts +6 -8
- package/dist/core/lib/textStyles.js +5 -5
- package/dist/core/notFound.d.ts +7 -0
- package/dist/core/notFound.js +11 -0
- package/dist/core/pageDestinations.js +6 -3
- package/dist/core/recordItem.js +34 -0
- package/dist/core/requestContext.d.ts +26 -0
- package/dist/core/requestContext.js +20 -0
- package/dist/features/canvas/CamoxCanvas.js +1734 -0
- package/dist/features/canvas/CanvasBlockFrame.js +353 -0
- package/dist/features/canvas/CanvasBlockHeader.js +55 -0
- package/dist/features/canvas/CanvasLoadingScreen.js +35 -0
- package/dist/features/canvas/CanvasOverlays.js +254 -0
- package/dist/features/canvas/CanvasPageEdge.js +87 -0
- package/dist/features/canvas/CanvasPageFrame.js +335 -0
- package/dist/features/canvas/CanvasPageHeader.js +125 -0
- package/dist/features/canvas/CanvasPreviewPageSlot.js +103 -0
- package/dist/features/canvas/CanvasShelfMarker.js +255 -0
- package/dist/features/canvas/DerivedPagePathInput.js +238 -0
- package/dist/features/canvas/canvasCamera.js +229 -0
- package/dist/features/canvas/canvasFlight.js +104 -0
- package/dist/features/canvas/canvasFrameCapture.js +364 -0
- package/dist/features/canvas/canvasFrameDocument.js +317 -0
- package/dist/features/canvas/canvasFrameMode.js +53 -0
- package/dist/features/canvas/canvasInsertionSeams.js +44 -0
- package/dist/features/canvas/canvasItems.js +120 -0
- package/dist/features/canvas/canvasOverlayGeometry.js +240 -0
- package/dist/features/canvas/canvasPages.js +79 -0
- package/dist/features/canvas/canvasScreenSpace.js +26 -0
- package/dist/features/canvas/canvasSelection.js +18 -0
- package/dist/features/canvas/canvasStore.js +149 -0
- package/dist/features/canvas/canvasThumbnails.js +304 -0
- package/dist/features/canvas/canvasZoom.js +10 -0
- package/dist/features/canvas/sidebar/CanvasInspector.js +202 -0
- package/dist/features/canvas/sidebar/CanvasNavigator.js +226 -0
- package/dist/features/canvas/sidebar/CanvasSidebar.js +60 -0
- package/dist/features/canvas/sidebar/CanvasSidebarFrame.js +48 -0
- package/dist/features/canvas/sidebar/CanvasSidebarSkeleton.js +39 -0
- package/dist/features/canvas/sidebar/CatalogBlockInspector.js +189 -0
- package/dist/features/canvas/sidebar/CuratedPageInspector.js +69 -0
- package/dist/features/canvas/sidebar/DerivedPageInspector.js +37 -0
- package/dist/features/canvas/sidebar/LayoutPageBlocks.js +78 -0
- package/dist/features/canvas/sidebar/LayoutPageOverview.js +71 -0
- package/dist/features/canvas/sidebar/PageInspector.js +157 -0
- package/dist/features/canvas/sidebar/PageInspectorSkeleton.js +90 -0
- package/dist/features/canvas/sidebar/PageOverview.js +27 -0
- package/dist/features/canvas/sidebar/SingletonPageInspector.js +31 -0
- package/dist/features/canvas/useCanvasCamera.js +803 -0
- package/dist/features/canvas/useCanvasFrame.js +149 -0
- package/dist/features/canvas/useCanvasFrameInput.js +97 -0
- package/dist/features/canvas/useCanvasNearness.js +57 -0
- package/dist/features/canvas/useDiscoveredPreviewPaths.js +62 -0
- package/dist/features/content/CamoxContent.d.ts +2 -5
- package/dist/features/content/CamoxContent.js +174 -271
- package/dist/features/content/CollectionItemSheetContext.js +106 -0
- package/dist/features/content/ContentAssets.js +315 -0
- package/dist/features/content/ContentCollection.js +663 -0
- package/dist/features/content/collection-form.js +58 -0
- package/dist/features/content/components/AssetCard.js +101 -69
- package/dist/features/content/components/AssetCardSkeleton.js +4 -8
- package/dist/features/content/components/ContentSidebar.js +129 -18
- package/dist/features/content/components/ContentSidebarGroup.js +37 -0
- package/dist/features/content/components/DeleteCollectionItemButton.js +202 -0
- package/dist/features/content/components/MissingFromLocale.js +282 -0
- package/dist/features/content/components/UploadDropZone.js +27 -31
- package/dist/features/content/components/UploadProgressDrawer.js +90 -98
- package/dist/features/navigation/navigation.d.ts +66 -20
- package/dist/features/navigation/navigation.js +257 -90
- package/dist/features/og/defaultFonts.js +8 -8
- package/dist/features/og/geist-variable-ttf-base64.js +1 -1
- package/dist/features/og/imageResponse.d.ts +8 -0
- package/dist/features/og/imageResponse.js +26 -0
- package/dist/features/page/CuratedPageContent.js +167 -0
- package/dist/features/page/DerivedPageContent.js +26 -30
- package/dist/features/page/SharedLayoutContent.js +25 -27
- package/dist/features/preview/CamoxPreview.d.ts +23 -61
- package/dist/features/preview/CamoxPreview.js +811 -507
- package/dist/features/preview/EditablePageContent.js +1 -1
- package/dist/features/preview/EditablePageExperience.js +16 -22
- package/dist/features/preview/components/AddBlockDialog.js +270 -0
- package/dist/features/preview/components/AssetFieldEditor.js +173 -154
- package/dist/features/preview/components/AssetLightbox.js +194 -136
- package/dist/features/preview/components/AssetPickerModal.js +153 -170
- package/dist/features/preview/components/BlockActionsPopover.js +150 -149
- package/dist/features/preview/components/BlockErrorBoundary.js +8 -12
- package/dist/features/preview/components/BlockThumbnail.js +176 -100
- package/dist/features/preview/components/CanvasPreview.js +243 -0
- package/dist/features/preview/components/CreatePageModal.js +128 -137
- package/dist/features/preview/components/DebouncedFieldEditor.js +29 -33
- package/dist/features/preview/components/DerivedLayoutDialog.js +46 -29
- package/dist/features/preview/components/DrillRow.js +150 -0
- package/dist/features/preview/components/FieldOverlayStyles.js +33 -10
- package/dist/features/preview/components/FieldToolbar.js +166 -116
- package/dist/features/preview/components/Frame.js +108 -20
- package/dist/features/preview/components/IconFieldEditor.js +227 -0
- package/dist/features/preview/components/ItemFieldsEditor.js +238 -205
- package/dist/features/preview/components/LinkFieldEditor.js +135 -139
- package/dist/features/preview/components/Metadata.js +22 -30
- package/dist/features/preview/components/MobilePreviewDrawer.js +89 -108
- package/dist/features/preview/components/MultipleAssetFieldEditor.js +334 -246
- package/dist/features/preview/components/OverlayTracker.js +10 -42
- package/dist/features/preview/components/Overlays.js +81 -69
- package/dist/features/preview/components/PageInfo.js +1748 -0
- package/dist/features/preview/components/PageInfoSkeleton.js +51 -0
- package/dist/features/preview/components/PageLocationFieldset.js +112 -116
- package/dist/features/preview/components/PageNavigatorHeader.js +24 -0
- package/dist/features/preview/components/PageNicknameField.js +22 -26
- package/dist/features/preview/components/PagePicker.js +145 -147
- package/dist/features/preview/components/PageTree.js +525 -532
- package/dist/features/preview/components/PreviewActivation.js +28 -32
- package/dist/features/preview/components/PreviewPanel.js +620 -319
- package/dist/features/preview/components/PreviewToolbar.js +111 -340
- package/dist/features/preview/components/RecordCard.js +80 -0
- package/dist/features/preview/components/RecordCombobox.js +178 -0
- package/dist/features/preview/components/ReferenceFieldEditor.js +149 -0
- package/dist/features/preview/components/ReferenceListFieldEditor.js +432 -0
- package/dist/features/preview/components/RemovedBlockPlaceholder.js +95 -0
- package/dist/features/preview/components/RepeatableItemsList.js +125 -138
- package/dist/features/preview/components/SelectionEditor.js +993 -0
- package/dist/features/preview/components/ShikiMarkdown.js +14 -18
- package/dist/features/preview/components/SidebarSection.js +52 -64
- package/dist/features/preview/components/StudioEditingFallback.js +56 -0
- package/dist/features/preview/components/UnlinkAssetButton.js +104 -107
- package/dist/features/preview/components/blockGridNavigation.js +15 -0
- package/dist/features/preview/components/contentFieldSchema.js +8 -0
- package/dist/features/preview/components/useFieldWriter.js +200 -0
- package/dist/features/preview/components/useRecordView.js +383 -0
- package/dist/features/preview/components/useRepeatableItemActions.js +35 -37
- package/dist/features/preview/components/useUpdateBlockPosition.js +37 -37
- package/dist/features/preview/editingFrame.js +197 -0
- package/dist/features/preview/overlayHighlights.js +27 -0
- package/dist/features/preview/overlayMessages.js +72 -1
- package/dist/features/preview/pageRecord.js +189 -0
- package/dist/features/preview/previewConstants.js +6 -2
- package/dist/features/preview/previewPageFrame.js +95 -0
- package/dist/features/preview/previewPreparation.js +7 -0
- package/dist/features/preview/previewSelection.js +33 -59
- package/dist/features/preview/previewStore.js +225 -123
- package/dist/features/preview/referencePickerFocus.js +29 -0
- package/dist/features/preview/repeatableItemTargets.js +56 -0
- package/dist/features/preview/selectionReveal.js +21 -0
- package/dist/features/preview/usePreviewViewportActions.js +114 -0
- package/dist/features/preview/viewportContinuity.js +109 -0
- package/dist/features/provider/AuthenticatedCamoxProvider.js +69 -44
- package/dist/features/provider/CamoxProvider.d.ts +3 -6
- package/dist/features/provider/CamoxProvider.js +38 -50
- package/dist/features/provider/CoreCamoxProvider.js +71 -23
- package/dist/features/provider/LocalhostPreviewProvider.js +73 -73
- package/dist/features/provider/PreviewSignInPage.js +54 -0
- package/dist/features/provider/components/CamoxAppContext.js +11 -11
- package/dist/features/provider/components/CommandPalette.js +87 -143
- package/dist/features/provider/useAdminShortcuts.js +7 -11
- package/dist/features/routes/pageRuntime.d.ts +44 -4
- package/dist/features/routes/pageRuntime.js +244 -137
- package/dist/features/runtime/RuntimeChrome.js +117 -115
- package/dist/features/runtime/alternates.js +64 -0
- package/dist/features/runtime/analytics.d.ts +7 -0
- package/dist/features/runtime/analytics.js +66 -0
- package/dist/features/runtime/artifactSources.js +87 -0
- package/dist/features/runtime/editingFallback.js +20 -0
- package/dist/features/runtime/linkPrefetch.js +97 -0
- package/dist/features/runtime/livePages.js +62 -0
- package/dist/features/runtime/llmsTxt.js +40 -0
- package/dist/features/runtime/loopbackFetch.js +18 -0
- package/dist/features/runtime/navigationAccessibility.js +51 -0
- package/dist/features/runtime/navigationTarget.js +23 -2
- package/dist/features/runtime/pageApp.js +216 -141
- package/dist/features/runtime/pageBlockTypes.js +20 -0
- package/dist/features/runtime/pageClient.d.ts +2 -4
- package/dist/features/runtime/pageClient.js +18 -3
- package/dist/features/runtime/pageNavigation.js +254 -32
- package/dist/features/runtime/pageServer.d.ts +2 -4
- package/dist/features/runtime/pageServer.js +8 -1
- package/dist/features/runtime/pageViewport.js +7 -0
- package/dist/features/runtime/runtime.d.ts +60 -23
- package/dist/features/runtime/runtime.js +779 -166
- package/dist/features/runtime/runtimeChromeLoader.js +58 -0
- package/dist/features/runtime/runtimeRoutes.d.ts +19 -0
- package/dist/features/runtime/runtimeRoutes.js +25 -0
- package/dist/features/runtime/scrollRestoration.js +133 -0
- package/dist/features/runtime/studioApp.d.ts +4 -3
- package/dist/features/runtime/studioApp.js +5 -9
- package/dist/features/runtime/studioClient.d.ts +2 -4
- package/dist/features/runtime/studioClient.js +12 -3
- package/dist/features/runtime/studioServer.d.ts +2 -4
- package/dist/features/runtime/studioServer.js +6 -1
- package/dist/features/runtime/worker.d.ts +6 -0
- package/dist/features/runtime/worker.js +23 -0
- package/dist/features/runtime/workerRequest.js +44 -0
- package/dist/features/studio/CamoxStudio.d.ts +2 -6
- package/dist/features/studio/CamoxStudio.js +34 -49
- package/dist/features/studio/FollowAgentProvider.js +338 -0
- package/dist/features/studio/components/ChatSidebar.js +356 -0
- package/dist/features/studio/components/DraftsControl.js +676 -0
- package/dist/features/studio/components/FaviconDialog.js +318 -0
- package/dist/features/studio/components/LocalePicker.js +785 -0
- package/dist/features/studio/components/Navbar.js +123 -103
- package/dist/features/studio/components/ProjectMenu.js +239 -260
- package/dist/features/studio/components/RenameDraftDialog.js +206 -0
- package/dist/features/studio/components/ReviewDraftSheet.js +1472 -0
- package/dist/features/studio/components/ThreadComposer.js +157 -0
- package/dist/features/studio/components/ThreadMarkdown.js +113 -0
- package/dist/features/studio/components/ThreadMessages.js +270 -0
- package/dist/features/studio/components/UserButton.js +34 -23
- package/dist/features/studio/draftLabel.js +33 -0
- package/dist/features/studio/draftNotice.js +13 -0
- package/dist/features/studio/followAgent.js +250 -0
- package/dist/features/studio/followAgentContext.js +7 -0
- package/dist/features/studio/localeOptions.js +118 -0
- package/dist/features/studio/localeSwitch.js +19 -0
- package/dist/features/studio/routes.js +48 -1
- package/dist/features/studio/studioStore.js +64 -1
- package/dist/features/studio/useTheme.js +24 -27
- package/dist/features/vite/artifactRuntimeMinification.js +36 -0
- package/dist/features/vite/auth.js +1 -50
- package/dist/features/vite/blockBoilerplate.js +6 -5
- package/dist/features/vite/blockChunks.js +31 -0
- package/dist/features/vite/bundlerLogs.js +17 -0
- package/dist/features/vite/definitionsSync.js +158 -226
- package/dist/features/vite/devAuthentication.js +4 -16
- package/dist/features/vite/devSignIn.js +87 -0
- package/dist/features/vite/iconGeneration.js +16 -0
- package/dist/features/vite/layoutGeneration.js +11 -1
- package/dist/features/vite/publishSeededContent.js +30 -0
- package/dist/features/vite/routeGeneration.js +6 -7
- package/dist/features/vite/runtimeDev.js +80 -99
- package/dist/features/vite/vite.d.ts +53 -31
- package/dist/features/vite/vite.js +230 -116
- package/dist/features/vite/workerBuild.js +39 -0
- package/dist/hooks/use-debounced-field.js +116 -47
- package/dist/hooks/use-file-upload.js +114 -67
- package/dist/hooks/use-marquee-selection.js +32 -36
- package/dist/hooks/use-page-destinations.js +69 -37
- package/dist/lib/api-client-server.d.ts +5 -0
- package/dist/lib/api-client-server.js +10 -4
- package/dist/lib/api-client.d.ts +6 -0
- package/dist/lib/api-client.js +51 -16
- package/dist/lib/api-socket.js +17 -0
- package/dist/lib/auth-page-styles.js +39 -0
- package/dist/lib/auth.js +139 -60
- package/dist/lib/collection-cache.js +23 -0
- package/dist/lib/draft-scope.d.ts +4 -0
- package/dist/lib/draft-scope.js +222 -0
- package/dist/lib/html.js +12 -0
- package/dist/lib/link-pages.js +154 -0
- package/dist/lib/locale-path.d.ts +22 -0
- package/dist/lib/locale-path.js +57 -0
- package/dist/lib/normalized-data.js +252 -152
- package/dist/lib/preview-handoff.js +13 -0
- package/dist/lib/queries.d.ts +11 -0
- package/dist/lib/queries.js +71 -131
- package/dist/lib/studio-reads.d.ts +14 -0
- package/dist/lib/studio-reads.js +574 -0
- package/dist/lib/use-project-room.js +50 -47
- package/dist/lib/use-thread.js +310 -0
- package/dist/lib/utils.js +25 -29
- package/dist/lib/view-locale-context.js +22 -0
- package/dist/lib/view-locale.js +46 -0
- package/dist/package.js +5 -0
- package/dist/studio-overlays.css +41 -147
- package/dist/studio.css +2 -2
- package/package.json +70 -72
- package/skills/camox/SKILL.md +16 -5
- package/skills/camox/references/artifacts.md +179 -0
- package/skills/camox/references/block-definitions.md +98 -55
- package/skills/camox/references/cli-common.md +18 -6
- package/skills/camox/references/cli-content.md +92 -58
- package/skills/camox/references/cli-publishing.md +26 -0
- package/skills/camox/references/dom-integrations.md +27 -0
- package/skills/camox/references/field-styling.md +7 -7
- package/skills/camox/references/layout-definitions.md +16 -14
- package/skills/camox/references/localization.md +56 -0
- package/skills/camox/references/routed-layouts.md +133 -15
- package/skills/camox-expand/SKILL.md +69 -0
- package/skills/camox-expand/references/jobs.md +39 -0
- package/skills/camoxify/SKILL.md +38 -2
- package/dist/core/components/AddBlockControlBar.js +0 -78
- package/dist/core/hooks/useRequireDraftSource.js +0 -23
- package/dist/features/metadata/sitemap.d.ts +0 -8
- package/dist/features/metadata/sitemap.js +0 -17
- package/dist/features/og/imageResponse.node.d.ts +0 -12
- package/dist/features/og/imageResponse.node.js +0 -49
- package/dist/features/og/imageResponse.workerd.d.ts +0 -12
- package/dist/features/og/imageResponse.workerd.js +0 -40
- package/dist/features/page/PublishedPageContent.js +0 -205
- package/dist/features/page/PublishedPageExperience.js +0 -23
- package/dist/features/preview/DerivedPreview.js +0 -134
- package/dist/features/preview/commentsEnabled.js +0 -8
- package/dist/features/preview/components/AddBlockSidebar.js +0 -381
- package/dist/features/preview/components/AttachedComments.js +0 -194
- package/dist/features/preview/components/CommentHeader.js +0 -122
- package/dist/features/preview/components/CommentSidebar.js +0 -29
- package/dist/features/preview/components/CommentTargetQuote.js +0 -166
- package/dist/features/preview/components/DerivedLayoutSidebar.d.ts +0 -5
- package/dist/features/preview/components/DerivedLayoutSidebar.js +0 -179
- package/dist/features/preview/components/DerivedPageInfoSidebar.js +0 -69
- package/dist/features/preview/components/LeftSidebar.js +0 -68
- package/dist/features/preview/components/PageEditorSidebar.js +0 -563
- package/dist/features/preview/components/PageInfoSidebar.js +0 -1551
- package/dist/features/preview/components/PageNavigatorSidebar.js +0 -78
- package/dist/features/preview/components/PageStatusBadge.js +0 -97
- package/dist/features/preview/components/PeekedBlock.js +0 -217
- package/dist/features/preview/components/PreviewComments.js +0 -56
- package/dist/features/preview/components/PreviewToolbarSpacer.js +0 -43
- package/dist/features/preview/components/PublicationRow.js +0 -422
- package/dist/features/preview/components/PublishDialog.js +0 -194
- package/dist/features/preview/components/RightSidebar.js +0 -59
- package/dist/features/preview/previewCommentsStore.js +0 -115
- package/dist/features/preview/publication.js +0 -81
- package/dist/features/runtime/SharedChromeContext.js +0 -7
- package/dist/features/studio/components/EnvironmentMenu.js +0 -413
- package/dist/features/vite/appGeneration.js +0 -89
- package/dist/lib/view-queries.js +0 -28
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/Matches.d.ts +0 -114
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/RouterProvider.d.ts +0 -25
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/config.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/defer.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/fileRoute.d.ts +0 -20
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/global.d.ts +0 -8
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/hash-scroll.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/index.d.ts +0 -18
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/link.d.ts +0 -161
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/load-matches.d.ts +0 -6
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/location.d.ts +0 -54
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/lru-cache.d.ts +0 -8
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/manifest.d.ts +0 -32
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.d.ts +0 -115
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/not-found.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/redirect.d.ts +0 -49
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/rewrite.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/root.d.ts +0 -6
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/route.d.ts +0 -343
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/routeInfo.d.ts +0 -48
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/router.d.ts +0 -695
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchMiddleware.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchParams.d.ts +0 -5
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/RawStream.d.ts +0 -38
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/seroval-plugins.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/transformer.d.ts +0 -65
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/stores.d.ts +0 -69
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/structuralSharing.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/typePrimitives.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderData.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderDeps.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useNavigate.d.ts +0 -10
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useParams.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useRouteContext.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useSearch.d.ts +0 -1
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/utils.d.ts +0 -28
- package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/validators.d.ts +0 -49
- package/skills/camox/references/cli-environments.md +0 -37
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { usePageBlocks } from "../../../lib/normalized-data.js";
|
|
2
1
|
import { useCamoxApp } from "../../provider/components/CamoxAppContext.js";
|
|
2
|
+
import { usePageBlocks } from "../../../lib/normalized-data.js";
|
|
3
3
|
import { cn } from "../../../lib/utils.js";
|
|
4
|
-
import { previewStore,
|
|
5
|
-
import {
|
|
4
|
+
import { previewStore, selectionBlockId, selectionForOwner } from "../previewStore.js";
|
|
5
|
+
import { useEditingFrame } from "../editingFrame.js";
|
|
6
|
+
import { PreviewEditingOwnerContext } from "../previewSelection.js";
|
|
6
7
|
import { useUpdateBlockPosition } from "./useUpdateBlockPosition.js";
|
|
7
8
|
import { BlockActionsPopover } from "./BlockActionsPopover.js";
|
|
8
9
|
import { usePreviewedPage } from "../CamoxPreview.js";
|
|
9
10
|
import { c } from "react/compiler-runtime";
|
|
10
11
|
import * as React from "react";
|
|
11
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { useSelector } from "@xstate/store-react";
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
13
14
|
import { Button } from "@camox/ui/button";
|
|
14
|
-
import {
|
|
15
|
+
import { Label } from "@camox/ui/label";
|
|
16
|
+
import { ChevronsUpDown, Ellipsis, GripVertical, LayoutTemplate, Plus } from "lucide-react";
|
|
15
17
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@camox/ui/tooltip";
|
|
16
18
|
import { DndContext, DragOverlay, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
17
19
|
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
@@ -19,75 +21,71 @@ import { SortableContext, defaultAnimateLayoutChanges, sortableKeyboardCoordinat
|
|
|
19
21
|
import { CSS } from "@dnd-kit/utilities";
|
|
20
22
|
|
|
21
23
|
//#region src/features/preview/components/PageTree.tsx
|
|
22
|
-
const usePreviewSource = () => {
|
|
23
|
-
const $ = c(1);
|
|
24
|
-
if ($[0] !== "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a") {
|
|
25
|
-
for (let $i = 0; $i < 1; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
26
|
-
$[0] = "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a";
|
|
27
|
-
}
|
|
28
|
-
return useSelector(previewStore, selectPreviewSource);
|
|
29
|
-
};
|
|
30
24
|
function useBlockTreeItem(block, t0) {
|
|
31
|
-
const $ = c(
|
|
32
|
-
if ($[0] !== "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a") {
|
|
33
|
-
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
34
|
-
$[0] = "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a";
|
|
35
|
-
}
|
|
25
|
+
const $ = c(21);
|
|
36
26
|
const isDragging = t0 === void 0 ? false : t0;
|
|
27
|
+
const owner = React.useContext(PreviewEditingOwnerContext);
|
|
37
28
|
const [ellipsisPopoverOpen, setEllipsisPopoverOpen] = React.useState(false);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
let t1;
|
|
30
|
+
if ($[0] !== owner) {
|
|
31
|
+
t1 = (state) => selectionForOwner(state.context, owner);
|
|
32
|
+
$[0] = owner;
|
|
33
|
+
$[1] = t1;
|
|
34
|
+
} else t1 = $[1];
|
|
35
|
+
const selection = useSelector(previewStore, t1);
|
|
36
|
+
const { send } = useEditingFrame();
|
|
37
|
+
let t2;
|
|
38
|
+
if ($[2] !== selection) {
|
|
39
|
+
t2 = selectionBlockId(selection);
|
|
40
|
+
$[2] = selection;
|
|
41
|
+
$[3] = t2;
|
|
42
|
+
} else t2 = $[3];
|
|
43
|
+
const isBlockActive = t2 === block.id;
|
|
41
44
|
const isBlockSelected = selection?.type === "block" && selection.blockId === block.id;
|
|
42
45
|
const shouldShowHover = !isDragging && !isBlockActive;
|
|
43
46
|
const shouldShowActive = isDragging || isBlockActive;
|
|
44
|
-
let t1;
|
|
45
|
-
if ($[1] !== block.id || $[2] !== iframeElement) {
|
|
46
|
-
t1 = () => {
|
|
47
|
-
if (!iframeElement?.contentWindow) return;
|
|
48
|
-
const message = {
|
|
49
|
-
type: "CAMOX_HOVER_BLOCK",
|
|
50
|
-
blockId: String(block.id)
|
|
51
|
-
};
|
|
52
|
-
iframeElement.contentWindow.postMessage(message, "*");
|
|
53
|
-
};
|
|
54
|
-
$[1] = block.id;
|
|
55
|
-
$[2] = iframeElement;
|
|
56
|
-
$[3] = t1;
|
|
57
|
-
} else t1 = $[3];
|
|
58
|
-
const handleBlockMouseEnter = t1;
|
|
59
|
-
let t2;
|
|
60
|
-
if ($[4] !== block.id || $[5] !== iframeElement) {
|
|
61
|
-
t2 = () => {
|
|
62
|
-
if (!iframeElement?.contentWindow) return;
|
|
63
|
-
const message_0 = {
|
|
64
|
-
type: "CAMOX_HOVER_BLOCK_END",
|
|
65
|
-
blockId: String(block.id)
|
|
66
|
-
};
|
|
67
|
-
iframeElement.contentWindow.postMessage(message_0, "*");
|
|
68
|
-
};
|
|
69
|
-
$[4] = block.id;
|
|
70
|
-
$[5] = iframeElement;
|
|
71
|
-
$[6] = t2;
|
|
72
|
-
} else t2 = $[6];
|
|
73
|
-
const handleBlockMouseLeave = t2;
|
|
74
47
|
let t3;
|
|
75
|
-
if ($[
|
|
76
|
-
t3 = () => {
|
|
48
|
+
if ($[4] !== block.id || $[5] !== send) {
|
|
49
|
+
t3 = () => send({
|
|
50
|
+
type: "CAMOX_HOVER_BLOCK",
|
|
51
|
+
blockId: block.id
|
|
52
|
+
});
|
|
53
|
+
$[4] = block.id;
|
|
54
|
+
$[5] = send;
|
|
55
|
+
$[6] = t3;
|
|
56
|
+
} else t3 = $[6];
|
|
57
|
+
const handleBlockMouseEnter = t3;
|
|
58
|
+
let t4;
|
|
59
|
+
if ($[7] !== block.id || $[8] !== send) {
|
|
60
|
+
t4 = () => send({
|
|
61
|
+
type: "CAMOX_HOVER_BLOCK_END",
|
|
62
|
+
blockId: block.id
|
|
63
|
+
});
|
|
64
|
+
$[7] = block.id;
|
|
65
|
+
$[8] = send;
|
|
66
|
+
$[9] = t4;
|
|
67
|
+
} else t4 = $[9];
|
|
68
|
+
const handleBlockMouseLeave = t4;
|
|
69
|
+
let t5;
|
|
70
|
+
if ($[10] !== block.id || $[11] !== isBlockSelected || $[12] !== owner) {
|
|
71
|
+
t5 = () => {
|
|
72
|
+
if (!owner) return;
|
|
77
73
|
if (isBlockSelected) previewStore.send({ type: "clearSelection" });
|
|
78
74
|
else previewStore.send({
|
|
79
75
|
type: "setFocusedBlock",
|
|
76
|
+
...owner,
|
|
80
77
|
blockId: block.id
|
|
81
78
|
});
|
|
82
79
|
};
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
85
|
-
$[
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
$[10] = block.id;
|
|
81
|
+
$[11] = isBlockSelected;
|
|
82
|
+
$[12] = owner;
|
|
83
|
+
$[13] = t5;
|
|
84
|
+
} else t5 = $[13];
|
|
85
|
+
const toggleSelection = t5;
|
|
86
|
+
let t6;
|
|
87
|
+
if ($[14] !== ellipsisPopoverOpen || $[15] !== handleBlockMouseEnter || $[16] !== handleBlockMouseLeave || $[17] !== shouldShowActive || $[18] !== shouldShowHover || $[19] !== toggleSelection) {
|
|
88
|
+
t6 = {
|
|
91
89
|
ellipsisPopoverOpen,
|
|
92
90
|
setEllipsisPopoverOpen,
|
|
93
91
|
shouldShowHover,
|
|
@@ -96,91 +94,77 @@ function useBlockTreeItem(block, t0) {
|
|
|
96
94
|
handleBlockMouseLeave,
|
|
97
95
|
toggleSelection
|
|
98
96
|
};
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
} else
|
|
107
|
-
return
|
|
108
|
-
}
|
|
109
|
-
function _temp2(state_0) {
|
|
110
|
-
return state_0.context.iframeElement;
|
|
111
|
-
}
|
|
112
|
-
function _temp(state) {
|
|
113
|
-
return state.context.selection;
|
|
97
|
+
$[14] = ellipsisPopoverOpen;
|
|
98
|
+
$[15] = handleBlockMouseEnter;
|
|
99
|
+
$[16] = handleBlockMouseLeave;
|
|
100
|
+
$[17] = shouldShowActive;
|
|
101
|
+
$[18] = shouldShowHover;
|
|
102
|
+
$[19] = toggleSelection;
|
|
103
|
+
$[20] = t6;
|
|
104
|
+
} else t6 = $[20];
|
|
105
|
+
return t6;
|
|
114
106
|
}
|
|
115
107
|
const BlockTreeItemHeader = (t0) => {
|
|
116
|
-
const $ = c(
|
|
117
|
-
if ($[0] !== "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a") {
|
|
118
|
-
for (let $i = 0; $i < 17; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
119
|
-
$[0] = "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a";
|
|
120
|
-
}
|
|
108
|
+
const $ = c(16);
|
|
121
109
|
let children;
|
|
122
110
|
let className;
|
|
123
111
|
let props;
|
|
124
112
|
let ref;
|
|
125
113
|
let shouldShowActive;
|
|
126
114
|
let shouldShowHover;
|
|
127
|
-
if ($[
|
|
115
|
+
if ($[0] !== t0) {
|
|
128
116
|
({children, shouldShowHover, shouldShowActive, className, ref, ...props} = t0);
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
117
|
+
$[0] = t0;
|
|
118
|
+
$[1] = children;
|
|
119
|
+
$[2] = className;
|
|
120
|
+
$[3] = props;
|
|
121
|
+
$[4] = ref;
|
|
122
|
+
$[5] = shouldShowActive;
|
|
123
|
+
$[6] = shouldShowHover;
|
|
136
124
|
} else {
|
|
137
|
-
children = $[
|
|
138
|
-
className = $[
|
|
139
|
-
props = $[
|
|
140
|
-
ref = $[
|
|
141
|
-
shouldShowActive = $[
|
|
142
|
-
shouldShowHover = $[
|
|
125
|
+
children = $[1];
|
|
126
|
+
className = $[2];
|
|
127
|
+
props = $[3];
|
|
128
|
+
ref = $[4];
|
|
129
|
+
shouldShowActive = $[5];
|
|
130
|
+
shouldShowHover = $[6];
|
|
143
131
|
}
|
|
144
132
|
const t1 = shouldShowHover && "hover:bg-accent/75";
|
|
145
133
|
const t2 = shouldShowActive && "bg-accent text-accent-foreground";
|
|
146
134
|
let t3;
|
|
147
|
-
if ($[
|
|
135
|
+
if ($[7] !== className || $[8] !== t1 || $[9] !== t2) {
|
|
148
136
|
t3 = cn("flex flex-row justify-between items-center gap-1 px-1 max-w-full rounded-lg text-foreground transition-all hover:transition-none", t1, t2, className);
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
$[
|
|
153
|
-
} else t3 = $[
|
|
137
|
+
$[7] = className;
|
|
138
|
+
$[8] = t1;
|
|
139
|
+
$[9] = t2;
|
|
140
|
+
$[10] = t3;
|
|
141
|
+
} else t3 = $[10];
|
|
154
142
|
let t4;
|
|
155
|
-
if ($[
|
|
143
|
+
if ($[11] !== children || $[12] !== props || $[13] !== ref || $[14] !== t3) {
|
|
156
144
|
t4 = /* @__PURE__ */ jsx("div", {
|
|
157
145
|
ref,
|
|
158
146
|
className: t3,
|
|
159
147
|
...props,
|
|
160
148
|
children
|
|
161
149
|
});
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
} else t4 = $[
|
|
150
|
+
$[11] = children;
|
|
151
|
+
$[12] = props;
|
|
152
|
+
$[13] = ref;
|
|
153
|
+
$[14] = t3;
|
|
154
|
+
$[15] = t4;
|
|
155
|
+
} else t4 = $[15];
|
|
168
156
|
return t4;
|
|
169
157
|
};
|
|
170
158
|
const BlockTreeItemTrigger = (t0) => {
|
|
171
|
-
const $ = c(
|
|
172
|
-
if ($[0] !== "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a") {
|
|
173
|
-
for (let $i = 0; $i < 5; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
174
|
-
$[0] = "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a";
|
|
175
|
-
}
|
|
159
|
+
const $ = c(4);
|
|
176
160
|
const { displayText, onClick } = t0;
|
|
177
161
|
let t1;
|
|
178
|
-
if ($[
|
|
162
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
179
163
|
t1 = cn("cursor-default flex-1 truncate py-2 text-sm text-left rounded-sm min-w-0", "focus-visible:underline outline-none focus-visible:decoration-ring/50 focus-visible:decoration-4");
|
|
180
|
-
$[
|
|
181
|
-
} else t1 = $[
|
|
164
|
+
$[0] = t1;
|
|
165
|
+
} else t1 = $[0];
|
|
182
166
|
let t2;
|
|
183
|
-
if ($[
|
|
167
|
+
if ($[1] !== displayText || $[2] !== onClick) {
|
|
184
168
|
t2 = /* @__PURE__ */ jsx("button", {
|
|
185
169
|
type: "button",
|
|
186
170
|
className: t1,
|
|
@@ -188,47 +172,43 @@ const BlockTreeItemTrigger = (t0) => {
|
|
|
188
172
|
onClick,
|
|
189
173
|
children: displayText
|
|
190
174
|
});
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
} else t2 = $[
|
|
175
|
+
$[1] = displayText;
|
|
176
|
+
$[2] = onClick;
|
|
177
|
+
$[3] = t2;
|
|
178
|
+
} else t2 = $[3];
|
|
195
179
|
return t2;
|
|
196
180
|
};
|
|
197
181
|
const BlockTreeItemEllipsis = (t0) => {
|
|
198
|
-
const $ = c(
|
|
199
|
-
if ($[0] !== "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a") {
|
|
200
|
-
for (let $i = 0; $i < 12; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
201
|
-
$[0] = "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a";
|
|
202
|
-
}
|
|
182
|
+
const $ = c(11);
|
|
203
183
|
let className;
|
|
204
184
|
let open;
|
|
205
185
|
let props;
|
|
206
|
-
if ($[
|
|
186
|
+
if ($[0] !== t0) {
|
|
207
187
|
({open, className, ...props} = t0);
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
188
|
+
$[0] = t0;
|
|
189
|
+
$[1] = className;
|
|
190
|
+
$[2] = open;
|
|
191
|
+
$[3] = props;
|
|
212
192
|
} else {
|
|
213
|
-
className = $[
|
|
214
|
-
open = $[
|
|
215
|
-
props = $[
|
|
193
|
+
className = $[1];
|
|
194
|
+
open = $[2];
|
|
195
|
+
props = $[3];
|
|
216
196
|
}
|
|
217
197
|
const t1 = open ? "flex" : "hidden group-hover:flex group-focus-within:flex";
|
|
218
198
|
let t2;
|
|
219
|
-
if ($[
|
|
199
|
+
if ($[4] !== className || $[5] !== t1) {
|
|
220
200
|
t2 = cn("text-muted-foreground hover:text-foreground", t1, className);
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
} else t2 = $[
|
|
201
|
+
$[4] = className;
|
|
202
|
+
$[5] = t1;
|
|
203
|
+
$[6] = t2;
|
|
204
|
+
} else t2 = $[6];
|
|
225
205
|
let t3;
|
|
226
|
-
if ($[
|
|
206
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
227
207
|
t3 = /* @__PURE__ */ jsx(Ellipsis, { className: "size-4" });
|
|
228
|
-
$[
|
|
229
|
-
} else t3 = $[
|
|
208
|
+
$[7] = t3;
|
|
209
|
+
} else t3 = $[7];
|
|
230
210
|
let t4;
|
|
231
|
-
if ($[
|
|
211
|
+
if ($[8] !== props || $[9] !== t2) {
|
|
232
212
|
t4 = /* @__PURE__ */ jsx(Button, {
|
|
233
213
|
variant: "ghost",
|
|
234
214
|
size: "icon-sm",
|
|
@@ -236,10 +216,10 @@ const BlockTreeItemEllipsis = (t0) => {
|
|
|
236
216
|
...props,
|
|
237
217
|
children: t3
|
|
238
218
|
});
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
} else t4 = $[
|
|
219
|
+
$[8] = props;
|
|
220
|
+
$[9] = t2;
|
|
221
|
+
$[10] = t4;
|
|
222
|
+
} else t4 = $[10];
|
|
243
223
|
return t4;
|
|
244
224
|
};
|
|
245
225
|
const animateLayoutChanges = (args) => {
|
|
@@ -248,121 +228,116 @@ const animateLayoutChanges = (args) => {
|
|
|
248
228
|
return defaultAnimateLayoutChanges(args);
|
|
249
229
|
};
|
|
250
230
|
const SortableBlock = (t0) => {
|
|
251
|
-
const $ = c(
|
|
252
|
-
if ($[0] !== "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a") {
|
|
253
|
-
for (let $i = 0; $i < 38; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
254
|
-
$[0] = "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a";
|
|
255
|
-
}
|
|
231
|
+
const $ = c(37);
|
|
256
232
|
const { block } = t0;
|
|
257
233
|
const [gripPopoverOpen, setGripPopoverOpen] = React.useState(false);
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
id: t1,
|
|
234
|
+
let t1;
|
|
235
|
+
if ($[0] !== block.id) {
|
|
236
|
+
t1 = {
|
|
237
|
+
id: block.id,
|
|
263
238
|
animateLayoutChanges
|
|
264
239
|
};
|
|
240
|
+
$[0] = block.id;
|
|
265
241
|
$[1] = t1;
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
$[3] =
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
transform: t3,
|
|
242
|
+
} else t1 = $[1];
|
|
243
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable(t1);
|
|
244
|
+
let t2;
|
|
245
|
+
if ($[2] !== transform) {
|
|
246
|
+
t2 = CSS.Transform.toString(transform);
|
|
247
|
+
$[2] = transform;
|
|
248
|
+
$[3] = t2;
|
|
249
|
+
} else t2 = $[3];
|
|
250
|
+
const t3 = isDragging ? 0 : 1;
|
|
251
|
+
let t4;
|
|
252
|
+
if ($[4] !== t2 || $[5] !== t3 || $[6] !== transition) {
|
|
253
|
+
t4 = {
|
|
254
|
+
transform: t2,
|
|
280
255
|
transition,
|
|
281
|
-
opacity:
|
|
256
|
+
opacity: t3
|
|
282
257
|
};
|
|
258
|
+
$[4] = t2;
|
|
283
259
|
$[5] = t3;
|
|
284
|
-
$[6] =
|
|
285
|
-
$[7] =
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
const style = t5;
|
|
260
|
+
$[6] = transition;
|
|
261
|
+
$[7] = t4;
|
|
262
|
+
} else t4 = $[7];
|
|
263
|
+
const style = t4;
|
|
289
264
|
const ctx = useBlockTreeItem(block, isDragging);
|
|
265
|
+
let t5;
|
|
290
266
|
let t6;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
t6 = /* @__PURE__ */ jsx("span", {
|
|
267
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
268
|
+
t5 = /* @__PURE__ */ jsx("span", {
|
|
294
269
|
className: "sr-only",
|
|
295
270
|
children: "Click and use arrow keys to reorder"
|
|
296
271
|
});
|
|
297
|
-
|
|
272
|
+
t6 = /* @__PURE__ */ jsx(GripVertical, { className: "h-4 w-4" });
|
|
273
|
+
$[8] = t5;
|
|
298
274
|
$[9] = t6;
|
|
299
|
-
$[10] = t7;
|
|
300
275
|
} else {
|
|
276
|
+
t5 = $[8];
|
|
301
277
|
t6 = $[9];
|
|
302
|
-
t7 = $[10];
|
|
303
278
|
}
|
|
304
|
-
let
|
|
305
|
-
if ($[
|
|
306
|
-
|
|
279
|
+
let t7;
|
|
280
|
+
if ($[10] !== attributes || $[11] !== listeners) {
|
|
281
|
+
t7 = /* @__PURE__ */ jsxs(Button, {
|
|
307
282
|
variant: "ghost",
|
|
308
283
|
size: "icon-sm",
|
|
309
284
|
className: "text-muted-foreground hover:text-foreground flex cursor-grab active:cursor-grabbing",
|
|
310
285
|
...attributes,
|
|
311
286
|
...listeners,
|
|
312
|
-
children: [
|
|
287
|
+
children: [t5, t6]
|
|
313
288
|
});
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
} else
|
|
318
|
-
const gripButton =
|
|
319
|
-
let
|
|
320
|
-
if ($[
|
|
321
|
-
|
|
289
|
+
$[10] = attributes;
|
|
290
|
+
$[11] = listeners;
|
|
291
|
+
$[12] = t7;
|
|
292
|
+
} else t7 = $[12];
|
|
293
|
+
const gripButton = t7;
|
|
294
|
+
let t8;
|
|
295
|
+
if ($[13] !== block || $[14] !== gripButton || $[15] !== gripPopoverOpen) {
|
|
296
|
+
t8 = /* @__PURE__ */ jsx(BlockActionsPopover, {
|
|
322
297
|
block,
|
|
323
298
|
open: gripPopoverOpen,
|
|
324
299
|
onOpenChange: setGripPopoverOpen,
|
|
325
300
|
children: gripButton
|
|
326
301
|
});
|
|
327
|
-
$[
|
|
328
|
-
$[
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
331
|
-
} else
|
|
332
|
-
const
|
|
333
|
-
let
|
|
334
|
-
if ($[
|
|
335
|
-
|
|
336
|
-
displayText:
|
|
302
|
+
$[13] = block;
|
|
303
|
+
$[14] = gripButton;
|
|
304
|
+
$[15] = gripPopoverOpen;
|
|
305
|
+
$[16] = t8;
|
|
306
|
+
} else t8 = $[16];
|
|
307
|
+
const t9 = block.summary || block.type;
|
|
308
|
+
let t10;
|
|
309
|
+
if ($[17] !== ctx.toggleSelection || $[18] !== t9) {
|
|
310
|
+
t10 = /* @__PURE__ */ jsx(BlockTreeItemTrigger, {
|
|
311
|
+
displayText: t9,
|
|
337
312
|
onClick: ctx.toggleSelection
|
|
338
313
|
});
|
|
339
|
-
$[
|
|
314
|
+
$[17] = ctx.toggleSelection;
|
|
315
|
+
$[18] = t9;
|
|
340
316
|
$[19] = t10;
|
|
341
|
-
|
|
342
|
-
|
|
317
|
+
} else t10 = $[19];
|
|
318
|
+
let t11;
|
|
319
|
+
if ($[20] !== ctx.ellipsisPopoverOpen) {
|
|
320
|
+
t11 = /* @__PURE__ */ jsx(BlockTreeItemEllipsis, { open: ctx.ellipsisPopoverOpen });
|
|
321
|
+
$[20] = ctx.ellipsisPopoverOpen;
|
|
322
|
+
$[21] = t11;
|
|
323
|
+
} else t11 = $[21];
|
|
343
324
|
let t12;
|
|
344
|
-
if ($[
|
|
345
|
-
t12 = /* @__PURE__ */ jsx(
|
|
346
|
-
$[21] = ctx.ellipsisPopoverOpen;
|
|
347
|
-
$[22] = t12;
|
|
348
|
-
} else t12 = $[22];
|
|
349
|
-
let t13;
|
|
350
|
-
if ($[23] !== block || $[24] !== ctx.ellipsisPopoverOpen || $[25] !== ctx.setEllipsisPopoverOpen || $[26] !== t12) {
|
|
351
|
-
t13 = /* @__PURE__ */ jsx(BlockActionsPopover, {
|
|
325
|
+
if ($[22] !== block || $[23] !== ctx.ellipsisPopoverOpen || $[24] !== ctx.setEllipsisPopoverOpen || $[25] !== t11) {
|
|
326
|
+
t12 = /* @__PURE__ */ jsx(BlockActionsPopover, {
|
|
352
327
|
block,
|
|
353
328
|
open: ctx.ellipsisPopoverOpen,
|
|
354
329
|
onOpenChange: ctx.setEllipsisPopoverOpen,
|
|
355
|
-
children:
|
|
330
|
+
children: t11
|
|
356
331
|
});
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
332
|
+
$[22] = block;
|
|
333
|
+
$[23] = ctx.ellipsisPopoverOpen;
|
|
334
|
+
$[24] = ctx.setEllipsisPopoverOpen;
|
|
335
|
+
$[25] = t11;
|
|
360
336
|
$[26] = t12;
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
t14 = /* @__PURE__ */ jsxs(BlockTreeItemHeader, {
|
|
337
|
+
} else t12 = $[26];
|
|
338
|
+
let t13;
|
|
339
|
+
if ($[27] !== ctx.handleBlockMouseEnter || $[28] !== ctx.handleBlockMouseLeave || $[29] !== ctx.shouldShowActive || $[30] !== ctx.shouldShowHover || $[31] !== setNodeRef || $[32] !== style || $[33] !== t10 || $[34] !== t12 || $[35] !== t8) {
|
|
340
|
+
t13 = /* @__PURE__ */ jsxs(BlockTreeItemHeader, {
|
|
366
341
|
ref: setNodeRef,
|
|
367
342
|
style,
|
|
368
343
|
className: "group",
|
|
@@ -371,65 +346,61 @@ const SortableBlock = (t0) => {
|
|
|
371
346
|
onMouseEnter: ctx.handleBlockMouseEnter,
|
|
372
347
|
onMouseLeave: ctx.handleBlockMouseLeave,
|
|
373
348
|
children: [
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
349
|
+
t8,
|
|
350
|
+
t10,
|
|
351
|
+
t12
|
|
377
352
|
]
|
|
378
353
|
});
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
} else
|
|
390
|
-
return
|
|
354
|
+
$[27] = ctx.handleBlockMouseEnter;
|
|
355
|
+
$[28] = ctx.handleBlockMouseLeave;
|
|
356
|
+
$[29] = ctx.shouldShowActive;
|
|
357
|
+
$[30] = ctx.shouldShowHover;
|
|
358
|
+
$[31] = setNodeRef;
|
|
359
|
+
$[32] = style;
|
|
360
|
+
$[33] = t10;
|
|
361
|
+
$[34] = t12;
|
|
362
|
+
$[35] = t8;
|
|
363
|
+
$[36] = t13;
|
|
364
|
+
} else t13 = $[36];
|
|
365
|
+
return t13;
|
|
391
366
|
};
|
|
392
367
|
const LayoutBlockItem = (t0) => {
|
|
393
|
-
const $ = c(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
$[0] = "8c544211b61d4f71ac5676458467f4c9f63ba3071b19db83d77d9a0d9e06ac4a";
|
|
397
|
-
}
|
|
398
|
-
const { block, layoutName, derived: t1 } = t0;
|
|
399
|
-
const derived = t1 === void 0 ? false : t1;
|
|
368
|
+
const $ = c(26);
|
|
369
|
+
const { block, layoutName, withActions: t1 } = t0;
|
|
370
|
+
const withActions = t1 === void 0 ? true : t1;
|
|
400
371
|
const camoxApp = useCamoxApp();
|
|
401
372
|
let t2;
|
|
402
|
-
if ($[
|
|
373
|
+
if ($[0] !== block.type || $[1] !== camoxApp) {
|
|
403
374
|
t2 = camoxApp.getBlockById(block.type);
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else t2 = $[
|
|
375
|
+
$[0] = block.type;
|
|
376
|
+
$[1] = camoxApp;
|
|
377
|
+
$[2] = t2;
|
|
378
|
+
} else t2 = $[2];
|
|
408
379
|
const blockDef = t2;
|
|
409
380
|
const ctx = useBlockTreeItem(block);
|
|
410
381
|
const displayText = blockDef?._internal.title ?? block.type;
|
|
411
382
|
let t3;
|
|
412
|
-
if ($[
|
|
383
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
413
384
|
t3 = /* @__PURE__ */ jsx(TooltipTrigger, { children: /* @__PURE__ */ jsx(LayoutTemplate, { className: "h-4 w-4" }) });
|
|
414
|
-
$[
|
|
415
|
-
} else t3 = $[
|
|
385
|
+
$[3] = t3;
|
|
386
|
+
} else t3 = $[3];
|
|
416
387
|
let t4;
|
|
417
|
-
if ($[
|
|
388
|
+
if ($[4] !== layoutName) {
|
|
418
389
|
t4 = /* @__PURE__ */ jsx("span", {
|
|
419
390
|
className: "font-semibold",
|
|
420
391
|
children: layoutName
|
|
421
392
|
});
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
} else t4 = $[
|
|
393
|
+
$[4] = layoutName;
|
|
394
|
+
$[5] = t4;
|
|
395
|
+
} else t4 = $[5];
|
|
425
396
|
let t5;
|
|
426
|
-
if ($[
|
|
397
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
427
398
|
t5 = /* @__PURE__ */ jsx("br", {});
|
|
428
|
-
$[
|
|
429
|
-
} else t5 = $[
|
|
399
|
+
$[6] = t5;
|
|
400
|
+
} else t5 = $[6];
|
|
430
401
|
const t6 = blockDef?._internal.synced ? "Synced: editing this block updates it across all layouts and pages" : "Changing the content may affect other pages";
|
|
431
402
|
let t7;
|
|
432
|
-
if ($[
|
|
403
|
+
if ($[7] !== t4 || $[8] !== t6) {
|
|
433
404
|
t7 = /* @__PURE__ */ jsx("div", {
|
|
434
405
|
className: "text-muted-foreground flex size-8 shrink-0 items-center justify-center",
|
|
435
406
|
children: /* @__PURE__ */ jsxs(Tooltip, { children: [t3, /* @__PURE__ */ jsxs(TooltipContent, { children: [
|
|
@@ -440,38 +411,38 @@ const LayoutBlockItem = (t0) => {
|
|
|
440
411
|
t6
|
|
441
412
|
] })] })
|
|
442
413
|
});
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
} else t7 = $[
|
|
414
|
+
$[7] = t4;
|
|
415
|
+
$[8] = t6;
|
|
416
|
+
$[9] = t7;
|
|
417
|
+
} else t7 = $[9];
|
|
447
418
|
let t8;
|
|
448
|
-
if ($[
|
|
419
|
+
if ($[10] !== ctx.toggleSelection || $[11] !== displayText) {
|
|
449
420
|
t8 = /* @__PURE__ */ jsx(BlockTreeItemTrigger, {
|
|
450
421
|
displayText,
|
|
451
422
|
onClick: ctx.toggleSelection
|
|
452
423
|
});
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
} else t8 = $[
|
|
424
|
+
$[10] = ctx.toggleSelection;
|
|
425
|
+
$[11] = displayText;
|
|
426
|
+
$[12] = t8;
|
|
427
|
+
} else t8 = $[12];
|
|
457
428
|
let t9;
|
|
458
|
-
if ($[
|
|
459
|
-
t9 =
|
|
429
|
+
if ($[13] !== block || $[14] !== ctx.ellipsisPopoverOpen || $[15] !== ctx.setEllipsisPopoverOpen || $[16] !== withActions) {
|
|
430
|
+
t9 = withActions && /* @__PURE__ */ jsx(BlockActionsPopover, {
|
|
460
431
|
block,
|
|
461
432
|
open: ctx.ellipsisPopoverOpen,
|
|
462
433
|
onOpenChange: ctx.setEllipsisPopoverOpen,
|
|
463
434
|
isLayoutBlock: true,
|
|
464
|
-
|
|
435
|
+
layoutSlot: block.slot,
|
|
465
436
|
children: /* @__PURE__ */ jsx(BlockTreeItemEllipsis, { open: ctx.ellipsisPopoverOpen })
|
|
466
437
|
});
|
|
467
|
-
$[
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
} else t9 = $[
|
|
438
|
+
$[13] = block;
|
|
439
|
+
$[14] = ctx.ellipsisPopoverOpen;
|
|
440
|
+
$[15] = ctx.setEllipsisPopoverOpen;
|
|
441
|
+
$[16] = withActions;
|
|
442
|
+
$[17] = t9;
|
|
443
|
+
} else t9 = $[17];
|
|
473
444
|
let t10;
|
|
474
|
-
if ($[
|
|
445
|
+
if ($[18] !== ctx.handleBlockMouseEnter || $[19] !== ctx.handleBlockMouseLeave || $[20] !== ctx.shouldShowActive || $[21] !== ctx.shouldShowHover || $[22] !== t7 || $[23] !== t8 || $[24] !== t9) {
|
|
475
446
|
t10 = /* @__PURE__ */ jsxs(BlockTreeItemHeader, {
|
|
476
447
|
className: "group",
|
|
477
448
|
shouldShowHover: ctx.shouldShowHover,
|
|
@@ -484,114 +455,167 @@ const LayoutBlockItem = (t0) => {
|
|
|
484
455
|
t9
|
|
485
456
|
]
|
|
486
457
|
});
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
} else t10 = $[
|
|
458
|
+
$[18] = ctx.handleBlockMouseEnter;
|
|
459
|
+
$[19] = ctx.handleBlockMouseLeave;
|
|
460
|
+
$[20] = ctx.shouldShowActive;
|
|
461
|
+
$[21] = ctx.shouldShowHover;
|
|
462
|
+
$[22] = t7;
|
|
463
|
+
$[23] = t8;
|
|
464
|
+
$[24] = t9;
|
|
465
|
+
$[25] = t10;
|
|
466
|
+
} else t10 = $[25];
|
|
496
467
|
return t10;
|
|
497
468
|
};
|
|
498
|
-
|
|
469
|
+
/** A sidebar field labelled "Blocks", holding a page's blocks and what acts on them. */
|
|
470
|
+
const BlocksGroup = (t0) => {
|
|
499
471
|
const $ = c(6);
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
472
|
+
const { children } = t0;
|
|
473
|
+
const labelId = React.useId();
|
|
474
|
+
let t1;
|
|
475
|
+
if ($[0] !== labelId) {
|
|
476
|
+
t1 = /* @__PURE__ */ jsx(Label, {
|
|
477
|
+
id: labelId,
|
|
478
|
+
children: "Blocks"
|
|
479
|
+
});
|
|
480
|
+
$[0] = labelId;
|
|
481
|
+
$[1] = t1;
|
|
482
|
+
} else t1 = $[1];
|
|
507
483
|
let t2;
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
484
|
+
if ($[2] !== children || $[3] !== labelId || $[4] !== t1) {
|
|
485
|
+
t2 = /* @__PURE__ */ jsxs("section", {
|
|
486
|
+
"aria-labelledby": labelId,
|
|
487
|
+
className: "flex flex-col gap-2",
|
|
488
|
+
children: [t1, children]
|
|
489
|
+
});
|
|
490
|
+
$[2] = children;
|
|
491
|
+
$[3] = labelId;
|
|
492
|
+
$[4] = t1;
|
|
493
|
+
$[5] = t2;
|
|
494
|
+
} else t2 = $[5];
|
|
495
|
+
return t2;
|
|
496
|
+
};
|
|
497
|
+
/** A page's blocks, collapsed by default behind a bordered toggle showing their count. */
|
|
498
|
+
const CollapsedPageTree = (t0) => {
|
|
499
|
+
const $ = c(15);
|
|
500
|
+
const { blockCount, children } = t0;
|
|
501
|
+
const [expanded, setExpanded] = React.useState(false);
|
|
502
|
+
let t1;
|
|
503
|
+
let t2;
|
|
504
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
505
|
+
t1 = cn("cursor-default flex flex-1 items-center gap-1 text-sm text-left rounded-sm min-w-0", "focus-visible:underline outline-none focus-visible:decoration-ring/50 focus-visible:decoration-4");
|
|
506
|
+
t2 = () => setExpanded(_temp);
|
|
507
|
+
$[0] = t1;
|
|
514
508
|
$[1] = t2;
|
|
515
|
-
$[2] = t3;
|
|
516
509
|
} else {
|
|
510
|
+
t1 = $[0];
|
|
517
511
|
t2 = $[1];
|
|
518
|
-
t3 = $[2];
|
|
519
512
|
}
|
|
520
|
-
|
|
521
|
-
|
|
513
|
+
let t3;
|
|
514
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
515
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
516
|
+
className: "text-muted-foreground flex size-8 shrink-0 items-center justify-center",
|
|
517
|
+
children: /* @__PURE__ */ jsx(ChevronsUpDown, { className: "h-4 w-4" })
|
|
518
|
+
});
|
|
519
|
+
$[2] = t3;
|
|
520
|
+
} else t3 = $[2];
|
|
521
|
+
const t4 = blockCount === 1 ? "block" : "blocks";
|
|
522
522
|
let t5;
|
|
523
|
-
if ($[3]
|
|
524
|
-
t5 = /* @__PURE__ */
|
|
525
|
-
className: "
|
|
526
|
-
children:
|
|
523
|
+
if ($[3] !== blockCount || $[4] !== t4) {
|
|
524
|
+
t5 = /* @__PURE__ */ jsxs("span", {
|
|
525
|
+
className: "truncate py-2",
|
|
526
|
+
children: [
|
|
527
|
+
blockCount,
|
|
528
|
+
" page ",
|
|
529
|
+
t4
|
|
530
|
+
]
|
|
527
531
|
});
|
|
528
|
-
$[3] =
|
|
529
|
-
|
|
532
|
+
$[3] = blockCount;
|
|
533
|
+
$[4] = t4;
|
|
534
|
+
$[5] = t5;
|
|
535
|
+
} else t5 = $[5];
|
|
530
536
|
let t6;
|
|
531
|
-
if ($[
|
|
532
|
-
t6 = /* @__PURE__ */ jsx(
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
"
|
|
536
|
-
children:
|
|
537
|
+
if ($[6] !== expanded || $[7] !== t5) {
|
|
538
|
+
t6 = /* @__PURE__ */ jsx(BlockTreeItemHeader, {
|
|
539
|
+
shouldShowHover: true,
|
|
540
|
+
shouldShowActive: false,
|
|
541
|
+
className: "rounded-none px-2",
|
|
542
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
543
|
+
type: "button",
|
|
544
|
+
"aria-expanded": expanded,
|
|
545
|
+
className: t1,
|
|
546
|
+
onClick: t2,
|
|
547
|
+
children: [t3, t5]
|
|
548
|
+
})
|
|
537
549
|
});
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
|
|
541
|
-
|
|
550
|
+
$[6] = expanded;
|
|
551
|
+
$[7] = t5;
|
|
552
|
+
$[8] = t6;
|
|
553
|
+
} else t6 = $[8];
|
|
554
|
+
let t7;
|
|
555
|
+
if ($[9] !== children || $[10] !== expanded) {
|
|
556
|
+
t7 = expanded && /* @__PURE__ */ jsx("div", {
|
|
557
|
+
className: "border-input flex flex-col gap-2 border-t p-1",
|
|
558
|
+
children
|
|
559
|
+
});
|
|
560
|
+
$[9] = children;
|
|
561
|
+
$[10] = expanded;
|
|
562
|
+
$[11] = t7;
|
|
563
|
+
} else t7 = $[11];
|
|
564
|
+
let t8;
|
|
565
|
+
if ($[12] !== t6 || $[13] !== t7) {
|
|
566
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
567
|
+
className: "border-input flex flex-col overflow-hidden rounded-lg border shadow-xs",
|
|
568
|
+
children: [t6, t7]
|
|
569
|
+
});
|
|
570
|
+
$[12] = t6;
|
|
571
|
+
$[13] = t7;
|
|
572
|
+
$[14] = t8;
|
|
573
|
+
} else t8 = $[14];
|
|
574
|
+
return t8;
|
|
542
575
|
};
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
}
|
|
576
|
+
/** A page's blocks. When `collapsible`, they start collapsed behind a toggle showing their count. */
|
|
577
|
+
const PageTree = (t0) => {
|
|
578
|
+
const $ = c(51);
|
|
579
|
+
const { collapsible: t1 } = t0;
|
|
580
|
+
const collapsible = t1 === void 0 ? false : t1;
|
|
549
581
|
const page = usePreviewedPage();
|
|
550
|
-
const
|
|
551
|
-
const peekedBlockPosition = useSelector(previewStore, _temp4);
|
|
552
|
-
const previewSource = usePreviewSource();
|
|
553
|
-
const requireDraft = useRequireDraftSource();
|
|
554
|
-
const { pageBlocks, beforeBlocks: layoutBeforeBlocks, afterBlocks: layoutAfterBlocks } = usePageBlocks(page, previewSource);
|
|
582
|
+
const { pageBlocks, beforeBlocks: layoutBeforeBlocks, afterBlocks: layoutAfterBlocks } = usePageBlocks(page);
|
|
555
583
|
const camoxApp = useCamoxApp();
|
|
556
584
|
const updatePosition = useUpdateBlockPosition();
|
|
557
585
|
const [activeId, setActiveId] = React.useState(null);
|
|
558
|
-
let
|
|
559
|
-
if ($[
|
|
560
|
-
|
|
586
|
+
let t2;
|
|
587
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
588
|
+
t2 = { activationConstraint: {
|
|
561
589
|
distance: 8,
|
|
562
590
|
delay: 150,
|
|
563
591
|
tolerance: 5
|
|
564
592
|
} };
|
|
565
|
-
$[
|
|
566
|
-
} else
|
|
567
|
-
let
|
|
593
|
+
$[0] = t2;
|
|
594
|
+
} else t2 = $[0];
|
|
595
|
+
let t3;
|
|
596
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
597
|
+
t3 = { coordinateGetter: sortableKeyboardCoordinates };
|
|
598
|
+
$[1] = t3;
|
|
599
|
+
} else t3 = $[1];
|
|
600
|
+
const sensors = useSensors(useSensor(PointerSensor, t2), useSensor(KeyboardSensor, t3));
|
|
601
|
+
let t4;
|
|
568
602
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
569
|
-
|
|
570
|
-
$[2] = t1;
|
|
571
|
-
} else t1 = $[2];
|
|
572
|
-
const sensors = useSensors(useSensor(PointerSensor, t0), useSensor(KeyboardSensor, t1));
|
|
573
|
-
let t2;
|
|
574
|
-
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
575
|
-
t2 = (event) => {
|
|
603
|
+
t4 = (event) => {
|
|
576
604
|
setActiveId(String(event.active.id));
|
|
577
605
|
};
|
|
578
|
-
$[
|
|
579
|
-
} else
|
|
580
|
-
const handleDragStart =
|
|
581
|
-
let
|
|
582
|
-
if ($[
|
|
583
|
-
|
|
606
|
+
$[2] = t4;
|
|
607
|
+
} else t4 = $[2];
|
|
608
|
+
const handleDragStart = t4;
|
|
609
|
+
let t5;
|
|
610
|
+
if ($[3] !== page || $[4] !== pageBlocks || $[5] !== updatePosition) {
|
|
611
|
+
t5 = (event_0) => {
|
|
584
612
|
const { active, over } = event_0;
|
|
585
613
|
if (!over || active.id === over.id || !page) {
|
|
586
614
|
setActiveId(null);
|
|
587
615
|
return;
|
|
588
616
|
}
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
return;
|
|
592
|
-
}
|
|
593
|
-
const oldIndex = pageBlocks.findIndex((block) => String(block.id) === active.id);
|
|
594
|
-
const newIndex = pageBlocks.findIndex((block_0) => String(block_0.id) === over.id);
|
|
617
|
+
const oldIndex = pageBlocks.findIndex((block) => block.id === active.id);
|
|
618
|
+
const newIndex = pageBlocks.findIndex((block_0) => block_0.id === over.id);
|
|
595
619
|
if (oldIndex === -1 || newIndex === -1) {
|
|
596
620
|
setActiveId(null);
|
|
597
621
|
return;
|
|
@@ -606,129 +630,92 @@ const PageTree = () => {
|
|
|
606
630
|
beforePosition = pageBlocks[newIndex].position;
|
|
607
631
|
}
|
|
608
632
|
updatePosition.mutate({
|
|
609
|
-
id:
|
|
633
|
+
id: String(active.id),
|
|
610
634
|
afterPosition,
|
|
611
635
|
beforePosition
|
|
612
636
|
});
|
|
613
637
|
setActiveId(null);
|
|
614
638
|
};
|
|
615
|
-
$[
|
|
616
|
-
$[
|
|
617
|
-
$[
|
|
618
|
-
$[
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
t4 = () => {
|
|
639
|
+
$[3] = page;
|
|
640
|
+
$[4] = pageBlocks;
|
|
641
|
+
$[5] = updatePosition;
|
|
642
|
+
$[6] = t5;
|
|
643
|
+
} else t5 = $[6];
|
|
644
|
+
const handleDragEnd = t5;
|
|
645
|
+
let t6;
|
|
646
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
647
|
+
t6 = () => {
|
|
625
648
|
setActiveId(null);
|
|
626
649
|
};
|
|
627
|
-
$[
|
|
628
|
-
} else
|
|
629
|
-
const handleDragCancel =
|
|
650
|
+
$[7] = t6;
|
|
651
|
+
} else t6 = $[7];
|
|
652
|
+
const handleDragCancel = t6;
|
|
630
653
|
if (!page) return null;
|
|
631
|
-
let t5;
|
|
632
|
-
if ($[10] !== camoxApp || $[11] !== page.layout) {
|
|
633
|
-
t5 = page.layout ? camoxApp.getLayoutById(page.layout.layoutId) : void 0;
|
|
634
|
-
$[10] = camoxApp;
|
|
635
|
-
$[11] = page.layout;
|
|
636
|
-
$[12] = t5;
|
|
637
|
-
} else t5 = $[12];
|
|
638
|
-
const layout = t5;
|
|
639
|
-
let t6;
|
|
640
|
-
if ($[13] !== pageBlocks || $[14] !== peekedBlockPosition) {
|
|
641
|
-
let t7;
|
|
642
|
-
if ($[16] !== peekedBlockPosition) {
|
|
643
|
-
t7 = (block_1) => peekedBlockPosition != null && block_1.position > peekedBlockPosition;
|
|
644
|
-
$[16] = peekedBlockPosition;
|
|
645
|
-
$[17] = t7;
|
|
646
|
-
} else t7 = $[17];
|
|
647
|
-
t6 = pageBlocks.findIndex(t7);
|
|
648
|
-
$[13] = pageBlocks;
|
|
649
|
-
$[14] = peekedBlockPosition;
|
|
650
|
-
$[15] = t6;
|
|
651
|
-
} else t6 = $[15];
|
|
652
|
-
const nextBlockIndex = t6;
|
|
653
|
-
const insertionIndex = peekedBlockPosition === "" ? 0 : nextBlockIndex === -1 ? pageBlocks.length : nextBlockIndex;
|
|
654
654
|
let t7;
|
|
655
|
-
if ($[
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
$[21] = layout?._internal;
|
|
663
|
-
$[22] = t8;
|
|
664
|
-
} else t8 = $[22];
|
|
665
|
-
t7 = layoutBeforeBlocks.map(t8);
|
|
666
|
-
$[18] = layout?._internal;
|
|
667
|
-
$[19] = layoutBeforeBlocks;
|
|
668
|
-
$[20] = t7;
|
|
669
|
-
} else t7 = $[20];
|
|
655
|
+
if ($[8] !== camoxApp || $[9] !== page.layout) {
|
|
656
|
+
t7 = page.layout ? camoxApp.getLayoutById(page.layout.layoutId) : void 0;
|
|
657
|
+
$[8] = camoxApp;
|
|
658
|
+
$[9] = page.layout;
|
|
659
|
+
$[10] = t7;
|
|
660
|
+
} else t7 = $[10];
|
|
661
|
+
const layout = t7;
|
|
670
662
|
let t8;
|
|
671
|
-
if ($[
|
|
672
|
-
|
|
673
|
-
$[
|
|
674
|
-
|
|
663
|
+
if ($[11] !== layout?._internal || $[12] !== layoutBeforeBlocks) {
|
|
664
|
+
let t9;
|
|
665
|
+
if ($[14] !== layout?._internal) {
|
|
666
|
+
t9 = (block_1) => /* @__PURE__ */ jsx(LayoutBlockItem, {
|
|
667
|
+
block: block_1,
|
|
668
|
+
layoutName: layout?._internal.title ?? "Unknown"
|
|
669
|
+
}, block_1.id);
|
|
670
|
+
$[14] = layout?._internal;
|
|
671
|
+
$[15] = t9;
|
|
672
|
+
} else t9 = $[15];
|
|
673
|
+
t8 = layoutBeforeBlocks.map(t9);
|
|
674
|
+
$[11] = layout?._internal;
|
|
675
|
+
$[12] = layoutBeforeBlocks;
|
|
676
|
+
$[13] = t8;
|
|
677
|
+
} else t8 = $[13];
|
|
675
678
|
let t9;
|
|
676
|
-
if ($[
|
|
677
|
-
t9 =
|
|
678
|
-
$[
|
|
679
|
-
|
|
680
|
-
} else t9 = $[25];
|
|
679
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
680
|
+
t9 = [restrictToVerticalAxis];
|
|
681
|
+
$[16] = t9;
|
|
682
|
+
} else t9 = $[16];
|
|
681
683
|
let t10;
|
|
682
|
-
if ($[
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
children: [isAddBlockSidebarOpen && index === insertionIndex && /* @__PURE__ */ jsx(BlockInsertionIndicator, {}), /* @__PURE__ */ jsx(SortableBlock, { block: block_4 })]
|
|
688
|
-
}, String(block_4.id));
|
|
689
|
-
$[30] = insertionIndex;
|
|
690
|
-
$[31] = isAddBlockSidebarOpen;
|
|
691
|
-
$[32] = t11;
|
|
692
|
-
} else t11 = $[32];
|
|
693
|
-
t10 = pageBlocks.map(t11);
|
|
694
|
-
$[26] = insertionIndex;
|
|
695
|
-
$[27] = isAddBlockSidebarOpen;
|
|
696
|
-
$[28] = pageBlocks;
|
|
697
|
-
$[29] = t10;
|
|
698
|
-
} else t10 = $[29];
|
|
684
|
+
if ($[17] !== pageBlocks) {
|
|
685
|
+
t10 = pageBlocks.map(_temp2);
|
|
686
|
+
$[17] = pageBlocks;
|
|
687
|
+
$[18] = t10;
|
|
688
|
+
} else t10 = $[18];
|
|
699
689
|
let t11;
|
|
700
|
-
if ($[
|
|
701
|
-
t11 =
|
|
702
|
-
$[
|
|
703
|
-
$[
|
|
704
|
-
|
|
705
|
-
$[36] = t11;
|
|
706
|
-
} else t11 = $[36];
|
|
690
|
+
if ($[19] !== pageBlocks) {
|
|
691
|
+
t11 = pageBlocks.map(_temp3);
|
|
692
|
+
$[19] = pageBlocks;
|
|
693
|
+
$[20] = t11;
|
|
694
|
+
} else t11 = $[20];
|
|
707
695
|
let t12;
|
|
708
|
-
if ($[
|
|
709
|
-
t12 = /* @__PURE__ */
|
|
696
|
+
if ($[21] !== t11) {
|
|
697
|
+
t12 = /* @__PURE__ */ jsx("div", {
|
|
710
698
|
className: "relative flex flex-col gap-0.5",
|
|
711
|
-
children:
|
|
699
|
+
children: t11
|
|
712
700
|
});
|
|
713
|
-
$[
|
|
714
|
-
$[
|
|
715
|
-
|
|
716
|
-
} else t12 = $[39];
|
|
701
|
+
$[21] = t11;
|
|
702
|
+
$[22] = t12;
|
|
703
|
+
} else t12 = $[22];
|
|
717
704
|
let t13;
|
|
718
|
-
if ($[
|
|
705
|
+
if ($[23] !== t10 || $[24] !== t12) {
|
|
719
706
|
t13 = /* @__PURE__ */ jsx(SortableContext, {
|
|
720
|
-
items:
|
|
707
|
+
items: t10,
|
|
721
708
|
strategy: verticalListSortingStrategy,
|
|
722
709
|
children: t12
|
|
723
710
|
});
|
|
724
|
-
$[
|
|
725
|
-
$[
|
|
726
|
-
$[
|
|
727
|
-
} else t13 = $[
|
|
711
|
+
$[23] = t10;
|
|
712
|
+
$[24] = t12;
|
|
713
|
+
$[25] = t13;
|
|
714
|
+
} else t13 = $[25];
|
|
728
715
|
let t14;
|
|
729
|
-
if ($[
|
|
716
|
+
if ($[26] !== activeId || $[27] !== pageBlocks) {
|
|
730
717
|
t14 = activeId ? (() => {
|
|
731
|
-
const activeBlock = pageBlocks.find((b) =>
|
|
718
|
+
const activeBlock = pageBlocks.find((b) => b.id === activeId);
|
|
732
719
|
if (!activeBlock) return null;
|
|
733
720
|
return /* @__PURE__ */ jsx("div", {
|
|
734
721
|
className: "bg-accent text-accent-foreground rounded-lg shadow-md",
|
|
@@ -741,109 +728,115 @@ const PageTree = () => {
|
|
|
741
728
|
})
|
|
742
729
|
});
|
|
743
730
|
})() : null;
|
|
744
|
-
$[
|
|
745
|
-
$[
|
|
746
|
-
$[
|
|
747
|
-
} else t14 = $[
|
|
731
|
+
$[26] = activeId;
|
|
732
|
+
$[27] = pageBlocks;
|
|
733
|
+
$[28] = t14;
|
|
734
|
+
} else t14 = $[28];
|
|
748
735
|
let t15;
|
|
749
|
-
if ($[
|
|
736
|
+
if ($[29] !== t14) {
|
|
750
737
|
t15 = /* @__PURE__ */ jsx(DragOverlay, {
|
|
751
738
|
dropAnimation: null,
|
|
752
739
|
children: t14
|
|
753
740
|
});
|
|
754
|
-
$[
|
|
755
|
-
$[
|
|
756
|
-
} else t15 = $[
|
|
741
|
+
$[29] = t14;
|
|
742
|
+
$[30] = t15;
|
|
743
|
+
} else t15 = $[30];
|
|
757
744
|
let t16;
|
|
758
|
-
if ($[
|
|
745
|
+
if ($[31] !== handleDragEnd || $[32] !== sensors || $[33] !== t13 || $[34] !== t15) {
|
|
759
746
|
t16 = /* @__PURE__ */ jsxs(DndContext, {
|
|
760
747
|
sensors,
|
|
761
748
|
collisionDetection: closestCenter,
|
|
762
749
|
onDragStart: handleDragStart,
|
|
763
750
|
onDragEnd: handleDragEnd,
|
|
764
751
|
onDragCancel: handleDragCancel,
|
|
765
|
-
modifiers:
|
|
752
|
+
modifiers: t9,
|
|
766
753
|
children: [t13, t15]
|
|
767
754
|
});
|
|
768
|
-
$[
|
|
769
|
-
$[
|
|
770
|
-
$[
|
|
771
|
-
$[
|
|
772
|
-
$[
|
|
773
|
-
} else t16 = $[
|
|
755
|
+
$[31] = handleDragEnd;
|
|
756
|
+
$[32] = sensors;
|
|
757
|
+
$[33] = t13;
|
|
758
|
+
$[34] = t15;
|
|
759
|
+
$[35] = t16;
|
|
760
|
+
} else t16 = $[35];
|
|
774
761
|
let t17;
|
|
775
|
-
if ($[
|
|
762
|
+
if ($[36] !== layout?._internal || $[37] !== layoutAfterBlocks) {
|
|
776
763
|
let t18;
|
|
777
|
-
if ($[
|
|
778
|
-
t18 = (
|
|
779
|
-
block:
|
|
764
|
+
if ($[39] !== layout?._internal) {
|
|
765
|
+
t18 = (block_4) => /* @__PURE__ */ jsx(LayoutBlockItem, {
|
|
766
|
+
block: block_4,
|
|
780
767
|
layoutName: layout?._internal.title ?? "Unknown"
|
|
781
|
-
},
|
|
782
|
-
$[
|
|
783
|
-
$[
|
|
784
|
-
} else t18 = $[
|
|
768
|
+
}, block_4.id);
|
|
769
|
+
$[39] = layout?._internal;
|
|
770
|
+
$[40] = t18;
|
|
771
|
+
} else t18 = $[40];
|
|
785
772
|
t17 = layoutAfterBlocks.map(t18);
|
|
786
|
-
$[
|
|
787
|
-
$[
|
|
788
|
-
$[
|
|
789
|
-
} else t17 = $[
|
|
773
|
+
$[36] = layout?._internal;
|
|
774
|
+
$[37] = layoutAfterBlocks;
|
|
775
|
+
$[38] = t17;
|
|
776
|
+
} else t17 = $[38];
|
|
790
777
|
let t18;
|
|
791
|
-
if ($[
|
|
778
|
+
if ($[41] !== t16 || $[42] !== t17 || $[43] !== t8) {
|
|
792
779
|
t18 = /* @__PURE__ */ jsxs("div", {
|
|
793
780
|
className: "flex flex-col gap-0.5",
|
|
794
781
|
children: [
|
|
795
|
-
|
|
782
|
+
t8,
|
|
796
783
|
t16,
|
|
797
784
|
t17
|
|
798
785
|
]
|
|
799
786
|
});
|
|
800
|
-
$[
|
|
801
|
-
$[
|
|
802
|
-
$[
|
|
803
|
-
$[
|
|
804
|
-
} else t18 = $[
|
|
787
|
+
$[41] = t16;
|
|
788
|
+
$[42] = t17;
|
|
789
|
+
$[43] = t8;
|
|
790
|
+
$[44] = t18;
|
|
791
|
+
} else t18 = $[44];
|
|
792
|
+
const list = t18;
|
|
805
793
|
let t19;
|
|
806
|
-
if ($[
|
|
807
|
-
t19 = (
|
|
808
|
-
if (!requireDraft()) return;
|
|
809
|
-
previewStore.send({ type: "openAddBlockSidebar" });
|
|
810
|
-
};
|
|
811
|
-
$[62] = requireDraft;
|
|
812
|
-
$[63] = t19;
|
|
813
|
-
} else t19 = $[63];
|
|
814
|
-
let t20;
|
|
815
|
-
if ($[64] === Symbol.for("react.memo_cache_sentinel")) {
|
|
816
|
-
t20 = /* @__PURE__ */ jsx(Plus, {});
|
|
817
|
-
$[64] = t20;
|
|
818
|
-
} else t20 = $[64];
|
|
819
|
-
let t21;
|
|
820
|
-
if ($[65] !== t19) {
|
|
821
|
-
t21 = /* @__PURE__ */ jsxs(Button, {
|
|
794
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
795
|
+
t19 = /* @__PURE__ */ jsxs(Button, {
|
|
822
796
|
variant: "secondary",
|
|
823
|
-
onClick:
|
|
824
|
-
children: [
|
|
797
|
+
onClick: _temp4,
|
|
798
|
+
children: [/* @__PURE__ */ jsx(Plus, {}), "Add block"]
|
|
825
799
|
});
|
|
826
|
-
$[
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
800
|
+
$[45] = t19;
|
|
801
|
+
} else t19 = $[45];
|
|
802
|
+
const addBlockButton = t19;
|
|
803
|
+
if (!collapsible) {
|
|
804
|
+
let t20;
|
|
805
|
+
if ($[46] !== list) {
|
|
806
|
+
t20 = /* @__PURE__ */ jsxs(Fragment, { children: [list, addBlockButton] });
|
|
807
|
+
$[46] = list;
|
|
808
|
+
$[47] = t20;
|
|
809
|
+
} else t20 = $[47];
|
|
810
|
+
return t20;
|
|
811
|
+
}
|
|
812
|
+
const blockCount = layoutBeforeBlocks.length + pageBlocks.length + layoutAfterBlocks.length;
|
|
813
|
+
let t20;
|
|
814
|
+
if ($[48] !== blockCount || $[49] !== list) {
|
|
815
|
+
t20 = /* @__PURE__ */ jsx(BlocksGroup, { children: /* @__PURE__ */ jsxs("div", {
|
|
816
|
+
className: "flex flex-col gap-1",
|
|
817
|
+
children: [/* @__PURE__ */ jsx(CollapsedPageTree, {
|
|
818
|
+
blockCount,
|
|
819
|
+
children: list
|
|
820
|
+
}), addBlockButton]
|
|
821
|
+
}) });
|
|
822
|
+
$[48] = blockCount;
|
|
823
|
+
$[49] = list;
|
|
824
|
+
$[50] = t20;
|
|
825
|
+
} else t20 = $[50];
|
|
826
|
+
return t20;
|
|
837
827
|
};
|
|
838
|
-
function
|
|
839
|
-
return
|
|
828
|
+
function _temp(value) {
|
|
829
|
+
return !value;
|
|
830
|
+
}
|
|
831
|
+
function _temp2(block_2) {
|
|
832
|
+
return block_2.id;
|
|
840
833
|
}
|
|
841
|
-
function
|
|
842
|
-
return
|
|
834
|
+
function _temp3(block_3) {
|
|
835
|
+
return /* @__PURE__ */ jsx(SortableBlock, { block: block_3 }, block_3.id);
|
|
843
836
|
}
|
|
844
|
-
function
|
|
845
|
-
|
|
837
|
+
function _temp4() {
|
|
838
|
+
previewStore.send({ type: "openAddBlockDialog" });
|
|
846
839
|
}
|
|
847
840
|
|
|
848
841
|
//#endregion
|
|
849
|
-
export { LayoutBlockItem, PageTree };
|
|
842
|
+
export { BlocksGroup, CollapsedPageTree, LayoutBlockItem, PageTree };
|