@puckeditor/plugin-emotion-cache 0.23.0-canary.fb9392de → 0.24.0-canary.0575ba70

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) The Puck Contributors.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ReactNode, ElementType, Ref, JSX } from 'react';
1
+ import { ElementType, CSSProperties, Ref, ComponentPropsWithoutRef, ReactElement, ReactNode, JSX } from 'react';
2
2
  import { EditorStateSnapshot, Editor, Extensions } from '@tiptap/react';
3
3
  import { BlockquoteOptions } from '@tiptap/extension-blockquote';
4
4
  import { BoldOptions } from '@tiptap/extension-bold';
@@ -20,6 +20,62 @@ type ItemSelector = {
20
20
  zone?: string;
21
21
  };
22
22
 
23
+ /**
24
+ * Props consumed by Puck internally that are shared between DropZones and slots.
25
+ */
26
+ type DropZoneSharedProps<ComponentType extends ElementType = "div"> = {
27
+ allow?: string[];
28
+ disallow?: string[];
29
+ style?: CSSProperties;
30
+ minEmptyHeight?: CSSProperties["minHeight"] | number;
31
+ className?: string;
32
+ collisionAxis?: DragAxis;
33
+ ref?: Ref<any>;
34
+ as?: ComponentType;
35
+ };
36
+ /**
37
+ * All props consumed by Puck for a DropZone component. `zone` lives here only.
38
+ *
39
+ * On slots `zone` is injected internally, so slots use {@link SlotProps} instead.
40
+ */
41
+ type DropZoneOwnProps<ComponentType extends ElementType = "div"> = DropZoneSharedProps<ComponentType> & {
42
+ zone: string;
43
+ };
44
+ /**
45
+ * Unsupported additional props that are never forwarded to `as`.
46
+ *
47
+ * Omitted from the public types AND stripped at runtime.
48
+ */
49
+ type NonForwardableProps = {
50
+ children?: unknown;
51
+ dangerouslySetInnerHTML?: unknown;
52
+ };
53
+ /**
54
+ * Keys internally consumed by Puck and never forwarded to `as`.
55
+ */
56
+ type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata";
57
+ /**
58
+ * Additional props forwarded to the element or component provided via `as`,
59
+ * typed against it.
60
+ *
61
+ * Puck-internal/unsupported props are stripped so they don't leak onto the DOM.
62
+ */
63
+ type ForwardedProps<ComponentType extends ElementType> = Omit<ComponentPropsWithoutRef<ComponentType>, ConsumedPropKey | keyof NonForwardableProps>;
64
+ /**
65
+ * Props for a `DropZone` component.
66
+ *
67
+ * Any additional props not consumed by Puck are forwarded to the element or
68
+ * component provided via `as` (defaulting to a `div`), typed against it.
69
+ */
70
+ type DropZoneProps<ComponentType extends ElementType = "div"> = DropZoneOwnProps<ComponentType> & ForwardedProps<ComponentType>;
71
+ /**
72
+ * Props for a `slot` render component.
73
+ *
74
+ * Any additional props not consumed by Puck are forwarded to the element or
75
+ * component provided via `as` (defaulting to a `div`), typed against it.
76
+ */
77
+ type SlotProps<ComponentType extends ElementType = "div"> = DropZoneSharedProps<ComponentType> & ForwardedProps<ComponentType>;
78
+
23
79
  declare const defaultEditorState: (ctx: EditorStateSnapshot, readOnly: boolean) => {
24
80
  isAlignLeft?: undefined;
25
81
  canAlignLeft?: undefined;
@@ -338,20 +394,11 @@ type FieldProps<F = Field<any>, ValueType = any> = {
338
394
  readOnly?: boolean;
339
395
  };
340
396
 
341
- type DropZoneProps = {
342
- zone: string;
343
- allow?: string[];
344
- disallow?: string[];
345
- style?: CSSProperties;
346
- minEmptyHeight?: CSSProperties["minHeight"] | number;
347
- className?: string;
348
- collisionAxis?: DragAxis;
349
- as?: ElementType;
350
- ref?: Ref<any>;
351
- };
352
-
353
397
  type PuckContext = {
354
- renderDropZone: (props: DropZoneProps) => React.ReactNode;
398
+ /**
399
+ * @deprecated Use {@link https://puckeditor.com/docs/api-reference/fields/slot Slots} instead.
400
+ */
401
+ renderDropZone: <ComponentType extends ElementType = "div">(props: DropZoneProps<ComponentType>) => React.ReactNode;
355
402
  metadata: Metadata;
356
403
  isEditing: boolean;
357
404
  dragRef: ((element: Element | null) => void) | null;
@@ -359,6 +406,12 @@ type PuckContext = {
359
406
  type DefaultRootFieldProps = {
360
407
  title?: string;
361
408
  };
409
+ /**
410
+ * Merge the default root field props into user-provided root props, letting
411
+ * the user's props take precedence. Using a plain intersection would turn an
412
+ * overridden `title` (e.g. `number`) into `never` (`number & string`).
413
+ */
414
+ type WithDefaultRootFieldProps<RootProps> = RootProps & Omit<DefaultRootFieldProps, keyof RootProps>;
362
415
  type DefaultComponentProps = {
363
416
  [key: string]: any;
364
417
  };
@@ -378,7 +431,7 @@ type UserGenerics<UserConfig extends Config = Config, UserParams extends Extract
378
431
  UserConfig: UserConfig;
379
432
  UserParams: UserParams;
380
433
  UserProps: UserParams["props"];
381
- UserRootProps: UserParams["rootProps"] & DefaultRootFieldProps;
434
+ UserRootProps: WithDefaultRootFieldProps<UserParams["rootProps"]>;
382
435
  UserData: UserData;
383
436
  UserAppState: UserAppState;
384
437
  UserPublicAppState: UserPublicAppState;
@@ -391,7 +444,7 @@ type ExtractField<UserField extends {
391
444
  type: T;
392
445
  }>;
393
446
 
394
- type SlotComponent = (props?: Omit<DropZoneProps, "zone">) => ReactNode;
447
+ type SlotComponent = <ComponentType extends ElementType = "div">(props?: SlotProps<ComponentType>) => ReactNode;
395
448
  type PuckComponent<Props> = (props: WithId<WithPuckProps<{
396
449
  [K in keyof Props]: WithDeepSlots<Props[K], SlotComponent>;
397
450
  }>>) => JSX.Element;
@@ -462,7 +515,7 @@ type DefaultComponents = Record<string, any>;
462
515
  type Config<PropsOrParams extends LeftOrExactRight<PropsOrParams, DefaultComponents, ConfigParams> = DefaultComponents | ConfigParams, RootProps extends DefaultComponentProps = any, CategoryName extends string = string> = PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, never> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number]> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, infer ParamFields> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], ParamFields[keyof ParamFields] & BaseField> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, any> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], {}> : ConfigInternal<PropsOrParams, RootProps, CategoryName>;
