@measured/puck 0.20.0-canary.e25949a6 → 0.20.0-canary.f2d031fb

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <div align="center">
4
4
 
5
- <a href="https://puckeditor.com">
5
+ <a href="https://puckeditor.com?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=logo">
6
6
  <picture>
7
7
  <source media="(prefers-color-scheme: dark)" srcset="https://res.cloudinary.com/die3nptcg/image/upload/Puck_Logo_White_RGB_j2rwgg.svg" height="100px" aria-label="Puck logo">
8
8
  <img src="https://res.cloudinary.com/die3nptcg/image/upload/Puck_Logo_Black_RGB_dqsjag.svg" height="100px" aria-label="Puck logo">
@@ -11,7 +11,7 @@
11
11
 
12
12
  _The visual editor for React_
13
13
 
14
- [Documentation](https://puckeditor.com/docs) • [Demo](https://demo.puckeditor.com/edit) • [Discord](https://discord.gg/V9mDAhuxyZ) • [Contributing](https://github.com/puckeditor/puck/blob/main/CONTRIBUTING.md)
14
+ [Documentation](https://puckeditor.com/docs?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=docs_link) • [Demo](https://demo.puckeditor.com/edit?utm_source=readme&utm_medium=code&utm_campaign=repo&utm_contents=demo_link) • [Discord](https://discord.gg/V9mDAhuxyZ) • [Contributing](https://github.com/puckeditor/puck/blob/main/CONTRIBUTING.md)
15
15
 
16
16
  ⭐️ Enjoying Puck? Please [leave a star](https://github.com/puckeditor/puck)!
17
17
 
@@ -86,7 +86,7 @@ export function Page() {
86
86
 
87
87
  ## Recipes
88
88
 
89
- Use `create-puck-app` to quickly spin up a a pre-configured app based on our provided [recipes](https://github.com/measuredco/puck/tree/main/recipes):
89
+ Use `create-puck-app` to quickly spin up a a pre-configured app based on our provided [recipes](https://github.com/puckeditor/puck/tree/main/recipes):
90
90
 
91
91
  ```sh
92
92
  npx create-puck-app my-app
@@ -94,21 +94,21 @@ npx create-puck-app my-app
94
94
 
95
95
  Available recipes include:
96
96
 
97
- - [**next**](https://github.com/measuredco/puck/tree/main/recipes/next): Next.js example, using App Router and static page generation
98
- - [**remix**](https://github.com/measuredco/puck/tree/main/recipes/remix): Remix Run v2 example, using dynamic routes at root-level
99
- - [**react-router**](https://github.com/measuredco/puck/tree/main/recipes/react-router): React Router v7 app example, using dynamic routes to create pages at any level
97
+ - [**next**](https://github.com/puckeditor/puck/tree/main/recipes/next): Next.js example, using App Router and static page generation
98
+ - [**remix**](https://github.com/puckeditor/puck/tree/main/recipes/remix): Remix Run v2 example, using dynamic routes at root-level
99
+ - [**react-router**](https://github.com/puckeditor/puck/tree/main/recipes/react-router): React Router v7 app example, using dynamic routes to create pages at any level
100
100
 
101
101
  ## Community
102
102
 
103
103
  - [Discord server](https://discord.gg/D9e4E3MQVZ) for discussions
104
- - [awesome-puck](https://github.com/measuredco/awesome-puck) community repo for plugins, custom fields & more
104
+ - [awesome-puck](https://github.com/puckeditor/awesome-puck) community repo for plugins, custom fields & more
105
105
 
106
106
  ## Get support
107
107
 
108
- If you have any questions about Puck, please open a [GitHub issue](https://github.com/measuredco/puck/issues) or join us on [Discord](https://discord.gg/D9e4E3MQVZ).
108
+ If you have any questions about Puck, please open a [GitHub issue](https://github.com/puckeditor/puck/issues) or join us on [Discord](https://discord.gg/D9e4E3MQVZ).
109
109
 
110
110
  Or [book a discovery call](https://app.cal.com/chrisvxd/puck-enquiry/) for hands-on support and consultancy.
111
111
 
112
112
  ## License
113
113
 
114
- MIT © [The Puck Contributors](https://github.com/measuredco/puck/graphs/contributors)
114
+ MIT © [The Puck Contributors](https://github.com/puckeditor/puck/graphs/contributors)
@@ -5751,10 +5751,15 @@ var InlineTextFieldInternal = ({
5751
5751
  e.stopPropagation();
5752
5752
  },
5753
5753
  onKeyDown: (e) => {
5754
+ e.stopPropagation();
5754
5755
  if (disableLineBreaks && e.key === "Enter" || isReadOnly) {
5755
5756
  e.preventDefault();
5756
5757
  }
5757
5758
  },
5759
+ onKeyUp: (e) => {
5760
+ e.stopPropagation();
5761
+ e.preventDefault();
5762
+ },
5758
5763
  onMouseOverCapture: () => setIsHovering(true),
5759
5764
  onMouseOutCapture: () => setIsHovering(false),
5760
5765
  onFocus: () => setIsFocused(true),
@@ -6487,7 +6492,7 @@ var SidebarSection = ({
6487
6492
 
6488
6493
  // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css#css-module
6489
6494
  init_react_import();
6490
- var styles_module_default15 = { "Puck": "_Puck_vnhjy_19", "Puck-portal": "_Puck-portal_vnhjy_31", "PuckLayout-inner": "_PuckLayout-inner_vnhjy_38", "PuckLayout--mounted": "_PuckLayout--mounted_vnhjy_50", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_vnhjy_54", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_vnhjy_60", "PuckLayout-mounted": "_PuckLayout-mounted_vnhjy_74", "PuckLayout": "_PuckLayout_vnhjy_38" };
6495
+ var styles_module_default15 = { "Puck": "_Puck_1yxlw_19", "Puck-portal": "_Puck-portal_1yxlw_31", "PuckLayout-inner": "_PuckLayout-inner_1yxlw_38", "PuckLayout--mounted": "_PuckLayout--mounted_1yxlw_59", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_1yxlw_63", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_1yxlw_69", "PuckLayout-mounted": "_PuckLayout-mounted_1yxlw_83", "PuckLayout": "_PuckLayout_1yxlw_38" };
6491
6496
 
6492
6497
  // components/Puck/components/Fields/index.tsx
6493
6498
  init_react_import();
@@ -8266,7 +8271,6 @@ var Sidebar = ({
8266
8271
  position,
8267
8272
  sidebarRef,
8268
8273
  isVisible,
8269
- width,
8270
8274
  onResize,
8271
8275
  onResizeEnd,
8272
8276
  children
@@ -8634,6 +8638,13 @@ function PuckLayout({ children }) {
8634
8638
  }
8635
8639
  }, [ready, iframe.enabled]);
8636
8640
  usePreviewModeHotkeys();
8641
+ const layoutOptions = {};
8642
+ if (leftWidth) {
8643
+ layoutOptions["--puck-user-left-side-bar-width"] = `${leftWidth}px`;
8644
+ }
8645
+ if (rightWidth) {
8646
+ layoutOptions["--puck-user-right-side-bar-width"] = `${rightWidth}px`;
8647
+ }
8637
8648
  return /* @__PURE__ */ jsxs21("div", { className: `Puck ${getClassName31()}`, children: [
8638
8649
  /* @__PURE__ */ jsx45(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ jsx45(CustomPuck, { children: children || /* @__PURE__ */ jsx45(FrameProvider, { children: /* @__PURE__ */ jsx45(
8639
8650
  "div",
@@ -8647,13 +8658,7 @@ function PuckLayout({ children }) {
8647
8658
  "div",
8648
8659
  {
8649
8660
  className: getLayoutClassName("inner"),
8650
- style: {
8651
- gridTemplateColumns: `
8652
- ${leftSideBarVisible ? leftWidth ? `${leftWidth}px` : "var(--puck-side-bar-width)" : "0"}
8653
- var(--puck-frame-width)
8654
- ${rightSideBarVisible ? rightWidth ? `${rightWidth}px` : "var(--puck-side-bar-width)" : "0"}
8655
- `
8656
- },
8661
+ style: layoutOptions,
8657
8662
  children: [
8658
8663
  /* @__PURE__ */ jsx45(Header, {}),
8659
8664
  /* @__PURE__ */ jsxs21(
@@ -8662,7 +8667,6 @@ function PuckLayout({ children }) {
8662
8667
  position: "left",
8663
8668
  sidebarRef: leftSidebarRef,
8664
8669
  isVisible: leftSideBarVisible,
8665
- width: leftWidth,
8666
8670
  onResize: setLeftWidth,
8667
8671
  onResizeEnd: handleLeftSidebarResizeEnd,
8668
8672
  children: [
@@ -8678,7 +8682,6 @@ function PuckLayout({ children }) {
8678
8682
  position: "right",
8679
8683
  sidebarRef: rightSidebarRef,
8680
8684
  isVisible: rightSideBarVisible,
8681
- width: rightWidth,
8682
8685
  onResize: setRightWidth,
8683
8686
  onResizeEnd: handleRightSidebarResizeEnd,
8684
8687
  children: /* @__PURE__ */ jsx45(FieldSideBar, {})
package/dist/index.css CHANGED
@@ -1430,23 +1430,25 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1430
1430
  }
1431
1431
 
1432
1432
  /* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css/#css-module-data */
1433
- ._Puck_vnhjy_19 {
1433
+ ._Puck_1yxlw_19 {
1434
1434
  --puck-space-px: 16px;
1435
1435
  font-family: var(--puck-font-family);
1436
1436
  overflow-x: hidden;
1437
1437
  }
1438
1438
  @media (min-width: 766px) {
1439
- ._Puck_vnhjy_19 {
1439
+ ._Puck_1yxlw_19 {
1440
1440
  overflow-x: auto;
1441
1441
  }
1442
1442
  }
1443
- ._Puck-portal_vnhjy_31 {
1443
+ ._Puck-portal_1yxlw_31 {
1444
1444
  position: relative;
1445
1445
  z-index: 2;
1446
1446
  }
1447
- ._PuckLayout-inner_vnhjy_38 {
1447
+ ._PuckLayout-inner_1yxlw_38 {
1448
1448
  --puck-frame-width: auto;
1449
1449
  --puck-side-bar-width: 0px;
1450
+ --puck-left-side-bar-width: var( --puck-user-left-side-bar-width, var(--puck-side-bar-width) );
1451
+ --puck-right-side-bar-width: var( --puck-user-right-side-bar-width, var(--puck-side-bar-width) );
1450
1452
  display: grid;
1451
1453
  grid-template-areas: "header header header" "left editor right";
1452
1454
  grid-template-columns: 0 var(--puck-frame-width) 0;
@@ -1455,50 +1457,50 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1455
1457
  position: relative;
1456
1458
  z-index: 0;
1457
1459
  }
1458
- ._PuckLayout--mounted_vnhjy_50 ._PuckLayout-inner_vnhjy_38 {
1460
+ ._PuckLayout--mounted_1yxlw_59 ._PuckLayout-inner_1yxlw_38 {
1459
1461
  --puck-side-bar-width: 186px;
1460
1462
  }
1461
- ._PuckLayout--leftSideBarVisible_vnhjy_54 ._PuckLayout-inner_vnhjy_38 {
1462
- grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) 0;
1463
+ ._PuckLayout--leftSideBarVisible_1yxlw_63 ._PuckLayout-inner_1yxlw_38 {
1464
+ grid-template-columns: var(--puck-left-side-bar-width) var(--puck-frame-width) 0;
1463
1465
  }
1464
- ._PuckLayout--rightSideBarVisible_vnhjy_60 ._PuckLayout-inner_vnhjy_38 {
1465
- grid-template-columns: 0 var(--puck-frame-width) var(--puck-side-bar-width);
1466
+ ._PuckLayout--rightSideBarVisible_1yxlw_69 ._PuckLayout-inner_1yxlw_38 {
1467
+ grid-template-columns: 0 var(--puck-frame-width) var(--puck-right-side-bar-width);
1466
1468
  }
1467
- ._PuckLayout--leftSideBarVisible_vnhjy_54._PuckLayout--rightSideBarVisible_vnhjy_60 ._PuckLayout-inner_vnhjy_38 {
1468
- grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) var(--puck-side-bar-width);
1469
+ ._PuckLayout--leftSideBarVisible_1yxlw_63._PuckLayout--rightSideBarVisible_1yxlw_69 ._PuckLayout-inner_1yxlw_38 {
1470
+ grid-template-columns: var(--puck-left-side-bar-width) var(--puck-frame-width) var(--puck-right-side-bar-width);
1469
1471
  }
1470
1472
  @media (min-width: 458px) {
1471
- ._PuckLayout-mounted_vnhjy_74 ._PuckLayout-inner_vnhjy_38 {
1473
+ ._PuckLayout-mounted_1yxlw_83 ._PuckLayout-inner_1yxlw_38 {
1472
1474
  --puck-frame-width: minmax(266px, auto);
1473
1475
  }
1474
1476
  }
1475
1477
  @media (min-width: 638px) {
1476
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1478
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1477
1479
  --puck-side-bar-width: minmax(186px, 250px);
1478
1480
  }
1479
1481
  }
1480
1482
  @media (min-width: 766px) {
1481
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1483
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1482
1484
  --puck-frame-width: auto;
1483
1485
  }
1484
1486
  }
1485
1487
  @media (min-width: 990px) {
1486
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1488
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1487
1489
  --puck-side-bar-width: 256px;
1488
1490
  }
1489
1491
  }
1490
1492
  @media (min-width: 1198px) {
1491
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1493
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1492
1494
  --puck-side-bar-width: 274px;
1493
1495
  }
1494
1496
  }
1495
1497
  @media (min-width: 1398px) {
1496
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1498
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1497
1499
  --puck-side-bar-width: 290px;
1498
1500
  }
1499
1501
  }
1500
1502
  @media (min-width: 1598px) {
1501
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1503
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1502
1504
  --puck-side-bar-width: 320px;
1503
1505
  }
1504
1506
  }
package/dist/index.d.mts CHANGED
@@ -268,8 +268,8 @@ type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<User
268
268
  getPermissions: GetPermissions<UserConfig>;
269
269
  refreshPermissions: RefreshPermissions<UserConfig>;
270
270
  selectedItem: G["UserComponentData"] | null;
271
- getItemBySelector: (selector: ItemSelector) => ComponentData | undefined;
272
- getItemById: (id: string) => ComponentData | undefined;
271
+ getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined;
272
+ getItemById: (id: string) => G["UserComponentData"] | undefined;
273
273
  getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
274
274
  history: {
275
275
  back: HistorySlice["back"];
package/dist/index.d.ts CHANGED
@@ -268,8 +268,8 @@ type UsePuckData<UserConfig extends Config = Config, G extends UserGenerics<User
268
268
  getPermissions: GetPermissions<UserConfig>;
269
269
  refreshPermissions: RefreshPermissions<UserConfig>;
270
270
  selectedItem: G["UserComponentData"] | null;
271
- getItemBySelector: (selector: ItemSelector) => ComponentData | undefined;
272
- getItemById: (id: string) => ComponentData | undefined;
271
+ getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined;
272
+ getItemById: (id: string) => G["UserComponentData"] | undefined;
273
273
  getSelectorForId: (id: string) => Required<ItemSelector> | undefined;
274
274
  history: {
275
275
  back: HistorySlice["back"];
package/dist/index.js CHANGED
@@ -5698,10 +5698,15 @@ var InlineTextFieldInternal = ({
5698
5698
  e.stopPropagation();
5699
5699
  },
5700
5700
  onKeyDown: (e) => {
5701
+ e.stopPropagation();
5701
5702
  if (disableLineBreaks && e.key === "Enter" || isReadOnly) {
5702
5703
  e.preventDefault();
5703
5704
  }
5704
5705
  },
5706
+ onKeyUp: (e) => {
5707
+ e.stopPropagation();
5708
+ e.preventDefault();
5709
+ },
5705
5710
  onMouseOverCapture: () => setIsHovering(true),
5706
5711
  onMouseOutCapture: () => setIsHovering(false),
5707
5712
  onFocus: () => setIsFocused(true),
@@ -7152,7 +7157,7 @@ var SidebarSection = ({
7152
7157
 
7153
7158
  // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css#css-module
7154
7159
  init_react_import();
7155
- var styles_module_default15 = { "Puck": "_Puck_vnhjy_19", "Puck-portal": "_Puck-portal_vnhjy_31", "PuckLayout-inner": "_PuckLayout-inner_vnhjy_38", "PuckLayout--mounted": "_PuckLayout--mounted_vnhjy_50", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_vnhjy_54", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_vnhjy_60", "PuckLayout-mounted": "_PuckLayout-mounted_vnhjy_74", "PuckLayout": "_PuckLayout_vnhjy_38" };
7160
+ var styles_module_default15 = { "Puck": "_Puck_1yxlw_19", "Puck-portal": "_Puck-portal_1yxlw_31", "PuckLayout-inner": "_PuckLayout-inner_1yxlw_38", "PuckLayout--mounted": "_PuckLayout--mounted_1yxlw_59", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_1yxlw_63", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_1yxlw_69", "PuckLayout-mounted": "_PuckLayout-mounted_1yxlw_83", "PuckLayout": "_PuckLayout_1yxlw_38" };
7156
7161
 
7157
7162
  // components/Puck/components/Fields/index.tsx
7158
7163
  init_react_import();
@@ -9008,7 +9013,6 @@ var Sidebar = ({
9008
9013
  position,
9009
9014
  sidebarRef,
9010
9015
  isVisible,
9011
- width,
9012
9016
  onResize,
9013
9017
  onResizeEnd,
9014
9018
  children
@@ -9376,6 +9380,13 @@ function PuckLayout({ children }) {
9376
9380
  }
9377
9381
  }, [ready, iframe.enabled]);
9378
9382
  usePreviewModeHotkeys();
9383
+ const layoutOptions = {};
9384
+ if (leftWidth) {
9385
+ layoutOptions["--puck-user-left-side-bar-width"] = `${leftWidth}px`;
9386
+ }
9387
+ if (rightWidth) {
9388
+ layoutOptions["--puck-user-right-side-bar-width"] = `${rightWidth}px`;
9389
+ }
9379
9390
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: `Puck ${getClassName31()}`, children: [
9380
9391
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CustomPuck, { children: children || /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FrameProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9381
9392
  "div",
@@ -9389,13 +9400,7 @@ function PuckLayout({ children }) {
9389
9400
  "div",
9390
9401
  {
9391
9402
  className: getLayoutClassName("inner"),
9392
- style: {
9393
- gridTemplateColumns: `
9394
- ${leftSideBarVisible ? leftWidth ? `${leftWidth}px` : "var(--puck-side-bar-width)" : "0"}
9395
- var(--puck-frame-width)
9396
- ${rightSideBarVisible ? rightWidth ? `${rightWidth}px` : "var(--puck-side-bar-width)" : "0"}
9397
- `
9398
- },
9403
+ style: layoutOptions,
9399
9404
  children: [
9400
9405
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Header, {}),
9401
9406
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
@@ -9404,7 +9409,6 @@ function PuckLayout({ children }) {
9404
9409
  position: "left",
9405
9410
  sidebarRef: leftSidebarRef,
9406
9411
  isVisible: leftSideBarVisible,
9407
- width: leftWidth,
9408
9412
  onResize: setLeftWidth,
9409
9413
  onResizeEnd: handleLeftSidebarResizeEnd,
9410
9414
  children: [
@@ -9420,7 +9424,6 @@ function PuckLayout({ children }) {
9420
9424
  position: "right",
9421
9425
  sidebarRef: rightSidebarRef,
9422
9426
  isVisible: rightSideBarVisible,
9423
- width: rightWidth,
9424
9427
  onResize: setRightWidth,
9425
9428
  onResizeEnd: handleRightSidebarResizeEnd,
9426
9429
  children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldSideBar, {})
package/dist/index.mjs CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-FYXJ5FPS.mjs";
21
+ } from "./chunk-PIG4I6UF.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
@@ -1428,23 +1428,25 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1428
1428
  }
1429
1429
 
1430
1430
  /* css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css/#css-module-data */
1431
- ._Puck_vnhjy_19 {
1431
+ ._Puck_1yxlw_19 {
1432
1432
  --puck-space-px: 16px;
1433
1433
  font-family: var(--puck-font-family);
1434
1434
  overflow-x: hidden;
1435
1435
  }
1436
1436
  @media (min-width: 766px) {
1437
- ._Puck_vnhjy_19 {
1437
+ ._Puck_1yxlw_19 {
1438
1438
  overflow-x: auto;
1439
1439
  }
1440
1440
  }
1441
- ._Puck-portal_vnhjy_31 {
1441
+ ._Puck-portal_1yxlw_31 {
1442
1442
  position: relative;
1443
1443
  z-index: 2;
1444
1444
  }
1445
- ._PuckLayout-inner_vnhjy_38 {
1445
+ ._PuckLayout-inner_1yxlw_38 {
1446
1446
  --puck-frame-width: auto;
1447
1447
  --puck-side-bar-width: 0px;
1448
+ --puck-left-side-bar-width: var( --puck-user-left-side-bar-width, var(--puck-side-bar-width) );
1449
+ --puck-right-side-bar-width: var( --puck-user-right-side-bar-width, var(--puck-side-bar-width) );
1448
1450
  display: grid;
1449
1451
  grid-template-areas: "header header header" "left editor right";
1450
1452
  grid-template-columns: 0 var(--puck-frame-width) 0;
@@ -1453,50 +1455,50 @@ body:has(._DropZone--isAnimating_1i2sv_68:empty) [data-puck-overlay] {
1453
1455
  position: relative;
1454
1456
  z-index: 0;
1455
1457
  }
1456
- ._PuckLayout--mounted_vnhjy_50 ._PuckLayout-inner_vnhjy_38 {
1458
+ ._PuckLayout--mounted_1yxlw_59 ._PuckLayout-inner_1yxlw_38 {
1457
1459
  --puck-side-bar-width: 186px;
1458
1460
  }
1459
- ._PuckLayout--leftSideBarVisible_vnhjy_54 ._PuckLayout-inner_vnhjy_38 {
1460
- grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) 0;
1461
+ ._PuckLayout--leftSideBarVisible_1yxlw_63 ._PuckLayout-inner_1yxlw_38 {
1462
+ grid-template-columns: var(--puck-left-side-bar-width) var(--puck-frame-width) 0;
1461
1463
  }
1462
- ._PuckLayout--rightSideBarVisible_vnhjy_60 ._PuckLayout-inner_vnhjy_38 {
1463
- grid-template-columns: 0 var(--puck-frame-width) var(--puck-side-bar-width);
1464
+ ._PuckLayout--rightSideBarVisible_1yxlw_69 ._PuckLayout-inner_1yxlw_38 {
1465
+ grid-template-columns: 0 var(--puck-frame-width) var(--puck-right-side-bar-width);
1464
1466
  }
1465
- ._PuckLayout--leftSideBarVisible_vnhjy_54._PuckLayout--rightSideBarVisible_vnhjy_60 ._PuckLayout-inner_vnhjy_38 {
1466
- grid-template-columns: var(--puck-side-bar-width) var(--puck-frame-width) var(--puck-side-bar-width);
1467
+ ._PuckLayout--leftSideBarVisible_1yxlw_63._PuckLayout--rightSideBarVisible_1yxlw_69 ._PuckLayout-inner_1yxlw_38 {
1468
+ grid-template-columns: var(--puck-left-side-bar-width) var(--puck-frame-width) var(--puck-right-side-bar-width);
1467
1469
  }
1468
1470
  @media (min-width: 458px) {
1469
- ._PuckLayout-mounted_vnhjy_74 ._PuckLayout-inner_vnhjy_38 {
1471
+ ._PuckLayout-mounted_1yxlw_83 ._PuckLayout-inner_1yxlw_38 {
1470
1472
  --puck-frame-width: minmax(266px, auto);
1471
1473
  }
1472
1474
  }
1473
1475
  @media (min-width: 638px) {
1474
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1476
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1475
1477
  --puck-side-bar-width: minmax(186px, 250px);
1476
1478
  }
1477
1479
  }
1478
1480
  @media (min-width: 766px) {
1479
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1481
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1480
1482
  --puck-frame-width: auto;
1481
1483
  }
1482
1484
  }
1483
1485
  @media (min-width: 990px) {
1484
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1486
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1485
1487
  --puck-side-bar-width: 256px;
1486
1488
  }
1487
1489
  }
1488
1490
  @media (min-width: 1198px) {
1489
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1491
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1490
1492
  --puck-side-bar-width: 274px;
1491
1493
  }
1492
1494
  }
1493
1495
  @media (min-width: 1398px) {
1494
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1496
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1495
1497
  --puck-side-bar-width: 290px;
1496
1498
  }
1497
1499
  }
1498
1500
  @media (min-width: 1598px) {
1499
- ._PuckLayout_vnhjy_38 ._PuckLayout-inner_vnhjy_38 {
1501
+ ._PuckLayout_1yxlw_38 ._PuckLayout-inner_1yxlw_38 {
1500
1502
  --puck-side-bar-width: 320px;
1501
1503
  }
1502
1504
  }
@@ -5698,10 +5698,15 @@ var InlineTextFieldInternal = ({
5698
5698
  e.stopPropagation();
5699
5699
  },
5700
5700
  onKeyDown: (e) => {
5701
+ e.stopPropagation();
5701
5702
  if (disableLineBreaks && e.key === "Enter" || isReadOnly) {
5702
5703
  e.preventDefault();
5703
5704
  }
5704
5705
  },
5706
+ onKeyUp: (e) => {
5707
+ e.stopPropagation();
5708
+ e.preventDefault();
5709
+ },
5705
5710
  onMouseOverCapture: () => setIsHovering(true),
5706
5711
  onMouseOutCapture: () => setIsHovering(false),
5707
5712
  onFocus: () => setIsFocused(true),
@@ -7152,7 +7157,7 @@ var SidebarSection = ({
7152
7157
 
7153
7158
  // css-module:/home/runner/work/puck/puck/packages/core/components/Puck/styles.module.css#css-module
7154
7159
  init_react_import();
7155
- var styles_module_default15 = { "Puck": "_Puck_vnhjy_19", "Puck-portal": "_Puck-portal_vnhjy_31", "PuckLayout-inner": "_PuckLayout-inner_vnhjy_38", "PuckLayout--mounted": "_PuckLayout--mounted_vnhjy_50", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_vnhjy_54", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_vnhjy_60", "PuckLayout-mounted": "_PuckLayout-mounted_vnhjy_74", "PuckLayout": "_PuckLayout_vnhjy_38" };
7160
+ var styles_module_default15 = { "Puck": "_Puck_1yxlw_19", "Puck-portal": "_Puck-portal_1yxlw_31", "PuckLayout-inner": "_PuckLayout-inner_1yxlw_38", "PuckLayout--mounted": "_PuckLayout--mounted_1yxlw_59", "PuckLayout--leftSideBarVisible": "_PuckLayout--leftSideBarVisible_1yxlw_63", "PuckLayout--rightSideBarVisible": "_PuckLayout--rightSideBarVisible_1yxlw_69", "PuckLayout-mounted": "_PuckLayout-mounted_1yxlw_83", "PuckLayout": "_PuckLayout_1yxlw_38" };
7156
7161
 
7157
7162
  // components/Puck/components/Fields/index.tsx
7158
7163
  init_react_import();
@@ -9008,7 +9013,6 @@ var Sidebar = ({
9008
9013
  position,
9009
9014
  sidebarRef,
9010
9015
  isVisible,
9011
- width,
9012
9016
  onResize,
9013
9017
  onResizeEnd,
9014
9018
  children
@@ -9376,6 +9380,13 @@ function PuckLayout({ children }) {
9376
9380
  }
9377
9381
  }, [ready, iframe.enabled]);
9378
9382
  usePreviewModeHotkeys();
9383
+ const layoutOptions = {};
9384
+ if (leftWidth) {
9385
+ layoutOptions["--puck-user-left-side-bar-width"] = `${leftWidth}px`;
9386
+ }
9387
+ if (rightWidth) {
9388
+ layoutOptions["--puck-user-right-side-bar-width"] = `${rightWidth}px`;
9389
+ }
9379
9390
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: `Puck ${getClassName31()}`, children: [
9380
9391
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DragDropContext, { disableAutoScroll: dnd == null ? void 0 : dnd.disableAutoScroll, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(CustomPuck, { children: children || /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FrameProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
9381
9392
  "div",
@@ -9389,13 +9400,7 @@ function PuckLayout({ children }) {
9389
9400
  "div",
9390
9401
  {
9391
9402
  className: getLayoutClassName("inner"),
9392
- style: {
9393
- gridTemplateColumns: `
9394
- ${leftSideBarVisible ? leftWidth ? `${leftWidth}px` : "var(--puck-side-bar-width)" : "0"}
9395
- var(--puck-frame-width)
9396
- ${rightSideBarVisible ? rightWidth ? `${rightWidth}px` : "var(--puck-side-bar-width)" : "0"}
9397
- `
9398
- },
9403
+ style: layoutOptions,
9399
9404
  children: [
9400
9405
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Header, {}),
9401
9406
  /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
@@ -9404,7 +9409,6 @@ function PuckLayout({ children }) {
9404
9409
  position: "left",
9405
9410
  sidebarRef: leftSidebarRef,
9406
9411
  isVisible: leftSideBarVisible,
9407
- width: leftWidth,
9408
9412
  onResize: setLeftWidth,
9409
9413
  onResizeEnd: handleLeftSidebarResizeEnd,
9410
9414
  children: [
@@ -9420,7 +9424,6 @@ function PuckLayout({ children }) {
9420
9424
  position: "right",
9421
9425
  sidebarRef: rightSidebarRef,
9422
9426
  isVisible: rightSideBarVisible,
9423
- width: rightWidth,
9424
9427
  onResize: setRightWidth,
9425
9428
  onResizeEnd: handleRightSidebarResizeEnd,
9426
9429
  children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldSideBar, {})
@@ -18,7 +18,7 @@ import {
18
18
  setDeep,
19
19
  useGetPuck,
20
20
  usePuck
21
- } from "./chunk-FYXJ5FPS.mjs";
21
+ } from "./chunk-PIG4I6UF.mjs";
22
22
  import {
23
23
  init_react_import,
24
24
  migrate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.20.0-canary.e25949a6",
3
+ "version": "0.20.0-canary.f2d031fb",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",