@orion-studios/payload-studio 0.5.0-beta.11 → 0.5.0-beta.111

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.
Files changed (77) hide show
  1. package/README.md +54 -0
  2. package/dist/admin/client.d.mts +3 -0
  3. package/dist/admin/client.d.ts +3 -0
  4. package/dist/admin/client.js +1745 -200
  5. package/dist/admin/client.mjs +1756 -214
  6. package/dist/admin/index.d.mts +2 -1
  7. package/dist/admin/index.d.ts +2 -1
  8. package/dist/admin/index.js +424 -11
  9. package/dist/admin/index.mjs +19 -1
  10. package/dist/admin-app/client.d.mts +7 -0
  11. package/dist/admin-app/client.d.ts +7 -0
  12. package/dist/admin-app/client.js +1270 -3
  13. package/dist/admin-app/client.mjs +1172 -2
  14. package/dist/admin-app/index.d.mts +1 -1
  15. package/dist/admin-app/index.d.ts +1 -1
  16. package/dist/admin-app/index.js +167 -0
  17. package/dist/admin-app/index.mjs +13 -1
  18. package/dist/admin-app/styles.css +247 -0
  19. package/dist/admin.css +8 -0
  20. package/dist/blocks/index.js +1011 -191
  21. package/dist/blocks/index.mjs +2 -2
  22. package/dist/chunk-ADIIWIYL.mjs +322 -0
  23. package/dist/{chunk-ZLLNO5FM.mjs → chunk-BET2YLAS.mjs} +104 -15
  24. package/dist/chunk-DAIZDGHL.mjs +614 -0
  25. package/dist/chunk-GKMBYYXF.mjs +776 -0
  26. package/dist/chunk-JQAHXYAM.mjs +1829 -0
  27. package/dist/chunk-OQSEJXC4.mjs +166 -0
  28. package/dist/chunk-PF3EBZXF.mjs +326 -0
  29. package/dist/chunk-ROTPP5CU.mjs +99 -0
  30. package/dist/chunk-XVH5SCBD.mjs +234 -0
  31. package/dist/chunk-ZTXJG4K5.mjs +85 -0
  32. package/dist/index-7lxTrxSG.d.mts +128 -0
  33. package/dist/index-7lxTrxSG.d.ts +128 -0
  34. package/dist/index-B7QvY3yF.d.mts +245 -0
  35. package/dist/index-BK03FiEM.d.ts +245 -0
  36. package/dist/{index-CmR6NInu.d.ts → index-BzKOThsI.d.mts} +30 -3
  37. package/dist/{index-CmR6NInu.d.mts → index-BzKOThsI.d.ts} +30 -3
  38. package/dist/{index-DbH0Ljwp.d.mts → index-D8BNfUJb.d.mts} +17 -2
  39. package/dist/{index-DbH0Ljwp.d.ts → index-DD_E2UfJ.d.ts} +17 -2
  40. package/dist/index-DUi_XND6.d.ts +193 -0
  41. package/dist/index-gLl_358v.d.mts +193 -0
  42. package/dist/index.d.mts +6 -5
  43. package/dist/index.d.ts +6 -5
  44. package/dist/index.js +2876 -460
  45. package/dist/index.mjs +12 -10
  46. package/dist/nextjs/index.d.mts +2 -1
  47. package/dist/nextjs/index.d.ts +2 -1
  48. package/dist/nextjs/index.js +497 -16
  49. package/dist/nextjs/index.mjs +8 -3
  50. package/dist/socialMedia-C05Iy-SV.d.mts +21 -0
  51. package/dist/socialMedia-C05Iy-SV.d.ts +21 -0
  52. package/dist/studio/index.d.mts +2 -1
  53. package/dist/studio/index.d.ts +2 -1
  54. package/dist/studio/index.js +171 -5
  55. package/dist/studio/index.mjs +7 -3
  56. package/dist/studio-pages/builder.css +517 -32
  57. package/dist/studio-pages/client.d.mts +75 -1
  58. package/dist/studio-pages/client.d.ts +75 -1
  59. package/dist/studio-pages/client.js +5662 -2759
  60. package/dist/studio-pages/client.mjs +5578 -2767
  61. package/dist/studio-pages/index.d.mts +4 -2
  62. package/dist/studio-pages/index.d.ts +4 -2
  63. package/dist/studio-pages/index.js +859 -71
  64. package/dist/studio-pages/index.mjs +10 -4
  65. package/package.json +35 -13
  66. package/dist/chunk-AAOHJDNS.mjs +0 -67
  67. package/dist/chunk-ETRRXURT.mjs +0 -141
  68. package/dist/chunk-J7W5EE3B.mjs +0 -278
  69. package/dist/chunk-N67KVM2S.mjs +0 -156
  70. package/dist/chunk-NESLJZFE.mjs +0 -303
  71. package/dist/chunk-U5BSPWAD.mjs +0 -1034
  72. package/dist/index-B9N5MyjF.d.mts +0 -39
  73. package/dist/index-BallJs-K.d.mts +0 -43
  74. package/dist/index-BallJs-K.d.ts +0 -43
  75. package/dist/index-DJFhANvJ.d.mts +0 -128
  76. package/dist/index-DJFhANvJ.d.ts +0 -128
  77. package/dist/index-g8tBHLKD.d.ts +0 -39
