camox 0.33.1 → 0.35.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.
Files changed (146) hide show
  1. package/dist/core/components/lexical/InlineLexicalEditor.js +1 -1
  2. package/dist/core/components/lexical/SidebarLexicalEditor.js +7 -7
  3. package/dist/core/components/lexical/TextLinkPopover.js +4 -4
  4. package/dist/core/createApp.d.ts +2 -1
  5. package/dist/core/createBlock.d.ts +5 -1451
  6. package/dist/core/createBlock.js +450 -1603
  7. package/dist/core/defineDocument.d.ts +7 -0
  8. package/dist/core/defineDocument.js +7 -0
  9. package/dist/core/editing/BlockEditingRuntime.js +36 -0
  10. package/dist/core/editing/CompleteBlockEditingRuntime.js +76 -0
  11. package/dist/core/editing/createEditableBlock.d.ts +1455 -0
  12. package/dist/core/editing/createEditableBlock.js +1751 -0
  13. package/dist/core/lib/lexicalState.js +1 -1
  14. package/dist/features/agent-chat/components/AgentChatSidebar.js +4 -4
  15. package/dist/features/agent-chat/components/AgentChatThread.js +5 -5
  16. package/dist/features/content/components/AssetCard.js +1 -1
  17. package/dist/features/navigation/navigation.d.ts +39 -0
  18. package/dist/features/navigation/navigation.js +231 -0
  19. package/dist/features/page/PublishedPageContent.js +236 -0
  20. package/dist/features/page/PublishedPageExperience.js +23 -0
  21. package/dist/features/preview/CamoxPreview.d.ts +4 -0
  22. package/dist/features/preview/CamoxPreview.js +16 -16
  23. package/dist/features/preview/EditablePageContent.js +3 -0
  24. package/dist/features/preview/EditablePageExperience.js +24 -0
  25. package/dist/features/preview/components/AddBlockSidebar.js +7 -7
  26. package/dist/features/preview/components/AssetFieldEditor.js +1 -1
  27. package/dist/features/preview/components/AssetLightbox.js +46 -110
  28. package/dist/features/preview/components/BlockActionsPopover.js +6 -6
  29. package/dist/features/preview/components/CreatePageModal.js +7 -7
  30. package/dist/features/preview/components/DebouncedFieldEditor.js +2 -2
  31. package/dist/features/preview/components/DraftSwitchDialog.js +1 -1
  32. package/dist/features/preview/components/FieldToolbar.js +4 -4
  33. package/dist/features/preview/components/Frame.js +1 -1
  34. package/dist/features/preview/components/ItemFieldsEditor.js +3 -3
  35. package/dist/features/preview/components/LeftSidebar.js +1 -1
  36. package/dist/features/preview/components/LinkFieldEditor.js +3 -3
  37. package/dist/features/preview/components/Metadata.js +87 -0
  38. package/dist/features/preview/components/MultipleAssetFieldEditor.js +1 -1
  39. package/dist/features/preview/components/OverlayTracker.js +3 -3
  40. package/dist/features/preview/components/Overlays.js +3 -3
  41. package/dist/features/preview/components/PageEditorSidebar.js +5 -5
  42. package/dist/features/preview/components/PageInfoSidebar.js +158 -74
  43. package/dist/features/preview/components/PageLocationFieldset.js +1 -1
  44. package/dist/features/preview/components/PageNavigatorSidebar.js +10 -10
  45. package/dist/features/preview/components/PageNicknameField.js +2 -2
  46. package/dist/features/preview/components/PagePicker.js +4 -4
  47. package/dist/features/preview/components/PageTree.js +3 -3
  48. package/dist/features/preview/components/PeekedBlock.js +2 -2
  49. package/dist/features/preview/components/PreviewPanel.js +2 -2
  50. package/dist/features/preview/components/PreviewToolbar.js +2 -2
  51. package/dist/features/preview/components/PublishDialog.js +2 -2
  52. package/dist/features/preview/components/RepeatableItemsList.js +1 -1
  53. package/dist/features/preview/components/RightSidebar.js +1 -1
  54. package/dist/features/preview/components/useRepeatableItemActions.js +1 -1
  55. package/dist/features/preview/components/useUpdateBlockPosition.js +4 -4
  56. package/dist/features/provider/AuthenticatedCamoxProvider.js +63 -0
  57. package/dist/features/provider/CamoxProvider.d.ts +5 -12
  58. package/dist/features/provider/CamoxProvider.js +81 -337
  59. package/dist/features/provider/CoreCamoxProvider.js +37 -0
  60. package/dist/features/provider/LocalhostPreviewProvider.js +159 -0
  61. package/dist/features/provider/components/CommandPalette.js +1 -1
  62. package/dist/features/provider/useAdminShortcuts.js +1 -1
  63. package/dist/features/routes/pageRuntime.js +6 -0
  64. package/dist/features/runtime/hydrationData.js +9 -0
  65. package/dist/features/runtime/pageApp.js +188 -0
  66. package/dist/features/runtime/pageClient.d.ts +6 -0
  67. package/dist/features/runtime/pageClient.js +20 -0
  68. package/dist/features/runtime/pageNavigation.js +170 -0
  69. package/dist/features/runtime/pageServer.d.ts +9 -0
  70. package/dist/features/runtime/pageServer.js +18 -0
  71. package/dist/features/runtime/runtime.d.ts +25 -0
  72. package/dist/features/runtime/runtime.js +44 -0
  73. package/dist/features/runtime/studioApp.d.ts +15 -0
  74. package/dist/features/runtime/studioApp.js +185 -0
  75. package/dist/features/runtime/studioClient.d.ts +6 -0
  76. package/dist/features/runtime/studioClient.js +20 -0
  77. package/dist/features/runtime/studioNavigation.js +115 -0
  78. package/dist/features/runtime/studioServer.d.ts +9 -0
  79. package/dist/features/runtime/studioServer.js +18 -0
  80. package/dist/features/studio/CamoxStudio.js +4 -4
  81. package/dist/features/studio/components/EnvironmentMenu.js +2 -2
  82. package/dist/features/studio/components/Navbar.js +7 -7
  83. package/dist/features/studio/components/ProjectMenu.js +9 -9
  84. package/dist/features/studio/components/UserButton.js +3 -3
  85. package/dist/features/studio/useTheme.js +1 -22
  86. package/dist/features/vite/appGeneration.js +16 -5
  87. package/dist/features/vite/blockBoilerplate.js +1 -1
  88. package/dist/features/vite/definitionsSync.js +4 -4
  89. package/dist/features/vite/routeGeneration.js +9 -156
  90. package/dist/features/vite/runtimeDev.js +291 -0
  91. package/dist/features/vite/utils.js +3 -1
  92. package/dist/features/vite/vite.d.ts +22 -3
  93. package/dist/features/vite/vite.js +42 -19
  94. package/dist/lib/auth.js +42 -68
  95. package/dist/lib/normalized-data.js +6 -6
  96. package/dist/lib/telemetry.js +1 -24
  97. package/dist/lib/utils.js +1 -1
  98. package/dist/lib/view-queries.js +28 -0
  99. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/Matches.d.ts +114 -0
  100. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/RouterProvider.d.ts +25 -0
  101. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/config.d.ts +1 -0
  102. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/defer.d.ts +1 -0
  103. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/fileRoute.d.ts +20 -0
  104. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/global.d.ts +8 -0
  105. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/hash-scroll.d.ts +1 -0
  106. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/index.d.ts +18 -0
  107. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/link.d.ts +161 -0
  108. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/load-matches.d.ts +6 -0
  109. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/location.d.ts +54 -0
  110. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/lru-cache.d.ts +8 -0
  111. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/manifest.d.ts +32 -0
  112. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.d.ts +115 -0
  113. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/not-found.d.ts +1 -0
  114. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/redirect.d.ts +49 -0
  115. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/rewrite.d.ts +1 -0
  116. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/root.d.ts +6 -0
  117. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/route.d.ts +343 -0
  118. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/routeInfo.d.ts +48 -0
  119. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/router.d.ts +695 -0
  120. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/scroll-restoration.d.ts +1 -0
  121. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchMiddleware.d.ts +1 -0
  122. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/searchParams.d.ts +5 -0
  123. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/RawStream.d.ts +38 -0
  124. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/seroval-plugins.d.ts +1 -0
  125. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/ssr/serializer/transformer.d.ts +65 -0
  126. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/stores.d.ts +69 -0
  127. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/structuralSharing.d.ts +1 -0
  128. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/typePrimitives.d.ts +1 -0
  129. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderData.d.ts +1 -0
  130. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useLoaderDeps.d.ts +1 -0
  131. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useNavigate.d.ts +10 -0
  132. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useParams.d.ts +1 -0
  133. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useRouteContext.d.ts +1 -0
  134. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/useSearch.d.ts +1 -0
  135. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/utils.d.ts +28 -0
  136. package/dist/node_modules/.pnpm/@tanstack_router-core@1.168.14/node_modules/@tanstack/router-core/dist/esm/validators.d.ts +49 -0
  137. package/package.json +39 -12
  138. package/skills/camox-block/SKILL.md +4 -4
  139. package/skills/camox-cli/SKILL.md +3 -3
  140. package/skills/camox-layout/SKILL.md +2 -2
  141. package/dist/features/routes/ogRoute.d.ts +0 -12
  142. package/dist/features/routes/ogRoute.js +0 -20
  143. package/dist/features/routes/pageRoute.d.ts +0 -48
  144. package/dist/features/routes/pageRoute.js +0 -254
  145. package/dist/lib/api-client.d.ts +0 -7
  146. package/dist/lib/queries.d.ts +0 -12
