@measured/puck 0.20.0-canary.8909f8cc → 0.20.0-canary.8c56aa8b

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.css CHANGED
@@ -1152,27 +1152,31 @@ textarea._Input-input_py9hf_26 {
1152
1152
  }
1153
1153
 
1154
1154
  /* css-module:/home/runner/work/puck/puck/packages/core/components/DraggableComponent/styles.module.css/#css-module-data */
1155
- ._DraggableComponent_qzbgx_1 {
1155
+ ._DraggableComponent_1vaqy_1 {
1156
1156
  position: absolute;
1157
1157
  pointer-events: none;
1158
1158
  --overlay-background: color-mix( in srgb, var(--puck-color-azure-08) 30%, transparent );
1159
1159
  }
1160
- ._DraggableComponent-overlay_qzbgx_12 {
1161
- cursor: pointer;
1160
+ ._DraggableComponent-overlayWrapper_1vaqy_12 {
1162
1161
  height: 100%;
1163
1162
  width: 100%;
1164
1163
  top: 0;
1165
- outline: 2px var(--puck-color-azure-09) solid;
1166
- outline-offset: -2px;
1167
1164
  position: absolute;
1168
1165
  pointer-events: none;
1169
1166
  box-sizing: border-box;
1170
1167
  z-index: 1;
1171
1168
  }
1172
- ._DraggableComponent_qzbgx_1:focus-visible > ._DraggableComponent-overlay_qzbgx_12 {
1169
+ ._DraggableComponent-overlay_1vaqy_12 {
1170
+ cursor: pointer;
1171
+ height: 100%;
1172
+ outline: 2px var(--puck-color-azure-09) solid;
1173
+ outline-offset: -2px;
1174
+ width: 100%;
1175
+ }
1176
+ ._DraggableComponent_1vaqy_1:focus-visible > ._DraggableComponent-overlayWrapper_1vaqy_12 {
1173
1177
  outline: 1px solid var(--puck-color-azure-05);
1174
1178
  }
1175
- ._DraggableComponent-loadingOverlay_qzbgx_29 {
1179
+ ._DraggableComponent-loadingOverlay_1vaqy_34 {
1176
1180
  background: var(--puck-color-white);
1177
1181
  color: var(--puck-color-grey-03);
1178
1182
  border-radius: 4px;
@@ -1187,29 +1191,27 @@ textarea._Input-input_py9hf_26 {
1187
1191
  opacity: 0.8;
1188
1192
  z-index: 1;
1189
1193
  }
1190
- ._DraggableComponent--hover_qzbgx_45:not(._DraggableComponent--isLocked_qzbgx_45) > ._DraggableComponent-overlay_qzbgx_12 {
1194
+ ._DraggableComponent--hover_1vaqy_50 > ._DraggableComponent-overlayWrapper_1vaqy_12 > ._DraggableComponent-overlay_1vaqy_12 {
1191
1195
  background: var(--overlay-background);
1192
- }
1193
- ._DraggableComponent--hover_qzbgx_45 > ._DraggableComponent-overlay_qzbgx_12 {
1194
1196
  outline: 2px var(--puck-color-azure-09) solid;
1195
1197
  }
1196
- ._DraggableComponent--isSelected_qzbgx_54 > ._DraggableComponent-overlay_qzbgx_12 {
1198
+ ._DraggableComponent--isSelected_1vaqy_57 > ._DraggableComponent-overlayWrapper_1vaqy_12 > ._DraggableComponent-overlay_1vaqy_12 {
1197
1199
  outline-color: var(--puck-color-azure-07);
1198
1200
  }
1199
- ._DraggableComponent_qzbgx_1:has(._DraggableComponent--hover_qzbgx_45 > ._DraggableComponent-overlay_qzbgx_12) > ._DraggableComponent-overlay_qzbgx_12 {
1201
+ ._DraggableComponent_1vaqy_1:has(._DraggableComponent--hover_1vaqy_50 > ._DraggableComponent-overlayWrapper_1vaqy_12) > ._DraggableComponent-overlayWrapper_1vaqy_12 {
1200
1202
  display: none;
1201
1203
  }
1202
- ._DraggableComponent-actionsOverlay_qzbgx_66 {
1204
+ ._DraggableComponent-actionsOverlay_1vaqy_71 {
1203
1205
  position: sticky;
1204
1206
  opacity: 0;
1205
1207
  pointer-events: none;
1206
1208
  z-index: 2;
1207
1209
  }
1208
- ._DraggableComponent--isSelected_qzbgx_54 ._DraggableComponent-actionsOverlay_qzbgx_66 {
1210
+ ._DraggableComponent--isSelected_1vaqy_57 ._DraggableComponent-actionsOverlay_1vaqy_71 {
1209
1211
  opacity: 1;
1210
1212
  pointer-events: auto;
1211
1213
  }
1212
- ._DraggableComponent-actions_qzbgx_66 {
1214
+ ._DraggableComponent-actions_1vaqy_71 {
1213
1215
  position: absolute;
1214
1216
  width: auto;
1215
1217
  cursor: grab;
@@ -1940,3 +1942,17 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1940
1942
  grid-area: right;
1941
1943
  justify-self: start;
1942
1944
  }
1945
+
1946
+ /* lib/overlay-portal/styles.css */
1947
+ [data-puck-overlay-portal],
1948
+ [data-puck-overlay-portal] * {
1949
+ pointer-events: auto;
1950
+ }
1951
+ [data-puck-overlay-portal]:hover {
1952
+ outline: 2px var(--puck-color-azure-09) solid;
1953
+ outline-offset: 2px;
1954
+ }
1955
+ [data-puck-overlay-portal]:focus-within {
1956
+ outline: 2px var(--puck-color-azure-07) solid;
1957
+ outline-offset: 2px;
1958
+ }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-BCI5tk0w.mjs';
2
- export { a2 as Adaptor, a0 as ArrayField, x as ArrayState, af as AsFieldProps, E as BaseData, T as BaseField, N as ComponentDataMap, K as ComponentDataOptionalId, Q as Content, a6 as CustomField, a5 as CustomFieldRender, ac as DefaultComponentProps, a9 as DefaultRootFieldProps, ab as DefaultRootProps, aa as DefaultRootRenderProps, n as Direction, o as DragAxis, a4 as ExternalField, a3 as ExternalFieldWithAdaptor, ah as ExtractPropsFromConfig, ai as ExtractRootPropsFromConfig, u as FieldRenderFunctions, v as ItemWithId, L as MappedItem, Y as NumberField, a1 as ObjectField, s as OverrideKey, z as PuckComponent, a8 as PuckContext, $ as RadioField, B as RootConfig, J as RootData, G as RootDataWithoutProps, _ as SelectField, S as Slot, y as SlotComponent, a7 as SlotField, X as TextField, Z as TextareaField, p as Viewport, ag as WithChildren, ad as WithId, ae as WithPuckProps, W as WithSlotProps, m as migrate, q as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BCI5tk0w.mjs';
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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-mCPqBAls.mjs';
2
+ export { a2 as Adaptor, a0 as ArrayField, x as ArrayState, af as AsFieldProps, E as BaseData, T as BaseField, N as ComponentDataMap, K as ComponentDataOptionalId, Q as Content, a6 as CustomField, a5 as CustomFieldRender, ac as DefaultComponentProps, a9 as DefaultRootFieldProps, ab as DefaultRootProps, aa as DefaultRootRenderProps, n as Direction, o as DragAxis, a4 as ExternalField, a3 as ExternalFieldWithAdaptor, ah as ExtractPropsFromConfig, ai as ExtractRootPropsFromConfig, u as FieldRenderFunctions, v as ItemWithId, L as MappedItem, Y as NumberField, a1 as ObjectField, s as OverrideKey, z as PuckComponent, a8 as PuckContext, $ as RadioField, B as RootConfig, J as RootData, G as RootDataWithoutProps, _ as SelectField, S as Slot, y as SlotComponent, a7 as SlotField, X as TextField, Z as TextareaField, p as Viewport, ag as WithChildren, ad as WithId, ae as WithPuckProps, W as WithSlotProps, m as migrate, q as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-mCPqBAls.mjs';
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';
@@ -249,6 +249,10 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
249
249
  metadata?: Metadata;
250
250
  }): react_jsx_runtime.JSX.Element;
251
251
 
252
+ declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: {
253
+ disableDrag?: boolean;
254
+ }) => (() => void) | undefined;
255
+
252
256
  type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
253
257
  appState: G["UserPublicAppState"];
254
258
  config: UserConfig;
@@ -290,4 +294,4 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
290
294
  */
291
295
  declare function useGetPuck(): () => UsePuckStore<Config>;
292
296
 
293
- export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, 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, renderContext, useGetPuck, usePuck };
297
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, 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, useGetPuck, usePuck };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-BCI5tk0w.js';
2
- export { a2 as Adaptor, a0 as ArrayField, x as ArrayState, af as AsFieldProps, E as BaseData, T as BaseField, N as ComponentDataMap, K as ComponentDataOptionalId, Q as Content, a6 as CustomField, a5 as CustomFieldRender, ac as DefaultComponentProps, a9 as DefaultRootFieldProps, ab as DefaultRootProps, aa as DefaultRootRenderProps, n as Direction, o as DragAxis, a4 as ExternalField, a3 as ExternalFieldWithAdaptor, ah as ExtractPropsFromConfig, ai as ExtractRootPropsFromConfig, u as FieldRenderFunctions, v as ItemWithId, L as MappedItem, Y as NumberField, a1 as ObjectField, s as OverrideKey, z as PuckComponent, a8 as PuckContext, $ as RadioField, B as RootConfig, J as RootData, G as RootDataWithoutProps, _ as SelectField, S as Slot, y as SlotComponent, a7 as SlotField, X as TextField, Z as TextareaField, p as Viewport, ag as WithChildren, ad as WithId, ae as WithPuckProps, W as WithSlotProps, m as migrate, q as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BCI5tk0w.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 Field, h as FieldProps, D as DropZoneProps, i as Data, j as OnAction, k as InitialHistory, l as ItemSelector } from './walk-tree-mCPqBAls.js';
2
+ export { a2 as Adaptor, a0 as ArrayField, x as ArrayState, af as AsFieldProps, E as BaseData, T as BaseField, N as ComponentDataMap, K as ComponentDataOptionalId, Q as Content, a6 as CustomField, a5 as CustomFieldRender, ac as DefaultComponentProps, a9 as DefaultRootFieldProps, ab as DefaultRootProps, aa as DefaultRootRenderProps, n as Direction, o as DragAxis, a4 as ExternalField, a3 as ExternalFieldWithAdaptor, ah as ExtractPropsFromConfig, ai as ExtractRootPropsFromConfig, u as FieldRenderFunctions, v as ItemWithId, L as MappedItem, Y as NumberField, a1 as ObjectField, s as OverrideKey, z as PuckComponent, a8 as PuckContext, $ as RadioField, B as RootConfig, J as RootData, G as RootDataWithoutProps, _ as SelectField, S as Slot, y as SlotComponent, a7 as SlotField, X as TextField, Z as TextareaField, p as Viewport, ag as WithChildren, ad as WithId, ae as WithPuckProps, W as WithSlotProps, m as migrate, q as overrideKeys, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-mCPqBAls.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';
@@ -249,6 +249,10 @@ declare function Render<UserConfig extends Config = Config, G extends UserGeneri
249
249
  metadata?: Metadata;
250
250
  }): react_jsx_runtime.JSX.Element;
251
251
 
252
+ declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: {
253
+ disableDrag?: boolean;
254
+ }) => (() => void) | undefined;
255
+
252
256
  type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>> = {
253
257
  appState: G["UserPublicAppState"];
254
258
  config: UserConfig;
@@ -290,4 +294,4 @@ declare function usePuck<UserConfig extends Config = Config>(): UsePuckStore<Use
290
294
  */
291
295
  declare function useGetPuck(): () => UsePuckStore<Config>;
292
296
 
293
- export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, 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, renderContext, useGetPuck, usePuck };
297
+ export { Action, ActionBar, AppState, AutoField, Button, ComponentConfig, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, 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, useGetPuck, usePuck };