@measured/puck 0.21.0-canary.eb8ea5ce → 0.21.0-canary.ed10e2a4

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.d.ts CHANGED
@@ -1,23 +1,8 @@
1
- import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as RichtextField, i as Field, j as FieldProps, D as DropZoneProps, k as Data, l as OnAction, n as InitialHistory, o as ItemSelector } from './walk-tree-Ja9bNCM9.js';
2
- export { af as Adaptor, ad as ArrayField, G as ArrayState, at as AsFieldProps, Z as BaseData, a7 as BaseField, ah as CacheOpts, L as ComponentConfigExtensions, Y as ComponentConfigParams, a2 as ComponentDataMap, a0 as ComponentDataOptionalId, a5 as ComponentMetadata, X as ConfigParams, a3 as Content, ak as CustomField, aj as CustomFieldRender, aq as DefaultComponentProps, Q as DefaultComponents, an as DefaultRootFieldProps, ap as DefaultRootProps, ao as DefaultRootRenderProps, q as Direction, s as DragAxis, ai as ExternalField, ag as ExternalFieldWithAdaptor, T as ExtractConfigParams, av as ExtractField, a6 as FieldMetadata, B as FieldRenderFunctions, x as FieldTransformFn, v as FieldTransformFnParams, E as ItemWithId, a1 as MappedItem, a9 as NumberField, ae as ObjectField, z as OverrideKey, K as PuckComponent, am as PuckContext, a4 as PuckMetadata, ac as RadioField, p as RichText, N as RootConfig, $ as RootData, _ as RootDataWithoutProps, ab as SelectField, S as Slot, J as SlotComponent, al as SlotField, a8 as TextField, aa as TextareaField, u as Viewport, au as WithChildren, ar as WithId, as as WithPuckProps, W as WithSlotProps, m as migrate, y as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Ja9bNCM9.js';
1
+ import { H as History, P as Permissions, a as ComponentData, C as Config, U as UserGenerics, F as Fields, b as PuckAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, O as Overrides, V as Viewports, I as IframeConfig, e as UiState, f as ComponentConfig, A as AppState, M as Metadata, g as FieldTransforms, h as Field, i as FieldProps, D as DropZoneProps, j as Data, k as OnAction, l as InitialHistory, n as ItemSelector } from './walk-tree-CgWnYC1X.js';
2
+ export { ad as Adaptor, ab as ArrayField, B as ArrayState, ar as AsFieldProps, X as BaseData, a5 as BaseField, af as CacheOpts, J as ComponentConfigExtensions, T as ComponentConfigParams, a0 as ComponentDataMap, _ as ComponentDataOptionalId, a3 as ComponentMetadata, Q as ConfigParams, a1 as Content, ai as CustomField, ah as CustomFieldRender, ao as DefaultComponentProps, L as DefaultComponents, al as DefaultRootFieldProps, an as DefaultRootProps, am as DefaultRootRenderProps, o as Direction, p as DragAxis, ag as ExternalField, ae as ExternalFieldWithAdaptor, N as ExtractConfigParams, at as ExtractField, a4 as FieldMetadata, y as FieldRenderFunctions, u as FieldTransformFn, s as FieldTransformFnParams, z as ItemWithId, $ as MappedItem, a7 as NumberField, ac as ObjectField, x as OverrideKey, G as PuckComponent, ak as PuckContext, a2 as PuckMetadata, aa as RadioField, K as RootConfig, Z as RootData, Y as RootDataWithoutProps, a9 as SelectField, S as Slot, E as SlotComponent, aj as SlotField, a6 as TextField, a8 as TextareaField, q as Viewport, as as WithChildren, ap as WithId, aq as WithPuckProps, W as WithSlotProps, m as migrate, v as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-CgWnYC1X.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import react__default, { ReactNode, SyntheticEvent, ReactElement } from 'react';
6
- import { Editor } from '@tiptap/react';
7
- import '@tiptap/extension-blockquote';
8
- import '@tiptap/extension-bold';
9
- import '@tiptap/extension-code';
10
- import '@tiptap/extension-code-block';
11
- import '@tiptap/extension-hard-break';
12
- import '@tiptap/extension-heading';
13
- import '@tiptap/extension-horizontal-rule';
14
- import '@tiptap/extension-italic';
15
- import '@tiptap/extension-link';
16
- import '@tiptap/extension-list';
17
- import '@tiptap/extension-paragraph';
18
- import '@tiptap/extension-strike';
19
- import '@tiptap/extension-text-align';
20
- import '@tiptap/extension-underline';
21
6
 
22
7
  type HistorySlice<D = any> = {
23
8
  index: number;
@@ -122,13 +107,6 @@ type AppStore<UserConfig extends Config = Config, G extends UserGenerics<UserCon
122
107
  nodes: NodesSlice;
123
108
  permissions: PermissionsSlice;
124
109
  fieldTransforms: FieldTransforms;
125
- currentRichText?: {
126
- inlineComponentId?: string;
127
- inline: boolean;
128
- field: RichtextField;
129
- editor: Editor;
130
- id: string;
131
- } | null;
132
110
  };
133
111
 
134
112
  declare const ActionBar: {
@@ -136,12 +114,10 @@ declare const ActionBar: {
136
114
  label?: string;
137
115
  children?: ReactNode;
138
116
  }): react_jsx_runtime.JSX.Element;
139
- Action: ({ children, label, onClick, active, disabled, }: {
117
+ Action: ({ children, label, onClick, }: {
140
118
  children: ReactNode;
141
119
  label?: string;
142
120
  onClick: (e: SyntheticEvent) => void;
143
- active?: boolean;
144
- disabled?: boolean;
145
121
  }) => react_jsx_runtime.JSX.Element;
146
122
  Label: ({ label }: {
147
123
  label: string;
@@ -149,14 +125,11 @@ declare const ActionBar: {
149
125
  Group: ({ children }: {
150
126
  children: ReactNode;
151
127
  }) => react_jsx_runtime.JSX.Element;
152
- Separator: () => react_jsx_runtime.JSX.Element;
153
128
  };
154
- declare const Action: ({ children, label, onClick, active, disabled, }: {
129
+ declare const Action: ({ children, label, onClick, }: {
155
130
  children: ReactNode;
156
131
  label?: string;
157
132
  onClick: (e: SyntheticEvent) => void;
158
- active?: boolean;
159
- disabled?: boolean;
160
133
  }) => react_jsx_runtime.JSX.Element;
161
134
  declare const Group: ({ children }: {
162
135
  children: ReactNode;
@@ -164,7 +137,6 @@ declare const Group: ({ children }: {
164
137
  declare const Label: ({ label }: {
165
138
  label: string;
166
139
  }) => react_jsx_runtime.JSX.Element;
167
- declare const Separator: () => react_jsx_runtime.JSX.Element;
168
140
 
169
141
  declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: {
170
142
  children?: ReactNode;
@@ -213,11 +185,11 @@ declare const Drawer: {
213
185
 
214
186
  declare const DropZone: react.ForwardRefExoticComponent<DropZoneProps & react.RefAttributes<HTMLDivElement>>;
215
187
 
216
- declare const IconButton: ({ active, children, href, onClick, type, disabled, tabIndex, newTab, fullWidth, title, }: {
217
- active?: boolean;
188
+ declare const IconButton: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, title, }: {
218
189
  children: ReactNode;
219
190
  href?: string;
220
191
  onClick?: (e: SyntheticEvent) => void | Promise<void>;
192
+ variant?: "primary" | "secondary";
221
193
  type?: "button" | "submit" | "reset";
222
194
  disabled?: boolean;
223
195
  tabIndex?: number;
@@ -280,75 +252,6 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
280
252
  metadata?: Metadata;
281
253
  }): react_jsx_runtime.JSX.Element;
282
254
 
283
- declare function AlignLeft(): react_jsx_runtime.JSX.Element;
284
-
285
- declare function AlignCenter(): react_jsx_runtime.JSX.Element;
286
-
287
- declare function AlignRight(): react_jsx_runtime.JSX.Element;
288
-
289
- declare function AlignJustify(): react_jsx_runtime.JSX.Element;
290
-
291
- declare function AlignSelect(): react_jsx_runtime.JSX.Element;
292
-
293
- declare function Bold(): react_jsx_runtime.JSX.Element;
294
-
295
- declare function Italic(): react_jsx_runtime.JSX.Element;
296
-
297
- declare function Underline(): react_jsx_runtime.JSX.Element;
298
-
299
- declare function Strikethrough(): react_jsx_runtime.JSX.Element;
300
-
301
- declare function InlineCode(): react_jsx_runtime.JSX.Element;
302
-
303
- declare function BulletList(): react_jsx_runtime.JSX.Element;
304
-
305
- declare function OrderedList(): react_jsx_runtime.JSX.Element;
306
-
307
- declare function CodeBlock(): react_jsx_runtime.JSX.Element;
308
-
309
- declare function Blockquote(): react_jsx_runtime.JSX.Element;
310
-
311
- declare function HorizontalRule(): react_jsx_runtime.JSX.Element;
312
-
313
- declare function HeadingSelect(): react_jsx_runtime.JSX.Element;
314
-
315
- declare function ListSelect(): react_jsx_runtime.JSX.Element;
316
-
317
- declare function Control({ icon, disabled, active, onClick, title, }: {
318
- icon: ReactNode;
319
- disabled?: boolean;
320
- active?: boolean;
321
- onClick: (e: SyntheticEvent) => any;
322
- title: string;
323
- }): react_jsx_runtime.JSX.Element;
324
-
325
- declare const RichTextMenu: {
326
- ({ children }: {
327
- children: ReactNode;
328
- }): react_jsx_runtime.JSX.Element;
329
- Group: ({ children }: {
330
- children: ReactNode;
331
- }) => react_jsx_runtime.JSX.Element;
332
- Control: typeof Control;
333
- AlignCenter: typeof AlignCenter;
334
- AlignJustify: typeof AlignJustify;
335
- AlignLeft: typeof AlignLeft;
336
- AlignRight: typeof AlignRight;
337
- AlignSelect: typeof AlignSelect;
338
- Blockquote: typeof Blockquote;
339
- Bold: typeof Bold;
340
- BulletList: typeof BulletList;
341
- CodeBlock: typeof CodeBlock;
342
- HeadingSelect: typeof HeadingSelect;
343
- HorizontalRule: typeof HorizontalRule;
344
- InlineCode: typeof InlineCode;
345
- Italic: typeof Italic;
346
- ListSelect: typeof ListSelect;
347
- OrderedList: typeof OrderedList;
348
- Strikethrough: typeof Strikethrough;
349
- Underline: typeof Underline;
350
- };
351
-
352
255
  declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: {
353
256
  disableDrag?: boolean;
354
257
  disableDragOnFocus?: boolean;
@@ -401,4 +304,4 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
401
304
  */
402
305
  declare function useGetPuck(): () => UsePuckStore<Config>;
403
306
 
404
- export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RichTextMenu, RichtextField, RootDataWithProps, Separator, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };
307
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Fields, Group, History, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RootDataWithProps, UiState, type UsePuckData, UserGenerics, Viewports, createUsePuck, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };