@drawnagency/primitives 0.1.57 → 0.1.58

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/index.js CHANGED
@@ -29,13 +29,15 @@ import {
29
29
  import {
30
30
  AudienceColorSchema,
31
31
  AudienceNameSchema,
32
+ MediaGridOptionsSchema,
33
+ slugifyAudienceName
34
+ } from "./chunk-V7JN2DDU.js";
35
+ import {
32
36
  DEFAULT_LINK,
33
37
  LinkTargetSchema,
34
38
  LinkValueSchema,
35
- MediaGridOptionsSchema,
36
- isSafeHref,
37
- slugifyAudienceName
38
- } from "./chunk-PYWS3MOJ.js";
39
+ isSafeHref
40
+ } from "./chunk-ZU2MKPTG.js";
39
41
  import {
40
42
  AudienceSchema,
41
43
  RoleSchema,
@@ -44,26 +46,28 @@ import {
44
46
  } from "./chunk-LZKVV4K2.js";
45
47
  import {
46
48
  buildGoogleFontsUrl,
47
- cn,
48
49
  createEvent,
49
- curatedIcons,
50
50
  darkModeEvent,
51
51
  deriveContrast,
52
52
  editModeEvent,
53
- ensureSanitizer,
54
53
  formatTimestamp,
55
- generateNavLinks,
56
- getIcon,
57
54
  gridColsClass,
58
55
  loadSiteContent,
59
56
  loadStaticSiteContent,
60
57
  mergeSiteContent,
61
58
  navChangeEvent,
62
- safeRedirect,
59
+ safeRedirect
60
+ } from "./chunk-AN62WPW7.js";
61
+ import "./chunk-TG43X7JO.js";
62
+ import {
63
+ cn,
64
+ curatedIcons,
65
+ ensureSanitizer,
66
+ generateNavLinks,
67
+ getIcon,
63
68
  sanitizeHtml,
64
69
  toSectionId
65
- } from "./chunk-PRKUXM7E.js";
66
- import "./chunk-TG43X7JO.js";
70
+ } from "./chunk-RFZNNCAS.js";
67
71
  import {
68
72
  isSameOriginRequest,
69
73
  requireSessionSecret,
@@ -108,6 +112,7 @@ import {
108
112
  registerSchema,
109
113
  registerSection
110
114
  } from "./chunk-VKAGMEKE.js";
115
+ import "./chunk-JSBRDJBE.js";
111
116
 
112
117
  // src/storage/types.ts
113
118
  var StorageConflictError = class extends Error {
package/dist/lib/dexie.js CHANGED
@@ -1,3 +1,5 @@
1
+ import "../chunk-JSBRDJBE.js";
2
+
1
3
  // src/lib/dexie.ts
2
4
  import Dexie from "dexie";
3
5
  var EditorDatabase = class extends Dexie {
package/dist/lib/env.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  env
3
3
  } from "../chunk-WKZ7OENC.js";
4
+ import "../chunk-JSBRDJBE.js";
4
5
  export {
5
6
  env
6
7
  };
package/dist/lib/index.js CHANGED
@@ -1,25 +1,27 @@
1
1
  import {
2
2
  buildGoogleFontsUrl,
3
- cn,
4
3
  createEvent,
5
- curatedIcons,
6
4
  darkModeEvent,
7
5
  deriveContrast,
8
6
  editModeEvent,
9
- ensureSanitizer,
10
7
  formatTimestamp,
11
- generateNavLinks,
12
- getIcon,
13
8
  gridColsClass,
14
9
  loadSiteContent,
15
10
  loadStaticSiteContent,
16
11
  mergeSiteContent,
17
12
  navChangeEvent,
18
- safeRedirect,
13
+ safeRedirect
14
+ } from "../chunk-AN62WPW7.js";
15
+ import "../chunk-TG43X7JO.js";
16
+ import {
17
+ cn,
18
+ curatedIcons,
19
+ ensureSanitizer,
20
+ generateNavLinks,
21
+ getIcon,
19
22
  sanitizeHtml,
20
23
  toSectionId
21
- } from "../chunk-PRKUXM7E.js";
22
- import "../chunk-TG43X7JO.js";
24
+ } from "../chunk-RFZNNCAS.js";
23
25
  import "../chunk-S2L3BPLS.js";
24
26
  import "../chunk-ICLXLWQ5.js";
25
27
  import "../chunk-DKOUFIP6.js";
@@ -38,6 +40,7 @@ import {
38
40
  registerSchema,
39
41
  registerSection
40
42
  } from "../chunk-VKAGMEKE.js";
43
+ import "../chunk-JSBRDJBE.js";
41
44
  export {
42
45
  buildGoogleFontsUrl,
43
46
  clearRegistry,
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  upgradeLegacySection
3
3
  } from "../chunk-TG43X7JO.js";
4
+ import "../chunk-JSBRDJBE.js";
4
5
  export {
5
6
  upgradeLegacySection
6
7
  };
@@ -11,6 +11,7 @@ import {
11
11
  registerSchema,
12
12
  registerSection
13
13
  } from "../chunk-VKAGMEKE.js";
14
+ import "../chunk-JSBRDJBE.js";
14
15
  export {
15
16
  clearRegistry,
16
17
  createRegistry,
@@ -20,6 +20,7 @@ import {
20
20
  MediaItemSchema,
21
21
  VariantSchema
22
22
  } from "../chunk-DKOUFIP6.js";
23
+ import "../chunk-JSBRDJBE.js";
23
24
  export {
24
25
  EXT_TO_MIME,
25
26
  ImageManifestSchema,
@@ -4,6 +4,7 @@ import {
4
4
  SessionSchema,
5
5
  SiteUserSchema
6
6
  } from "../chunk-LZKVV4K2.js";
7
+ import "../chunk-JSBRDJBE.js";
7
8
  export {
8
9
  AudienceSchema,
9
10
  RoleSchema,
@@ -5,6 +5,7 @@ import {
5
5
  blockDepth,
6
6
  getBlockChildren
7
7
  } from "../chunk-NSCT3AMV.js";
8
+ import "../chunk-JSBRDJBE.js";
8
9
  export {
9
10
  LayoutEnvelopeSchema,
10
11
  MAX_BLOCK_DEPTH,
@@ -1,13 +1,15 @@
1
1
  import {
2
2
  AudienceColorSchema,
3
3
  AudienceNameSchema,
4
+ MediaGridOptionsSchema,
5
+ slugifyAudienceName
6
+ } from "../chunk-V7JN2DDU.js";
7
+ import {
4
8
  DEFAULT_LINK,
5
9
  LinkTargetSchema,
6
10
  LinkValueSchema,
7
- MediaGridOptionsSchema,
8
- isSafeHref,
9
- slugifyAudienceName
10
- } from "../chunk-PYWS3MOJ.js";
11
+ isSafeHref
12
+ } from "../chunk-ZU2MKPTG.js";
11
13
  import {
12
14
  AudienceSchema,
13
15
  RoleSchema,
@@ -40,6 +42,7 @@ import {
40
42
  } from "../chunk-DKOUFIP6.js";
41
43
  import "../chunk-NSCT3AMV.js";
42
44
  import "../chunk-VKAGMEKE.js";
45
+ import "../chunk-JSBRDJBE.js";
43
46
  export {
44
47
  AudienceColorSchema,
45
48
  AudienceNameSchema,
@@ -1,3 +1,5 @@
1
+ import "../chunk-JSBRDJBE.js";
2
+
1
3
  // src/types/database.ts
2
4
  var Constants = {
3
5
  graphql_public: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drawnagency/primitives",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -44,6 +44,10 @@
44
44
  "types": "./dist/lib/migrate-sections-transform.d.ts",
45
45
  "default": "./dist/lib/migrate-sections-transform.js"
46
46
  },
47
+ "./components/sections/register-schemas": {
48
+ "types": "./dist/components/sections/register-schemas.d.ts",
49
+ "default": "./dist/components/sections/register-schemas.js"
50
+ },
47
51
  "./auth": {
48
52
  "types": "./dist/auth/index.d.ts",
49
53
  "default": "./dist/auth/index.js"
@@ -1,57 +0,0 @@
1
- import {
2
- HexColorSchema
3
- } from "./chunk-ICLXLWQ5.js";
4
-
5
- // src/schemas/audience.ts
6
- import { z } from "zod";
7
- var AudienceNameSchema = z.string().min(1).max(32).regex(
8
- /^[a-z0-9]([a-z0-9_-]*[a-z0-9])?$/,
9
- "lowercase alphanumeric, dashes and underscores allowed"
10
- );
11
- var AudienceColorSchema = HexColorSchema.nullable();
12
- function slugifyAudienceName(input) {
13
- return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
14
- }
15
-
16
- // src/schemas/media-grid-options.ts
17
- import { z as z2 } from "zod";
18
- var MediaGridOptionsSchema = z2.object({
19
- square: z2.boolean().optional(),
20
- border: z2.boolean().optional(),
21
- crop: z2.boolean().optional(),
22
- showCaptions: z2.boolean().optional()
23
- }).default({});
24
-
25
- // src/schemas/link.ts
26
- import { z as z3 } from "zod";
27
- var LinkTargetSchema = z3.enum(["_self", "_blank"]);
28
- function isSafeHref(href) {
29
- const normalized = href.replace(/[\t\r\n]/g, "").trimStart();
30
- if (normalized === "") return true;
31
- if (normalized.startsWith("//")) return false;
32
- const scheme = /^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(normalized);
33
- if (!scheme) return true;
34
- const s = scheme[1].toLowerCase();
35
- return s === "http" || s === "https" || s === "mailto";
36
- }
37
- var LinkValueSchema = z3.discriminatedUnion("kind", [
38
- z3.object({ kind: z3.literal("external"), href: z3.string().refine(isSafeHref, "Unsafe href scheme"), target: LinkTargetSchema }),
39
- z3.object({
40
- kind: z3.literal("internal"),
41
- pageId: z3.string(),
42
- anchorSectionId: z3.string().nullable().optional(),
43
- target: LinkTargetSchema
44
- })
45
- ]);
46
- var DEFAULT_LINK = { kind: "external", href: "", target: "_self" };
47
-
48
- export {
49
- AudienceNameSchema,
50
- AudienceColorSchema,
51
- slugifyAudienceName,
52
- MediaGridOptionsSchema,
53
- LinkTargetSchema,
54
- isSafeHref,
55
- LinkValueSchema,
56
- DEFAULT_LINK
57
- };