@drawnagency/primitives 0.1.58 → 0.1.60
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/capabilities.d.ts +16 -0
- package/dist/auth/capabilities.d.ts.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +3 -1
- package/dist/auth/types.d.ts +26 -22
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/{chunk-ICLXLWQ5.js → chunk-BT7STGDW.js} +31 -23
- package/dist/{chunk-L2JJFOXD.js → chunk-CBWK3KPV.js} +5 -1
- package/dist/{chunk-V7JN2DDU.js → chunk-ODCJQOVO.js} +1 -1
- package/dist/{chunk-AN62WPW7.js → chunk-Q5EEYBMJ.js} +8 -5
- package/dist/chunk-TZQPOR5A.js +24 -0
- package/dist/{chunk-XTK4BR27.js → chunk-UNWNT52N.js} +13 -0
- package/dist/chunk-ZGFAYZWB.js +8 -0
- package/dist/components/editor/DropEdgeIndicator.d.ts +8 -0
- package/dist/components/editor/DropEdgeIndicator.d.ts.map +1 -0
- package/dist/components/editor/PagesModal.d.ts.map +1 -1
- package/dist/components/editor/SectionOrderingModal.d.ts.map +1 -1
- package/dist/components/primitives/defineHeadingSection.d.ts +28 -0
- package/dist/components/primitives/defineHeadingSection.d.ts.map +1 -0
- package/dist/components/sections/Colors/index.d.ts.map +1 -1
- package/dist/components/sections/Container/index.d.ts.map +1 -1
- package/dist/components/sections/IconList/IconList.d.ts +1 -6
- package/dist/components/sections/IconList/IconList.d.ts.map +1 -1
- package/dist/components/sections/IconList/index.d.ts +11 -0
- package/dist/components/sections/IconList/index.d.ts.map +1 -1
- package/dist/components/sections/LinkHeading/index.d.ts.map +1 -1
- package/dist/components/sections/SubHeading/index.d.ts +0 -1
- package/dist/components/sections/SubHeading/index.d.ts.map +1 -1
- package/dist/components/sections/SubSubHeading/index.d.ts +0 -1
- package/dist/components/sections/SubSubHeading/index.d.ts.map +1 -1
- package/dist/components/sections/all-sections.d.ts +0 -2
- package/dist/components/sections/all-sections.d.ts.map +1 -1
- package/dist/components/sections/register-schemas.js +409 -420
- package/dist/components/shared/Navigation.d.ts.map +1 -1
- package/dist/components/shell/BugReportFAB.d.ts.map +1 -1
- package/dist/components/shell/EditorShell.d.ts.map +1 -1
- package/dist/hooks/useEditorPublish.d.ts.map +1 -1
- package/dist/hooks/useMediaPipeline.d.ts.map +1 -1
- package/dist/hooks/useSortableRow.d.ts +25 -0
- package/dist/hooks/useSortableRow.d.ts.map +1 -0
- package/dist/index.js +27 -24
- package/dist/lib/events.d.ts +1 -0
- package/dist/lib/events.d.ts.map +1 -1
- package/dist/lib/image-refs.d.ts +21 -0
- package/dist/lib/image-refs.d.ts.map +1 -0
- package/dist/lib/index.js +8 -7
- package/dist/lib/platform-broker.d.ts +14 -0
- package/dist/lib/platform-broker.d.ts.map +1 -0
- package/dist/lib/platform-broker.js +60 -0
- package/dist/lib/reorder.d.ts +12 -0
- package/dist/lib/reorder.d.ts.map +1 -0
- package/dist/lib/text.d.ts +2 -0
- package/dist/lib/text.d.ts.map +1 -1
- package/dist/media/index.js +3 -2
- package/dist/media/utils.d.ts.map +1 -1
- package/dist/schemas/index.js +11 -11
- package/dist/types/database.d.ts +46 -0
- package/dist/types/database.d.ts.map +1 -1
- package/package.json +6 -2
- package/src/auth/capabilities.ts +26 -0
- package/src/auth/index.ts +3 -0
- package/src/auth/types.ts +36 -26
- package/src/components/editor/DropEdgeIndicator.tsx +13 -0
- package/src/components/editor/PagesModal.tsx +12 -80
- package/src/components/editor/SectionOrderingModal.tsx +8 -78
- package/src/components/primitives/defineHeadingSection.tsx +56 -0
- package/src/components/sections/Colors/index.tsx +2 -4
- package/src/components/sections/Container/index.tsx +2 -4
- package/src/components/sections/IconList/IconList.tsx +1 -7
- package/src/components/sections/IconList/index.tsx +11 -5
- package/src/components/sections/LinkHeading/index.tsx +5 -20
- package/src/components/sections/SubHeading/index.tsx +6 -23
- package/src/components/sections/SubSubHeading/index.tsx +6 -23
- package/src/components/shared/Navigation.tsx +6 -4
- package/src/components/shell/BugReportFAB.tsx +13 -9
- package/src/components/shell/EditorShell.tsx +5 -1
- package/src/hooks/useEditorPublish.ts +71 -49
- package/src/hooks/useMediaPipeline.ts +11 -34
- package/src/hooks/useSortableRow.ts +99 -0
- package/src/lib/events.ts +1 -0
- package/src/lib/image-refs.ts +53 -0
- package/src/lib/platform-broker.ts +72 -0
- package/src/lib/reorder.ts +20 -0
- package/src/lib/text.ts +5 -0
- package/src/media/utils.ts +6 -1
- package/src/types/database.ts +41 -0
- package/dist/chunk-DKOUFIP6.js +0 -35
package/dist/chunk-DKOUFIP6.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// src/schemas/media.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var VariantSchema = z.object({
|
|
4
|
-
width: z.number().int().positive(),
|
|
5
|
-
height: z.number().int().positive(),
|
|
6
|
-
size: z.number().int().nonnegative()
|
|
7
|
-
});
|
|
8
|
-
var MediaItemSchema = z.object({
|
|
9
|
-
id: z.string(),
|
|
10
|
-
hash: z.string(),
|
|
11
|
-
kind: z.enum(["image", "animated", "video"]),
|
|
12
|
-
originalName: z.string(),
|
|
13
|
-
width: z.number().int().positive(),
|
|
14
|
-
height: z.number().int().positive(),
|
|
15
|
-
mimeType: z.string(),
|
|
16
|
-
size: z.number().int().nonnegative(),
|
|
17
|
-
folder: z.string(),
|
|
18
|
-
variants: z.array(VariantSchema),
|
|
19
|
-
alt: z.string().default("")
|
|
20
|
-
});
|
|
21
|
-
var ImageManifestSchema = z.object({
|
|
22
|
-
images: z.record(z.string(), MediaItemSchema)
|
|
23
|
-
});
|
|
24
|
-
var MediaConfigSchema = z.object({
|
|
25
|
-
sizes: z.array(z.number()).default([640, 1080, 1920]),
|
|
26
|
-
maxFileSize: z.number().default(5242880),
|
|
27
|
-
quality: z.number().min(1).max(100).default(85)
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export {
|
|
31
|
-
VariantSchema,
|
|
32
|
-
MediaItemSchema,
|
|
33
|
-
ImageManifestSchema,
|
|
34
|
-
MediaConfigSchema
|
|
35
|
-
};
|