@embedpdf/plugin-ui 2.3.0 → 2.4.0
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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +2 -1
- package/dist/lib/types.d.ts +3 -2
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +2 -1
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +2 -1
- package/dist/react/index.js.map +1 -1
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared-preact/types.d.ts +1 -0
- package/dist/shared-react/types.d.ts +1 -0
- package/dist/svelte/hooks/use-schema-renderer.svelte.d.ts +1 -0
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.js +2 -1
- package/dist/svelte/index.js.map +1 -1
- package/dist/svelte/types.d.ts +1 -0
- package/dist/vue/hooks/use-ui.d.ts +6 -0
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +2 -1
- package/dist/vue/index.js.map +1 -1
- package/dist/vue/types.d.ts +1 -0
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -63,9 +63,9 @@ const setSidebarTab = (documentId, sidebarId, tabId) => ({
|
|
|
63
63
|
type: SET_SIDEBAR_TAB,
|
|
64
64
|
payload: { documentId, sidebarId, tabId }
|
|
65
65
|
});
|
|
66
|
-
const openModal = (documentId, modalId) => ({
|
|
66
|
+
const openModal = (documentId, modalId, props) => ({
|
|
67
67
|
type: OPEN_MODAL,
|
|
68
|
-
payload: { documentId, modalId }
|
|
68
|
+
payload: { documentId, modalId, props }
|
|
69
69
|
});
|
|
70
70
|
const closeModal = (documentId) => ({
|
|
71
71
|
type: CLOSE_MODAL,
|
|
@@ -921,7 +921,7 @@ const _UIPlugin = class _UIPlugin extends BasePlugin {
|
|
|
921
921
|
setActiveToolbar: (placement, slot, toolbarId, documentId) => this.setToolbarForDocument(placement, slot, toolbarId, documentId),
|
|
922
922
|
setActiveSidebar: (placement, slot, sidebarId, documentId, activeTab) => this.setSidebarForDocument(placement, slot, sidebarId, documentId, activeTab),
|
|
923
923
|
toggleSidebar: (placement, slot, sidebarId, documentId, activeTab) => this.toggleSidebarForDocument(placement, slot, sidebarId, documentId, activeTab),
|
|
924
|
-
openModal: (modalId, documentId) => this.openModalForDocument(modalId, documentId),
|
|
924
|
+
openModal: (modalId, props, documentId) => this.openModalForDocument(modalId, props, documentId),
|
|
925
925
|
openMenu: (menuId, triggeredByCommandId, triggeredByItemId, documentId) => this.openMenuForDocument(menuId, triggeredByCommandId, triggeredByItemId, documentId),
|
|
926
926
|
toggleMenu: (menuId, triggeredByCommandId, triggeredByItemId, documentId) => this.toggleMenuForDocument(menuId, triggeredByCommandId, triggeredByItemId, documentId),
|
|
927
927
|
// Overlay operations
|
|
@@ -972,7 +972,7 @@ const _UIPlugin = class _UIPlugin extends BasePlugin {
|
|
|
972
972
|
setSidebarTab: (sidebarId, tabId) => this.setSidebarTabForDocument(sidebarId, tabId, documentId),
|
|
973
973
|
getSidebarTab: (sidebarId) => this.getSidebarTabForDocument(sidebarId, documentId),
|
|
974
974
|
// ───── Modals (with animation lifecycle) ─────
|
|
975
|
-
openModal: (modalId) => this.openModalForDocument(modalId, documentId),
|
|
975
|
+
openModal: (modalId, props) => this.openModalForDocument(modalId, props, documentId),
|
|
976
976
|
closeModal: () => this.closeModalForDocument(documentId),
|
|
977
977
|
clearModal: () => this.clearModalForDocument(documentId),
|
|
978
978
|
getActiveModal: () => this.getActiveModalForDocument(documentId),
|
|
@@ -1088,9 +1088,9 @@ const _UIPlugin = class _UIPlugin extends BasePlugin {
|
|
|
1088
1088
|
// ─────────────────────────────────────────────────────────
|
|
1089
1089
|
// Core Operations - Modals (with animation lifecycle)
|
|
1090
1090
|
// ─────────────────────────────────────────────────────────
|
|
1091
|
-
openModalForDocument(modalId, documentId) {
|
|
1091
|
+
openModalForDocument(modalId, props, documentId) {
|
|
1092
1092
|
const id = documentId ?? this.getActiveDocumentId();
|
|
1093
|
-
this.dispatch(openModal(id, modalId));
|
|
1093
|
+
this.dispatch(openModal(id, modalId, props));
|
|
1094
1094
|
this.modalChanged$.emit(id, { modalId, isOpen: true });
|
|
1095
1095
|
}
|
|
1096
1096
|
closeModalForDocument(documentId) {
|
|
@@ -1356,7 +1356,7 @@ const uiReducer = (state = initialState, action) => {
|
|
|
1356
1356
|
// Modal Actions (with animation lifecycle)
|
|
1357
1357
|
// ─────────────────────────────────────────────────────────
|
|
1358
1358
|
case OPEN_MODAL: {
|
|
1359
|
-
const { documentId, modalId } = action.payload;
|
|
1359
|
+
const { documentId, modalId, props } = action.payload;
|
|
1360
1360
|
const docState = state.documents[documentId] || initialDocumentState;
|
|
1361
1361
|
return {
|
|
1362
1362
|
...state,
|
|
@@ -1366,7 +1366,8 @@ const uiReducer = (state = initialState, action) => {
|
|
|
1366
1366
|
...docState,
|
|
1367
1367
|
activeModal: {
|
|
1368
1368
|
modalId,
|
|
1369
|
-
isOpen: true
|
|
1369
|
+
isOpen: true,
|
|
1370
|
+
props
|
|
1370
1371
|
},
|
|
1371
1372
|
openMenus: {}
|
|
1372
1373
|
// Close all menus when opening modal
|