camox 0.44.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/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 +53 -53
- package/dist/core/components/lexical/MaxLengthPlugin.js +59 -0
- package/dist/core/components/lexical/SelectionBroadcaster.js +53 -54
- package/dist/core/components/lexical/SidebarLexicalEditor.js +322 -229
- package/dist/core/components/lexical/SummaryToggleGuard.js +42 -0
- package/dist/core/components/lexical/TextLinkPopover.js +169 -180
- package/dist/core/createApp.d.ts +241 -312
- package/dist/core/createApp.js +123 -29
- package/dist/core/createBlock.d.ts +5 -5
- package/dist/core/createBlock.js +385 -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 +754 -633
- package/dist/core/editing/createEditableBlock.js +2113 -1066
- 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 +302 -106
- package/dist/core/lib/contentType.js +201 -173
- package/dist/core/lib/fieldTypes.js +3 -0
- package/dist/core/lib/iconTypes.d.ts +3 -3
- package/dist/core/lib/icons.d.ts +4 -4
- package/dist/core/lib/icons.js +40 -44
- 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 +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 +5 -7
- package/dist/core/lib/textStyles.js +2 -2
- 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 +80 -84
- 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 +816 -537
- 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 +181 -134
- 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 +21 -19
- package/dist/features/preview/components/DrillRow.js +150 -0
- package/dist/features/preview/components/FieldOverlayStyles.js +11 -8
- package/dist/features/preview/components/FieldToolbar.js +160 -110
- package/dist/features/preview/components/Frame.js +108 -20
- package/dist/features/preview/components/IconFieldEditor.js +62 -66
- package/dist/features/preview/components/ItemFieldsEditor.js +231 -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 +9 -41
- 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 +128 -130
- 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 +105 -333
- 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 +17 -44
- 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 +32 -63
- 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 +66 -50
- package/dist/features/provider/LocalhostPreviewProvider.js +78 -114
- package/dist/features/provider/PreviewSignInPage.js +54 -0
- package/dist/features/provider/components/CamoxAppContext.js +11 -11
- package/dist/features/provider/components/CommandPalette.js +75 -82
- 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 +229 -158
- 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 +6 -2
- package/dist/features/runtime/pageViewport.js +7 -0
- package/dist/features/runtime/runtime.d.ts +59 -24
- package/dist/features/runtime/runtime.js +779 -191
- 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/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 +1 -1
- 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 +51 -31
- package/dist/features/vite/vite.js +224 -127
- 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 +117 -61
- 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 +2 -2
- package/dist/lib/queries.d.ts +11 -0
- package/dist/lib/queries.js +70 -141
- 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 -50
- 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 -151
- package/dist/studio.css +2 -2
- package/package.json +70 -73
- package/skills/camox/SKILL.md +16 -11
- package/skills/camox/references/artifacts.md +179 -0
- package/skills/camox/references/block-definitions.md +75 -59
- package/skills/camox/references/cli-common.md +9 -11
- package/skills/camox/references/cli-content.md +92 -69
- 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 +4 -4
- 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 +29 -7
- 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 -331
- 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 -167
- 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/components/SendFeedbackDialog.js +0 -83
- package/dist/features/preview/previewCommentsStore.js +0 -135
- package/dist/features/preview/publication.js +0 -81
- package/dist/features/preview/usePageComments.js +0 -39
- package/dist/features/runtime/SharedChromeContext.js +0 -7
- package/dist/features/studio/components/EnvironmentMenu.js +0 -425
- 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
package/dist/core/createBlock.js
CHANGED
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { artifactFrameProps, artifactStandInProps, isArtifactSource } from "./lib/artifact.js";
|
|
2
|
+
import { artifactData } from "./lib/artifactData.js";
|
|
3
|
+
import { resolveBlockFields, resolveToMarkdown } from "./lib/contentType.js";
|
|
4
|
+
import { useProjectUuid } from "../lib/auth.js";
|
|
5
|
+
import { useLocation, useNavigate } from "../features/navigation/navigation.js";
|
|
6
|
+
import { useOptionalCamoxApp } from "../features/provider/components/CamoxAppContext.js";
|
|
7
|
+
import { isItemMarker, queryResultIds, resolveAssetValue, useNormalizedData } from "../lib/normalized-data.js";
|
|
8
|
+
import { useLinkPages } from "../lib/link-pages.js";
|
|
5
9
|
import { useBlockEditingRuntime } from "./editing/BlockEditingRuntime.js";
|
|
6
|
-
import {
|
|
10
|
+
import { ArtifactStudioContext, ArtifactsRunContext, useArtifactHost, useInitialArtifactData } from "./hooks/useArtifactHost.js";
|
|
7
11
|
import { IconSvg } from "./lib/icons.js";
|
|
12
|
+
import { renderImagePlaceholder } from "./lib/imagePlaceholder.js";
|
|
8
13
|
import { buildImageSrcSet, getDefaultImageSizes, getDefaultImageWidth, transformImageUrl } from "./lib/imageTransform.js";
|
|
9
14
|
import { markdownToReactNodes } from "./lib/lexicalReact.js";
|
|
15
|
+
import { resolveReference, resolveReferenceList } from "./lib/reference.js";
|
|
10
16
|
import { c } from "react/compiler-runtime";
|
|
11
|
-
import { Type as Type$1 } from "@sinclair/typebox";
|
|
12
|
-
import { useQuery } from "@tanstack/react-query";
|
|
13
|
-
import { generateKeyBetween } from "fractional-indexing";
|
|
14
17
|
import * as React from "react";
|
|
15
|
-
import {
|
|
18
|
+
import { isQueryBacked } from "@camox/api-contract";
|
|
19
|
+
import { Type } from "@sinclair/typebox";
|
|
20
|
+
import { generateKeyBetween } from "fractional-indexing";
|
|
21
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
22
|
|
|
17
23
|
//#region src/core/createBlock.tsx
|
|
18
24
|
const ASSET_LIST_SELF_KEY = "__camox_asset_self__";
|
|
@@ -24,7 +30,10 @@ function normalizeLinkValue(value) {
|
|
|
24
30
|
};
|
|
25
31
|
}
|
|
26
32
|
function resolveLinkHref(link, pages, pathname) {
|
|
27
|
-
if (link.type === "page")
|
|
33
|
+
if (link.type === "page") {
|
|
34
|
+
if (!pages) return pathname;
|
|
35
|
+
return pages.find((page) => page.id === link.pageId)?.fullPath ?? null;
|
|
36
|
+
}
|
|
28
37
|
if (!link.href || link.href.startsWith("#")) return `${pathname}${link.href ?? ""}`;
|
|
29
38
|
return link.href;
|
|
30
39
|
}
|
|
@@ -71,7 +80,7 @@ function buildPeekItems(properties, blockId, parentItemId, content, items, count
|
|
|
71
80
|
const markers = [];
|
|
72
81
|
let previousPosition = null;
|
|
73
82
|
for (let index = 0; index < defaultCount; index += 1) {
|
|
74
|
-
const id =
|
|
83
|
+
const id = `peek_${++counter.value}`;
|
|
75
84
|
const itemContent = {};
|
|
76
85
|
for (const [key, itemProperty] of Object.entries(property.items.properties)) {
|
|
77
86
|
if (itemProperty.type === "array" && itemProperty.items?.properties) continue;
|
|
@@ -89,7 +98,10 @@ function buildPeekItems(properties, blockId, parentItemId, content, items, count
|
|
|
89
98
|
summary: "",
|
|
90
99
|
position,
|
|
91
100
|
createdAt: 0,
|
|
92
|
-
updatedAt: 0
|
|
101
|
+
updatedAt: 0,
|
|
102
|
+
projectId: null,
|
|
103
|
+
sharedContentType: null,
|
|
104
|
+
references: {}
|
|
93
105
|
});
|
|
94
106
|
markers.push({ _itemId: id });
|
|
95
107
|
const nestedContent = {};
|
|
@@ -104,8 +116,9 @@ function buildPeekItems(properties, blockId, parentItemId, content, items, count
|
|
|
104
116
|
}
|
|
105
117
|
}
|
|
106
118
|
function createViewBlock(options) {
|
|
107
|
-
const
|
|
108
|
-
const
|
|
119
|
+
const fields = resolveBlockFields(options);
|
|
120
|
+
const typeboxSchema = Type.Object(fields.content);
|
|
121
|
+
const settingsTypeboxSchema = fields.settings ? Type.Object(fields.settings) : null;
|
|
109
122
|
const contentDefaults = collectDefaults(typeboxSchema.properties);
|
|
110
123
|
const settingsDefaults = settingsTypeboxSchema ? collectDefaults(settingsTypeboxSchema.properties) : {};
|
|
111
124
|
const repeatableDefaults = {};
|
|
@@ -132,15 +145,11 @@ function createViewBlock(options) {
|
|
|
132
145
|
children
|
|
133
146
|
});
|
|
134
147
|
const value = useValue(name);
|
|
135
|
-
const
|
|
136
|
-
const {
|
|
137
|
-
const { data: pages } = useQuery({
|
|
138
|
-
...viewPageQueries.list(project?.id ?? 0),
|
|
139
|
-
enabled: !!project
|
|
140
|
-
});
|
|
148
|
+
const pages = useLinkPages(useProjectUuid());
|
|
149
|
+
const pathname = useLocation({ select: (location) => location.pathname });
|
|
141
150
|
return children({ children: markdownToReactNodes(value, {
|
|
142
151
|
pages,
|
|
143
|
-
fallbackHref:
|
|
152
|
+
fallbackHref: pathname,
|
|
144
153
|
textStyle,
|
|
145
154
|
linkStyle
|
|
146
155
|
}) }, { text: value });
|
|
@@ -166,6 +175,85 @@ function createViewBlock(options) {
|
|
|
166
175
|
const value = typeof rawValue === "string" ? rawValue : "";
|
|
167
176
|
return children({ src: value }, { url: value });
|
|
168
177
|
};
|
|
178
|
+
const Artifact = ({ name, children }) => {
|
|
179
|
+
const editingRuntime = useBlockEditingRuntime();
|
|
180
|
+
if (editingRuntime) return editingRuntime.renderPrimitive(options, "Artifact", {
|
|
181
|
+
name,
|
|
182
|
+
children
|
|
183
|
+
});
|
|
184
|
+
const value = useValue(name);
|
|
185
|
+
const data = useArtifactData(name);
|
|
186
|
+
const hostProps = useArtifactHost({
|
|
187
|
+
studio: React.use(ArtifactStudioContext),
|
|
188
|
+
data,
|
|
189
|
+
size: useFieldSchema(name)?.size,
|
|
190
|
+
navigate: useNavigate()
|
|
191
|
+
});
|
|
192
|
+
const initialData = useInitialArtifactData(value, data);
|
|
193
|
+
const fontLinks = useOptionalCamoxApp()?.getArtifactFontLinks();
|
|
194
|
+
const runs = React.use(ArtifactsRunContext);
|
|
195
|
+
if (!isArtifactSource(value)) return null;
|
|
196
|
+
return children({
|
|
197
|
+
...runs ? artifactFrameProps(value, {
|
|
198
|
+
fontLinks,
|
|
199
|
+
data: initialData
|
|
200
|
+
}) : artifactStandInProps(value),
|
|
201
|
+
...hostProps
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
function useArtifactData(name) {
|
|
205
|
+
const $ = c(13);
|
|
206
|
+
const block = React.use(Context);
|
|
207
|
+
const item = React.use(RepeaterContext);
|
|
208
|
+
const { filesMap } = useNormalizedData();
|
|
209
|
+
const pages = useLinkPages(useProjectUuid());
|
|
210
|
+
let t0;
|
|
211
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
212
|
+
t0 = { select: _temp2 };
|
|
213
|
+
$[0] = t0;
|
|
214
|
+
} else t0 = $[0];
|
|
215
|
+
const pathname = useLocation(t0);
|
|
216
|
+
if (!block) throw new Error("Artifact must be used within a Block Component");
|
|
217
|
+
const field = item ? item.itemSchema?.[name] : typeboxSchema.properties[name];
|
|
218
|
+
let t1;
|
|
219
|
+
if ($[1] !== block || $[2] !== field || $[3] !== filesMap || $[4] !== item || $[5] !== pages || $[6] !== pathname) {
|
|
220
|
+
const owner = item ? {
|
|
221
|
+
content: item.itemContent,
|
|
222
|
+
settings: item.itemSettings
|
|
223
|
+
} : {
|
|
224
|
+
content: block.content,
|
|
225
|
+
settings: block.settings
|
|
226
|
+
};
|
|
227
|
+
let t2;
|
|
228
|
+
if ($[8] !== pages || $[9] !== pathname) {
|
|
229
|
+
t2 = (link) => resolveLinkHref(normalizeLinkValue(link), pages, pathname) ?? pathname;
|
|
230
|
+
$[8] = pages;
|
|
231
|
+
$[9] = pathname;
|
|
232
|
+
$[10] = t2;
|
|
233
|
+
} else t2 = $[10];
|
|
234
|
+
let t3;
|
|
235
|
+
if ($[11] !== filesMap) {
|
|
236
|
+
t3 = (value) => resolveAssetValue(value, filesMap);
|
|
237
|
+
$[11] = filesMap;
|
|
238
|
+
$[12] = t3;
|
|
239
|
+
} else t3 = $[12];
|
|
240
|
+
t1 = artifactData(field, owner, {
|
|
241
|
+
linkHref: t2,
|
|
242
|
+
asset: t3
|
|
243
|
+
});
|
|
244
|
+
$[1] = block;
|
|
245
|
+
$[2] = field;
|
|
246
|
+
$[3] = filesMap;
|
|
247
|
+
$[4] = item;
|
|
248
|
+
$[5] = pages;
|
|
249
|
+
$[6] = pathname;
|
|
250
|
+
$[7] = t1;
|
|
251
|
+
} else t1 = $[7];
|
|
252
|
+
return t1;
|
|
253
|
+
}
|
|
254
|
+
function _temp2(location) {
|
|
255
|
+
return location.pathname;
|
|
256
|
+
}
|
|
169
257
|
const Link = ({ name, children }) => {
|
|
170
258
|
const editingRuntime = useBlockEditingRuntime();
|
|
171
259
|
if (editingRuntime) return editingRuntime.renderPrimitive(options, "Link", {
|
|
@@ -173,13 +261,8 @@ function createViewBlock(options) {
|
|
|
173
261
|
children
|
|
174
262
|
});
|
|
175
263
|
const value = normalizeLinkValue(useValue(name) ?? {});
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
const { data: pages } = useQuery({
|
|
179
|
-
...viewPageQueries.list(project?.id ?? 0),
|
|
180
|
-
enabled: !!project
|
|
181
|
-
});
|
|
182
|
-
const href = resolveLinkHref(value, pages, useLocation({ select: (location) => location.pathname }));
|
|
264
|
+
const href = resolveLinkHref(value, useLinkPages(useProjectUuid()), useLocation({ select: (location) => location.pathname }));
|
|
265
|
+
if (href == null) return value.text;
|
|
183
266
|
return children({
|
|
184
267
|
to: href,
|
|
185
268
|
target: value.newTab ? "_blank" : void 0,
|
|
@@ -192,23 +275,19 @@ function createViewBlock(options) {
|
|
|
192
275
|
});
|
|
193
276
|
};
|
|
194
277
|
function useAsset(name) {
|
|
195
|
-
const $ = c(
|
|
196
|
-
if ($[0] !== "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2") {
|
|
197
|
-
for (let $i = 0; $i < 4; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
198
|
-
$[0] = "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2";
|
|
199
|
-
}
|
|
278
|
+
const $ = c(3);
|
|
200
279
|
const block = React.use(Context);
|
|
201
280
|
const item = React.use(RepeaterContext);
|
|
202
281
|
const { filesMap } = useNormalizedData();
|
|
203
282
|
if (!block) throw new Error("Asset must be used within a Block Component");
|
|
204
283
|
const raw = item ? item.itemContent[name] : block.content[name];
|
|
205
284
|
let t0;
|
|
206
|
-
if ($[
|
|
207
|
-
t0 =
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
} else t0 = $[
|
|
285
|
+
if ($[0] !== filesMap || $[1] !== raw) {
|
|
286
|
+
t0 = resolveAssetValue(raw, filesMap);
|
|
287
|
+
$[0] = filesMap;
|
|
288
|
+
$[1] = raw;
|
|
289
|
+
$[2] = t0;
|
|
290
|
+
} else t0 = $[2];
|
|
212
291
|
const resolved = t0;
|
|
213
292
|
const fallback = item ? repeatableDefaults[item.arrayFieldName]?.[String(name)] : contentDefaults[String(name)];
|
|
214
293
|
return resolved ?? fallback;
|
|
@@ -220,7 +299,7 @@ function createViewBlock(options) {
|
|
|
220
299
|
children
|
|
221
300
|
});
|
|
222
301
|
const value = useAsset(name);
|
|
223
|
-
return children({
|
|
302
|
+
return renderImagePlaceholder(value, children({
|
|
224
303
|
src: transformImageUrl(value.url, {
|
|
225
304
|
width: getDefaultImageWidth(),
|
|
226
305
|
mimeType: value.mimeType,
|
|
@@ -229,7 +308,7 @@ function createViewBlock(options) {
|
|
|
229
308
|
srcSet: buildImageSrcSet(value.url, value.mimeType, value.size),
|
|
230
309
|
sizes: getDefaultImageSizes(),
|
|
231
310
|
alt: value.alt
|
|
232
|
-
}, value);
|
|
311
|
+
}, value));
|
|
233
312
|
};
|
|
234
313
|
const File = ({ name, children }) => {
|
|
235
314
|
const editingRuntime = useBlockEditingRuntime();
|
|
@@ -243,6 +322,172 @@ function createViewBlock(options) {
|
|
|
243
322
|
download: value.filename
|
|
244
323
|
}, value);
|
|
245
324
|
};
|
|
325
|
+
const ReferencePrimitive = (t0) => {
|
|
326
|
+
const $ = c(6);
|
|
327
|
+
let Primitive;
|
|
328
|
+
let props;
|
|
329
|
+
if ($[0] !== t0) {
|
|
330
|
+
({primitive: Primitive, ...props} = t0);
|
|
331
|
+
$[0] = t0;
|
|
332
|
+
$[1] = Primitive;
|
|
333
|
+
$[2] = props;
|
|
334
|
+
} else {
|
|
335
|
+
Primitive = $[1];
|
|
336
|
+
props = $[2];
|
|
337
|
+
}
|
|
338
|
+
if (useValue(props.name) == null) return null;
|
|
339
|
+
let t1;
|
|
340
|
+
if ($[3] !== Primitive || $[4] !== props) {
|
|
341
|
+
t1 = /* @__PURE__ */ jsx(Primitive, { ...props });
|
|
342
|
+
$[3] = Primitive;
|
|
343
|
+
$[4] = props;
|
|
344
|
+
$[5] = t1;
|
|
345
|
+
} else t1 = $[5];
|
|
346
|
+
return t1;
|
|
347
|
+
};
|
|
348
|
+
const ReferenceImage = (props) => {
|
|
349
|
+
const $ = c(2);
|
|
350
|
+
let t0;
|
|
351
|
+
if ($[0] !== props) {
|
|
352
|
+
t0 = /* @__PURE__ */ jsx(ReferencePrimitive, {
|
|
353
|
+
primitive: Image,
|
|
354
|
+
...props
|
|
355
|
+
});
|
|
356
|
+
$[0] = props;
|
|
357
|
+
$[1] = t0;
|
|
358
|
+
} else t0 = $[1];
|
|
359
|
+
return t0;
|
|
360
|
+
};
|
|
361
|
+
const ReferenceFile = (props) => {
|
|
362
|
+
const $ = c(2);
|
|
363
|
+
let t0;
|
|
364
|
+
if ($[0] !== props) {
|
|
365
|
+
t0 = /* @__PURE__ */ jsx(ReferencePrimitive, {
|
|
366
|
+
primitive: File,
|
|
367
|
+
...props
|
|
368
|
+
});
|
|
369
|
+
$[0] = props;
|
|
370
|
+
$[1] = t0;
|
|
371
|
+
} else t0 = $[1];
|
|
372
|
+
return t0;
|
|
373
|
+
};
|
|
374
|
+
const ReferenceEmbed = (props) => {
|
|
375
|
+
const $ = c(2);
|
|
376
|
+
let t0;
|
|
377
|
+
if ($[0] !== props) {
|
|
378
|
+
t0 = /* @__PURE__ */ jsx(ReferencePrimitive, {
|
|
379
|
+
primitive: Embed,
|
|
380
|
+
...props
|
|
381
|
+
});
|
|
382
|
+
$[0] = props;
|
|
383
|
+
$[1] = t0;
|
|
384
|
+
} else t0 = $[1];
|
|
385
|
+
return t0;
|
|
386
|
+
};
|
|
387
|
+
function useFieldSchema(name) {
|
|
388
|
+
const block = React.use(Context);
|
|
389
|
+
const item = React.use(RepeaterContext);
|
|
390
|
+
if (item) return item.itemSchema?.[name];
|
|
391
|
+
return (block?.sourceSchema ?? typeboxSchema.properties)[name];
|
|
392
|
+
}
|
|
393
|
+
const Reference = ({ name, children }) => {
|
|
394
|
+
const editingRuntime = useBlockEditingRuntime();
|
|
395
|
+
if (editingRuntime) return editingRuntime.renderPrimitive(options, "Reference", {
|
|
396
|
+
name,
|
|
397
|
+
children
|
|
398
|
+
});
|
|
399
|
+
const block = React.use(Context);
|
|
400
|
+
const { recordsMap } = useNormalizedData();
|
|
401
|
+
if (!block) throw new Error("Reference must be used within a Block Component");
|
|
402
|
+
const schema = useFieldSchema(name);
|
|
403
|
+
const record = resolveReference(useValue(name), schema.collectionId, recordsMap);
|
|
404
|
+
if (!record) return null;
|
|
405
|
+
return /* @__PURE__ */ jsx(RecordScope, {
|
|
406
|
+
block,
|
|
407
|
+
schema,
|
|
408
|
+
record,
|
|
409
|
+
children
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
const ReferenceList = ({ name, children }) => {
|
|
413
|
+
const editingRuntime = useBlockEditingRuntime();
|
|
414
|
+
if (editingRuntime) return editingRuntime.renderPrimitive(options, "ReferenceList", {
|
|
415
|
+
name,
|
|
416
|
+
children
|
|
417
|
+
});
|
|
418
|
+
const block = React.use(Context);
|
|
419
|
+
const item = React.use(RepeaterContext);
|
|
420
|
+
const normalizedData = useNormalizedData();
|
|
421
|
+
if (!block) throw new Error("ReferenceList must be used within a Block Component");
|
|
422
|
+
const schema = useFieldSchema(name);
|
|
423
|
+
const stored = useValue(name);
|
|
424
|
+
const ids = isQueryBacked(schema) ? queryResultIds(normalizedData, {
|
|
425
|
+
blockId: block.blockId,
|
|
426
|
+
itemId: item?.itemId
|
|
427
|
+
}, name) : stored;
|
|
428
|
+
const { recordsMap } = normalizedData;
|
|
429
|
+
return resolveReferenceList(ids, schema.collectionId, recordsMap).map((record) => /* @__PURE__ */ jsx(RecordScope, {
|
|
430
|
+
block,
|
|
431
|
+
schema,
|
|
432
|
+
record,
|
|
433
|
+
children
|
|
434
|
+
}, record.id));
|
|
435
|
+
};
|
|
436
|
+
const RecordScope = (t0) => {
|
|
437
|
+
const $ = c(13);
|
|
438
|
+
const { block, schema, record, children } = t0;
|
|
439
|
+
const hop = block.recordHop ? 2 : 1;
|
|
440
|
+
let t1;
|
|
441
|
+
if ($[0] !== block || $[1] !== hop || $[2] !== record.content || $[3] !== schema.referenceSchema.properties) {
|
|
442
|
+
t1 = {
|
|
443
|
+
...block,
|
|
444
|
+
content: record.content,
|
|
445
|
+
sourceSchema: schema.referenceSchema.properties,
|
|
446
|
+
recordHop: hop
|
|
447
|
+
};
|
|
448
|
+
$[0] = block;
|
|
449
|
+
$[1] = hop;
|
|
450
|
+
$[2] = record.content;
|
|
451
|
+
$[3] = schema.referenceSchema.properties;
|
|
452
|
+
$[4] = t1;
|
|
453
|
+
} else t1 = $[4];
|
|
454
|
+
let t2;
|
|
455
|
+
if ($[5] !== children || $[6] !== hop || $[7] !== record.id || $[8] !== record.label) {
|
|
456
|
+
t2 = children({
|
|
457
|
+
id: record.id,
|
|
458
|
+
label: record.label,
|
|
459
|
+
Field,
|
|
460
|
+
Image: ReferenceImage,
|
|
461
|
+
File: ReferenceFile,
|
|
462
|
+
Embed: ReferenceEmbed,
|
|
463
|
+
ImageList,
|
|
464
|
+
FileList,
|
|
465
|
+
...hop === 1 ? {
|
|
466
|
+
Reference,
|
|
467
|
+
ReferenceList
|
|
468
|
+
} : {}
|
|
469
|
+
});
|
|
470
|
+
$[5] = children;
|
|
471
|
+
$[6] = hop;
|
|
472
|
+
$[7] = record.id;
|
|
473
|
+
$[8] = record.label;
|
|
474
|
+
$[9] = t2;
|
|
475
|
+
} else t2 = $[9];
|
|
476
|
+
let t3;
|
|
477
|
+
if ($[10] !== t1 || $[11] !== t2) {
|
|
478
|
+
t3 = /* @__PURE__ */ jsx(RepeaterContext.Provider, {
|
|
479
|
+
value: null,
|
|
480
|
+
children: /* @__PURE__ */ jsx(Context.Provider, {
|
|
481
|
+
value: t1,
|
|
482
|
+
children: t2
|
|
483
|
+
})
|
|
484
|
+
});
|
|
485
|
+
$[10] = t1;
|
|
486
|
+
$[11] = t2;
|
|
487
|
+
$[12] = t3;
|
|
488
|
+
} else t3 = $[12];
|
|
489
|
+
return t3;
|
|
490
|
+
};
|
|
246
491
|
const AssetList = ({ name, children, primitive }) => {
|
|
247
492
|
const editingRuntime = useBlockEditingRuntime();
|
|
248
493
|
if (editingRuntime) return editingRuntime.renderPrimitive(options, primitive, {
|
|
@@ -254,18 +499,18 @@ function createViewBlock(options) {
|
|
|
254
499
|
const { filesMap } = useNormalizedData();
|
|
255
500
|
if (!block) throw new Error("ImageList/FileList must be used within a Block Component");
|
|
256
501
|
const fieldName = String(name);
|
|
257
|
-
const schema = parent ? typeboxSchema.properties[parent.arrayFieldName]?.items?.properties?.[fieldName] : typeboxSchema.properties[fieldName];
|
|
502
|
+
const schema = parent ? typeboxSchema.properties[parent.arrayFieldName]?.items?.properties?.[fieldName] : (block.sourceSchema ?? typeboxSchema.properties)[fieldName];
|
|
258
503
|
const fieldType = schema?.fieldType;
|
|
259
|
-
if (fieldType !== "ImageList" && fieldType !== "FileList") throw new Error(`"${fieldName}" is not
|
|
504
|
+
if (fieldType !== "ImageList" && fieldType !== "FileList") throw new Error(`"${fieldName}" is not an imageList or fileList field`);
|
|
260
505
|
const source = parent ? parent.itemContent[fieldName] : block.content[fieldName];
|
|
261
506
|
let values = Array.isArray(source) ? source : [];
|
|
262
507
|
if (values.length === 0 && schema.defaultItems > 0 && schema.items?.default) values = Array.from({ length: schema.defaultItems }, () => schema.items.default);
|
|
263
508
|
const Single = fieldType === "ImageList" ? Image : File;
|
|
264
|
-
return values.map((value) =>
|
|
509
|
+
return values.map((value) => resolveAssetValue(value, filesMap)).filter(Boolean).map((value, index) => /* @__PURE__ */ jsx(RepeaterContext.Provider, {
|
|
265
510
|
value: {
|
|
266
511
|
arrayFieldName: fieldName,
|
|
267
512
|
containerItemId: parent?.itemId ?? parent?.containerItemId,
|
|
268
|
-
itemContent: { [ASSET_LIST_SELF_KEY]:
|
|
513
|
+
itemContent: { [ASSET_LIST_SELF_KEY]: value },
|
|
269
514
|
itemSettings: {}
|
|
270
515
|
},
|
|
271
516
|
children: /* @__PURE__ */ jsx(Single, {
|
|
@@ -275,37 +520,29 @@ function createViewBlock(options) {
|
|
|
275
520
|
}, index));
|
|
276
521
|
};
|
|
277
522
|
const ImageList = (props) => {
|
|
278
|
-
const $ = c(
|
|
279
|
-
if ($[0] !== "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2") {
|
|
280
|
-
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
281
|
-
$[0] = "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2";
|
|
282
|
-
}
|
|
523
|
+
const $ = c(2);
|
|
283
524
|
let t0;
|
|
284
|
-
if ($[
|
|
525
|
+
if ($[0] !== props) {
|
|
285
526
|
t0 = /* @__PURE__ */ jsx(AssetList, {
|
|
286
527
|
...props,
|
|
287
528
|
primitive: "ImageList"
|
|
288
529
|
});
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
} else t0 = $[
|
|
530
|
+
$[0] = props;
|
|
531
|
+
$[1] = t0;
|
|
532
|
+
} else t0 = $[1];
|
|
292
533
|
return t0;
|
|
293
534
|
};
|
|
294
535
|
const FileList = (props) => {
|
|
295
|
-
const $ = c(
|
|
296
|
-
if ($[0] !== "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2") {
|
|
297
|
-
for (let $i = 0; $i < 3; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
298
|
-
$[0] = "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2";
|
|
299
|
-
}
|
|
536
|
+
const $ = c(2);
|
|
300
537
|
let t0;
|
|
301
|
-
if ($[
|
|
538
|
+
if ($[0] !== props) {
|
|
302
539
|
t0 = /* @__PURE__ */ jsx(AssetList, {
|
|
303
540
|
...props,
|
|
304
541
|
primitive: "FileList"
|
|
305
542
|
});
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
} else t0 = $[
|
|
543
|
+
$[0] = props;
|
|
544
|
+
$[1] = t0;
|
|
545
|
+
} else t0 = $[1];
|
|
309
546
|
return t0;
|
|
310
547
|
};
|
|
311
548
|
const Repeater = ({ name, children }) => {
|
|
@@ -321,27 +558,31 @@ function createViewBlock(options) {
|
|
|
321
558
|
const fieldName = String(name);
|
|
322
559
|
const source = parent ? parent.itemContent[fieldName] : block.content[fieldName];
|
|
323
560
|
if (!Array.isArray(source)) throw new Error(`Field "${fieldName}" is not an array`);
|
|
324
|
-
|
|
325
|
-
|
|
561
|
+
const itemSchema = (parent ? parent.itemSchema?.[fieldName] : typeboxSchema.properties[fieldName])?.items?.properties;
|
|
562
|
+
return source.map((item) => isItemMarker(item) ? itemsMap.get(item._itemId) ?? null : item).filter(Boolean).map((item, index) => {
|
|
563
|
+
const databaseItem = item.content !== void 0 && item.id != null;
|
|
326
564
|
const itemContent = {
|
|
327
565
|
...repeatableDefaults[fieldName],
|
|
328
|
-
...databaseItem ?
|
|
566
|
+
...databaseItem ? item.content : item
|
|
329
567
|
};
|
|
330
568
|
const itemSettings = {
|
|
331
569
|
...repeatableSettingsDefaults[fieldName],
|
|
332
|
-
...databaseItem ?
|
|
570
|
+
...databaseItem ? item.settings : null
|
|
333
571
|
};
|
|
334
|
-
const itemId = databaseItem ?
|
|
572
|
+
const itemId = databaseItem ? item.id : void 0;
|
|
335
573
|
const api = {
|
|
336
574
|
Field,
|
|
337
575
|
Icon,
|
|
338
576
|
Link,
|
|
339
577
|
Embed,
|
|
578
|
+
Artifact,
|
|
340
579
|
Image,
|
|
341
580
|
File,
|
|
342
581
|
ImageList,
|
|
343
582
|
FileList,
|
|
344
583
|
Repeater,
|
|
584
|
+
Reference,
|
|
585
|
+
ReferenceList,
|
|
345
586
|
useSetting: (settingName) => itemSettings[settingName]
|
|
346
587
|
};
|
|
347
588
|
return /* @__PURE__ */ jsx(RepeaterContext.Provider, {
|
|
@@ -350,7 +591,8 @@ function createViewBlock(options) {
|
|
|
350
591
|
containerItemId: itemId ?? parent?.containerItemId,
|
|
351
592
|
itemContent,
|
|
352
593
|
itemId,
|
|
353
|
-
itemSettings
|
|
594
|
+
itemSettings,
|
|
595
|
+
itemSchema
|
|
354
596
|
},
|
|
355
597
|
children: children(api, index)
|
|
356
598
|
}, itemId ?? index);
|
|
@@ -364,149 +606,137 @@ function createViewBlock(options) {
|
|
|
364
606
|
return context.settings[name];
|
|
365
607
|
};
|
|
366
608
|
const Detached = (t0) => {
|
|
367
|
-
const $ = c(
|
|
368
|
-
if ($[0] !== "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2") {
|
|
369
|
-
for (let $i = 0; $i < 6; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
370
|
-
$[0] = "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2";
|
|
371
|
-
}
|
|
609
|
+
const $ = c(5);
|
|
372
610
|
const { children } = t0;
|
|
373
611
|
const editingRuntime = useBlockEditingRuntime();
|
|
374
612
|
if (editingRuntime) {
|
|
375
613
|
let t1;
|
|
376
|
-
if ($[
|
|
614
|
+
if ($[0] !== children || $[1] !== editingRuntime) {
|
|
377
615
|
t1 = editingRuntime.renderPrimitive(options, "Detached", { children });
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
} else t1 = $[
|
|
616
|
+
$[0] = children;
|
|
617
|
+
$[1] = editingRuntime;
|
|
618
|
+
$[2] = t1;
|
|
619
|
+
} else t1 = $[2];
|
|
382
620
|
return t1;
|
|
383
621
|
}
|
|
384
622
|
let t1;
|
|
385
|
-
if ($[
|
|
623
|
+
if ($[3] !== children) {
|
|
386
624
|
t1 = children({
|
|
387
|
-
ref:
|
|
625
|
+
ref: _temp4,
|
|
388
626
|
style: { opacity: 1 },
|
|
389
|
-
onClick:
|
|
390
|
-
onMouseEnter:
|
|
391
|
-
onMouseLeave:
|
|
627
|
+
onClick: _temp5,
|
|
628
|
+
onMouseEnter: _temp6,
|
|
629
|
+
onMouseLeave: _temp7
|
|
392
630
|
});
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
} else t1 = $[
|
|
631
|
+
$[3] = children;
|
|
632
|
+
$[4] = t1;
|
|
633
|
+
} else t1 = $[4];
|
|
396
634
|
return t1;
|
|
397
635
|
};
|
|
398
636
|
const Component = (props) => {
|
|
399
|
-
const $ = c(
|
|
400
|
-
if ($[0] !== "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2") {
|
|
401
|
-
for (let $i = 0; $i < 23; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
402
|
-
$[0] = "3acac8919c70a3a0d046963b88ac49743134e81069b8ead862dfcba56c027ed2";
|
|
403
|
-
}
|
|
637
|
+
const $ = c(22);
|
|
404
638
|
const editingRuntime = useBlockEditingRuntime();
|
|
405
639
|
if (editingRuntime) {
|
|
406
640
|
let t0;
|
|
407
|
-
if ($[
|
|
641
|
+
if ($[0] !== editingRuntime || $[1] !== props) {
|
|
408
642
|
t0 = editingRuntime.renderBlock(options, props);
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
} else t0 = $[
|
|
643
|
+
$[0] = editingRuntime;
|
|
644
|
+
$[1] = props;
|
|
645
|
+
$[2] = t0;
|
|
646
|
+
} else t0 = $[2];
|
|
413
647
|
return t0;
|
|
414
648
|
}
|
|
415
649
|
const { blockData, mode } = props;
|
|
416
650
|
let mergedContent;
|
|
417
651
|
let normalizedContent;
|
|
418
|
-
if ($[
|
|
652
|
+
if ($[3] !== blockData.content) {
|
|
419
653
|
mergedContent = {
|
|
420
654
|
...contentDefaults,
|
|
421
655
|
...blockData.content
|
|
422
656
|
};
|
|
423
657
|
normalizedContent = { ...mergedContent };
|
|
424
|
-
for (const [key, value] of Object.entries(normalizedContent)) if (Array.isArray(value) && value[0]?.content !== void 0) normalizedContent[key] = value.map(
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
658
|
+
for (const [key, value] of Object.entries(normalizedContent)) if (Array.isArray(value) && value[0]?.content !== void 0) normalizedContent[key] = value.map(_temp8);
|
|
659
|
+
$[3] = blockData.content;
|
|
660
|
+
$[4] = mergedContent;
|
|
661
|
+
$[5] = normalizedContent;
|
|
428
662
|
} else {
|
|
429
|
-
mergedContent = $[
|
|
430
|
-
normalizedContent = $[
|
|
663
|
+
mergedContent = $[4];
|
|
664
|
+
normalizedContent = $[5];
|
|
431
665
|
}
|
|
432
666
|
const AuthoredComponent = options.component;
|
|
433
667
|
let t0;
|
|
434
|
-
if ($[
|
|
668
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
435
669
|
t0 = {
|
|
436
670
|
position: "relative",
|
|
437
|
-
scrollMargin: "5rem"
|
|
438
|
-
background: "var(--background)"
|
|
671
|
+
scrollMargin: "5rem"
|
|
439
672
|
};
|
|
440
|
-
$[
|
|
441
|
-
} else t0 = $[
|
|
673
|
+
$[6] = t0;
|
|
674
|
+
} else t0 = $[6];
|
|
442
675
|
let t1;
|
|
443
|
-
if ($[
|
|
676
|
+
if ($[7] !== blockData.settings) {
|
|
444
677
|
t1 = {
|
|
445
678
|
...settingsDefaults,
|
|
446
679
|
...blockData.settings
|
|
447
680
|
};
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
} else t1 = $[
|
|
681
|
+
$[7] = blockData.settings;
|
|
682
|
+
$[8] = t1;
|
|
683
|
+
} else t1 = $[8];
|
|
451
684
|
let t2;
|
|
452
|
-
if ($[
|
|
685
|
+
if ($[9] !== blockData._id || $[10] !== mergedContent || $[11] !== mode || $[12] !== t1) {
|
|
453
686
|
t2 = {
|
|
454
687
|
blockId: blockData._id,
|
|
455
688
|
content: mergedContent,
|
|
456
689
|
settings: t1,
|
|
457
690
|
mode
|
|
458
691
|
};
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
} else t2 = $[
|
|
692
|
+
$[9] = blockData._id;
|
|
693
|
+
$[10] = mergedContent;
|
|
694
|
+
$[11] = mode;
|
|
695
|
+
$[12] = t1;
|
|
696
|
+
$[13] = t2;
|
|
697
|
+
} else t2 = $[13];
|
|
465
698
|
let t3;
|
|
466
|
-
if ($[
|
|
699
|
+
if ($[14] !== normalizedContent) {
|
|
467
700
|
t3 = /* @__PURE__ */ jsx(AuthoredComponent, { content: normalizedContent });
|
|
468
|
-
$[
|
|
469
|
-
$[
|
|
470
|
-
} else t3 = $[
|
|
701
|
+
$[14] = normalizedContent;
|
|
702
|
+
$[15] = t3;
|
|
703
|
+
} else t3 = $[15];
|
|
471
704
|
let t4;
|
|
472
|
-
if ($[
|
|
705
|
+
if ($[16] !== t2 || $[17] !== t3) {
|
|
473
706
|
t4 = /* @__PURE__ */ jsx(Context.Provider, {
|
|
474
707
|
value: t2,
|
|
475
708
|
children: t3
|
|
476
709
|
});
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
} else t4 = $[
|
|
710
|
+
$[16] = t2;
|
|
711
|
+
$[17] = t3;
|
|
712
|
+
$[18] = t4;
|
|
713
|
+
} else t4 = $[18];
|
|
481
714
|
let t5;
|
|
482
|
-
if ($[20]
|
|
483
|
-
t5 = /* @__PURE__ */ jsx("div", {
|
|
484
|
-
$[20] = t5;
|
|
485
|
-
} else t5 = $[20];
|
|
486
|
-
let t6;
|
|
487
|
-
if ($[21] !== t4) {
|
|
488
|
-
t6 = /* @__PURE__ */ jsxs("div", {
|
|
715
|
+
if ($[19] !== blockData._id || $[20] !== t4) {
|
|
716
|
+
t5 = /* @__PURE__ */ jsx("div", {
|
|
489
717
|
className: "group visual-editing-block",
|
|
718
|
+
"data-camox-viewport-block": blockData._id,
|
|
490
719
|
style: t0,
|
|
491
|
-
children:
|
|
720
|
+
children: t4
|
|
492
721
|
});
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
|
|
496
|
-
|
|
722
|
+
$[19] = blockData._id;
|
|
723
|
+
$[20] = t4;
|
|
724
|
+
$[21] = t5;
|
|
725
|
+
} else t5 = $[21];
|
|
726
|
+
return t5;
|
|
497
727
|
};
|
|
498
728
|
const contentSchema = {
|
|
499
729
|
type: "object",
|
|
500
730
|
title: options.title,
|
|
501
731
|
description: options.description,
|
|
502
732
|
properties: typeboxSchema.properties,
|
|
503
|
-
required: Object.keys(
|
|
504
|
-
toMarkdown: resolveToMarkdown(options.toMarkdown,
|
|
733
|
+
required: Object.keys(fields.content),
|
|
734
|
+
toMarkdown: resolveToMarkdown(options.toMarkdown, fields.settings, "block", fields.content)
|
|
505
735
|
};
|
|
506
736
|
const settingsSchema = settingsTypeboxSchema ? {
|
|
507
737
|
type: "object",
|
|
508
738
|
properties: settingsTypeboxSchema.properties,
|
|
509
|
-
required: Object.keys(
|
|
739
|
+
required: Object.keys(fields.settings ?? {})
|
|
510
740
|
} : void 0;
|
|
511
741
|
const getInitialBundle = () => {
|
|
512
742
|
const content = { ...contentDefaults };
|
|
@@ -534,12 +764,15 @@ function createViewBlock(options) {
|
|
|
534
764
|
Icon,
|
|
535
765
|
Field,
|
|
536
766
|
Embed,
|
|
767
|
+
Artifact,
|
|
537
768
|
Link,
|
|
538
769
|
Image,
|
|
539
770
|
File,
|
|
540
771
|
ImageList,
|
|
541
772
|
FileList,
|
|
542
773
|
Repeater,
|
|
774
|
+
Reference,
|
|
775
|
+
ReferenceList,
|
|
543
776
|
useSetting,
|
|
544
777
|
_internal: {
|
|
545
778
|
Component,
|
|
@@ -566,16 +799,16 @@ function createViewBlock(options) {
|
|
|
566
799
|
getPeekBundle: () => {
|
|
567
800
|
const content = { ...contentDefaults };
|
|
568
801
|
const repeatableItems = [];
|
|
569
|
-
buildPeekItems(typeboxSchema.properties,
|
|
802
|
+
buildPeekItems(typeboxSchema.properties, "peek", null, content, repeatableItems, { value: 0 });
|
|
570
803
|
return {
|
|
571
804
|
block: {
|
|
572
|
-
id:
|
|
805
|
+
id: "peek",
|
|
573
806
|
pageId: null,
|
|
574
807
|
layoutId: null,
|
|
575
808
|
type: options.id,
|
|
576
809
|
content,
|
|
577
810
|
settings: settingsDefaults,
|
|
578
|
-
|
|
811
|
+
slot: null,
|
|
579
812
|
summary: "",
|
|
580
813
|
position: "",
|
|
581
814
|
createdAt: 0,
|
|
@@ -589,13 +822,13 @@ function createViewBlock(options) {
|
|
|
589
822
|
};
|
|
590
823
|
}
|
|
591
824
|
const createBlock = createViewBlock;
|
|
592
|
-
function _temp() {}
|
|
593
|
-
function _temp2() {}
|
|
594
|
-
function _temp3() {}
|
|
595
825
|
function _temp4() {}
|
|
596
|
-
function _temp5(
|
|
826
|
+
function _temp5() {}
|
|
827
|
+
function _temp6() {}
|
|
828
|
+
function _temp7() {}
|
|
829
|
+
function _temp8(item) {
|
|
597
830
|
return item.content;
|
|
598
831
|
}
|
|
599
832
|
|
|
600
833
|
//#endregion
|
|
601
|
-
export {
|
|
834
|
+
export { createBlock };
|