@drawnagency/primitives 0.1.61 → 0.1.62
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-UQ4OYRW7.js → chunk-2BHPWO7M.js} +54 -166
- package/dist/chunk-4E66N6UV.js +10 -0
- package/dist/chunk-5THS4K5D.js +123 -0
- package/dist/{chunk-TG43X7JO.js → chunk-75P6HWPN.js} +29 -5
- package/dist/{chunk-ODCJQOVO.js → chunk-7IMQVDDJ.js} +1 -1
- package/dist/{chunk-4OX3Z7SB.js → chunk-FJBDGYHE.js} +32 -671
- package/dist/{chunk-WLMJCNU7.js → chunk-I5737FJY.js} +0 -8
- package/dist/chunk-JRT4KWHU.js +1201 -0
- package/dist/chunk-QWDOJUUO.js +648 -0
- package/dist/{chunk-BT7STGDW.js → chunk-TEYTLQVH.js} +0 -15
- package/dist/{chunk-AM5LZD6Q.js → chunk-ZYXLNJ5M.js} +6 -5
- package/dist/components/brandguide/ColorSwatchSettings.d.ts +1 -1
- package/dist/components/brandguide/ColorSwatchSettings.d.ts.map +1 -1
- package/dist/components/brandguide/Colors.d.ts +1 -1
- package/dist/components/brandguide/Colors.d.ts.map +1 -1
- package/dist/components/editor/index.js +4 -2
- package/dist/components/primitives/IconPicker.d.ts +1 -7
- package/dist/components/primitives/IconPicker.d.ts.map +1 -1
- package/dist/components/primitives/index.js +10 -7
- package/dist/components/sections/Colors/index.d.ts.map +1 -1
- package/dist/components/sections/Colors/schema.d.ts +19 -0
- package/dist/components/sections/Colors/schema.d.ts.map +1 -0
- package/dist/components/sections/DoDontMedia/DoDontMediaBlock.d.ts +20 -0
- package/dist/components/sections/DoDontMedia/DoDontMediaBlock.d.ts.map +1 -0
- package/dist/components/sections/DoDontMedia/index.d.ts +45 -0
- package/dist/components/sections/DoDontMedia/index.d.ts.map +1 -0
- package/dist/components/sections/IconList/DoDontToggle.d.ts +14 -0
- package/dist/components/sections/IconList/DoDontToggle.d.ts.map +1 -0
- package/dist/components/sections/IconList/IconList.d.ts.map +1 -1
- package/dist/components/sections/IconList/index.d.ts.map +1 -1
- package/dist/components/sections/Media/MediaBlock.d.ts +1 -3
- package/dist/components/sections/Media/MediaBlock.d.ts.map +1 -1
- package/dist/components/sections/Media/index.d.ts +0 -1
- package/dist/components/sections/Media/index.d.ts.map +1 -1
- package/dist/components/sections/all-sections.d.ts +54 -18
- package/dist/components/sections/all-sections.d.ts.map +1 -1
- package/dist/components/sections/brand-guide.d.ts +84 -0
- package/dist/components/sections/brand-guide.d.ts.map +1 -0
- package/dist/components/sections/brand-guide.js +21 -0
- package/dist/components/sections/core-sections.d.ts +93 -0
- package/dist/components/sections/core-sections.d.ts.map +1 -0
- package/dist/components/sections/register-schemas.js +108 -1155
- package/dist/index.js +29 -33
- package/dist/lib/index.js +4 -4
- package/dist/lib/loader.d.ts.map +1 -1
- package/dist/lib/migrate-sections-transform.d.ts.map +1 -1
- package/dist/lib/migrate-sections-transform.js +1 -1
- package/dist/lib/registry.d.ts +6 -1
- package/dist/lib/registry.d.ts.map +1 -1
- package/dist/media/index.js +1 -1
- package/dist/schemas/index.js +3 -7
- package/dist/schemas/shared.d.ts +0 -17
- package/dist/schemas/shared.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/components/brandguide/ColorSwatchSettings.tsx +1 -1
- package/src/components/brandguide/Colors.tsx +1 -1
- package/src/components/primitives/IconPicker.tsx +27 -119
- package/src/components/sections/Colors/index.tsx +2 -1
- package/src/components/sections/Colors/schema.ts +24 -0
- package/src/components/sections/DoDontMedia/DoDontMediaBlock.tsx +35 -0
- package/src/components/sections/DoDontMedia/index.tsx +84 -0
- package/src/components/sections/IconList/DoDontToggle.tsx +76 -0
- package/src/components/sections/IconList/IconList.tsx +24 -14
- package/src/components/sections/IconList/index.tsx +1 -0
- package/src/components/sections/Media/MediaBlock.tsx +1 -11
- package/src/components/sections/Media/index.tsx +0 -15
- package/src/components/sections/all-sections.ts +7 -35
- package/src/components/sections/brand-guide.ts +13 -0
- package/src/components/sections/core-sections.ts +26 -0
- package/src/lib/loader.ts +10 -4
- package/src/lib/migrate-sections-transform.ts +33 -5
- package/src/lib/registry.ts +6 -1
- package/src/schemas/shared.ts +0 -18
package/dist/index.js
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AUDIENCE_COOKIE,
|
|
3
|
-
AUDIENCE_MAX_AGE_SECONDS,
|
|
4
|
-
LastOwnerError,
|
|
5
|
-
SESSION_COOKIE,
|
|
6
|
-
SESSION_MAX_AGE_SECONDS,
|
|
7
|
-
deriveUiCapabilities,
|
|
8
|
-
setSessionCookie,
|
|
9
|
-
signAudienceToken,
|
|
10
|
-
signSessionToken,
|
|
11
|
-
verifyAudienceToken,
|
|
12
|
-
verifySessionToken
|
|
13
|
-
} from "./chunk-UNWNT52N.js";
|
|
14
1
|
import {
|
|
15
2
|
EXT_TO_MIME,
|
|
16
3
|
MIME_TO_EXT,
|
|
@@ -27,12 +14,25 @@ import {
|
|
|
27
14
|
sanitizeMediaName,
|
|
28
15
|
setMediaProvider
|
|
29
16
|
} from "./chunk-CBWK3KPV.js";
|
|
17
|
+
import {
|
|
18
|
+
AUDIENCE_COOKIE,
|
|
19
|
+
AUDIENCE_MAX_AGE_SECONDS,
|
|
20
|
+
LastOwnerError,
|
|
21
|
+
SESSION_COOKIE,
|
|
22
|
+
SESSION_MAX_AGE_SECONDS,
|
|
23
|
+
deriveUiCapabilities,
|
|
24
|
+
setSessionCookie,
|
|
25
|
+
signAudienceToken,
|
|
26
|
+
signSessionToken,
|
|
27
|
+
verifyAudienceToken,
|
|
28
|
+
verifySessionToken
|
|
29
|
+
} from "./chunk-UNWNT52N.js";
|
|
30
30
|
import {
|
|
31
31
|
AudienceColorSchema,
|
|
32
32
|
AudienceNameSchema,
|
|
33
33
|
MediaGridOptionsSchema,
|
|
34
34
|
slugifyAudienceName
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-7IMQVDDJ.js";
|
|
36
36
|
import {
|
|
37
37
|
AudienceSchema,
|
|
38
38
|
RoleSchema,
|
|
@@ -54,8 +54,8 @@ import {
|
|
|
54
54
|
loadStaticSiteContent,
|
|
55
55
|
mergeSiteContent,
|
|
56
56
|
safeRedirect
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-ZYXLNJ5M.js";
|
|
58
|
+
import "./chunk-75P6HWPN.js";
|
|
59
59
|
import {
|
|
60
60
|
curatedIcons,
|
|
61
61
|
getIcon
|
|
@@ -72,6 +72,7 @@ import {
|
|
|
72
72
|
sanitizeHtml,
|
|
73
73
|
toSectionId
|
|
74
74
|
} from "./chunk-53DKVAB6.js";
|
|
75
|
+
import "./chunk-ZGFAYZWB.js";
|
|
75
76
|
import {
|
|
76
77
|
cn
|
|
77
78
|
} from "./chunk-7EOSDFS3.js";
|
|
@@ -80,25 +81,11 @@ import {
|
|
|
80
81
|
requireSessionSecret,
|
|
81
82
|
safeNextPath
|
|
82
83
|
} from "./chunk-S2L3BPLS.js";
|
|
83
|
-
import "./chunk-ZGFAYZWB.js";
|
|
84
84
|
import {
|
|
85
85
|
getSectionContentSchema,
|
|
86
86
|
getSectionSchema
|
|
87
87
|
} from "./chunk-TZQPOR5A.js";
|
|
88
88
|
import {
|
|
89
|
-
clearRegistry,
|
|
90
|
-
createRegistry,
|
|
91
|
-
defineSection,
|
|
92
|
-
getAllSchemas,
|
|
93
|
-
getAllSections,
|
|
94
|
-
getSchema,
|
|
95
|
-
getSection,
|
|
96
|
-
registerSchema,
|
|
97
|
-
registerSection
|
|
98
|
-
} from "./chunk-VKAGMEKE.js";
|
|
99
|
-
import {
|
|
100
|
-
ColorItemSchema,
|
|
101
|
-
ColorSpaceSchema,
|
|
102
89
|
FontNameSchema,
|
|
103
90
|
HexColorSchema,
|
|
104
91
|
ImageManifestSchema,
|
|
@@ -115,7 +102,18 @@ import {
|
|
|
115
102
|
TextLineSchema,
|
|
116
103
|
VariantSchema,
|
|
117
104
|
normalizeSiteIndex
|
|
118
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-TEYTLQVH.js";
|
|
106
|
+
import {
|
|
107
|
+
clearRegistry,
|
|
108
|
+
createRegistry,
|
|
109
|
+
defineSection,
|
|
110
|
+
getAllSchemas,
|
|
111
|
+
getAllSections,
|
|
112
|
+
getSchema,
|
|
113
|
+
getSection,
|
|
114
|
+
registerSchema,
|
|
115
|
+
registerSection
|
|
116
|
+
} from "./chunk-VKAGMEKE.js";
|
|
119
117
|
import "./chunk-NSCT3AMV.js";
|
|
120
118
|
import {
|
|
121
119
|
env
|
|
@@ -137,8 +135,6 @@ export {
|
|
|
137
135
|
AudienceColorSchema,
|
|
138
136
|
AudienceNameSchema,
|
|
139
137
|
AudienceSchema,
|
|
140
|
-
ColorItemSchema,
|
|
141
|
-
ColorSpaceSchema,
|
|
142
138
|
DEFAULT_LINK,
|
|
143
139
|
EXT_TO_MIME,
|
|
144
140
|
FontNameSchema,
|
package/dist/lib/index.js
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
loadStaticSiteContent,
|
|
8
8
|
mergeSiteContent,
|
|
9
9
|
safeRedirect
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-ZYXLNJ5M.js";
|
|
11
|
+
import "../chunk-75P6HWPN.js";
|
|
12
12
|
import {
|
|
13
13
|
curatedIcons,
|
|
14
14
|
getIcon
|
|
@@ -25,12 +25,13 @@ import {
|
|
|
25
25
|
sanitizeHtml,
|
|
26
26
|
toSectionId
|
|
27
27
|
} from "../chunk-53DKVAB6.js";
|
|
28
|
+
import "../chunk-ZGFAYZWB.js";
|
|
28
29
|
import {
|
|
29
30
|
cn
|
|
30
31
|
} from "../chunk-7EOSDFS3.js";
|
|
31
32
|
import "../chunk-S2L3BPLS.js";
|
|
32
|
-
import "../chunk-ZGFAYZWB.js";
|
|
33
33
|
import "../chunk-TZQPOR5A.js";
|
|
34
|
+
import "../chunk-TEYTLQVH.js";
|
|
34
35
|
import {
|
|
35
36
|
clearRegistry,
|
|
36
37
|
createRegistry,
|
|
@@ -42,7 +43,6 @@ import {
|
|
|
42
43
|
registerSchema,
|
|
43
44
|
registerSection
|
|
44
45
|
} from "../chunk-VKAGMEKE.js";
|
|
45
|
-
import "../chunk-BT7STGDW.js";
|
|
46
46
|
import "../chunk-NSCT3AMV.js";
|
|
47
47
|
import {
|
|
48
48
|
env
|
package/dist/lib/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/lib/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAe,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAKvF,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,WAAW,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/lib/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAe,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAKvF,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,EAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,WAAW,CA6Cb;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACnC,WAAW,CAQb;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAe9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-sections-transform.d.ts","sourceRoot":"","sources":["../../src/lib/migrate-sections-transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"migrate-sections-transform.d.ts","sourceRoot":"","sources":["../../src/lib/migrate-sections-transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAU1D"}
|
package/dist/lib/registry.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export type SettingsFieldDef = {
|
|
|
28
28
|
coerce?: "number";
|
|
29
29
|
/** When set, an empty-string ("") selection is normalized to `undefined`
|
|
30
30
|
* before the content/options split, so an optional-enum field clears cleanly
|
|
31
|
-
* (e.g.
|
|
31
|
+
* (e.g. an optional-enum content field). Opt-in so other
|
|
32
32
|
* selects keep their "" value. */
|
|
33
33
|
emptyIsUndefined?: boolean;
|
|
34
34
|
options: {
|
|
@@ -94,6 +94,10 @@ export interface WrapperProps {
|
|
|
94
94
|
}
|
|
95
95
|
export interface SectionDefinition<T = unknown> {
|
|
96
96
|
type: string;
|
|
97
|
+
/** Grouping label. `"brand-guide"` marks opinionated sections separable from the
|
|
98
|
+
* generic core set; omitted/`"core"` is a generic section. Presentation/grouping
|
|
99
|
+
* only — does not affect registration. */
|
|
100
|
+
category?: "core" | "brand-guide";
|
|
97
101
|
label: string;
|
|
98
102
|
icon?: ReactNode;
|
|
99
103
|
schema: ZodType<T>;
|
|
@@ -123,6 +127,7 @@ export interface SectionDefinition<T = unknown> {
|
|
|
123
127
|
}
|
|
124
128
|
type DefineSectionInput<S extends ZodType> = {
|
|
125
129
|
type: string;
|
|
130
|
+
category?: "core" | "brand-guide";
|
|
126
131
|
label: string;
|
|
127
132
|
icon?: ReactNode;
|
|
128
133
|
schema: S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/lib/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,MAAM,gBAAgB,GACxB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACD;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,KA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C,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAEjE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAEtE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAE3D;AAED,wBAAgB,cAAc,IAAI,iBAAiB,EAAE,CAEpD;AAED,wBAAgB,aAAa,IAAI,OAAO,EAAE,CAEzC;AAED,wBAAgB,aAAa,IAAI,IAAI,CAEpC"}
|
package/dist/media/index.js
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
AudienceNameSchema,
|
|
4
4
|
MediaGridOptionsSchema,
|
|
5
5
|
slugifyAudienceName
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-7IMQVDDJ.js";
|
|
7
7
|
import {
|
|
8
8
|
AudienceSchema,
|
|
9
9
|
RoleSchema,
|
|
@@ -20,10 +20,7 @@ import {
|
|
|
20
20
|
getSectionContentSchema,
|
|
21
21
|
getSectionSchema
|
|
22
22
|
} from "../chunk-TZQPOR5A.js";
|
|
23
|
-
import "../chunk-VKAGMEKE.js";
|
|
24
23
|
import {
|
|
25
|
-
ColorItemSchema,
|
|
26
|
-
ColorSpaceSchema,
|
|
27
24
|
FontNameSchema,
|
|
28
25
|
HexColorSchema,
|
|
29
26
|
ImageManifestSchema,
|
|
@@ -40,15 +37,14 @@ import {
|
|
|
40
37
|
TextLineSchema,
|
|
41
38
|
VariantSchema,
|
|
42
39
|
normalizeSiteIndex
|
|
43
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-TEYTLQVH.js";
|
|
41
|
+
import "../chunk-VKAGMEKE.js";
|
|
44
42
|
import "../chunk-NSCT3AMV.js";
|
|
45
43
|
import "../chunk-JSBRDJBE.js";
|
|
46
44
|
export {
|
|
47
45
|
AudienceColorSchema,
|
|
48
46
|
AudienceNameSchema,
|
|
49
47
|
AudienceSchema,
|
|
50
|
-
ColorItemSchema,
|
|
51
|
-
ColorSpaceSchema,
|
|
52
48
|
DEFAULT_LINK,
|
|
53
49
|
FontNameSchema,
|
|
54
50
|
HexColorSchema,
|
package/dist/schemas/shared.d.ts
CHANGED
|
@@ -109,21 +109,4 @@ export declare const SingleMediaReferenceSchema: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
109
109
|
export type SingleMediaReference = z.infer<typeof SingleMediaReferenceSchema>;
|
|
110
110
|
export declare const HexColorSchema: z.ZodString;
|
|
111
111
|
export declare const FontNameSchema: z.ZodString;
|
|
112
|
-
export declare const ColorSpaceSchema: z.ZodObject<{
|
|
113
|
-
hex: z.ZodOptional<z.ZodString>;
|
|
114
|
-
rgb: z.ZodOptional<z.ZodString>;
|
|
115
|
-
cmyk: z.ZodOptional<z.ZodString>;
|
|
116
|
-
pantone: z.ZodOptional<z.ZodString>;
|
|
117
|
-
}, z.core.$strip>;
|
|
118
|
-
export type ColorSpace = z.infer<typeof ColorSpaceSchema>;
|
|
119
|
-
export declare const ColorItemSchema: z.ZodObject<{
|
|
120
|
-
name: z.ZodOptional<z.ZodString>;
|
|
121
|
-
spaces: z.ZodArray<z.ZodObject<{
|
|
122
|
-
hex: z.ZodOptional<z.ZodString>;
|
|
123
|
-
rgb: z.ZodOptional<z.ZodString>;
|
|
124
|
-
cmyk: z.ZodOptional<z.ZodString>;
|
|
125
|
-
pantone: z.ZodOptional<z.ZodString>;
|
|
126
|
-
}, z.core.$strip>>;
|
|
127
|
-
}, z.core.$strip>;
|
|
128
|
-
export type ColorItem = z.infer<typeof ColorItemSchema>;
|
|
129
112
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwBxB,eAAO,MAAM,cAAc;;;;;;;;;;;;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6C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drawnagency/primitives",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package.json": "./package.json",
|
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
"types": "./dist/components/sections/register-schemas.d.ts",
|
|
53
53
|
"default": "./dist/components/sections/register-schemas.js"
|
|
54
54
|
},
|
|
55
|
+
"./components/sections/brand-guide": {
|
|
56
|
+
"types": "./dist/components/sections/brand-guide.d.ts",
|
|
57
|
+
"default": "./dist/components/sections/brand-guide.js"
|
|
58
|
+
},
|
|
55
59
|
"./components/editor": {
|
|
56
60
|
"types": "./dist/components/editor/index.d.ts",
|
|
57
61
|
"default": "./dist/components/editor/index.js"
|
|
@@ -6,7 +6,7 @@ import { EditableGrid } from "../primitives/EditableGrid";
|
|
|
6
6
|
import { EditablePlainText } from "../primitives/EditablePlainText";
|
|
7
7
|
import type { ReactNode } from "react";
|
|
8
8
|
import ColorSwatchSettings from "./ColorSwatchSettings";
|
|
9
|
-
import type { ColorItem } from "
|
|
9
|
+
import type { ColorItem } from "../sections/Colors/schema";
|
|
10
10
|
import type { SectionContent } from "../../schemas/sections";
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { useEffect, useRef
|
|
2
|
-
import { Check, X } from "lucide-react";
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
3
2
|
import { cn } from "../../lib/cn";
|
|
4
3
|
import { curatedIcons } from "../../lib/icons";
|
|
5
4
|
|
|
@@ -8,142 +7,51 @@ interface IconPickerProps {
|
|
|
8
7
|
onSelect: (iconId: string | null) => void;
|
|
9
8
|
onClose: () => void;
|
|
10
9
|
showRemove?: boolean;
|
|
11
|
-
/** Opt-in: render the None / Do-Don't mode toggle. Default false → grid-only. */
|
|
12
|
-
allowDoDont?: boolean;
|
|
13
|
-
/** Current per-item Do/Don't tag (only meaningful when allowDoDont). */
|
|
14
|
-
dodont?: "do" | "dont";
|
|
15
|
-
/** Commit a Do/Don't choice; pass undefined to clear the tag (None). */
|
|
16
|
-
onSelectDoDont?: (v: "do" | "dont" | undefined) => void;
|
|
17
10
|
}
|
|
18
11
|
|
|
19
|
-
export function IconPicker({
|
|
20
|
-
selected,
|
|
21
|
-
onSelect,
|
|
22
|
-
onClose,
|
|
23
|
-
showRemove = true,
|
|
24
|
-
allowDoDont = false,
|
|
25
|
-
dodont,
|
|
26
|
-
onSelectDoDont,
|
|
27
|
-
}: IconPickerProps) {
|
|
12
|
+
export function IconPicker({ selected, onSelect, onClose, showRemove = true }: IconPickerProps) {
|
|
28
13
|
const panelRef = useRef<HTMLDivElement>(null);
|
|
29
|
-
// Open in the mode matching the item's current state.
|
|
30
|
-
const [mode, setMode] = useState<"none" | "dodont">(dodont ? "dodont" : "none");
|
|
31
14
|
|
|
32
15
|
useEffect(() => {
|
|
33
16
|
function handleMouseDown(e: MouseEvent) {
|
|
34
|
-
if (panelRef.current && !panelRef.current.contains(e.target as Node))
|
|
35
|
-
onClose();
|
|
36
|
-
}
|
|
17
|
+
if (panelRef.current && !panelRef.current.contains(e.target as Node)) onClose();
|
|
37
18
|
}
|
|
38
19
|
document.addEventListener("mousedown", handleMouseDown);
|
|
39
20
|
return () => document.removeEventListener("mousedown", handleMouseDown);
|
|
40
21
|
}, [onClose]);
|
|
41
22
|
|
|
42
|
-
const showDoDont = allowDoDont && mode === "dodont";
|
|
43
|
-
|
|
44
23
|
return (
|
|
45
24
|
<div
|
|
46
25
|
ref={panelRef}
|
|
47
26
|
className="absolute z-50 w-56 rounded-lg border border-base-200 bg-base p-2 shadow-lg"
|
|
48
27
|
>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
aria-label="None"
|
|
55
|
-
aria-selected={mode === "none"}
|
|
56
|
-
className={cn(
|
|
57
|
-
"cursor-pointer flex-1 rounded px-2 py-1 text-xs font-medium transition-colors",
|
|
58
|
-
mode === "none"
|
|
59
|
-
? "bg-base text-base-contrast shadow-sm"
|
|
60
|
-
: "text-base-contrast-light hover:text-base-contrast",
|
|
61
|
-
)}
|
|
62
|
-
onClick={() => {
|
|
63
|
-
setMode("none");
|
|
64
|
-
onSelectDoDont?.(undefined);
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
None
|
|
68
|
-
</button>
|
|
69
|
-
<button
|
|
70
|
-
type="button"
|
|
71
|
-
role="tab"
|
|
72
|
-
aria-label="Do / Don't"
|
|
73
|
-
aria-selected={mode === "dodont"}
|
|
74
|
-
className={cn(
|
|
75
|
-
"cursor-pointer flex-1 rounded px-2 py-1 text-xs font-medium transition-colors",
|
|
76
|
-
mode === "dodont"
|
|
77
|
-
? "bg-base text-base-contrast shadow-sm"
|
|
78
|
-
: "text-base-contrast-light hover:text-base-contrast",
|
|
79
|
-
)}
|
|
80
|
-
onClick={() => setMode("dodont")}
|
|
81
|
-
>
|
|
82
|
-
Do / Don't
|
|
83
|
-
</button>
|
|
84
|
-
</div>
|
|
85
|
-
)}
|
|
86
|
-
|
|
87
|
-
{showDoDont ? (
|
|
88
|
-
<div className="grid grid-cols-2 gap-2">
|
|
89
|
-
<button
|
|
90
|
-
type="button"
|
|
91
|
-
aria-label="Do"
|
|
92
|
-
className={cn(
|
|
93
|
-
"cursor-pointer flex flex-col items-center justify-center gap-1 rounded py-2 transition-colors",
|
|
94
|
-
"text-green-600 hover:bg-base-accent",
|
|
95
|
-
dodont === "do" && "ring-2 ring-primary bg-base-accent",
|
|
96
|
-
)}
|
|
97
|
-
onClick={() => onSelectDoDont?.("do")}
|
|
98
|
-
>
|
|
99
|
-
<Check size={20} />
|
|
100
|
-
<span className="text-xs font-medium">Do</span>
|
|
101
|
-
</button>
|
|
102
|
-
<button
|
|
103
|
-
type="button"
|
|
104
|
-
aria-label="Don't"
|
|
105
|
-
className={cn(
|
|
106
|
-
"cursor-pointer flex flex-col items-center justify-center gap-1 rounded py-2 transition-colors",
|
|
107
|
-
"text-red-600 hover:bg-base-accent",
|
|
108
|
-
dodont === "dont" && "ring-2 ring-primary bg-base-accent",
|
|
109
|
-
)}
|
|
110
|
-
onClick={() => onSelectDoDont?.("dont")}
|
|
111
|
-
>
|
|
112
|
-
<X size={20} />
|
|
113
|
-
<span className="text-xs font-medium">Don't</span>
|
|
114
|
-
</button>
|
|
115
|
-
</div>
|
|
116
|
-
) : (
|
|
117
|
-
<>
|
|
118
|
-
<div className="grid grid-cols-5 gap-1">
|
|
119
|
-
{curatedIcons.map((entry) => {
|
|
120
|
-
const Icon = entry.icon;
|
|
121
|
-
const isSelected = selected === entry.id;
|
|
122
|
-
return (
|
|
123
|
-
<button
|
|
124
|
-
key={entry.id}
|
|
125
|
-
aria-label={entry.label}
|
|
126
|
-
className={cn(
|
|
127
|
-
"cursor-pointer flex h-9 w-9 items-center justify-center rounded transition-colors",
|
|
128
|
-
"text-base-contrast-light hover:bg-base-accent hover:text-base-contrast",
|
|
129
|
-
isSelected && "ring-2 ring-primary bg-base-accent text-primary",
|
|
130
|
-
)}
|
|
131
|
-
onClick={() => onSelect(entry.id)}
|
|
132
|
-
>
|
|
133
|
-
<Icon size={18} />
|
|
134
|
-
</button>
|
|
135
|
-
);
|
|
136
|
-
})}
|
|
137
|
-
</div>
|
|
138
|
-
{showRemove && (
|
|
28
|
+
<div className="grid grid-cols-5 gap-1">
|
|
29
|
+
{curatedIcons.map((entry) => {
|
|
30
|
+
const Icon = entry.icon;
|
|
31
|
+
const isSelected = selected === entry.id;
|
|
32
|
+
return (
|
|
139
33
|
<button
|
|
140
|
-
|
|
141
|
-
|
|
34
|
+
key={entry.id}
|
|
35
|
+
aria-label={entry.label}
|
|
36
|
+
className={cn(
|
|
37
|
+
"cursor-pointer flex h-9 w-9 items-center justify-center rounded transition-colors",
|
|
38
|
+
"text-base-contrast-light hover:bg-base-accent hover:text-base-contrast",
|
|
39
|
+
isSelected && "ring-2 ring-primary bg-base-accent text-primary",
|
|
40
|
+
)}
|
|
41
|
+
onClick={() => onSelect(entry.id)}
|
|
142
42
|
>
|
|
143
|
-
|
|
43
|
+
<Icon size={18} />
|
|
144
44
|
</button>
|
|
145
|
-
)
|
|
146
|
-
|
|
45
|
+
);
|
|
46
|
+
})}
|
|
47
|
+
</div>
|
|
48
|
+
{showRemove && (
|
|
49
|
+
<button
|
|
50
|
+
className="cursor-pointer mt-2 w-full rounded px-2 py-1.5 text-center text-xs text-base-contrast-light hover:bg-base-accent hover:text-base-contrast"
|
|
51
|
+
onClick={() => onSelect(null)}
|
|
52
|
+
>
|
|
53
|
+
Remove icon
|
|
54
|
+
</button>
|
|
147
55
|
)}
|
|
148
56
|
</div>
|
|
149
57
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineSection } from "../../../lib/registry";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { Palette } from "lucide-react";
|
|
4
|
-
import { ColorItemSchema } from "
|
|
4
|
+
import { ColorItemSchema } from "./schema";
|
|
5
5
|
import Colors from "../../brandguide/Colors";
|
|
6
6
|
import { pluralize } from "../../../lib/text";
|
|
7
7
|
|
|
@@ -18,6 +18,7 @@ const schema = z.object({
|
|
|
18
18
|
|
|
19
19
|
export default defineSection({
|
|
20
20
|
type: "colors",
|
|
21
|
+
category: "brand-guide",
|
|
21
22
|
label: "Colors",
|
|
22
23
|
icon: <Palette size={18} />,
|
|
23
24
|
schema,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { HexColorSchema } from "../../../schemas/shared";
|
|
3
|
+
|
|
4
|
+
// Brand-guide color spaces (cmyk/pantone). Kept OUT of the generic schemas/shared
|
|
5
|
+
// so a core-only build does not pull brand color concepts. HexColorSchema stays
|
|
6
|
+
// generic in schemas/shared (used by site-config + audience) and is re-imported here.
|
|
7
|
+
export const ColorSpaceSchema = z.object({
|
|
8
|
+
hex: HexColorSchema.optional(),
|
|
9
|
+
rgb: z.string().optional(),
|
|
10
|
+
cmyk: z.string().optional(),
|
|
11
|
+
pantone: z.string().optional(),
|
|
12
|
+
}).refine(
|
|
13
|
+
(data) => data.hex !== undefined || data.rgb !== undefined || data.cmyk !== undefined || data.pantone !== undefined,
|
|
14
|
+
{ message: "At least one color space must be defined" },
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export type ColorSpace = z.infer<typeof ColorSpaceSchema>;
|
|
18
|
+
|
|
19
|
+
export const ColorItemSchema = z.object({
|
|
20
|
+
name: z.string().optional(),
|
|
21
|
+
spaces: z.array(ColorSpaceSchema).min(1),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export type ColorItem = z.infer<typeof ColorItemSchema>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Check, X } from "lucide-react";
|
|
2
|
+
import type { SingleMediaReference } from "../../../schemas/shared";
|
|
3
|
+
import type { LinkValue } from "../../../schemas/link";
|
|
4
|
+
import { MediaBlock } from "../Media/MediaBlock";
|
|
5
|
+
|
|
6
|
+
export interface DoDontMediaBlockProps {
|
|
7
|
+
refValue: SingleMediaReference;
|
|
8
|
+
options: { square?: boolean; showCaption?: boolean; border?: boolean; objectFit?: "cover" | "contain" };
|
|
9
|
+
link?: LinkValue;
|
|
10
|
+
dodont: "do" | "dont";
|
|
11
|
+
isEditMode: boolean;
|
|
12
|
+
onRefChange?: (ref: SingleMediaReference) => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Brand-guide composition: a do/dont badge over the generic, brand-agnostic
|
|
16
|
+
* MediaBlock. The badge (do = check/green, dont = x/red) lives here, NOT in the
|
|
17
|
+
* generic media section. */
|
|
18
|
+
export function DoDontMediaBlock({ refValue, options, link, dodont, isEditMode, onRefChange }: DoDontMediaBlockProps) {
|
|
19
|
+
return (
|
|
20
|
+
<div>
|
|
21
|
+
<div className="flex h-10 items-center justify-center pb-1">
|
|
22
|
+
{dodont === "do"
|
|
23
|
+
? <Check size={28} className="text-green-600" />
|
|
24
|
+
: <X size={28} className="text-red-600" />}
|
|
25
|
+
</div>
|
|
26
|
+
<MediaBlock
|
|
27
|
+
refValue={refValue}
|
|
28
|
+
options={options}
|
|
29
|
+
link={link}
|
|
30
|
+
isEditMode={isEditMode}
|
|
31
|
+
onRefChange={onRefChange}
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|