@promakeai/inspector-hook 1.3.3 → 1.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.d.ts.map +1 -1
- package/dist/index.js +32 -0
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,sBAAsB,EAEtB,kBAAkB,EAenB,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,sBAAsB,EAEtB,kBAAkB,EAenB,MAAM,4BAA4B,CAAC;AAuJpC,wBAAgB,YAAY,CAC1B,SAAS,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACvC,SAAS,CAAC,EAAE,kBAAkB,EAC9B,MAAM,CAAC,EAAE,eAAe,EACxB,KAAK,CAAC,EAAE,cAAc,EACtB,aAAa,CAAC,EAAE,sBAAsB,GACrC,kBAAkB,CA6gBpB;AAGD,YAAY,EACV,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,cAAc,EACd,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -92,6 +92,24 @@ export function useInspector(iframeRef, callbacks, labels, theme, initialConfig)
|
|
|
92
92
|
show: show,
|
|
93
93
|
});
|
|
94
94
|
}, [sendMessage]);
|
|
95
|
+
/**
|
|
96
|
+
* Show or hide sub-elements tab
|
|
97
|
+
*/
|
|
98
|
+
const showSubElements = useCallback((show) => {
|
|
99
|
+
sendMessage({
|
|
100
|
+
type: "SHOW_SUB_ELEMENTS",
|
|
101
|
+
show: show,
|
|
102
|
+
});
|
|
103
|
+
}, [sendMessage]);
|
|
104
|
+
/**
|
|
105
|
+
* Show or hide images tab for child images
|
|
106
|
+
*/
|
|
107
|
+
const showImagesTab = useCallback((show) => {
|
|
108
|
+
sendMessage({
|
|
109
|
+
type: "SHOW_IMAGES_TAB",
|
|
110
|
+
show: show,
|
|
111
|
+
});
|
|
112
|
+
}, [sendMessage]);
|
|
95
113
|
/**
|
|
96
114
|
* Show or hide "Built with Promake" badge
|
|
97
115
|
*/
|
|
@@ -328,6 +346,18 @@ export function useInspector(iframeRef, callbacks, labels, theme, initialConfig)
|
|
|
328
346
|
show: initialConfig.showActionsTab,
|
|
329
347
|
});
|
|
330
348
|
}
|
|
349
|
+
if (initialConfig.showSubElements !== undefined) {
|
|
350
|
+
sendMessage({
|
|
351
|
+
type: "SHOW_SUB_ELEMENTS",
|
|
352
|
+
show: initialConfig.showSubElements,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
if (initialConfig.showImagesTab !== undefined) {
|
|
356
|
+
sendMessage({
|
|
357
|
+
type: "SHOW_IMAGES_TAB",
|
|
358
|
+
show: initialConfig.showImagesTab,
|
|
359
|
+
});
|
|
360
|
+
}
|
|
331
361
|
if (initialConfig.showChildBorders !== undefined) {
|
|
332
362
|
sendMessage({
|
|
333
363
|
type: "SET_SHOW_CHILD_BORDERS",
|
|
@@ -377,6 +407,7 @@ export function useInspector(iframeRef, callbacks, labels, theme, initialConfig)
|
|
|
377
407
|
showImageInput,
|
|
378
408
|
showStyleEditor,
|
|
379
409
|
showActionsTab,
|
|
410
|
+
showSubElements,
|
|
380
411
|
setBadgeVisible,
|
|
381
412
|
highlightElement,
|
|
382
413
|
getElementByInspectorId,
|
|
@@ -387,6 +418,7 @@ export function useInspector(iframeRef, callbacks, labels, theme, initialConfig)
|
|
|
387
418
|
setAllowEditForMultipleInstances,
|
|
388
419
|
setIsDraggable,
|
|
389
420
|
setIsResizable,
|
|
421
|
+
showImagesTab,
|
|
390
422
|
};
|
|
391
423
|
}
|
|
392
424
|
// Export utility functions
|