@measured/puck-plugin-heading-analyzer 0.16.0-canary.4ee30eb → 0.16.0-canary.e367dd4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +14 -6
- 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(initialHistory) {
|
77495
77495
|
var _a3, _b;
|
77496
77496
|
const [histories, setHistories] = (0, import_react27.useState)(
|
77497
|
-
(_a3 =
|
77497
|
+
(_a3 = initialHistory == null ? void 0 : initialHistory.histories) != null ? _a3 : []
|
77498
77498
|
);
|
77499
77499
|
const [index, setIndex] = (0, import_react27.useState)(
|
77500
|
-
(_b =
|
77500
|
+
(_b = initialHistory == null ? void 0 : initialHistory.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
|
+
initialHistory
|
77956
77956
|
}) {
|
77957
77957
|
var _a3;
|
77958
|
-
const historyStore = useHistoryStore(
|
77958
|
+
const historyStore = useHistoryStore(initialHistory);
|
77959
77959
|
const [reducer2] = (0, import_react30.useState)(
|
77960
77960
|
() => createReducer({ config, record: historyStore.record })
|
77961
77961
|
);
|
@@ -78497,7 +78497,15 @@ See https://github.com/measuredco/puck/issues/411 for more information. This mes
|
|
78497
78497
|
appState,
|
78498
78498
|
config,
|
78499
78499
|
dispatch,
|
78500
|
-
history
|
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
|
+
},
|
78501
78509
|
selectedItem: selectedItem || null
|
78502
78510
|
};
|
78503
78511
|
};
|
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.e367dd4",
|
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.e367dd4",
|
22
22
|
"@types/react": "^18.2.0",
|
23
23
|
"@types/react-dom": "^18.2.0",
|
24
24
|
"eslint": "^7.32.0",
|