@measured/puck-plugin-emotion-cache 0.21.0-canary.e9d5c0ea → 0.21.0-canary.ec77dd9f

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 CHANGED
@@ -118,6 +118,7 @@ interface CustomField<Value extends any> extends BaseField {
118
118
  type: "custom";
119
119
  render: CustomFieldRender<Value>;
120
120
  contentEditable?: boolean;
121
+ key?: string;
121
122
  }
122
123
  interface SlotField extends BaseField {
123
124
  type: "slot";
@@ -320,7 +321,6 @@ interface FieldMetadata extends Metadata {
320
321
  type ItemWithId = {
321
322
  _arrayId: string;
322
323
  _originalIndex: number;
323
- _currentIndex: number;
324
324
  };
325
325
  type ArrayState = {
326
326
  items: ItemWithId[];
@@ -331,7 +331,6 @@ type UiState = {
331
331
  rightSideBarVisible: boolean;
332
332
  leftSideBarWidth?: number | null;
333
333
  rightSideBarWidth?: number | null;
334
- mobilePanelExpanded?: boolean;
335
334
  itemSelector: ItemSelector | null;
336
335
  arrayState: Record<string, ArrayState | undefined>;
337
336
  previewMode: "interactive" | "edit";
@@ -344,7 +343,7 @@ type UiState = {
344
343
  isDragging: boolean;
345
344
  viewports: {
346
345
  current: {
347
- width: number | "100%";
346
+ width: number;
348
347
  height: number | "auto";
349
348
  };
350
349
  controlsVisible: boolean;
@@ -353,9 +352,6 @@ type UiState = {
353
352
  field: {
354
353
  focus?: string | null;
355
354
  };
356
- plugin: {
357
- current: string | null;
358
- };
359
355
  };
360
356
  type AppState<UserData extends Data = Data> = {
361
357
  data: UserData;
@@ -399,11 +395,6 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
399
395
  type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
400
396
  never
401
397
  ] ? False : True;
402
- type RenderFunc<Props extends {
403
- [key: string]: any;
404
- } = {
405
- children: ReactNode;
406
- }> = (props: Props) => ReactElement;
407
398
 
408
399
  type MapFnParams<ThisField = Field> = {
409
400
  value: any;
@@ -427,6 +418,11 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
427
418
  [Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
428
419
  }>;
429
420
 
421
+ type RenderFunc<Props extends {
422
+ [key: string]: any;
423
+ } = {
424
+ children: ReactNode;
425
+ }> = (props: Props) => ReactElement;
430
426
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
431
427
  type OverrideKey = (typeof overrideKeys)[number];
432
428
  type OverridesGeneric<Shape extends {
@@ -497,7 +493,7 @@ type DragAxis = "dynamic" | "y" | "x";
497
493
 
498
494
  type iconTypes = "Smartphone" | "Monitor" | "Tablet";
499
495
  type Viewport = {
500
- width: number | "100%";
496
+ width: number;
501
497
  height?: number | "auto";
502
498
  label?: string;
503
499
  icon?: iconTypes | ReactNode;
@@ -511,13 +507,8 @@ type Permissions = {
511
507
  insert: boolean;
512
508
  } & Record<string, boolean>;
513
509
  type Plugin<UserConfig extends Config = Config> = {
514
- name?: string;
515
- label?: string;
516
- icon?: ReactNode;
517
- render?: () => ReactElement;
518
510
  overrides?: Partial<Overrides<UserConfig>>;
519
511
  fieldTransforms?: FieldTransforms<UserConfig>;
520
- mobilePanelHeight?: "toggle" | "min-content";
521
512
  };
522
513
  type Slot<Props extends {
523
514
  [key: string]: DefaultComponentProps;
package/dist/index.d.ts CHANGED
@@ -118,6 +118,7 @@ interface CustomField<Value extends any> extends BaseField {
118
118
  type: "custom";
119
119
  render: CustomFieldRender<Value>;
120
120
  contentEditable?: boolean;
121
+ key?: string;
121
122
  }
122
123
  interface SlotField extends BaseField {
123
124
  type: "slot";
@@ -320,7 +321,6 @@ interface FieldMetadata extends Metadata {
320
321
  type ItemWithId = {
321
322
  _arrayId: string;
322
323
  _originalIndex: number;
323
- _currentIndex: number;
324
324
  };
325
325
  type ArrayState = {
326
326
  items: ItemWithId[];
@@ -331,7 +331,6 @@ type UiState = {
331
331
  rightSideBarVisible: boolean;
332
332
  leftSideBarWidth?: number | null;
333
333
  rightSideBarWidth?: number | null;
334
- mobilePanelExpanded?: boolean;
335
334
  itemSelector: ItemSelector | null;
336
335
  arrayState: Record<string, ArrayState | undefined>;
337
336
  previewMode: "interactive" | "edit";
@@ -344,7 +343,7 @@ type UiState = {
344
343
  isDragging: boolean;
345
344
  viewports: {
346
345
  current: {
347
- width: number | "100%";
346
+ width: number;
348
347
  height: number | "auto";
349
348
  };
350
349
  controlsVisible: boolean;
@@ -353,9 +352,6 @@ type UiState = {
353
352
  field: {
354
353
  focus?: string | null;
355
354
  };
356
- plugin: {
357
- current: string | null;
358
- };
359
355
  };
360
356
  type AppState<UserData extends Data = Data> = {
361
357
  data: UserData;
@@ -399,11 +395,6 @@ type LeftOrExactRight<Union, Left, Right> = (Left & Union extends Right ? Exact<
399
395
  type AssertHasValue<T, True = T, False = never> = [keyof T] extends [
400
396
  never
401
397
  ] ? False : True;
402
- type RenderFunc<Props extends {
403
- [key: string]: any;
404
- } = {
405
- children: ReactNode;
406
- }> = (props: Props) => ReactElement;
407
398
 
408
399
  type MapFnParams<ThisField = Field> = {
409
400
  value: any;
@@ -427,6 +418,11 @@ G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends
427
418
  [Type in UserField["type"]]: FieldTransformFn<ExtractField<UserField, Type>>;
428
419
  }>;
429
420
 
421
+ type RenderFunc<Props extends {
422
+ [key: string]: any;
423
+ } = {
424
+ children: ReactNode;
425
+ }> = (props: Props) => ReactElement;
430
426
  declare const overrideKeys: readonly ["header", "headerActions", "fields", "fieldLabel", "drawer", "drawerItem", "componentOverlay", "outline", "puck", "preview"];
431
427
  type OverrideKey = (typeof overrideKeys)[number];
432
428
  type OverridesGeneric<Shape extends {
@@ -497,7 +493,7 @@ type DragAxis = "dynamic" | "y" | "x";
497
493
 
498
494
  type iconTypes = "Smartphone" | "Monitor" | "Tablet";
499
495
  type Viewport = {
500
- width: number | "100%";
496
+ width: number;
501
497
  height?: number | "auto";
502
498
  label?: string;
503
499
  icon?: iconTypes | ReactNode;
@@ -511,13 +507,8 @@ type Permissions = {
511
507
  insert: boolean;
512
508
  } & Record<string, boolean>;
513
509
  type Plugin<UserConfig extends Config = Config> = {
514
- name?: string;
515
- label?: string;
516
- icon?: ReactNode;
517
- render?: () => ReactElement;
518
510
  overrides?: Partial<Overrides<UserConfig>>;
519
511
  fieldTransforms?: FieldTransforms<UserConfig>;
520
- mobilePanelHeight?: "toggle" | "min-content";
521
512
  };
522
513
  type Slot<Props extends {
523
514
  [key: string]: DefaultComponentProps;
package/dist/index.js CHANGED
@@ -28,11 +28,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // index.tsx
31
- var plugin_emotion_cache_exports = {};
32
- __export(plugin_emotion_cache_exports, {
33
- default: () => plugin_emotion_cache_default
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ default: () => index_default
34
34
  });
35
- module.exports = __toCommonJS(plugin_emotion_cache_exports);
35
+ module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // ../tsup-config/react-import.js
38
38
  var import_react = __toESM(require("react"));
@@ -63,7 +63,7 @@ function createStyleElement(options) {
63
63
  tag.setAttribute("data-s", "");
64
64
  return tag;
65
65
  }
66
- var StyleSheet = /* @__PURE__ */ function() {
66
+ var StyleSheet = /* @__PURE__ */ (function() {
67
67
  function StyleSheet2(options) {
68
68
  var _this = this;
69
69
  this._insertTag = function(tag) {
@@ -121,7 +121,7 @@ var StyleSheet = /* @__PURE__ */ function() {
121
121
  this.ctr = 0;
122
122
  };
123
123
  return StyleSheet2;
124
- }();
124
+ })();
125
125
 
126
126
  // ../../node_modules/stylis/src/Enum.js
127
127
  var MS = "-ms-";
@@ -924,4 +924,4 @@ var createEmotionCachePlugin = (key) => {
924
924
  }
925
925
  };
926
926
  };
927
- var plugin_emotion_cache_default = createEmotionCachePlugin;
927
+ var index_default = createEmotionCachePlugin;
package/dist/index.mjs CHANGED
@@ -27,7 +27,7 @@ function createStyleElement(options) {
27
27
  tag.setAttribute("data-s", "");
28
28
  return tag;
29
29
  }
30
- var StyleSheet = /* @__PURE__ */ function() {
30
+ var StyleSheet = /* @__PURE__ */ (function() {
31
31
  function StyleSheet2(options) {
32
32
  var _this = this;
33
33
  this._insertTag = function(tag) {
@@ -85,7 +85,7 @@ var StyleSheet = /* @__PURE__ */ function() {
85
85
  this.ctr = 0;
86
86
  };
87
87
  return StyleSheet2;
88
- }();
88
+ })();
89
89
 
90
90
  // ../../node_modules/stylis/src/Enum.js
91
91
  var MS = "-ms-";
@@ -888,7 +888,7 @@ var createEmotionCachePlugin = (key) => {
888
888
  }
889
889
  };
890
890
  };
891
- var plugin_emotion_cache_default = createEmotionCachePlugin;
891
+ var index_default = createEmotionCachePlugin;
892
892
  export {
893
- plugin_emotion_cache_default as default
893
+ index_default as default
894
894
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-emotion-cache",
3
- "version": "0.21.0-canary.e9d5c0ea",
3
+ "version": "0.21.0-canary.ec77dd9f",
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,8 @@
24
24
  ],
25
25
  "devDependencies": {
26
26
  "@emotion/react": "^11.13.3",
27
- "@measured/puck": "^0.21.0-canary.e9d5c0ea",
27
+ "@measured/puck": "^0.21.0-canary.ec77dd9f",
28
+ "@types/minimatch": "3.0.5",
28
29
  "@types/react": "^19.0.1",
29
30
  "@types/react-dom": "^19.0.2",
30
31
  "eslint": "^7.32.0",