463
516
  type ExtractConfigParams<UserConfig extends ConfigInternal> = UserConfig extends ConfigInternal<infer PropsOrParams, infer RootProps, infer CategoryName, infer UserField> ? {
464
517
  props: PropsOrParams;
465
- rootProps: RootProps & DefaultRootFieldProps;
518
+ rootProps: WithDefaultRootFieldProps<RootProps>;
466
519
  categoryNames: CategoryName;
467
520
  field: UserField extends {
468
521
  type: string;
@@ -545,6 +598,8 @@ type UiState = {
545
598
  expanded?: boolean;
546
599
  }>;
547
600
  isDragging: boolean;
601
+ /** Outline items whose children are shown, keyed by item id */
602
+ itemExpanded?: Record<string, boolean>;
548
603
  viewports: {
549
604
  current: {
550
605
  width: number | "100%";
@@ -690,12 +745,12 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
690
745
  }>;
691
746
  type FieldRenderFunctions<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends {
692
747
  type: string;
693
- } = Field | G["UserField"]> = Omit<{
748
+ } = Field | G["UserField"]> = {
694
749
  [Type in UserField["type"]]: React.FunctionComponent<FieldProps<ExtractField<UserField, Type>, any> & {
695
750
  children: ReactNode;
696
751
  name: string;
697
- }>;
698
- }, "custom">;
752
+ }> | null;
753
+ };
699
754
 
700
755
  type DragAxis = "dynamic" | "y" | "x";
701
756
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ReactElement, CSSProperties, ReactNode, ElementType, Ref, JSX } from 'react';
1
+ import { ElementType, CSSProperties, Ref, ComponentPropsWithoutRef, ReactElement, ReactNode, JSX } from 'react';
2
2
  import { EditorStateSnapshot, Editor, Extensions } from '@tiptap/react';
