@powerhousedao/design-system 4.1.0-dev.97 → 4.1.0-dev.99

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-document-undo-redo.d.ts","sourceRoot":"","sources":["../../../../../../src/connect/components/document-toolbar/utils/use-document-undo-redo.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM;;;;;EAuBtD"}
1
+ {"version":3,"file":"use-document-undo-redo.d.ts","sourceRoot":"","sources":["../../../../../../src/connect/components/document-toolbar/utils/use-document-undo-redo.ts"],"names":[],"mappings":"AAGA,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM;;;;;EAsBtD"}
@@ -4,7 +4,6 @@ export function useDocumentUndoRedo(documentId) {
4
4
  const [document, dispatch] = useDocumentById(documentId);
5
5
  const globalRevisionNumber = document?.header.revision.global ?? 0;
6
6
  const localRevisionNumber = document?.header.revision.local ?? 0;
7
- // TODO: check why undo and redo actions are not working
8
7
  const canUndo = globalRevisionNumber > 0 || localRevisionNumber > 0;
9
8
  const canRedo = !!document?.clipboard.length;
10
9
  const handleUndo = () => {
@@ -16,8 +15,8 @@ export function useDocumentUndoRedo(documentId) {
16
15
  return {
17
16
  undo: handleUndo,
18
17
  redo: handleRedo,
19
- canUndo: false,
20
- canRedo: false,
18
+ canUndo,
19
+ canRedo,
21
20
  };
22
21
  }
23
22
  //# sourceMappingURL=use-document-undo-redo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-document-undo-redo.js","sourceRoot":"","sources":["../../../../../../src/connect/components/document-toolbar/utils/use-document-undo-redo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,UAAU,mBAAmB,CAAC,UAAmB;IACrD,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAEzD,MAAM,oBAAoB,GAAG,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC;IACnE,MAAM,mBAAmB,GAAG,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC;IAEjE,wDAAwD;IACxD,MAAM,OAAO,GAAG,oBAAoB,GAAG,CAAC,IAAI,mBAAmB,GAAG,CAAC,CAAC;IACpE,MAAM,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC;IAE7C,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACnB,CAAC,CAAC;IACF,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,KAAK;KACf,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"use-document-undo-redo.js","sourceRoot":"","sources":["../../../../../../src/connect/components/document-toolbar/utils/use-document-undo-redo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,UAAU,mBAAmB,CAAC,UAAmB;IACrD,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;IAEzD,MAAM,oBAAoB,GAAG,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,CAAC;IACnE,MAAM,mBAAmB,GAAG,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC;IAEjE,MAAM,OAAO,GAAG,oBAAoB,GAAG,CAAC,IAAI,mBAAmB,GAAG,CAAC,CAAC;IACpE,MAAM,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC;IAE7C,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACnB,CAAC,CAAC;IACF,MAAM,UAAU,GAAG,GAAG,EAAE;QACtB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,UAAU;QAChB,OAAO;QACP,OAAO;KACR,CAAC;AACJ,CAAC"}