@@ -1,5 +1,5 @@
1
- import { useFrame } from "../../../features/preview/components/Frame.js";
2
1
  import { isHttpTextLinkTarget } from "../../lib/textLinks.js";
2
+ import { useFrame } from "../../../features/preview/components/Frame.js";
3
3
  import { lexicalStateToMarkdown } from "../../lib/lexicalState.js";
4
4
  import { createEditorConfig, normalizeLexicalState } from "./editorConfig.js";
5
5
  import { InlineContentEditable } from "./InlineContentEditable.js";
@@ -1,25 +1,25 @@
1
+ import { isHttpTextLinkTarget } from "../../lib/textLinks.js";
1
2
  import { INPUT_BASE_STYLES, INPUT_FOCUS_STYLES, cn } from "../../../lib/utils.js";
3
+ import { TextLinkPopover } from "./TextLinkPopover.js";
2
4
  import { FORMAT_FLAGS } from "../../lib/modifierFormats.js";
3
- import { isHttpTextLinkTarget } from "../../lib/textLinks.js";
4
5
  import { lexicalStateToMarkdown } from "../../lib/lexicalState.js";
5
6
  import { createEditorConfig, normalizeLexicalState } from "./editorConfig.js";
6
- import { TextLinkPopover } from "./TextLinkPopover.js";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import * as React from "react";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ import { Button } from "@camox/ui/button";
11
+ import { Bold, Italic } from "lucide-react";
12
+ import { FloatingToolbar } from "@camox/ui/floating-toolbar";
13
+ import { Toggle } from "@camox/ui/toggle";
10
14
  import { $createLinkNode, TOGGLE_LINK_COMMAND } from "@lexical/link";
