@measured/puck-plugin-emotion-cache 0.21.0-canary.1cec93c4 → 0.21.0-canary.1d823fd9
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.mts +18 -9
- package/dist/index.d.ts +18 -9
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, CSSProperties,
|
|
1
|
+
import { ReactElement, CSSProperties, ReactNode, JSX } from 'react';
|
|
2
2
|
|
|
3
3
|
type ItemSelector = {
|
|
4
4
|
index: number;
|
|
@@ -149,7 +149,6 @@ type DropZoneProps = {
|
|
|
149
149
|
minEmptyHeight?: number;
|
|
150
150
|
className?: string;
|
|
151
151
|
collisionAxis?: DragAxis;
|
|
152
|
-
as?: ElementType;
|
|
153
152
|
};
|
|
154
153
|
|
|
155
154
|
type PuckContext = {
|
|
@@ -322,6 +321,7 @@ interface FieldMetadata extends Metadata {
|
|
|
322
321
|
type ItemWithId = {
|
|
323
322
|
_arrayId: string;
|
|
324
323
|
_originalIndex: number;
|
|
324
|
+
_currentIndex: number;
|
|
325
325
|
};
|
|
326
326
|
type ArrayState = {
|
|
327
327
|
items: ItemWithId[];
|
|
@@ -332,6 +332,7 @@ type UiState = {
|
|
|
332
332
|
rightSideBarVisible: boolean;
|
|
333
333
|
leftSideBarWidth?: number | null;
|
|
334
334
|
rightSideBarWidth?: number | null;
|
|
335
|
+
mobilePanelExpanded?: boolean;
|
|
335
336
|
itemSelector: ItemSelector | null;
|
|
336
337
|
arrayState: Record<string, ArrayState | undefined>;
|
|
337
338
|
previewMode: "interactive" | "edit";
|
|
@@ -344,7 +345,7 @@ type UiState = {
|
|
|
344
345
|
isDragging: boolean;
|
|
345
346
|
viewports: {
|
|
346
347
|
current: {
|
|
347
|
-
width: number;
|
|
348
|
+
width: number | "100%";
|
|
348
349
|
height: number | "auto";
|
|
349
350
|
};
|
|
350
351
|
controlsVisible: boolean;
|
|
@@ -353,6 +354,9 @@ type UiState = {
|
|
|
353
354
|
field: {
|
|
354
355
|
focus?: string | null;
|
|
355
356
|
};
|
|
357
|
+
plugin: {
|
|
358
|
+
current: string | null;
|
|
359
|
+
};
|
|
356
360
|
};
|
|
357
361
|
type AppState<UserData extends Data = Data> = {
|
|
358
362
|
data: UserData;
|
|
@@ -396,6 +400,11 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
|
|
|
396
400
|
type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
|
|
397
401
|
never
|
|
398
402
|
] ? False : True;
|
|
403
|
+
type RenderFunc<Props extends {
|
|
404
|
+
[key: string]: any;
|
|
405
|
+
} = {
|
|
406
|
+
children: ReactNode;
|
|
407
|
+
}> = (props: Props) => ReactElement;
|
|
399
408
|
|
|
400
409
|
type MapFnParams<ThisField = Field> = {
|
|
401
410
|
value: any;
|
|
@@ -419,11 +428,6 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
|
|
|
419
428
|
[Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
|
|
420
429
|
}>;
|
|
421
430
|
|
|
422
|
-
type RenderFunc<Props extends {
|
|
423
|
-
[key: string]: any;
|
|
424
|
-
} = {
|
|
425
|
-
children: ReactNode;
|
|
426
|
-
}> = (props: Props) => ReactElement;
|
|
427
431
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
428
432
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
429
433
|
type OverridesGeneric<Shape extends {
|
|
@@ -494,7 +498,7 @@ type DragAxis = "dynamic" | "y" | "x";
|
|
|
494
498
|
|
|
495
499
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
|
496
500
|
type Viewport = {
|
|
497
|
-
width: number;
|
|
501
|
+
width: number | "100%";
|
|
498
502
|
height?: number | "auto";
|
|
499
503
|
label?: string;
|
|
500
504
|
icon?: iconTypes | ReactNode;
|
|
@@ -508,8 +512,13 @@ type Permissions = {
|
|
|
508
512
|
insert: boolean;
|
|
509
513
|
} & Record<string, boolean>;
|
|
510
514
|
type Plugin<UserConfig extends Config = Config> = {
|
|
515
|
+
name?: string;
|
|
516
|
+
label?: string;
|
|
517
|
+
icon?: ReactNode;
|
|
518
|
+
render?: () => ReactElement;
|
|
511
519
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
512
520
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
521
|
+
mobilePanelHeight?: "toggle" | "min-content";
|
|
513
522
|
};
|
|
514
523
|
type Slot<Props extends {
|
|
515
524
|
[key: string]: DefaultComponentProps;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement, CSSProperties,
|
|
1
|
+
import { ReactElement, CSSProperties, ReactNode, JSX } from 'react';
|
|
2
2
|
|
|
3
3
|
type ItemSelector = {
|
|
4
4
|
index: number;
|
|
@@ -149,7 +149,6 @@ type DropZoneProps = {
|
|
|
149
149
|
minEmptyHeight?: number;
|
|
150
150
|
className?: string;
|
|
151
151
|
collisionAxis?: DragAxis;
|
|
152
|
-
as?: ElementType;
|
|
153
152
|
};
|
|
154
153
|
|
|
155
154
|
type PuckContext = {
|
|
@@ -322,6 +321,7 @@ interface FieldMetadata extends Metadata {
|
|
|
322
321
|
type ItemWithId = {
|
|
323
322
|
_arrayId: string;
|
|
324
323
|
_originalIndex: number;
|
|
324
|
+
_currentIndex: number;
|
|
325
325
|
};
|
|
326
326
|
type ArrayState = {
|
|
327
327
|
items: ItemWithId[];
|
|
@@ -332,6 +332,7 @@ type UiState = {
|
|
|
332
332
|
rightSideBarVisible: boolean;
|
|
333
333
|
leftSideBarWidth?: number | null;
|
|
334
334
|
rightSideBarWidth?: number | null;
|
|
335
|
+
mobilePanelExpanded?: boolean;
|
|
335
336
|
itemSelector: ItemSelector | null;
|
|
336
337
|
arrayState: Record<string, ArrayState | undefined>;
|
|
337
338
|
previewMode: "interactive" | "edit";
|
|
@@ -344,7 +345,7 @@ type UiState = {
|
|
|
344
345
|
isDragging: boolean;
|
|
345
346
|
viewports: {
|
|
346
347
|
current: {
|
|
347
|
-
width: number;
|
|
348
|
+
width: number | "100%";
|
|
348
349
|
height: number | "auto";
|
|
349
350
|
};
|
|
350
351
|
controlsVisible: boolean;
|
|
@@ -353,6 +354,9 @@ type UiState = {
|
|
|
353
354
|
field: {
|
|
354
355
|
focus?: string | null;
|
|
355
356
|
};
|
|
357
|
+
plugin: {
|
|
358
|
+
current: string | null;
|
|
359
|
+
};
|
|
356
360
|
};
|
|
357
361
|
type AppState<UserData extends Data = Data> = {
|
|
358
362
|
data: UserData;
|
|
@@ -396,6 +400,11 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
|
|
|
396
400
|
type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
|
|
397
401
|
never
|
|
398
402
|
] ? False : True;
|
|
403
|
+
type RenderFunc<Props extends {
|
|
404
|
+
[key: string]: any;
|
|
405
|
+
} = {
|
|
406
|
+
children: ReactNode;
|
|
407
|
+
}> = (props: Props) => ReactElement;
|
|
399
408
|
|
|
400
409
|
type MapFnParams<ThisField = Field> = {
|
|
401
410
|
value: any;
|
|
@@ -419,11 +428,6 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
|
|
|
419
428
|
[Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
|
|
420
429
|
}>;
|
|
421
430
|
|
|
422
|
-
type RenderFunc<Props extends {
|
|
423
|
-
[key: string]: any;
|
|
424
|
-
} = {
|
|
425
|
-
children: ReactNode;
|
|
426
|
-
}> = (props: Props) => ReactElement;
|
|
427
431
|
declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
|
|
428
432
|
type OverrideKey = (typeof overrideKeys)[number];
|
|
429
433
|
type OverridesGeneric<Shape extends {
|
|
@@ -494,7 +498,7 @@ type DragAxis = "dynamic" | "y" | "x";
|
|
|
494
498
|
|
|
495
499
|
type iconTypes = "Smartphone" | "Monitor" | "Tablet";
|
|
496
500
|
type Viewport = {
|
|
497
|
-
width: number;
|
|
501
|
+
width: number | "100%";
|
|
498
502
|
height?: number | "auto";
|
|
499
503
|
label?: string;
|
|
500
504
|
icon?: iconTypes | ReactNode;
|
|
@@ -508,8 +512,13 @@ type Permissions = {
|
|
|
508
512
|
insert: boolean;
|
|
509
513
|
} & Record<string, boolean>;
|
|
510
514
|
type Plugin<UserConfig extends Config = Config> = {
|
|
515
|
+
name?: string;
|
|
516
|
+
label?: string;
|
|
517
|
+
icon?: ReactNode;
|
|
518
|
+
render?: () => ReactElement;
|
|
511
519
|
overrides?: Partial<Overrides<UserConfig>>;
|
|
512
520
|
fieldTransforms?: FieldTransforms<UserConfig>;
|
|
521
|
+
mobilePanelHeight?: "toggle" | "min-content";
|
|
513
522
|
};
|
|
514
523
|
type Slot<Props extends {
|
|
515
524
|
[key: string]: DefaultComponentProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@measured/puck-plugin-emotion-cache",
|
|
3
|
-
"version": "0.21.0-canary.
|
|
3
|
+
"version": "0.21.0-canary.1d823fd9",
|
|
4
4
|
"author": "Chris Villa <chris@puckeditor.com>",
|
|
5
5
|
"repository": "measuredco/puck",
|
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@emotion/react": "^11.13.3",
|
|
27
|
-
"@measured/puck": "^0.21.0-canary.
|
|
27
|
+
"@measured/puck": "^0.21.0-canary.1d823fd9",
|
|
28
28
|
"@types/minimatch": "3.0.5",
|
|
29
29
|
"@types/react": "^19.0.1",
|
|
30
30
|
"@types/react-dom": "^19.0.2",
|