camox 0.34.0 → 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 (73) 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 +449 -1602
  7. package/dist/core/editing/BlockEditingRuntime.js +36 -0
  8. package/dist/core/editing/CompleteBlockEditingRuntime.js +76 -0
  9. package/dist/core/editing/createEditableBlock.d.ts +1455 -0
  10. package/dist/core/editing/createEditableBlock.js +1751 -0
  11. package/dist/core/lib/lexicalState.js +1 -1
  12. package/dist/features/agent-chat/components/AgentChatSidebar.js +1 -1
  13. package/dist/features/content/components/AssetCard.js +1 -1
  14. package/dist/features/page/PublishedPageContent.js +236 -0
  15. package/dist/features/page/PublishedPageExperience.js +23 -0
  16. package/dist/features/preview/CamoxPreview.d.ts +1 -0
  17. package/dist/features/preview/CamoxPreview.js +4 -4
  18. package/dist/features/preview/EditablePageContent.js +3 -0
  19. package/dist/features/preview/EditablePageExperience.js +24 -0
  20. package/dist/features/preview/components/AddBlockSidebar.js +3 -3
  21. package/dist/features/preview/components/AssetFieldEditor.js +1 -1
  22. package/dist/features/preview/components/AssetLightbox.js +46 -110
  23. package/dist/features/preview/components/BlockActionsPopover.js +6 -6
  24. package/dist/features/preview/components/CreatePageModal.js +4 -4
  25. package/dist/features/preview/components/DebouncedFieldEditor.js +2 -2
  26. package/dist/features/preview/components/DraftSwitchDialog.js +1 -1
  27. package/dist/features/preview/components/FieldToolbar.js +3 -3
  28. package/dist/features/preview/components/Frame.js +1 -1
  29. package/dist/features/preview/components/ItemFieldsEditor.js +3 -3
  30. package/dist/features/preview/components/LeftSidebar.js +1 -1
  31. package/dist/features/preview/components/LinkFieldEditor.js +3 -3
  32. package/dist/features/preview/components/Metadata.js +87 -0
  33. package/dist/features/preview/components/MultipleAssetFieldEditor.js +1 -1
  34. package/dist/features/preview/components/OverlayTracker.js +3 -3
  35. package/dist/features/preview/components/Overlays.js +3 -3
  36. package/dist/features/preview/components/PageEditorSidebar.js +5 -5
  37. package/dist/features/preview/components/PageInfoSidebar.js +157 -73
  38. package/dist/features/preview/components/PageLocationFieldset.js +1 -1
  39. package/dist/features/preview/components/PageNavigatorSidebar.js +4 -4
  40. package/dist/features/preview/components/PageNicknameField.js +2 -2
  41. package/dist/features/preview/components/PagePicker.js +3 -3
  42. package/dist/features/preview/components/PageTree.js +3 -3
  43. package/dist/features/preview/components/PeekedBlock.js +2 -2
  44. package/dist/features/preview/components/PreviewPanel.js +2 -2
  45. package/dist/features/preview/components/PreviewToolbar.js +2 -2
  46. package/dist/features/preview/components/PublishDialog.js +2 -2
  47. package/dist/features/preview/components/RepeatableItemsList.js +1 -1
  48. package/dist/features/preview/components/RightSidebar.js +1 -1
  49. package/dist/features/preview/components/useRepeatableItemActions.js +1 -1
  50. package/dist/features/preview/components/useUpdateBlockPosition.js +1 -1
  51. package/dist/features/provider/AuthenticatedCamoxProvider.js +63 -0
  52. package/dist/features/provider/CamoxProvider.d.ts +5 -12
  53. package/dist/features/provider/CamoxProvider.js +80 -338
  54. package/dist/features/provider/CoreCamoxProvider.js +37 -0
  55. package/dist/features/provider/LocalhostPreviewProvider.js +159 -0
  56. package/dist/features/provider/components/CommandPalette.js +1 -1
  57. package/dist/features/provider/useAdminShortcuts.js +1 -1
  58. package/dist/features/runtime/hydrationData.js +9 -0
  59. package/dist/features/runtime/pageApp.js +148 -35
  60. package/dist/features/runtime/pageClient.d.ts +1 -2
  61. package/dist/features/runtime/pageClient.js +3 -20
  62. package/dist/features/runtime/runtime.d.ts +1 -0
  63. package/dist/features/runtime/studioApp.js +76 -8
  64. package/dist/features/runtime/studioClient.d.ts +6 -0
  65. package/dist/features/runtime/studioClient.js +20 -0
  66. package/dist/features/studio/CamoxStudio.js +1 -1
  67. package/dist/features/studio/components/EnvironmentMenu.js +2 -2
  68. package/dist/features/studio/useTheme.js +1 -22
  69. package/dist/features/vite/runtimeDev.js +24 -3
  70. package/dist/features/vite/vite.js +7 -1
  71. package/dist/lib/normalized-data.js +6 -6
  72. package/dist/lib/view-queries.js +28 -0
  73. package/package.json +9 -4
@@ -0,0 +1,28 @@
1
+ import { getOrpc } from "./api-client.js";
2
+ import { queryKeys } from "@camox/api-contract/query-keys";
3
+
4
+ //#region src/lib/view-queries.ts
5
+ const viewPageQueries = { list: (projectId) => ({
6
+ ...getOrpc().pages.list.queryOptions({
7
+ input: { projectId },
8
+ staleTime: Infinity
9
+ }),
10
+ queryKey: queryKeys.pages.list
11
+ }) };
12
+ const viewProjectQueries = { getBySlug: (slug) => ({ ...getOrpc().projects.getBySlug.queryOptions({
13
+ input: { slug },
14
+ staleTime: Infinity
15
+ }) }) };
16
+ const viewBlockQueries = { get: (id, source) => ({
17
+ ...getOrpc().blocks.get.queryOptions({
18
+ input: {
19
+ id,
20
+ source
21
+ },
22
+ staleTime: Infinity
23
+ }),
24
+ queryKey: queryKeys.blocks.get(id, source)
25
+ }) };
26
+
27
+ //#endregion
28
+ export { viewBlockQueries, viewPageQueries, viewProjectQueries };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camox",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "camox": "./bin/camox.mjs"
@@ -77,6 +77,11 @@
77
77
  "types": "./dist/features/runtime/pageClient.d.ts",
78
78
  "import": "./dist/features/runtime/pageClient.js"
79
79
  },
80
+ "./_internal/studioClient": {
81
+ "source": "./src/features/runtime/studioClient.tsx",
82
+ "types": "./dist/features/runtime/studioClient.d.ts",
83
+ "import": "./dist/features/runtime/studioClient.js"
84
+ },
80
85
  "./_internal/studioServer": {
81
86
  "source": "./src/features/runtime/studioServer.tsx",
82
87
  "types": "./dist/features/runtime/studioServer.d.ts",
@@ -152,9 +157,9 @@
152
157
  "streamdown": "^2.5.0",
153
158
  "unhead": "^3.1.7",
154
159
  "zod": "^4.4.3",
155
- "@camox/api-contract": "0.34.0",
156
- "@camox/cli": "0.34.0",
157
- "@camox/ui": "0.34.0"
160
+ "@camox/api-contract": "0.35.0",
161
+ "@camox/cli": "0.35.0",
162
+ "@camox/ui": "0.35.0"
158
163
  },
159
164
  "devDependencies": {
160
165
  "@babel/core": "^7.29.0",