@drawnagency/primitives 0.1.105 → 0.1.107
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/auth/cookies.d.ts +21 -1
- package/dist/auth/cookies.d.ts.map +1 -1
- package/dist/auth/index.d.ts +2 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +3 -1
- package/dist/auth/types.d.ts +28 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/{chunk-PTOLUMGV.js → chunk-4RNF2DRG.js} +1 -0
- package/dist/{chunk-MUTHF2GT.js → chunk-5IZ2KTMU.js} +2 -2
- package/dist/{chunk-LZKVV4K2.js → chunk-6P4CJCXB.js} +7 -1
- package/dist/{chunk-CZLYECHC.js → chunk-AB3XVXI3.js} +4 -4
- package/dist/chunk-B7VBSE5X.js +12 -0
- package/dist/{chunk-BGHWUJFV.js → chunk-BOZUEKWL.js} +107 -171
- package/dist/{chunk-TGNS7D4F.js → chunk-CPTFFLK2.js} +1 -1
- package/dist/{chunk-26ALJO4K.js → chunk-D6TLUVOP.js} +1 -1
- package/dist/{chunk-EM5DFHDZ.js → chunk-GEENI3OC.js} +13 -4
- package/dist/chunk-GGXZZ77Z.js +70 -0
- package/dist/{chunk-X4PRBGB3.js → chunk-IPKZ5FU6.js} +83 -33
- package/dist/{chunk-CXQWLG6X.js → chunk-JIQBLG6Y.js} +23 -20
- package/dist/{chunk-EWNDBKYK.js → chunk-LUAI5DWR.js} +1 -1
- package/dist/chunk-NLQ5F3RQ.js +43 -0
- package/dist/{chunk-3COSXTOY.js → chunk-XBYJQ5RS.js} +1 -1
- package/dist/{chunk-WA6QPDJI.js → chunk-ZHHJVKU7.js} +6 -6
- package/dist/collab/rebase.js +2 -1
- package/dist/components/editor/SectionOrderingModal.d.ts.map +1 -1
- package/dist/components/editor/index.js +8 -7
- package/dist/components/primitives/index.js +7 -6
- package/dist/components/sections/Container/Container.d.ts.map +1 -1
- package/dist/components/sections/brand-guide.js +8 -7
- package/dist/components/sections/register-schemas.js +13 -12
- package/dist/components/sections/register.js +13 -12
- package/dist/components/shared/Navigation.d.ts +16 -1
- package/dist/components/shared/Navigation.d.ts.map +1 -1
- package/dist/components/shared/SectionSummaryRow.d.ts +24 -0
- package/dist/components/shared/SectionSummaryRow.d.ts.map +1 -0
- package/dist/components/shell/AudienceAddForm.d.ts +4 -1
- package/dist/components/shell/AudienceAddForm.d.ts.map +1 -1
- package/dist/components/shell/AudienceDetailsPanel.d.ts +28 -0
- package/dist/components/shell/AudienceDetailsPanel.d.ts.map +1 -0
- package/dist/components/shell/AudienceRow.d.ts +15 -1
- package/dist/components/shell/AudienceRow.d.ts.map +1 -1
- package/dist/components/shell/CredentialList.d.ts +18 -0
- package/dist/components/shell/CredentialList.d.ts.map +1 -0
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/components/shell/MediaLibraryModal.d.ts.map +1 -1
- package/dist/components/shell/SectionTypePicker.d.ts.map +1 -1
- package/dist/components/shell/SiteSettingsViewerAccess.d.ts.map +1 -1
- package/dist/components/shell/ViewerLoginForm.d.ts +5 -1
- package/dist/components/shell/ViewerLoginForm.d.ts.map +1 -1
- package/dist/index.js +47 -29
- package/dist/lib/audience-overview.d.ts +53 -0
- package/dist/lib/audience-overview.d.ts.map +1 -0
- package/dist/lib/audience-secret.d.ts +11 -0
- package/dist/lib/audience-secret.d.ts.map +1 -0
- package/dist/lib/audience-secret.js +70 -0
- package/dist/lib/container-ops.d.ts.map +1 -1
- package/dist/lib/events.d.ts +3 -0
- package/dist/lib/events.d.ts.map +1 -1
- package/dist/lib/index-ops.js +3 -2
- package/dist/lib/index.js +13 -12
- package/dist/lib/insert-menu.d.ts +7 -3
- package/dist/lib/insert-menu.d.ts.map +1 -1
- package/dist/lib/nav.d.ts.map +1 -1
- package/dist/lib/thumb-views.d.ts +17 -0
- package/dist/lib/thumb-views.d.ts.map +1 -0
- package/dist/media/index.js +4 -3
- package/dist/schemas/audience.d.ts +29 -0
- package/dist/schemas/audience.d.ts.map +1 -1
- package/dist/schemas/audience.js +24 -0
- package/dist/schemas/auth.d.ts +1 -0
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/auth.js +1 -1
- package/dist/schemas/index.js +28 -12
- package/dist/schemas/site-config.d.ts +1 -1
- package/dist/schemas/site-config.d.ts.map +1 -1
- package/dist/types/database.d.ts +59 -5
- package/dist/types/database.d.ts.map +1 -1
- package/package.json +9 -1
- package/src/auth/cookies.ts +37 -4
- package/src/auth/index.ts +2 -1
- package/src/auth/types.ts +32 -0
- package/src/components/editor/SectionOrderingModal.tsx +8 -73
- package/src/components/sections/Container/Container.tsx +12 -2
- package/src/components/sections/IconList/IconList.tsx +75 -22
- package/src/components/shared/Navigation.tsx +113 -7
- package/src/components/shared/SectionSummaryRow.tsx +73 -0
- package/src/components/shell/AudienceAddForm.tsx +18 -9
- package/src/components/shell/AudienceDetailsPanel.tsx +263 -0
- package/src/components/shell/AudienceRow.tsx +55 -13
- package/src/components/shell/CredentialList.tsx +285 -0
- package/src/components/shell/EditorShell.tsx +98 -5
- package/src/components/shell/MediaLibraryModal.tsx +42 -5
- package/src/components/shell/SectionTypePicker.tsx +28 -2
- package/src/components/shell/SiteSettingsViewerAccess.tsx +57 -6
- package/src/components/shell/ViewerLoginForm.tsx +35 -15
- package/src/lib/audience-overview.ts +110 -0
- package/src/lib/audience-secret.ts +99 -0
- package/src/lib/container-ops.ts +6 -3
- package/src/lib/events.ts +3 -0
- package/src/lib/insert-menu.ts +38 -4
- package/src/lib/nav.ts +6 -2
- package/src/lib/thumb-views.ts +28 -0
- package/src/schemas/audience.ts +52 -0
- package/src/schemas/auth.ts +6 -0
- package/src/schemas/site-config.ts +1 -1
- package/src/types/database.ts +59 -5
- package/dist/chunk-ZDQ3TT47.js +0 -30
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
requireSessionSecret
|
|
3
|
+
} from "../chunk-S2L3BPLS.js";
|
|
4
|
+
import "../chunk-WKZ7OENC.js";
|
|
5
|
+
import "../chunk-JSBRDJBE.js";
|
|
6
|
+
|
|
7
|
+
// src/lib/audience-secret.ts
|
|
8
|
+
var INFO = "drawnagency:audience-password:v1";
|
|
9
|
+
var VERSION = "v1";
|
|
10
|
+
var IV_BYTES = 12;
|
|
11
|
+
var enc = new TextEncoder();
|
|
12
|
+
var dec = new TextDecoder();
|
|
13
|
+
function toBase64Url(bytes) {
|
|
14
|
+
let binary = "";
|
|
15
|
+
for (const b of bytes) binary += String.fromCharCode(b);
|
|
16
|
+
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
17
|
+
}
|
|
18
|
+
function fromBase64Url(value) {
|
|
19
|
+
const padded = value.replace(/-/g, "+").replace(/_/g, "/");
|
|
20
|
+
const binary = atob(padded + "=".repeat((4 - padded.length % 4) % 4));
|
|
21
|
+
const bytes = new Uint8Array(binary.length);
|
|
22
|
+
for (let i = 0; i < binary.length; i++) bytes[i] = binary.charCodeAt(i);
|
|
23
|
+
return bytes;
|
|
24
|
+
}
|
|
25
|
+
async function deriveKey() {
|
|
26
|
+
const base = await crypto.subtle.importKey(
|
|
27
|
+
"raw",
|
|
28
|
+
requireSessionSecret(),
|
|
29
|
+
"HKDF",
|
|
30
|
+
false,
|
|
31
|
+
["deriveKey"]
|
|
32
|
+
);
|
|
33
|
+
return crypto.subtle.deriveKey(
|
|
34
|
+
{ name: "HKDF", hash: "SHA-256", salt: new Uint8Array(0), info: enc.encode(INFO) },
|
|
35
|
+
base,
|
|
36
|
+
{ name: "AES-GCM", length: 256 },
|
|
37
|
+
false,
|
|
38
|
+
["encrypt", "decrypt"]
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
async function sealAudiencePassword(password) {
|
|
42
|
+
const iv = crypto.getRandomValues(new Uint8Array(IV_BYTES));
|
|
43
|
+
const ciphertext = await crypto.subtle.encrypt(
|
|
44
|
+
{ name: "AES-GCM", iv },
|
|
45
|
+
await deriveKey(),
|
|
46
|
+
enc.encode(password)
|
|
47
|
+
);
|
|
48
|
+
return `${VERSION}.${toBase64Url(iv)}.${toBase64Url(new Uint8Array(ciphertext))}`;
|
|
49
|
+
}
|
|
50
|
+
async function openAudiencePassword(sealed) {
|
|
51
|
+
if (!sealed) return null;
|
|
52
|
+
const parts = sealed.split(".");
|
|
53
|
+
if (parts.length !== 3 || parts[0] !== VERSION) return null;
|
|
54
|
+
try {
|
|
55
|
+
const iv = fromBase64Url(parts[1]);
|
|
56
|
+
if (iv.byteLength !== IV_BYTES) return null;
|
|
57
|
+
const plain = await crypto.subtle.decrypt(
|
|
58
|
+
{ name: "AES-GCM", iv },
|
|
59
|
+
await deriveKey(),
|
|
60
|
+
fromBase64Url(parts[2])
|
|
61
|
+
);
|
|
62
|
+
return dec.decode(plain);
|
|
63
|
+
} catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
openAudiencePassword,
|
|
69
|
+
sealAudiencePassword
|
|
70
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-ops.d.ts","sourceRoot":"","sources":["../../src/lib/container-ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"container-ops.d.ts","sourceRoot":"","sources":["../../src/lib/container-ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAYnD,qEAAqE;AACrE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,CAG9D;AAWD,wBAAgB,YAAY,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,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O,CAiBT"}
|
package/dist/lib/events.d.ts
CHANGED
|
@@ -34,4 +34,7 @@ export declare const editorDirtyEvent: TypedEvent<{
|
|
|
34
34
|
}>;
|
|
35
35
|
export declare const siteNavChangeEvent: TypedEvent<SiteNav>;
|
|
36
36
|
export declare const pageSelectEvent: TypedEvent<string>;
|
|
37
|
+
/** Nav → EditorShell: open the Audience Details surface inside the editor, so
|
|
38
|
+
* editors keep the toolbar instead of navigating out to the /audiences route. */
|
|
39
|
+
export declare const audienceDetailsEvent: TypedEvent<void>;
|
|
37
40
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/lib/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/lib/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE9C,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;CACnD;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAW1D;AAED,eAAO,MAAM,aAAa;gBAA6B,OAAO;EAAqB,CAAC;AACpF,eAAO,MAAM,cAAc,uBAA0C,CAAC;AACtE,eAAO,MAAM,aAAa,oBAAsC,CAAC;AACjE,eAAO,MAAM,mBAAmB,oBAAwC,CAAC;AACzE,eAAO,MAAM,kBAAkB;SAAsB,MAAM;UAAQ,MAAM;EAAqB,CAAC;AAC/F;;2EAE2E;AAC3E,eAAO,MAAM,mBAAmB;SAAsB,MAAM;UAAQ,MAAM;EAAsB,CAAC;AACjG;;4BAE4B;AAC5B,eAAO,MAAM,yBAAyB;aAA0B,MAAM;EAA6B,CAA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{
|
|
|
11
11
|
setGroupStartCollapsed,
|
|
12
12
|
slugifyPageSlug,
|
|
13
13
|
uniquePageSlug
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-CPTFFLK2.js";
|
|
15
15
|
import {
|
|
16
16
|
IndexSchema,
|
|
17
17
|
PageStatusSchema,
|
|
18
18
|
RESERVED_SLUGS,
|
|
19
19
|
SLUG_RE
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-BOZUEKWL.js";
|
|
21
21
|
import "../chunk-FM4M4Q2W.js";
|
|
22
|
+
import "../chunk-GGXZZ77Z.js";
|
|
22
23
|
import "../chunk-JSBRDJBE.js";
|
|
23
24
|
|
|
24
25
|
// src/lib/index-ops.ts
|
package/dist/lib/index.js
CHANGED
|
@@ -18,14 +18,8 @@ import {
|
|
|
18
18
|
safeRedirect,
|
|
19
19
|
suggestAccessibleOn,
|
|
20
20
|
wcagLevel
|
|
21
|
-
} from "../chunk-
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import {
|
|
24
|
-
ensureSanitizer,
|
|
25
|
-
generateNavLinks,
|
|
26
|
-
sanitizeHtml,
|
|
27
|
-
toSectionId
|
|
28
|
-
} from "../chunk-72CG6AA2.js";
|
|
21
|
+
} from "../chunk-AB3XVXI3.js";
|
|
22
|
+
import "../chunk-5BM2Y3NJ.js";
|
|
29
23
|
import {
|
|
30
24
|
curatedIcons,
|
|
31
25
|
getIcon
|
|
@@ -35,10 +29,17 @@ import {
|
|
|
35
29
|
darkModeEvent,
|
|
36
30
|
editModeEvent,
|
|
37
31
|
navChangeEvent
|
|
38
|
-
} from "../chunk-
|
|
32
|
+
} from "../chunk-4RNF2DRG.js";
|
|
33
|
+
import {
|
|
34
|
+
ensureSanitizer,
|
|
35
|
+
generateNavLinks,
|
|
36
|
+
sanitizeHtml,
|
|
37
|
+
toSectionId
|
|
38
|
+
} from "../chunk-72CG6AA2.js";
|
|
39
39
|
import {
|
|
40
40
|
cn
|
|
41
41
|
} from "../chunk-7EOSDFS3.js";
|
|
42
|
+
import "../chunk-S2L3BPLS.js";
|
|
42
43
|
import {
|
|
43
44
|
env
|
|
44
45
|
} from "../chunk-WKZ7OENC.js";
|
|
@@ -49,8 +50,7 @@ import {
|
|
|
49
50
|
navEntries,
|
|
50
51
|
pagesInNavOrder,
|
|
51
52
|
reconcileNav
|
|
52
|
-
} from "../chunk-
|
|
53
|
-
import "../chunk-5BM2Y3NJ.js";
|
|
53
|
+
} from "../chunk-CPTFFLK2.js";
|
|
54
54
|
import "../chunk-REDDTTGJ.js";
|
|
55
55
|
import "../chunk-TZQPOR5A.js";
|
|
56
56
|
import {
|
|
@@ -64,8 +64,9 @@ import {
|
|
|
64
64
|
registerSchema,
|
|
65
65
|
registerSection
|
|
66
66
|
} from "../chunk-VKAGMEKE.js";
|
|
67
|
-
import "../chunk-
|
|
67
|
+
import "../chunk-BOZUEKWL.js";
|
|
68
68
|
import "../chunk-FM4M4Q2W.js";
|
|
69
|
+
import "../chunk-GGXZZ77Z.js";
|
|
69
70
|
import "../chunk-NSCT3AMV.js";
|
|
70
71
|
import "../chunk-JSBRDJBE.js";
|
|
71
72
|
export {
|
|
@@ -9,9 +9,13 @@ export interface InsertMenuOption {
|
|
|
9
9
|
label: string;
|
|
10
10
|
icon?: ReactNode;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* sections
|
|
14
|
-
|
|
12
|
+
/** Sort insert-menu entries into `INSERT_MENU_ORDER`, with unlisted entries
|
|
13
|
+
* (custom sections) alphabetical by label at the end. Pure; returns a copy. */
|
|
14
|
+
export declare function sortInsertMenuOptions<T extends InsertMenuOption>(options: T[]): T[];
|
|
15
|
+
/** Every non-spacer section type, plus presets contributed by registered
|
|
16
|
+
* sections, in `INSERT_MENU_ORDER`. Presets appear only when their owning
|
|
17
|
+
* section is registered, so a core-only build (no brand-guide sections) shows
|
|
18
|
+
* no brand-guide presets. */
|
|
15
19
|
export declare function buildInsertMenuOptions(sections: SectionDefinition[]): InsertMenuOption[];
|
|
16
20
|
/** Resolve an Add-menu selection to ready-to-insert content. `newId` mints ids for
|
|
17
21
|
* any nested children a preset creates. Returns null for an unknown type/preset. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insert-menu.d.ts","sourceRoot":"","sources":["../../src/lib/insert-menu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wEAAwE;AACxE,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED
|
|
1
|
+
{"version":3,"file":"insert-menu.d.ts","sourceRoot":"","sources":["../../src/lib/insert-menu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,wEAAwE;AACxE,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,8EAA8E;AAC9E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAsBD;gFACgF;AAChF,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,gBAAgB,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CASnF;AAED;;;8BAG8B;AAC9B,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GA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AkB,kBAAkB,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CAAC,GAAG,YAAY,GAAG,eAAe,CAAC;AAE7F,MAAM,WAAW,OAAO;IACtB,+DAA+D;IAC/D,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,iFAAiF;IACjF,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAMD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,KAAK,EAAE,SAAS,CAAC;IACjB,cAAc,EAAE,aAAa,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B;;;;;2BAKuB;IACvB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC5B,GAAG,OAAO,CAkEV"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Thumbnail } from "./registry";
|
|
2
|
+
import type { MediaManifest } from "../media/types";
|
|
3
|
+
/**
|
|
4
|
+
* A section thumbnail with its media reference already resolved to a URL, so the
|
|
5
|
+
* component rendering it needs neither the registry nor the media provider. The
|
|
6
|
+
* Audience Details page resolves these server-side for exactly that reason.
|
|
7
|
+
*/
|
|
8
|
+
export type ThumbView = {
|
|
9
|
+
kind: "color";
|
|
10
|
+
value: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "image";
|
|
13
|
+
src: string | null;
|
|
14
|
+
alt: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function toThumbViews(thumbnails: Thumbnail[], manifest: MediaManifest): ThumbView[];
|
|
17
|
+
//# sourceMappingURL=thumb-views.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thumb-views.d.ts","sourceRoot":"","sources":["../../src/lib/thumb-views.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAUvD,wBAAgB,YAAY,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,aAAa,GAAG,SAAS,EAAE,CAM1F"}
|
package/dist/media/index.js
CHANGED
|
@@ -18,16 +18,17 @@ import {
|
|
|
18
18
|
resolveMedia,
|
|
19
19
|
sanitizeMediaName,
|
|
20
20
|
setMediaProvider
|
|
21
|
-
} from "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
} from "../chunk-XBYJQ5RS.js";
|
|
22
|
+
import "../chunk-CPTFFLK2.js";
|
|
23
23
|
import {
|
|
24
24
|
ImageManifestSchema,
|
|
25
25
|
MediaConfigSchema,
|
|
26
26
|
MediaFolderSchema,
|
|
27
27
|
MediaItemSchema,
|
|
28
28
|
VariantSchema
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-BOZUEKWL.js";
|
|
30
30
|
import "../chunk-FM4M4Q2W.js";
|
|
31
|
+
import "../chunk-GGXZZ77Z.js";
|
|
31
32
|
import "../chunk-JSBRDJBE.js";
|
|
32
33
|
export {
|
|
33
34
|
BAKED_MEDIA_KEYS,
|
|
@@ -3,6 +3,35 @@ export declare const AudienceNameSchema: z.ZodString;
|
|
|
3
3
|
export declare const AudienceColorSchema: z.ZodNullable<z.ZodString>;
|
|
4
4
|
export type AudienceName = z.infer<typeof AudienceNameSchema>;
|
|
5
5
|
export type AudienceColor = z.infer<typeof AudienceColorSchema>;
|
|
6
|
+
/**
|
|
7
|
+
* A viewer sign-in name. Looser than an audience slug — dots are allowed, so
|
|
8
|
+
* `agency.jane` works — but still constrained enough to be typed correctly over
|
|
9
|
+
* the phone. Always lowercased before storage and lookup, so `Agency2` and
|
|
10
|
+
* `agency2` are the same login.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ViewerUsernameSchema: z.ZodString;
|
|
13
|
+
/** Normalize a typed username for storage and lookup. */
|
|
14
|
+
export declare function normalizeUsername(input: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Wire-facing username: lowercased and trimmed BEFORE validation, so `Agency4`
|
|
17
|
+
* is accepted and stored as `agency4` rather than 400-ing on a case difference.
|
|
18
|
+
* Everything else the base schema rejects still fails.
|
|
19
|
+
*/
|
|
20
|
+
export declare const NormalizedUsernameSchema: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
21
|
+
/** Minimum for a NEW credential password. Deliberately stricter than the
|
|
22
|
+
* audience passwords it replaces (which allowed a single character). */
|
|
23
|
+
export declare const VIEWER_PASSWORD_MIN_LENGTH = 8;
|
|
24
|
+
export declare const ViewerPasswordSchema: z.ZodString;
|
|
25
|
+
/** A credential as it travels to the editor and the Audience Details page.
|
|
26
|
+
* Never carries the hash or the sealed copy. */
|
|
27
|
+
export declare const ViewerCredentialSchema: z.ZodObject<{
|
|
28
|
+
username: z.ZodString;
|
|
29
|
+
label: z.ZodNullable<z.ZodString>;
|
|
30
|
+
audienceName: z.ZodString;
|
|
31
|
+
createdAt: z.ZodString;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type ViewerUsername = z.infer<typeof ViewerUsernameSchema>;
|
|
34
|
+
export type ViewerCredential = z.infer<typeof ViewerCredentialSchema>;
|
|
6
35
|
/**
|
|
7
36
|
* Convert a friendly display string into an audience slug.
|
|
8
37
|
* Lowercases, replaces non-alphanumeric runs with single dashes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../../src/schemas/audience.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB,aAO5B,CAAC;AAEJ,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
1
|
+
{"version":3,"file":"audience.d.ts","sourceRoot":"","sources":["../../src/schemas/audience.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB,aAO5B,CAAC;AAEJ,eAAO,MAAM,mBAAmB,4BAA4B,CAAC;AAE7D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,aAO9B,CAAC;AAEJ,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,gFAKR,CAAC;AAE9B;yEACyE;AACzE,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,eAAO,MAAM,oBAAoB,aAA6C,CAAC;AAE/E;iDACiD;AACjD,eAAO,MAAM,sBAAsB;;;;;iBAMjC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AudienceColorSchema,
|
|
3
|
+
AudienceNameSchema,
|
|
4
|
+
NormalizedUsernameSchema,
|
|
5
|
+
VIEWER_PASSWORD_MIN_LENGTH,
|
|
6
|
+
ViewerCredentialSchema,
|
|
7
|
+
ViewerPasswordSchema,
|
|
8
|
+
ViewerUsernameSchema,
|
|
9
|
+
normalizeUsername,
|
|
10
|
+
slugifyAudienceName
|
|
11
|
+
} from "../chunk-NLQ5F3RQ.js";
|
|
12
|
+
import "../chunk-GGXZZ77Z.js";
|
|
13
|
+
import "../chunk-JSBRDJBE.js";
|
|
14
|
+
export {
|
|
15
|
+
AudienceColorSchema,
|
|
16
|
+
AudienceNameSchema,
|
|
17
|
+
NormalizedUsernameSchema,
|
|
18
|
+
VIEWER_PASSWORD_MIN_LENGTH,
|
|
19
|
+
ViewerCredentialSchema,
|
|
20
|
+
ViewerPasswordSchema,
|
|
21
|
+
ViewerUsernameSchema,
|
|
22
|
+
normalizeUsername,
|
|
23
|
+
slugifyAudienceName
|
|
24
|
+
};
|
package/dist/schemas/auth.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare const AudienceSchema: z.ZodObject<{
|
|
|
28
28
|
readonly: z.ZodBoolean;
|
|
29
29
|
hasPassword: z.ZodBoolean;
|
|
30
30
|
isDefault: z.ZodBoolean;
|
|
31
|
+
credentialCount: z.ZodDefault<z.ZodNumber>;
|
|
31
32
|
}, z.core.$strip>;
|
|
32
33
|
export type Session = z.infer<typeof SessionSchema>;
|
|
33
34
|
export type SiteUser = z.infer<typeof SiteUserSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU;;;EAA8B,CAAC;AAEtD,eAAO,MAAM,aAAa;;;;;;;;iBAKxB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;iBAKzB,CAAC;AAEH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU;;;EAA8B,CAAC;AAEtD,eAAO,MAAM,aAAa;;;;;;;;iBAKxB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;iBAKzB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;iBAazB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}
|
package/dist/schemas/auth.js
CHANGED
package/dist/schemas/index.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
MediaGridOptionsSchema,
|
|
5
|
-
slugifyAudienceName
|
|
6
|
-
} from "../chunk-ZDQ3TT47.js";
|
|
2
|
+
MediaGridOptionsSchema
|
|
3
|
+
} from "../chunk-B7VBSE5X.js";
|
|
7
4
|
import {
|
|
8
5
|
AudienceSchema,
|
|
9
6
|
RoleSchema,
|
|
10
7
|
SessionSchema,
|
|
11
8
|
SiteUserSchema
|
|
12
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-6P4CJCXB.js";
|
|
10
|
+
import {
|
|
11
|
+
AudienceColorSchema,
|
|
12
|
+
AudienceNameSchema,
|
|
13
|
+
NormalizedUsernameSchema,
|
|
14
|
+
VIEWER_PASSWORD_MIN_LENGTH,
|
|
15
|
+
ViewerCredentialSchema,
|
|
16
|
+
ViewerPasswordSchema,
|
|
17
|
+
ViewerUsernameSchema,
|
|
18
|
+
normalizeUsername,
|
|
19
|
+
slugifyAudienceName
|
|
20
|
+
} from "../chunk-NLQ5F3RQ.js";
|
|
13
21
|
import {
|
|
14
22
|
DEFAULT_LINK,
|
|
15
23
|
LinkTargetSchema,
|
|
@@ -40,27 +48,29 @@ import "../chunk-VKAGMEKE.js";
|
|
|
40
48
|
import {
|
|
41
49
|
ChatbotConfigSchema,
|
|
42
50
|
ChatbotTaskSchema,
|
|
43
|
-
FontNameSchema,
|
|
44
|
-
HexColorSchema,
|
|
45
51
|
ImageManifestSchema,
|
|
46
52
|
IndexSchema,
|
|
47
53
|
MediaConfigSchema,
|
|
48
54
|
MediaFolderSchema,
|
|
49
55
|
MediaItemSchema,
|
|
50
|
-
MediaReferenceSchema,
|
|
51
56
|
PageSchema,
|
|
52
57
|
PageStatusSchema,
|
|
53
58
|
RESERVED_SLUGS,
|
|
54
59
|
SLUG_RE,
|
|
55
60
|
SectionMetaSchema,
|
|
56
|
-
SingleMediaReferenceSchema,
|
|
57
61
|
SiteConfigSchema,
|
|
58
62
|
StatusSchema,
|
|
59
|
-
TextLineSchema,
|
|
60
63
|
VariantSchema,
|
|
61
64
|
normalizeSiteIndex
|
|
62
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-BOZUEKWL.js";
|
|
63
66
|
import "../chunk-FM4M4Q2W.js";
|
|
67
|
+
import {
|
|
68
|
+
FontNameSchema,
|
|
69
|
+
HexColorSchema,
|
|
70
|
+
MediaReferenceSchema,
|
|
71
|
+
SingleMediaReferenceSchema,
|
|
72
|
+
TextLineSchema
|
|
73
|
+
} from "../chunk-GGXZZ77Z.js";
|
|
64
74
|
import "../chunk-NSCT3AMV.js";
|
|
65
75
|
import "../chunk-JSBRDJBE.js";
|
|
66
76
|
export {
|
|
@@ -90,6 +100,7 @@ export {
|
|
|
90
100
|
MediaReferenceSchema,
|
|
91
101
|
NavEntrySchema,
|
|
92
102
|
NavFileSchema,
|
|
103
|
+
NormalizedUsernameSchema,
|
|
93
104
|
PageSchema,
|
|
94
105
|
PageStatusSchema,
|
|
95
106
|
RESERVED_SLUGS,
|
|
@@ -102,7 +113,11 @@ export {
|
|
|
102
113
|
SiteUserSchema,
|
|
103
114
|
StatusSchema,
|
|
104
115
|
TextLineSchema,
|
|
116
|
+
VIEWER_PASSWORD_MIN_LENGTH,
|
|
105
117
|
VariantSchema,
|
|
118
|
+
ViewerCredentialSchema,
|
|
119
|
+
ViewerPasswordSchema,
|
|
120
|
+
ViewerUsernameSchema,
|
|
106
121
|
documentBucketPath,
|
|
107
122
|
documentFileUrl,
|
|
108
123
|
documentGitPath,
|
|
@@ -110,5 +125,6 @@ export {
|
|
|
110
125
|
getSectionSchema,
|
|
111
126
|
isSafeHref,
|
|
112
127
|
normalizeSiteIndex,
|
|
128
|
+
normalizeUsername,
|
|
113
129
|
slugifyAudienceName
|
|
114
130
|
};
|
|
@@ -17,7 +17,7 @@ export declare const SectionMetaSchema: z.ZodObject<{
|
|
|
17
17
|
access: z.ZodArray<z.ZodString>;
|
|
18
18
|
}, z.core.$strip>;
|
|
19
19
|
export type SectionMeta = z.infer<typeof SectionMetaSchema>;
|
|
20
|
-
export declare const RESERVED_SLUGS: readonly ["edit", "api", "login", "set-password", "404", "present", "print"];
|
|
20
|
+
export declare const RESERVED_SLUGS: readonly ["edit", "api", "login", "set-password", "404", "present", "print", "audiences"];
|
|
21
21
|
export declare const PageStatusSchema: z.ZodEnum<{
|
|
22
22
|
live: "live";
|
|
23
23
|
archived: "archived";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../src/schemas/site-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,YAAY;;;;;+FAExB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;iBAI5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../src/schemas/site-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,YAAY;;;;;+FAExB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;iBAI5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAQ5D,eAAO,MAAM,cAAc,2FAA4F,CAAC;AAWxH,eAAO,MAAM,gBAAgB;;;EAA+B,CAAC;AAE7D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAI9C,eAAO,MAAM,OAAO,QAA+B,CAAC;AAwCpD,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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705
|
+
audience_id: string;
|
|
706
|
+
created_at: string;
|
|
707
|
+
id: string;
|
|
708
|
+
label: string | null;
|
|
709
|
+
password_cipher: string | null;
|
|
710
|
+
password_hash: string;
|
|
711
|
+
site_id: string;
|
|
712
|
+
username: string;
|
|
713
|
+
};
|
|
714
|
+
Insert: {
|
|
715
|
+
audience_id: string;
|
|
716
|
+
created_at?: string;
|
|
717
|
+
id?: string;
|
|
718
|
+
label?: string | null;
|
|
719
|
+
password_cipher?: string | null;
|
|
720
|
+
password_hash: string;
|
|
721
|
+
site_id: string;
|
|
722
|
+
username: string;
|
|
723
|
+
};
|
|
724
|
+
Update: {
|
|
725
|
+
audience_id?: string;
|
|
726
|
+
created_at?: string;
|
|
727
|
+
id?: string;
|
|
728
|
+
label?: string | null;
|
|
729
|
+
password_cipher?: string | null;
|
|
730
|
+
password_hash?: string;
|
|
731
|
+
site_id?: string;
|
|
732
|
+
username?: string;
|
|
733
|
+
};
|
|
734
|
+
Relationships: [
|
|
735
|
+
{
|
|
736
|
+
foreignKeyName: "viewer_credentials_audience_id_fkey";
|
|
737
|
+
columns: ["audience_id"];
|
|
738
|
+
isOneToOne: false;
|
|
739
|
+
referencedRelation: "viewer_audiences";
|
|
740
|
+
referencedColumns: ["id"];
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
foreignKeyName: "viewer_credentials_site_id_fkey";
|
|
744
|
+
columns: ["site_id"];
|
|
745
|
+
isOneToOne: false;
|
|
746
|
+
referencedRelation: "sites";
|
|
747
|
+
referencedColumns: ["id"];
|
|
748
|
+
}
|
|
749
|
+
];
|
|
750
|
+
};
|
|
703
751
|
};
|
|
704
752
|
Views: {
|
|
705
753
|
[_ in never]: never;
|
|
@@ -719,6 +767,12 @@ export type Database = {
|
|
|
719
767
|
site_id: string;
|
|
720
768
|
user_id: string;
|
|
721
769
|
}[];
|
|
770
|
+
SetofOptions: {
|
|
771
|
+
from: "*";
|
|
772
|
+
to: "editor_locks";
|
|
773
|
+
isOneToOne: false;
|
|
774
|
+
isSetofReturn: true;
|
|
775
|
+
};
|
|
722
776
|
};
|
|
723
777
|
chat_usage_hit: {
|
|
724
778
|
Args: {
|
|
@@ -741,9 +795,9 @@ export type Database = {
|
|
|
741
795
|
p_site_id: string;
|
|
742
796
|
};
|
|
743
797
|
Returns: {
|
|
744
|
-
created_at: string
|
|
798
|
+
created_at: string;
|
|
745
799
|
email: string;
|
|
746
|
-
last_sign_in_at: string
|
|
800
|
+
last_sign_in_at: string;
|
|
747
801
|
role: string;
|
|
748
802
|
user_id: string;
|
|
749
803
|
}[];
|
|
@@ -798,10 +852,10 @@ export type Database = {
|
|
|
798
852
|
p_token_hash: string;
|
|
799
853
|
};
|
|
800
854
|
Returns: {
|
|
855
|
+
client_id: string;
|
|
856
|
+
family_id: string;
|
|
857
|
+
platform_user_id: string;
|
|
801
858
|
status: string;
|
|
802
|
-
family_id: string | null;
|
|
803
|
-
client_id: string | null;
|
|
804
|
-
platform_user_id: string | null;
|
|
805
859
|
}[];
|
|
806
860
|
};
|
|
807
861
|
provision_claim: {
|