@puckeditor/plugin-pages 0.9.0-canary.d4a0bc62 → 0.9.0-canary.d582a110

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
@@ -929,15 +929,15 @@ p {
929
929
  }
930
930
 
931
931
  /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Menu/styles.module.css/#css-module-data */
932
- ._Menu_1tu16_1 {
932
+ ._Menu_1jr57_1 {
933
933
  display: flex;
934
934
  position: relative;
935
935
  }
936
- ._Menu-content_1tu16_6 {
936
+ ._Menu-content_1jr57_6 {
937
937
  outline: none;
938
938
  z-index: 1;
939
939
  }
940
- ._Menu-sections_1tu16_11 {
940
+ ._Menu-sections_1jr57_11 {
941
941
  background-color: white;
942
942
  border: 1px solid var(--puck-color-grey-09);
943
943
  border-radius: 8px;
@@ -947,40 +947,41 @@ p {
947
947
  padding-bottom: 4px;
948
948
  padding-top: 4px;
949
949
  }
950
- ._Menu-action_1tu16_22 {
950
+ ._Menu-action_1jr57_22 {
951
951
  background: none;
952
952
  border: none;
953
953
  margin-left: auto;
954
954
  padding: 0;
955
955
  }
956
- ._Menu-action_1tu16_22:hover:not(:disabled) {
956
+ ._Menu-action_1jr57_22:hover:not(:disabled) {
957
957
  cursor: pointer;
958
958
  opacity: 0.8;
959
959
  }
960
- ._Menu-action_1tu16_22:disabled {
960
+ ._Menu-action_1jr57_22:disabled {
961
961
  cursor: not-allowed;
962
962
  opacity: 0.5;
963
963
  }
964
- ._Menu-action_1tu16_22:focus-visible {
964
+ ._Menu-action_1jr57_22:focus-visible {
965
965
  outline: 2px solid var(--puck-color-azure-05);
966
966
  outline-offset: 2px;
967
967
  }
968
- ._Menu-list_1tu16_44 {
968
+ ._Menu-list_1jr57_44 {
969
969
  list-style: none;
970
970
  margin: 0;
971
971
  padding: 0;
972
972
  }
973
- ._Menu-list_1tu16_44 + ._Menu-list_1tu16_44 {
973
+ ._Menu-list_1jr57_44 + ._Menu-list_1jr57_44 {
974
974
  border-top: 1px solid var(--puck-color-grey-09);
975
975
  margin-top: 4px;
976
976
  }
977
- ._Menu-item_1tu16_55 {
977
+ ._Menu-item_1jr57_55 {
978
978
  align-items: center;
979
979
  background: none;
980
980
  border: none;
981
981
  box-sizing: border-box;
982
982
  color: var(--puck-color-grey-02);
983
983
  display: flex;
984
+ font-family: var(--puck-font-family);
984
985
  font-size: var(--puck-font-size-xxs);
985
986
  font-weight: 500;
986
987
  gap: 8px;
@@ -990,16 +991,16 @@ p {
990
991
  white-space: nowrap;
991
992
  width: 100%;
992
993
  }
993
- a._Menu-item_1tu16_55,
994
- button._Menu-item_1tu16_55 {
994
+ a._Menu-item_1jr57_55,
995
+ button._Menu-item_1jr57_55 {
995
996
  cursor: pointer;
996
997
  }
997
- a._Menu-item_1tu16_55:hover,
998
- button._Menu-item_1tu16_55:hover {
998
+ a._Menu-item_1jr57_55:hover,
999
+ button._Menu-item_1jr57_55:hover {
999
1000
  background-color: var(--puck-color-azure-11);
1000
1001
  color: var(--puck-color-azure-04);
1001
1002
  }
1002
- ._Menu-item--disabled_1tu16_83 {
1003
+ ._Menu-item--disabled_1jr57_84 {
1003
1004
  cursor: not-allowed;
1004
1005
  opacity: 0.5;
1005
1006
  }
@@ -1294,15 +1295,15 @@ button._Menu-item_1tu16_55:hover {
1294
1295
  }
1295
1296
 
1296
1297
  /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Tag/Tag.module.css/#css-module-data */
1297
- ._Tag_s2h0n_1 {
1298
+ ._Tag_162k8_1 {
1298
1299
  align-items: center;
1299
1300
  display: flex;
1300
- text-transform: uppercase;
1301
+ text-transform: lowercase;
1301
1302
  font-family: var(--puck-font-family-monospaced);
1302
- font-weight: 600;
1303
+ font-weight: 500;
1303
1304
  font-size: var(--puck-font-size-xxxs);
1304
1305
  gap: 6px;
1305
- border-radius: 4px;
1306
+ border-radius: 16px;
1306
1307
  border: 1px solid currentColor;
1307
1308
  color: var(--puck-color-grey-05);
1308
1309
  padding: 4px 8px;
@@ -1311,34 +1312,35 @@ button._Menu-item_1tu16_55:hover {
1311
1312
  position: relative;
1312
1313
  z-index: 0;
1313
1314
  }
1314
- ._Tag--borderless_s2h0n_21 {
1315
+ ._Tag--borderless_162k8_21 {
1315
1316
  border: none;
1316
1317
  }
1317
- ._Tag--colorBlue_s2h0n_25 {
1318
- color: var(--puck-color-azure-05);
1318
+ ._Tag--colorBlue_162k8_25 {
1319
+ background-color: var(--puck-color-azure-05);
1320
+ color: var(--puck-color-white);
1319
1321
  }
1320
- ._Tag--colorGreen_s2h0n_29 {
1322
+ ._Tag--colorGreen_162k8_30 {
1321
1323
  color: var(--puck-color-green-06);
1322
1324
  }
1323
- ._Tag--colorRed_s2h0n_33 {
1325
+ ._Tag--colorRed_162k8_34 {
1324
1326
  color: var(--puck-color-red-04);
1325
1327
  }
1326
- ._Tag--colorMuted_s2h0n_37 {
1327
- color: var(--puck-color-grey-06);
1328
+ ._Tag--colorMuted_162k8_38 {
1329
+ color: var(--puck-color-grey-05);
1328
1330
  }
1329
- ._Tag-sprite_s2h0n_41 {
1331
+ ._Tag-sprite_162k8_42 {
1330
1332
  display: flex;
1331
1333
  }
1332
- ._Tag--pulse_s2h0n_45 {
1333
- ._Tag-sprite_s2h0n_41 {
1334
+ ._Tag--pulse_162k8_46 {
1335
+ ._Tag-sprite_162k8_42 {
1334
1336
  background: currentColor;
1335
1337
  border-radius: 50%;
1336
1338
  height: 5px;
1337
1339
  position: relative;
1338
1340
  width: 5px;
1339
1341
  }
1340
- ._Tag-sprite_s2h0n_41::before {
1341
- animation: _pulse_s2h0n_1 1s 0s infinite alternate;
1342
+ ._Tag-sprite_162k8_42::before {
1343
+ animation: _pulse_162k8_1 1s 0s infinite alternate;
1342
1344
  animation-fill-mode: both;
1343
1345
  background-color: color-mix(in srgb, currentColor 25%, transparent);
1344
1346
  border-radius: 50%;
@@ -1352,7 +1354,7 @@ button._Menu-item_1tu16_55:hover {
1352
1354
  z-index: -1;
1353
1355
  }
1354
1356
  }
1355
- @keyframes _pulse_s2h0n_1 {
1357
+ @keyframes _pulse_162k8_1 {
1356
1358
  0% {
1357
1359
  transform: scale(1);
1358
1360
  }
@@ -1360,7 +1362,7 @@ button._Menu-item_1tu16_55:hover {
1360
1362
  transform: scale(2);
1361
1363
  }
1362
1364
  }
1363
- ._Tag-label_s2h0n_79 {
1365
+ ._Tag-label_162k8_80 {
1364
1366
  margin-top: 1px;
1365
1367
  }
1366
1368
 
package/dist/index.js CHANGED
@@ -5353,7 +5353,7 @@ var import_react16 = require("react");
5353
5353
 
5354
5354
  // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Menu/styles.module.css#css-module
5355
5355
  init_react_import();
5356
- var styles_module_default3 = { "Menu": "_Menu_1tu16_1", "Menu-content": "_Menu-content_1tu16_6", "Menu-sections": "_Menu-sections_1tu16_11", "Menu-action": "_Menu-action_1tu16_22", "Menu-list": "_Menu-list_1tu16_44", "Menu-item": "_Menu-item_1tu16_55", "Menu-item--disabled": "_Menu-item--disabled_1tu16_83" };
5356
+ var styles_module_default3 = { "Menu": "_Menu_1jr57_1", "Menu-content": "_Menu-content_1jr57_6", "Menu-sections": "_Menu-sections_1jr57_11", "Menu-action": "_Menu-action_1jr57_22", "Menu-list": "_Menu-list_1jr57_44", "Menu-item": "_Menu-item_1jr57_55", "Menu-item--disabled": "_Menu-item--disabled_1jr57_84" };
5357
5357
 
5358
5358
  // ../../node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.2.0_@types+react@19.2.0__@types+reac_e6e9e3f3089a7a72fc73cc2cd9dafc33/node_modules/@radix-ui/react-popover/dist/index.mjs
5359
5359
  init_react_import();
@@ -7994,7 +7994,7 @@ init_react_import();
7994
7994
 
7995
7995
  // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Tag/Tag.module.css#css-module
7996
7996
  init_react_import();
7997
- var Tag_module_default = { "Tag": "_Tag_s2h0n_1", "Tag--borderless": "_Tag--borderless_s2h0n_21", "Tag--colorBlue": "_Tag--colorBlue_s2h0n_25", "Tag--colorGreen": "_Tag--colorGreen_s2h0n_29", "Tag--colorRed": "_Tag--colorRed_s2h0n_33", "Tag--colorMuted": "_Tag--colorMuted_s2h0n_37", "Tag-sprite": "_Tag-sprite_s2h0n_41", "Tag--pulse": "_Tag--pulse_s2h0n_45", "pulse": "_pulse_s2h0n_1", "Tag-label": "_Tag-label_s2h0n_79" };
7997
+ var Tag_module_default = { "Tag": "_Tag_162k8_1", "Tag--borderless": "_Tag--borderless_162k8_21", "Tag--colorBlue": "_Tag--colorBlue_162k8_25", "Tag--colorGreen": "_Tag--colorGreen_162k8_30", "Tag--colorRed": "_Tag--colorRed_162k8_34", "Tag--colorMuted": "_Tag--colorMuted_162k8_38", "Tag-sprite": "_Tag-sprite_162k8_42", "Tag--pulse": "_Tag--pulse_162k8_46", "pulse": "_pulse_162k8_1", "Tag-label": "_Tag-label_162k8_80" };
7998
7998
 
7999
7999
  // ../platform-client/components/Tag/Tag.tsx
8000
8000
  var import_jsx_runtime40 = require("react/jsx-runtime");
@@ -22256,8 +22256,13 @@ var postMessageToParent = ({
22256
22256
  window.parent.postMessage(message2, parentOrigin);
22257
22257
  };
22258
22258
 
22259
+ // src/lib/is-embedded.ts
22260
+ init_react_import();
22261
+ var isEmbedded = () => typeof window !== "undefined" && window.self !== window.top;
22262
+
22259
22263
  // src/lib/request-token.ts
22260
22264
  var requestToken = (parentOrigin) => {
22265
+ if (!isEmbedded()) return Promise.resolve("");
22261
22266
  return new Promise((resolve) => {
22262
22267
  const handler = async (event) => {
22263
22268
  if (event.origin !== parentOrigin) return;
@@ -22298,6 +22303,7 @@ var getActiveVersion = ({
22298
22303
  init_react_import();
22299
22304
  var RETRY_INTERVAL_MS = 100;
22300
22305
  var waitForParentReady = (parentOrigin) => {
22306
+ if (!isEmbedded()) return Promise.resolve();
22301
22307
  return new Promise((resolve) => {
22302
22308
  let intervalId = 0;
22303
22309
  const sendReadyCheck = () => {
@@ -24514,8 +24520,8 @@ var PagePlugin = (opts) => {
24514
24520
  createPage("/");
24515
24521
  postToParent({ type: "DATA_READY" });
24516
24522
  }
24517
- setLoading(false);
24518
24523
  }
24524
+ setLoading(false);
24519
24525
  },
24520
24526
  [
24521
24527
  host,
@@ -24887,7 +24893,9 @@ var HeaderActions = (opts) => {
24887
24893
  }) => {
24888
24894
  setPageVersions(data.page.id, data.page.versions, data.page.path ?? path);
24889
24895
  setActivePage(data.page.path ?? path);
24890
- setActiveVersion(nextActiveVersion);
24896
+ setActiveVersion(
24897
+ data.page.versions?.some((version3) => version3.id === nextActiveVersion) ? nextActiveVersion : null
24898
+ );
24891
24899
  if (syncHistoryData) {
24892
24900
  syncSavedHistory(syncHistoryData);
24893
24901
  }
package/dist/index.mjs CHANGED
@@ -5345,7 +5345,7 @@ import { useState as useState25 } from "react";
5345
5345
 
5346
5346
  // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Menu/styles.module.css#css-module
5347
5347
  init_react_import();
5348
- var styles_module_default3 = { "Menu": "_Menu_1tu16_1", "Menu-content": "_Menu-content_1tu16_6", "Menu-sections": "_Menu-sections_1tu16_11", "Menu-action": "_Menu-action_1tu16_22", "Menu-list": "_Menu-list_1tu16_44", "Menu-item": "_Menu-item_1tu16_55", "Menu-item--disabled": "_Menu-item--disabled_1tu16_83" };
5348
+ var styles_module_default3 = { "Menu": "_Menu_1jr57_1", "Menu-content": "_Menu-content_1jr57_6", "Menu-sections": "_Menu-sections_1jr57_11", "Menu-action": "_Menu-action_1jr57_22", "Menu-list": "_Menu-list_1jr57_44", "Menu-item": "_Menu-item_1jr57_55", "Menu-item--disabled": "_Menu-item--disabled_1jr57_84" };
5349
5349
 
5350
5350
  // ../../node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.2.0_@types+react@19.2.0__@types+reac_e6e9e3f3089a7a72fc73cc2cd9dafc33/node_modules/@radix-ui/react-popover/dist/index.mjs
5351
5351
  init_react_import();
@@ -7986,7 +7986,7 @@ init_react_import();
7986
7986
 
7987
7987
  // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Tag/Tag.module.css#css-module
7988
7988
  init_react_import();
7989
- var Tag_module_default = { "Tag": "_Tag_s2h0n_1", "Tag--borderless": "_Tag--borderless_s2h0n_21", "Tag--colorBlue": "_Tag--colorBlue_s2h0n_25", "Tag--colorGreen": "_Tag--colorGreen_s2h0n_29", "Tag--colorRed": "_Tag--colorRed_s2h0n_33", "Tag--colorMuted": "_Tag--colorMuted_s2h0n_37", "Tag-sprite": "_Tag-sprite_s2h0n_41", "Tag--pulse": "_Tag--pulse_s2h0n_45", "pulse": "_pulse_s2h0n_1", "Tag-label": "_Tag-label_s2h0n_79" };
7989
+ var Tag_module_default = { "Tag": "_Tag_162k8_1", "Tag--borderless": "_Tag--borderless_162k8_21", "Tag--colorBlue": "_Tag--colorBlue_162k8_25", "Tag--colorGreen": "_Tag--colorGreen_162k8_30", "Tag--colorRed": "_Tag--colorRed_162k8_34", "Tag--colorMuted": "_Tag--colorMuted_162k8_38", "Tag-sprite": "_Tag-sprite_162k8_42", "Tag--pulse": "_Tag--pulse_162k8_46", "pulse": "_pulse_162k8_1", "Tag-label": "_Tag-label_162k8_80" };
7990
7990
 
7991
7991
  // ../platform-client/components/Tag/Tag.tsx
7992
7992
  import { jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
@@ -22251,8 +22251,13 @@ var postMessageToParent = ({
22251
22251
  window.parent.postMessage(message2, parentOrigin);
22252
22252
  };
22253
22253
 
22254
+ // src/lib/is-embedded.ts
22255
+ init_react_import();
22256
+ var isEmbedded = () => typeof window !== "undefined" && window.self !== window.top;
22257
+
22254
22258
  // src/lib/request-token.ts
22255
22259
  var requestToken = (parentOrigin) => {
22260
+ if (!isEmbedded()) return Promise.resolve("");
22256
22261
  return new Promise((resolve) => {
22257
22262
  const handler = async (event) => {
22258
22263
  if (event.origin !== parentOrigin) return;
@@ -22293,6 +22298,7 @@ var getActiveVersion = ({
22293
22298
  init_react_import();
22294
22299
  var RETRY_INTERVAL_MS = 100;
22295
22300
  var waitForParentReady = (parentOrigin) => {
22301
+ if (!isEmbedded()) return Promise.resolve();
22296
22302
  return new Promise((resolve) => {
22297
22303
  let intervalId = 0;
22298
22304
  const sendReadyCheck = () => {
@@ -24509,8 +24515,8 @@ var PagePlugin = (opts) => {
24509
24515
  createPage("/");
24510
24516
  postToParent({ type: "DATA_READY" });
24511
24517
  }
24512
- setLoading(false);
24513
24518
  }
24519
+ setLoading(false);
24514
24520
  },
24515
24521
  [
24516
24522
  host,
@@ -24882,7 +24888,9 @@ var HeaderActions = (opts) => {
24882
24888
  }) => {
24883
24889
  setPageVersions(data.page.id, data.page.versions, data.page.path ?? path);
24884
24890
  setActivePage(data.page.path ?? path);
24885
- setActiveVersion(nextActiveVersion);
24891
+ setActiveVersion(
24892
+ data.page.versions?.some((version3) => version3.id === nextActiveVersion) ? nextActiveVersion : null
24893
+ );
24886
24894
  if (syncHistoryData) {
24887
24895
  syncSavedHistory(syncHistoryData);
24888
24896
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-pages",
3
- "version": "0.9.0-canary.d4a0bc62",
3
+ "version": "0.9.0-canary.d582a110",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "zustand": "^5.0.8"
29
29
  },
30
30
  "devDependencies": {
31
- "@puckeditor/core": "0.24.0-canary.c1ec9773",
31
+ "@puckeditor/core": "0.24.0-canary.90665dfb",
32
32
  "@radix-ui/react-popover": "^1.1.15",
33
33
  "@testing-library/dom": "^10.4.1",
34
34
  "@testing-library/react": "^16.3.2",
@@ -46,10 +46,10 @@
46
46
  "vite-tsconfig-paths": "^5.1.4",
47
47
  "vitest": "^4.1.11",
48
48
  "zod": "^4.1.12",
49
- "@puckeditor/platform-types": "0.9.0-canary.d4a0bc62",
50
- "eslint-config-custom": "0.9.0-canary.d4a0bc62",
51
- "tsconfig": "0.9.0-canary.d4a0bc62",
52
- "tsup-config": "0.9.0-canary.d4a0bc62"
49
+ "@puckeditor/platform-types": "0.9.0-canary.d582a110",
50
+ "eslint-config-custom": "0.9.0-canary.d582a110",
51
+ "tsconfig": "0.9.0-canary.d582a110",
52
+ "tsup-config": "0.9.0-canary.d582a110"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@puckeditor/core": "^0.21.0 || 0.21.0-canary.de0baf39",