@measured/puck-plugin-heading-analyzer 0.16.0-canary.e367dd4 → 0.16.0-canary.ef2e5ec
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +6 -14
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -77491,13 +77491,13 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77491
77491
|
var import_react27 = require("react");
|
77492
77492
|
var import_use_debounce3 = (init_index_module(), __toCommonJS(index_module_exports));
|
77493
77493
|
var EMPTY_HISTORY_INDEX = -1;
|
77494
|
-
function useHistoryStore(
|
77494
|
+
function useHistoryStore(initialHistories) {
|
77495
77495
|
var _a3, _b;
|
77496
77496
|
const [histories, setHistories] = (0, import_react27.useState)(
|
77497
|
-
(_a3 =
|
77497
|
+
(_a3 = initialHistories == null ? void 0 : initialHistories.histories) != null ? _a3 : []
|
77498
77498
|
);
|
77499
77499
|
const [index, setIndex] = (0, import_react27.useState)(
|
77500
|
-
(_b =
|
77500
|
+
(_b = initialHistories == null ? void 0 : initialHistories.index) != null ? _b : EMPTY_HISTORY_INDEX
|
77501
77501
|
);
|
77502
77502
|
const hasPast = index > EMPTY_HISTORY_INDEX;
|
77503
77503
|
const hasFuture = index < histories.length - 1;
|
@@ -77952,10 +77952,10 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
77952
77952
|
enabled: true
|
77953
77953
|
},
|
77954
77954
|
dnd,
|
77955
|
-
|
77955
|
+
initialHistories
|
77956
77956
|
}) {
|
77957
77957
|
var _a3;
|
77958
|
-
const historyStore = useHistoryStore(
|
77958
|
+
const historyStore = useHistoryStore(initialHistories);
|
77959
77959
|
const [reducer2] = (0, import_react30.useState)(
|
77960
77960
|
() => createReducer({ config, record: historyStore.record })
|
77961
77961
|
);
|
@@ -78497,15 +78497,7 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
78497
78497
|
appState,
|
78498
78498
|
config,
|
78499
78499
|
dispatch,
|
78500
|
-
history
|
78501
|
-
back: history.back,
|
78502
|
-
forward: history.forward,
|
78503
|
-
hasPast: history.historyStore.hasPast,
|
78504
|
-
hasFuture: history.historyStore.hasFuture,
|
78505
|
-
histories: history.historyStore.histories,
|
78506
|
-
index: history.historyStore.index,
|
78507
|
-
historyStore: history.historyStore
|
78508
|
-
},
|
78500
|
+
history,
|
78509
78501
|
selectedItem: selectedItem || null
|
78510
78502
|
};
|
78511
78503
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@measured/puck-plugin-heading-analyzer",
|
3
|
-
"version": "0.16.0-canary.
|
3
|
+
"version": "0.16.0-canary.ef2e5ec",
|
4
4
|
"author": "Measured Corporation Ltd <hello@measured.co>",
|
5
5
|
"repository": "measuredco/puck",
|
6
6
|
"bugs": "https://github.com/measuredco/puck/issues",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"dist"
|
19
19
|
],
|
20
20
|
"devDependencies": {
|
21
|
-
"@measured/puck": "^0.16.0-canary.
|
21
|
+
"@measured/puck": "^0.16.0-canary.ef2e5ec",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|