@@ -1,4 +1,10 @@
1
- import type { FC } from 'react'
1
+ import type { ComponentType, CSSProperties, FC, ReactNode } from 'react'
2
+ import type {
3
+ BuilderBlockSettingsV2,
4
+ BuilderSettingsPanelMode,
5
+ BuilderThemeTokenOverrides,
6
+ BuilderThemeTokens,
7
+ } from './builder/settings-v2'
2
8
 
3
9
  export type BuilderBlock = {
4
10
  blockType: string
@@ -12,11 +18,79 @@ export type SectionPreset = {
12
18
  blocks: BuilderBlock[]
13
19
  }
14
20
 
21
+ export type BuilderRenderWithSectionShell = (
22
+ block: {
23
+ blockType?: string
24
+ [key: string]: unknown
25
+ },
26
+ className: string,
27
+ content: ReactNode,
28
+ options?: {
29
+ inheritProjectStyles?: boolean
30
+ },
31
+ ) => ReactNode
32
+
33
+ export type BuilderInlineTextComponentProps = {
34
+ as?: 'h1' | 'h2' | 'h3' | 'p' | 'span'
35
+ className?: string
36
+ multiline?: boolean
37
+ onCommit: (value: string) => void
38
+ placeholder?: string
39
+ style?: CSSProperties
40
+ value?: string
41
+ }
42
+
43
+ export type BuilderPreviewTextFieldOptions = Omit<
44
+ BuilderInlineTextComponentProps,
45
+ 'onCommit' | 'value'
46
+ >
47
+
48
+ export type BuilderPreviewEditingHelpers = {
49
+ InlineText: ComponentType<BuilderInlineTextComponentProps>
50
+ readText: (value: unknown, fallback?: string) => string
51
+ updateArrayItemText: (
52
+ arrayField: string,
53
+ itemIndex: number,
54
+ fieldName: string,
55
+ value: string,
56
+ ) => void
57
+ updateBlockText: (fieldName: string, value: string) => void
58
+ }
59
+
60
+ export type BuilderBlockPreviewRenderArgs = {
61
+ block: {
62
+ blockType?: string
63
+ [key: string]: unknown
64
+ }
65
+ editing: BuilderPreviewEditingHelpers
66
+ index: number
67
+ renderWithSectionShell: BuilderRenderWithSectionShell
68
+ resolvedThemeTokens: BuilderThemeTokens
69
+ }
70
+
71
+ export type BuilderBlockPreviewRenderer = (args: BuilderBlockPreviewRenderArgs) => ReactNode | null
72
+
15
73
  export declare const BuilderPageEditor: FC<{
74
+ featureFlags?: {
75
+ settingsPanelV2?: boolean
76
+ }
16
77
  initialDoc?: Record<string, unknown>
17
78
  pageID: string
79
+ renderBlockPreview?: (args: BuilderBlockPreviewRenderArgs) => ReactNode | null
80
+ siteThemeTokens?: BuilderThemeTokenOverrides
18
81
  }>
19
82
 
83
+ export declare const registerBuilderBlockPreviewRenderer: (
84
+ renderer: BuilderBlockPreviewRenderer | null,
85
+ ) => void
86
+
87
+ export type {
88
+ BuilderBlockSettingsV2,
89
+ BuilderSettingsPanelMode,
90
+ BuilderThemeTokenOverrides,
91
+ BuilderThemeTokens,
92
+ }
93
+
20
94
  export declare const sectionPresets: SectionPreset[]
21
95
  export declare const templateStarterPresets: Record<string, BuilderBlock[]>
22
96
  export declare function clonePresetBlocks(blocks: BuilderBlock[]): BuilderBlock[]
@@ -1,4 +1,10 @@
1
- import type { FC } from 'react'
1
+ import type { ComponentType, CSSProperties, FC, ReactNode } from 'react'
2
+ import type {
3
+ BuilderBlockSettingsV2,
4
+ BuilderSettingsPanelMode,
5
+ BuilderThemeTokenOverrides,
6
+ BuilderThemeTokens,
7
+ } from './builder/settings-v2'
2
8
 
3
9
  export type BuilderBlock = {
4
10
  blockType: string
@@ -12,11 +18,79 @@ export type SectionPreset = {
12
18
  blocks: BuilderBlock[]
13
19
  }
14
20
 
21
+ export type BuilderRenderWithSectionShell = (
22
+ block: {
23
+ blockType?: string
24
+ [key: string]: unknown
25
+ },
26
+ className: string,
27
+ content: ReactNode,
28
+ options?: {
29
+ inheritProjectStyles?: boolean
30
+ },
31
+ ) => ReactNode
32
+
33
+ export type BuilderInlineTextComponentProps = {
34
+ as?: 'h1' | 'h2' | 'h3' | 'p' | 'span'
35
+ className?: string
36
+ multiline?: boolean
37
+ onCommit: (value: string) => void
38
+ placeholder?: string
39
+ style?: CSSProperties
40
+ value?: string
41
+ }
42
+
43
+ export type BuilderPreviewTextFieldOptions = Omit<
44
+ BuilderInlineTextComponentProps,
45
+ 'onCommit' | 'value'
46
+ >
47
+
48
+ export type BuilderPreviewEditingHelpers = {
49
+ InlineText: ComponentType<BuilderInlineTextComponentProps>
50
+ readText: (value: unknown, fallback?: string) => string
51
+ updateArrayItemText: (
52
+ arrayField: string,
53
+ itemIndex: number,
54
+ fieldName: string,
55
+ value: string,
56
+ ) => void
57
+ updateBlockText: (fieldName: string, value: string) => void
58
+ }
59
+
60
+ export type BuilderBlockPreviewRenderArgs = {
61
+ block: {
62
+ blockType?: string
63
+ [key: string]: unknown
64
+ }
65
+ editing: BuilderPreviewEditingHelpers
66
+ index: number
67
+ renderWithSectionShell: BuilderRenderWithSectionShell
68
+ resolvedThemeTokens: BuilderThemeTokens
69
+ }
70
+
71
+ export type BuilderBlockPreviewRenderer = (args: BuilderBlockPreviewRenderArgs) => ReactNode | null
72
+
15
73
  export declare const BuilderPageEditor: FC<{
74
+ featureFlags?: {
75
+ settingsPanelV2?: boolean
76
+ }
16
77
  initialDoc?: Record<string, unknown>
17
78
  pageID: string
79
+ renderBlockPreview?: (args: BuilderBlockPreviewRenderArgs) => ReactNode | null
80
+ siteThemeTokens?: BuilderThemeTokenOverrides
18
81
  }>
19
82
 
83
+ export declare const registerBuilderBlockPreviewRenderer: (
84
+ renderer: BuilderBlockPreviewRenderer | null,
85
+ ) => void
86
+
87
+ export type {
88
+ BuilderBlockSettingsV2,
89
+ BuilderSettingsPanelMode,
90
+ BuilderThemeTokenOverrides,
91
+ BuilderThemeTokens,
92
+ }
93
+
20
94
  export declare const sectionPresets: SectionPreset[]
21
95
  export declare const templateStarterPresets: Record<string, BuilderBlock[]>
22
96
  export declare function clonePresetBlocks(blocks: BuilderBlock[]): BuilderBlock[]