camox 0.78.0 → 0.80.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/core/lib/artifact.d.ts +26 -1
- package/dist/core/lib/artifactData.d.ts +5 -1
- package/dist/core/lib/artifactHost.d.ts +43 -0
- package/dist/features/brand/BrandPart.js +116 -0
- package/dist/features/brand/CamoxBrand.js +758 -0
- package/dist/features/brand/VoiceGroup.js +443 -0
- package/dist/features/preview/EditablePageExperience.js +2 -2
- package/dist/features/runtime/artifactReplay.d.ts +3 -0
- package/dist/features/runtime/artifactReplay.js +4 -0
- package/dist/features/runtime/runtime.d.ts +1 -1
- package/dist/features/runtime/runtime.js +4 -4
- package/dist/features/studio/components/DraftReview.js +55 -32
- package/dist/features/studio/components/Navbar.js +9 -7
- package/dist/features/studio/routes.js +3 -3
- package/dist/features/vite/vite.js +1 -0
- package/dist/lib/queries.js +10 -6
- package/dist/lib/studio-reads.d.ts +1 -0
- package/dist/lib/studio-reads.js +6 -0
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +8 -4
- package/dist/features/memory/CamoxMemory.js +0 -747
|
@@ -4,7 +4,7 @@ import { actionsStore } from "../../provider/actionsStore.js";
|
|
|
4
4
|
import { cn } from "../../../lib/utils.js";
|
|
5
5
|
import { usePageDestinations } from "../../../hooks/use-page-destinations.js";
|
|
6
6
|
import { useLocalePath, useLocalizedPath } from "../../../lib/view-locale.js";
|
|
7
|
-
import { STUDIO_BASE_PATH,
|
|
7
|
+
import { STUDIO_BASE_PATH, STUDIO_BRAND_PATH, STUDIO_CONTENT_PATH, STUDIO_SETTINGS_PATH } from "../routes.js";
|
|
8
8
|
import { studioStore } from "../studioStore.js";
|
|
9
9
|
import { UserButton } from "./UserButton.js";
|
|
10
10
|
import { ConnectAgent } from "./ConnectAgent.js";
|
|
@@ -29,11 +29,13 @@ const links = [
|
|
|
29
29
|
aliases: ["Website"]
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
to:
|
|
33
|
-
title: "
|
|
34
|
-
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Brain, {}), "
|
|
32
|
+
to: STUDIO_BRAND_PATH,
|
|
33
|
+
title: "Brand",
|
|
34
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Brain, {}), "Brand"] }),
|
|
35
35
|
icon: "Brain",
|
|
36
36
|
aliases: [
|
|
37
|
+
"Brand",
|
|
38
|
+
"Voice",
|
|
37
39
|
"Memory",
|
|
38
40
|
"Memories",
|
|
39
41
|
"Remember"
|
|
@@ -98,11 +100,11 @@ const Navbar = (t0) => {
|
|
|
98
100
|
const isSettings = t2;
|
|
99
101
|
let t3;
|
|
100
102
|
if ($[2] !== pathname) {
|
|
101
|
-
t3 = isInSection(
|
|
103
|
+
t3 = isInSection(STUDIO_BRAND_PATH, pathname);
|
|
102
104
|
$[2] = pathname;
|
|
103
105
|
$[3] = t3;
|
|
104
106
|
} else t3 = $[3];
|
|
105
|
-
const
|
|
107
|
+
const isBrand = t3;
|
|
106
108
|
let t4;
|
|
107
109
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
108
110
|
t4 = /* @__PURE__ */ jsx(ProjectMenu, {});
|
|
@@ -114,7 +116,7 @@ const Navbar = (t0) => {
|
|
|
114
116
|
$[5] = isSettings;
|
|
115
117
|
$[6] = t5;
|
|
116
118
|
} else t5 = $[6];
|
|
117
|
-
const t6 = isSettings ||
|
|
119
|
+
const t6 = isSettings || isBrand;
|
|
118
120
|
let t7;
|
|
119
121
|
if ($[7] !== recordPage || $[8] !== t6) {
|
|
120
122
|
t7 = /* @__PURE__ */ jsx(LocalePicker, {
|
|
@@ -3,8 +3,8 @@ const STUDIO_ROUTE_SEGMENT = "camox";
|
|
|
3
3
|
const STUDIO_BASE_PATH = `/${STUDIO_ROUTE_SEGMENT}`;
|
|
4
4
|
const STUDIO_CONTENT_PATH = `${STUDIO_BASE_PATH}/content`;
|
|
5
5
|
const STUDIO_ASSETS_PATH = `${STUDIO_CONTENT_PATH}/assets`;
|
|
6
|
-
/** The
|
|
7
|
-
const
|
|
6
|
+
/** The Brand Section, where members set the Voice and see and correct memory. */
|
|
7
|
+
const STUDIO_BRAND_PATH = `${STUDIO_BASE_PATH}/brand`;
|
|
8
8
|
/** The Settings Section, where members change Project Settings. */
|
|
9
9
|
const STUDIO_SETTINGS_PATH = `${STUDIO_BASE_PATH}/settings`;
|
|
10
10
|
const collectionContentPath = (collectionId) => `${STUDIO_CONTENT_PATH}/collections/${encodeURIComponent(collectionId)}`;
|
|
@@ -34,4 +34,4 @@ function matchCollectionContentPath(pathname) {
|
|
|
34
34
|
const STUDIO_CANVAS_PATH = `${STUDIO_BASE_PATH}/canvas`;
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
|
-
export { STUDIO_ASSETS_PATH, STUDIO_BASE_PATH, STUDIO_CANVAS_PATH, STUDIO_CONTENT_PATH,
|
|
37
|
+
export { STUDIO_ASSETS_PATH, STUDIO_BASE_PATH, STUDIO_BRAND_PATH, STUDIO_CANVAS_PATH, STUDIO_CONTENT_PATH, STUDIO_ROUTE_SEGMENT, STUDIO_SETTINGS_PATH, collectionContentPath, editCollectionItemPath, matchCollectionContentPath };
|
|
@@ -87,6 +87,7 @@ const CAMOX_OPTIMIZED_DEPS = [
|
|
|
87
87
|
"camox > @base-ui/react/popover",
|
|
88
88
|
"camox > @base-ui/react/select",
|
|
89
89
|
"camox > @base-ui/react/separator",
|
|
90
|
+
"camox > @base-ui/react/slider",
|
|
90
91
|
"camox > @base-ui/react/switch",
|
|
91
92
|
"camox > @base-ui/react/tabs",
|
|
92
93
|
"camox > @base-ui/react/toggle",
|
package/dist/lib/queries.js
CHANGED
|
@@ -80,11 +80,15 @@ const localeMutations = {
|
|
|
80
80
|
/** Adds a page or record deleted from the locale viewed back to it. */
|
|
81
81
|
addBack: () => getOrpc().locales.addBack.mutationOptions()
|
|
82
82
|
};
|
|
83
|
-
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
/**
|
|
84
|
+
* Changing the brand, by correcting memory or saving the Voice: content writes, so on Live they
|
|
85
|
+
* start a draft (ADR 0049, ADR 0051, ADR 0052).
|
|
86
|
+
*/
|
|
87
|
+
const brandMutations = {
|
|
88
|
+
addMemory: () => getOrpc().memories.add.mutationOptions(),
|
|
89
|
+
changeMemory: () => getOrpc().memories.change.mutationOptions(),
|
|
90
|
+
deleteMemory: () => getOrpc().memories.delete.mutationOptions(),
|
|
91
|
+
saveVoice: () => getOrpc().memories.saveVoice.mutationOptions()
|
|
88
92
|
};
|
|
89
93
|
const blockMutations = {
|
|
90
94
|
delete: () => getOrpc().blocks.delete.mutationOptions(),
|
|
@@ -159,4 +163,4 @@ const fileMutations = {
|
|
|
159
163
|
};
|
|
160
164
|
|
|
161
165
|
//#endregion
|
|
162
|
-
export { blockMutations, collectionMutations, draftMutations, fileMutations, localeMutations,
|
|
166
|
+
export { blockMutations, brandMutations, collectionMutations, draftMutations, fileMutations, localeMutations, pageMutations, projectMutations, publicationMutations, repeatableItemMutations, specialistMutations };
|
|
@@ -8,6 +8,7 @@ import "react";
|
|
|
8
8
|
import "@camox/api-contract/query-keys";
|
|
9
9
|
import "@camox/api-contract/specialists";
|
|
10
10
|
import { QueryClient } from "@tanstack/react-query";
|
|
11
|
+
import "@camox/api-contract/voice";
|
|
11
12
|
//#region src/lib/studio-reads.d.ts
|
|
12
13
|
type LayoutRead = Awaited<ReturnType<ApiClient["layouts"]["get"]>>;
|
|
13
14
|
/** A layout's structure: its blocks before and after the content of its pages. */
|
package/dist/lib/studio-reads.js
CHANGED
|
@@ -65,6 +65,12 @@ const reads = {
|
|
|
65
65
|
fetch: ({ api, signal }, { projectId }) => api.memories.list({ projectId }, { signal }),
|
|
66
66
|
staleTime: Infinity
|
|
67
67
|
}),
|
|
68
|
+
voice: entry({
|
|
69
|
+
key: ({ projectId }) => [...queryKeys.memories.voice, projectId],
|
|
70
|
+
everyLocale: true,
|
|
71
|
+
fetch: ({ api, signal }, { projectId }) => api.memories.voice({ projectId }, { signal }),
|
|
72
|
+
staleTime: Infinity
|
|
73
|
+
}),
|
|
68
74
|
missingFromLocale: entry({
|
|
69
75
|
key: ({ projectId }) => [
|
|
70
76
|
"camox",
|
package/dist/package.js
CHANGED