@drawnagency/primitives 0.1.86 → 0.1.88
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/{chunk-YKOLOZB2.js → chunk-DRCPDOW3.js} +14 -0
- package/dist/{chunk-MBJUWOM2.js → chunk-EO7K45GV.js} +1 -1
- package/dist/{chunk-2CVP2AGK.js → chunk-H2FENAQH.js} +6 -6
- package/dist/{chunk-DKXISNJ2.js → chunk-NEDOJHHR.js} +2 -2
- package/dist/{chunk-DO3ZENLN.js → chunk-OEL57NYV.js} +1 -1
- package/dist/{chunk-FDBZZ4AT.js → chunk-PTVY3Q7P.js} +1 -1
- package/dist/{chunk-665DW3HR.js → chunk-SK6GGTTO.js} +220 -207
- package/dist/{chunk-EP3LVOXZ.js → chunk-WA3HFN54.js} +1 -1
- package/dist/{chunk-YAPG44NS.js → chunk-XDG2K6UT.js} +1 -1
- package/dist/{chunk-E3MTIMOG.js → chunk-XPUBUR64.js} +10 -0
- package/dist/components/brandguide/Colors.d.ts.map +1 -1
- package/dist/components/brandguide/ColorsEditable.d.ts +20 -0
- package/dist/components/brandguide/ColorsEditable.d.ts.map +1 -0
- package/dist/components/brandguide/ColorsView.d.ts +9 -0
- package/dist/components/brandguide/ColorsView.d.ts.map +1 -0
- package/dist/components/brandguide/colors-shared.d.ts +4 -0
- package/dist/components/brandguide/colors-shared.d.ts.map +1 -0
- package/dist/components/editor/index.js +4 -4
- package/dist/components/primitives/index.js +5 -5
- package/dist/components/sections/Colors/index.d.ts.map +1 -1
- package/dist/components/sections/SectionIsland.d.ts +8 -0
- package/dist/components/sections/SectionIsland.d.ts.map +1 -0
- package/dist/components/sections/brand-guide.js +5 -5
- package/dist/components/sections/register-schemas.js +8 -8
- package/dist/components/sections/register.js +8 -8
- package/dist/components/shared/Navigation.d.ts +6 -1
- package/dist/components/shared/Navigation.d.ts.map +1 -1
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsDisplay.d.ts.map +1 -1
- package/dist/hooks/useCollabSession.d.ts.map +1 -1
- package/dist/hooks/useMediaPipeline.d.ts +2 -1
- package/dist/hooks/useMediaPipeline.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/lib/image-refs.d.ts +9 -0
- package/dist/lib/image-refs.d.ts.map +1 -1
- package/dist/lib/index.js +2 -2
- package/dist/lib/registry.d.ts +7 -0
- package/dist/lib/registry.d.ts.map +1 -1
- package/dist/media/index.js +4 -2
- package/dist/media/resolve.d.ts +25 -0
- package/dist/media/resolve.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/site-config.d.ts +10 -0
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/brandguide/Colors.tsx +2 -275
- package/src/components/brandguide/ColorsEditable.tsx +155 -0
- package/src/components/brandguide/ColorsView.tsx +100 -0
- package/src/components/brandguide/colors-shared.ts +17 -0
- package/src/components/sections/Colors/index.tsx +1 -0
- package/src/components/sections/SectionIsland.tsx +21 -0
- package/src/components/shared/Navigation.tsx +20 -2
- package/src/components/shell/EditorShell.tsx +4 -0
- package/src/components/shell/SiteSettingsDisplay.tsx +106 -0
- package/src/hooks/useCollabSession.ts +27 -0
- package/src/hooks/useMediaPipeline.ts +16 -3
- package/src/lib/image-refs.ts +19 -0
- package/src/lib/registry.ts +7 -0
- package/src/media/resolve.ts +34 -0
- package/src/schemas/site-config.ts +13 -0
|
@@ -229,6 +229,19 @@ function rebindImageRef(ref, imageId) {
|
|
|
229
229
|
for (const key of BAKED_MEDIA_KEYS) delete fresh[key];
|
|
230
230
|
return fresh;
|
|
231
231
|
}
|
|
232
|
+
function resolveLogo(logo, manifest, provider) {
|
|
233
|
+
if (!logo) return null;
|
|
234
|
+
const light = resolveMedia({ imageId: logo.light.imageId }, manifest, [1], provider);
|
|
235
|
+
if (!light?.src || light.tag === "video") return null;
|
|
236
|
+
const dark = logo.dark ? resolveMedia({ imageId: logo.dark.imageId }, manifest, [1], provider) : null;
|
|
237
|
+
const darkUrl = dark && dark.tag !== "video" ? dark.src : null;
|
|
238
|
+
return {
|
|
239
|
+
lightUrl: light.src,
|
|
240
|
+
darkUrl,
|
|
241
|
+
invertInDark: logo.invertInDark,
|
|
242
|
+
showInNav: logo.showInNav
|
|
243
|
+
};
|
|
244
|
+
}
|
|
232
245
|
|
|
233
246
|
// src/media/videoPoster.ts
|
|
234
247
|
function generateVideoPoster(blob, quality) {
|
|
@@ -324,6 +337,7 @@ export {
|
|
|
324
337
|
resolveManifestReferences,
|
|
325
338
|
BAKED_MEDIA_KEYS,
|
|
326
339
|
rebindImageRef,
|
|
340
|
+
resolveLogo,
|
|
327
341
|
generateVideoPoster,
|
|
328
342
|
setMediaProvider,
|
|
329
343
|
getMediaProvider
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
pluralize,
|
|
4
4
|
stripHtmlToPlainText,
|
|
5
5
|
truncate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SK6GGTTO.js";
|
|
7
7
|
import {
|
|
8
8
|
DeleteButton,
|
|
9
9
|
DragHandle,
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
buildBlockDropData,
|
|
16
16
|
canDropBlock,
|
|
17
17
|
isBlockDragData
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XDG2K6UT.js";
|
|
19
19
|
import {
|
|
20
20
|
EditableRichText,
|
|
21
21
|
defineHeadingSection
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-PTVY3Q7P.js";
|
|
23
23
|
import {
|
|
24
24
|
EditablePlainText,
|
|
25
25
|
ImageDropZone,
|
|
@@ -28,11 +28,11 @@ import {
|
|
|
28
28
|
colSpanClass,
|
|
29
29
|
containerGridClass,
|
|
30
30
|
spacerHiddenClass
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-NEDOJHHR.js";
|
|
32
32
|
import {
|
|
33
33
|
useMediaLibrary,
|
|
34
34
|
useResolvedMedia
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-EO7K45GV.js";
|
|
36
36
|
import {
|
|
37
37
|
embedUrl
|
|
38
38
|
} from "./chunk-Y4JQGO6G.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
} from "./chunk-TZQPOR5A.js";
|
|
52
52
|
import {
|
|
53
53
|
SingleMediaReferenceSchema
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-XPUBUR64.js";
|
|
55
55
|
import {
|
|
56
56
|
defineSection,
|
|
57
57
|
getSection
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
SettingsIcon,
|
|
7
7
|
useMediaLibrary,
|
|
8
8
|
useResolvedMedia
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EO7K45GV.js";
|
|
10
10
|
import {
|
|
11
11
|
rebindImageRef
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DRCPDOW3.js";
|
|
13
13
|
import {
|
|
14
14
|
cn
|
|
15
15
|
} from "./chunk-7EOSDFS3.js";
|