11
15
  import { LexicalComposer } from "@lexical/react/LexicalComposer";
12
16
  import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
17
+ import { ContentEditable } from "@lexical/react/LexicalContentEditable";
13
18
  import { HistoryPlugin } from "@lexical/react/LexicalHistoryPlugin";
14
19
  import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
15
20
  import { OnChangePlugin } from "@lexical/react/LexicalOnChangePlugin";
16
21
  import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
17
22
  import { $createTextNode, $getSelection, $isRangeSelection, $setSelection, COMMAND_PRIORITY_LOW, FORMAT_TEXT_COMMAND, INSERT_LINE_BREAK_COMMAND, KEY_ENTER_COMMAND, PASTE_COMMAND } from "lexical";
18
- import { Button } from "@camox/ui/button";
19
- import { Bold, Italic } from "lucide-react";
20
- import { FloatingToolbar } from "@camox/ui/floating-toolbar";
21
- import { Toggle } from "@camox/ui/toggle";
22
- import { ContentEditable } from "@lexical/react/LexicalContentEditable";
23
23
 
24
24
  //#region src/core/components/lexical/SidebarLexicalEditor.tsx
25
25
  function EnterAsLineBreakHandler() {
@@ -1,15 +1,15 @@
1
1
  import { useProjectSlug } from "../../../lib/auth.js";
2
- import { pageQueries, projectQueries } from "../../../lib/queries.js";
3
2
  import { createPageTextLinkTarget, getPageIdFromTextLinkTarget } from "../../lib/textLinks.js";
3
+ import { pageQueries, projectQueries } from "../../../lib/queries.js";
4
4
  import { c } from "react/compiler-runtime";
5
- import { Input } from "@camox/ui/input";
6
- import { Label } from "@camox/ui/label";
7
- import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
8
5
  import { useQuery } from "@tanstack/react-query";
9
6
  import * as React from "react";
10
7
  import { jsx, jsxs } from "react/jsx-runtime";
11
8
  import { Button } from "@camox/ui/button";
12
9
  import { Link2 } from "lucide-react";
10
+ import { Popover, PopoverContent, PopoverTrigger } from "@camox/ui/popover";
11
+ import { Label } from "@camox/ui/label";
12
+ import { Input } from "@camox/ui/input";
13
13
  import { Tabs, TabsList, TabsTrigger } from "@camox/ui/tabs";
14
14
 
15
15
  //#region src/core/components/lexical/TextLinkPopover.tsx
@@ -1,6 +1,7 @@
1
1
  import { EmbedURL, FileValue, ImageValue, LinkValue } from "./lib/contentType.js";
2
2
  import { MarkdownInlineComponents } from "./lib/lexicalReact.js";
3
- import { Block, BlockComponentProps, PeekItem, RepeatableItemSeed } from "./createBlock.js";
3
+ import { BlockComponentProps, PeekItem, RepeatableItemSeed } from "./editing/createEditableBlock.js";
4
+ import { Block } from "./createBlock.js";
4
5
  import { Layout, LayoutBlockData, OgImageParams } from "./createLayout.js";
5
6
  import * as _$_sinclair_typebox0 from "@sinclair/typebox";
6
7
  import * as _$react from "react";