3
3
  import { BlockquoteOptions } from '@tiptap/extension-blockquote';
4
4
  import { BoldOptions } from '@tiptap/extension-bold';
@@ -20,6 +20,62 @@ type ItemSelector = {
20
20
  zone?: string;
21
21
  };
22
22
 
23
+ /**
24
+ * Props consumed by Puck internally that are shared between DropZones and slots.
25
+ */
26
+ type DropZoneSharedProps<ComponentType extends ElementType = "div"> = {
27
+ allow?: string[];
28
+ disallow?: string[];
29
+ style?: CSSProperties;
30
+ minEmptyHeight?: CSSProperties["minHeight"] | number;
31
+ className?: string;
32
+ collisionAxis?: DragAxis;
33
+ ref?: Ref<any>;
34
+ as?: ComponentType;
35
+ };
36
+ /**
37
+ * All props consumed by Puck for a DropZone component. `zone` lives here only.
38
+ *
39
+ * On slots `zone` is injected internally, so slots use {@link SlotProps} instead.
40
+ */
41
+ type DropZoneOwnProps<ComponentType extends ElementType = "div"> = DropZoneSharedProps<ComponentType> & {
42
+ zone: string;
43
+ };
44
+ /**
45
+ * Unsupported additional props that are never forwarded to `as`.
46
+ *
47
+ * Omitted from the public types AND stripped at runtime.
48
+ */
49
+ type NonForwardableProps = {
50
+ children?: unknown;
51
+ dangerouslySetInnerHTML?: unknown;
52
+ };
53
+ /**
54
+ * Keys internally consumed by Puck and never forwarded to `as`.
55
+ */
56
+ type ConsumedPropKey = keyof DropZoneOwnProps | "as" | "content" | "config" | "metadata";
57
+ /**
58
+ * Additional props forwarded to the element or component provided via `as`,
59
+ * typed against it.
60
+ *
61
+ * Puck-internal/unsupported props are stripped so they don't leak onto the DOM.
62
+ */
63
+ type ForwardedProps<ComponentType extends ElementType> = Omit<ComponentPropsWithoutRef<ComponentType>, ConsumedPropKey | keyof NonForwardableProps>;
64
+ /**
65
+ * Props for a `DropZone` component.
66
+ *
67
+ * Any additional props not consumed by Puck are forwarded to the element or
68
+ * component provided via `as` (defaulting to a `div`), typed against it.
69
+ */
70
+ type DropZoneProps<ComponentType extends ElementType = "div"> = DropZoneOwnProps<ComponentType> & ForwardedProps<ComponentType>;
71
+ /**
72
+ * Props for a `slot` render component.
73
+ *
74
+ * Any additional props not consumed by Puck are forwarded to the element or
75
+ * component provided via `as` (defaulting to a `div`), typed against it.
76
+ */
77
+ type SlotProps<ComponentType extends ElementType = "div"> = DropZoneSharedProps<ComponentType> & ForwardedProps<ComponentType>;
78
+
23
79
  declare const defaultEditorState: (ctx: EditorStateSnapshot, readOnly: boolean) => {
24
80
  isAlignLeft?: undefined;
25
81
  canAlignLeft?: undefined;
@@ -338,20 +394,11 @@ type FieldProps<F = Field<any>, ValueType = any> = {
338
394
  readOnly?: boolean;
339
395
  };
340
396
 
341
- type DropZoneProps = {
342
- zone: string;
343
- allow?: string[];
344
- disallow?: string[];
345
- style?: CSSProperties;
346
- minEmptyHeight?: CSSProperties["minHeight"] | number;
347
- className?: string;
348
- collisionAxis?: DragAxis;
349
- as?: ElementType;
350
- ref?: Ref<any>;
351
- };
352
-
353
397
  type PuckContext = {
354
- renderDropZone: (props: DropZoneProps) => React.ReactNode;
398
+ /**
399
+ * @deprecated Use {@link https://puckeditor.com/docs/api-reference/fields/slot Slots} instead.
400
+ */
401
+ renderDropZone: <ComponentType extends ElementType = "div">(props: DropZoneProps<ComponentType>) => React.ReactNode;
355
402
  metadata: Metadata;
356
403
  isEditing: boolean;
357
404
  dragRef: ((element: Element | null) => void) | null;
@@ -359,6 +406,12 @@ type PuckContext = {
359
406
  type DefaultRootFieldProps = {
360
407
  title?: string;
361
408
  };
409
+ /**
410
+ * Merge the default root field props into user-provided root props, letting
411
+ * the user's props take precedence. Using a plain intersection would turn an
412
+ * overridden `title` (e.g. `number`) into `never` (`number & string`).
413
+ */
414
+ type WithDefaultRootFieldProps<RootProps> = RootProps & Omit<DefaultRootFieldProps, keyof RootProps>;
362
415
  type DefaultComponentProps = {
363
416
  [key: string]: any;
364
417
  };
@@ -378,7 +431,7 @@ type UserGenerics<UserConfig extends Config = Config, UserParams extends Extract
378
431
  UserConfig: UserConfig;
379
432
  UserParams: UserParams;
380
433
  UserProps: UserParams["props"];
381
- UserRootProps: UserParams["rootProps"] & DefaultRootFieldProps;
434
+ UserRootProps: WithDefaultRootFieldProps<UserParams["rootProps"]>;
382
435
  UserData: UserData;
383
436
  UserAppState: UserAppState;
384
437
  UserPublicAppState: UserPublicAppState;
@@ -391,7 +444,7 @@ type ExtractField<UserField extends {
391
444
  type: T;
392
445
  }>;
393
446
 
394
- type SlotComponent = (props?: Omit<DropZoneProps, "zone">) => ReactNode;
447
+ type SlotComponent = <ComponentType extends ElementType = "div">(props?: SlotProps<ComponentType>) => ReactNode;
395
448
  type PuckComponent<Props> = (props: WithId<WithPuckProps<{
396
449
  [K in keyof Props]: WithDeepSlots<Props[K], SlotComponent>;
397
450
  }>>) => JSX.Element;
@@ -462,7 +515,7 @@ type DefaultComponents = Record<string, any>;
462
515
  type Config<PropsOrParams extends LeftOrExactRight<PropsOrParams, DefaultComponents, ConfigParams> = DefaultComponents | ConfigParams, RootProps extends DefaultComponentProps = any, CategoryName extends string = string> = PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, never> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number]> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, infer ParamFields> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], ParamFields[keyof ParamFields] & BaseField> : PropsOrParams extends ConfigParams<infer ParamComponents, infer ParamRoot, infer ParamCategoryName, any> ? ConfigInternal<ParamComponents, ParamRoot, ParamCategoryName[number], {}> : ConfigInternal<PropsOrParams, RootProps, CategoryName>;
463
516
  type ExtractConfigParams<UserConfig extends ConfigInternal> = UserConfig extends ConfigInternal<infer PropsOrParams, infer RootProps, infer CategoryName, infer UserField> ? {
464
517
  props: PropsOrParams;
465
- rootProps: RootProps & DefaultRootFieldProps;
518
+ rootProps: WithDefaultRootFieldProps<RootProps>;
466
519
  categoryNames: CategoryName;
467
520
  field: UserField extends {
468
521
  type: string;
@@ -545,6 +598,8 @@ type UiState = {
545
598
  expanded?: boolean;
546
599
  }>;
547
600
  isDragging: boolean;
601
+ /** Outline items whose children are shown, keyed by item id */
602
+ itemExpanded?: Record<string, boolean>;
548
603
  viewports: {
549
604
  current: {
550
605
  width: number | "100%";
@@ -690,12 +745,12 @@ type Overrides<UserConfig extends Config = Config> = OverridesGeneric<{
690
745
  }>;
691
746
  type FieldRenderFunctions<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>, UserField extends {
692
747
  type: string;
693
- } = Field | G["UserField"]> = Omit<{
748
+ } = Field | G["UserField"]> = {
694
749
  [Type in UserField["type"]]: React.FunctionComponent<FieldProps<ExtractField<UserField, Type>, any> & {
695
750
  children: ReactNode;
696
751
  name: string;
697
- }>;
698
- }, "custom">;
752
+ }> | null;
753
+ };
699
754
 
700
755
  type DragAxis = "dynamic" | "y" | "x";
701
756
 
package/dist/index.js CHANGED
@@ -40,7 +40,7 @@ var import_react = __toESM(require("react"));
40
40
  // index.tsx
41
41
  var import_react2 = require("react");
42
42
 
43
- // ../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
43
+ // ../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
44
44
  var isDevelopment = false;
45
45
  function sheetForTag(tag) {
46
46
  if (tag.sheet) {
@@ -123,7 +123,7 @@ var StyleSheet = /* @__PURE__ */ (function() {
123
123
  return StyleSheet2;
124
124
  })();
125
125
 
126
- // ../../node_modules/stylis/src/Enum.js
126
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
127
127
  var MS = "-ms-";
128
128
  var MOZ = "-moz-";
129
129
  var WEBKIT = "-webkit-";
@@ -134,7 +134,7 @@ var IMPORT = "@import";
134
134
  var KEYFRAMES = "@keyframes";
135
135
  var LAYER = "@layer";
136
136
 
137
- // ../../node_modules/stylis/src/Utility.js
137
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
138
138
  var abs = Math.abs;
139
139
  var from = String.fromCharCode;
140
140
  var assign = Object.assign;
@@ -172,7 +172,7 @@ function combine(array, callback) {
172
172
  return array.map(callback).join("");
173
173
  }
174
174
 
175
- // ../../node_modules/stylis/src/Tokenizer.js
175
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js
176
176
  var line = 1;
177
177
  var column = 1;
178
178
  var length = 0;
@@ -308,7 +308,7 @@ function identifier(index) {
308
308
  return slice(index, position);
309
309
  }
310
310
 
311
- // ../../node_modules/stylis/src/Parser.js
311
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js
312
312
  function compile(value) {
313
313
  return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
314
314
  }
@@ -457,7 +457,7 @@ function declaration(value, root, parent, length2) {
457
457
  return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
458
458
  }
459
459
 
460
- // ../../node_modules/stylis/src/Serializer.js
460
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js
461
461
  function serialize(children, callback) {
462
462
  var output = "";
463
463
  var length2 = sizeof(children);
@@ -482,7 +482,7 @@ function stringify(element, index, children, callback) {
482
482
  return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
483
483
  }
484
484
 
485
- // ../../node_modules/stylis/src/Middleware.js
485
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js
486
486
  function middleware(collection) {
487
487
  var length2 = sizeof(collection);
488
488
  return function(element, index, children, callback) {
@@ -501,7 +501,7 @@ function rulesheet(callback) {
501
501
  };
502
502
  }
503
503
 
504
- // ../../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
504
+ // ../../node_modules/.pnpm/@emotion+weak-memoize@0.4.0/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
505
505
  var weakMemoize = function weakMemoize2(func) {
506
506
  var cache = /* @__PURE__ */ new WeakMap();
507
507
  return function(arg) {
@@ -514,7 +514,7 @@ var weakMemoize = function weakMemoize2(func) {
514
514
  };
515
515
  };
516
516
 
517
- // ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
517
+ // ../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
518
518
  function memoize(fn) {
519
519
  var cache = /* @__PURE__ */ Object.create(null);
520
520
  return function(arg) {
@@ -523,7 +523,7 @@ function memoize(fn) {
523
523
  };
524
524
  }
525
525
 
526
- // ../../node_modules/@emotion/cache/dist/emotion-cache.esm.js
526
+ // ../../node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.esm.js
527
527
  var isBrowser = typeof document !== "undefined";
528
528
  var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
529
529
  var previous = 0;
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import React from "react";
4
4
  // index.tsx
5
5
  import { useEffect, useState } from "react";
6
6
 
7
- // ../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
7
+ // ../../node_modules/.pnpm/@emotion+sheet@1.4.0/node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
8
8
  var isDevelopment = false;
9
9
  function sheetForTag(tag) {
10
10
  if (tag.sheet) {
@@ -87,7 +87,7 @@ var StyleSheet = /* @__PURE__ */ (function() {
87
87
  return StyleSheet2;
88
88
  })();
89
89
 
90
- // ../../node_modules/stylis/src/Enum.js
90
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Enum.js
91
91
  var MS = "-ms-";
92
92
  var MOZ = "-moz-";
93
93
  var WEBKIT = "-webkit-";
@@ -98,7 +98,7 @@ var IMPORT = "@import";
98
98
  var KEYFRAMES = "@keyframes";
99
99
  var LAYER = "@layer";
100
100
 
101
- // ../../node_modules/stylis/src/Utility.js
101
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Utility.js
102
102
  var abs = Math.abs;
103
103
  var from = String.fromCharCode;
104
104
  var assign = Object.assign;
@@ -136,7 +136,7 @@ function combine(array, callback) {
136
136
  return array.map(callback).join("");
137
137
  }
138
138
 
139
- // ../../node_modules/stylis/src/Tokenizer.js
139
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Tokenizer.js
140
140
  var line = 1;
141
141
  var column = 1;
142
142
  var length = 0;
@@ -272,7 +272,7 @@ function identifier(index) {
272
272
  return slice(index, position);
273
273
  }
274
274
 
275
- // ../../node_modules/stylis/src/Parser.js
275
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Parser.js
276
276
  function compile(value) {
277
277
  return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
278
278
  }
@@ -421,7 +421,7 @@ function declaration(value, root, parent, length2) {
421
421
  return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
422
422
  }
423
423
 
424
- // ../../node_modules/stylis/src/Serializer.js
424
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Serializer.js
425
425
  function serialize(children, callback) {
426
426
  var output = "";
427
427
  var length2 = sizeof(children);
@@ -446,7 +446,7 @@ function stringify(element, index, children, callback) {
446
446
  return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
447
447
  }
448
448
 
449
- // ../../node_modules/stylis/src/Middleware.js
449
+ // ../../node_modules/.pnpm/stylis@4.2.0/node_modules/stylis/src/Middleware.js
450
450
  function middleware(collection) {
451
451
  var length2 = sizeof(collection);
452
452
  return function(element, index, children, callback) {
@@ -465,7 +465,7 @@ function rulesheet(callback) {
465
465
  };
466
466
  }
467
467
 
468
- // ../../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
468
+ // ../../node_modules/.pnpm/@emotion+weak-memoize@0.4.0/node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
469
469
  var weakMemoize = function weakMemoize2(func) {
470
470
  var cache = /* @__PURE__ */ new WeakMap();
471
471
  return function(arg) {
@@ -478,7 +478,7 @@ var weakMemoize = function weakMemoize2(func) {
478
478
  };
479
479
  };
480
480
 
481
- // ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
481
+ // ../../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
482
482
  function memoize(fn) {
483
483
  var cache = /* @__PURE__ */ Object.create(null);
484
484
  return function(arg) {
@@ -487,7 +487,7 @@ function memoize(fn) {
487
487
  };
488
488
  }
489
489
 
490
- // ../../node_modules/@emotion/cache/dist/emotion-cache.esm.js
490
+ // ../../node_modules/.pnpm/@emotion+cache@11.14.0/node_modules/@emotion/cache/dist/emotion-cache.esm.js
491
491
  var isBrowser = typeof document !== "undefined";
492
492
  var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
493
493
  var previous = 0;
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-emotion-cache",
3
- "version": "0.23.0-canary.fb9392de",
3
+ "version": "0.24.0-canary.0575ba70",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
- "repository": "puckeditor/puck",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "puckeditor/puck"
8
+ },
6
9
  "bugs": "https://github.com/puckeditor/puck/issues",
7
10
  "homepage": "https://puckeditor.com",
8
11
  "private": false,
@@ -14,29 +17,28 @@
14
17
  "types": "./dist/index.d.ts"
15
18
  },
16
19
  "license": "MIT",
17
- "scripts": {
18
- "lint": "eslint \"**/*.ts*\"",
19
- "build": "rm -rf dist && tsup index.tsx",
20
- "prepare": "yarn build"
21
- },
22
20
  "files": [
23
21
  "dist"
24
22
  ],
25
23
  "devDependencies": {
26
24
  "@emotion/react": "^11.13.3",
27
- "@puckeditor/core": "^0.23.0-canary.fb9392de",
25
+ "@puckeditor/core": "^0.24.0-canary.0575ba70",
28
26
  "@types/minimatch": "3.0.5",
29
27
  "@types/react": "^19.2.7",
30
28
  "@types/react-dom": "^19.0.2",
31
29
  "eslint": "^9.0.0",
32
- "eslint-config-custom": "*",
33
- "tsconfig": "*",
30
+ "eslint-config-custom": "0.0.0",
31
+ "tsconfig": "0.0.0",
34
32
  "tsup": "^8.2.4",
35
- "tsup-config": "*",
33
+ "tsup-config": "0.0.0",
36
34
  "typescript": "^5.5.4"
37
35
  },
38
36
  "peerDependencies": {
39
37
  "@emotion/react": "^11.0.0",
40
38
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
39
+ },
40
+ "scripts": {
41
+ "lint": "eslint \"**/*.ts*\"",
42
+ "build": "rm -rf dist && tsup index.tsx"
41
43
  }
42
- }
44
+ }