@hazem3500/palette 0.9.119 → 0.9.120
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/README.md +2 -2
- package/dist/chunk-AAFGCZLH.js +1 -0
- package/dist/index.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/react.js +1 -1
- package/dist/server.js +1 -1
- package/dist/setup.js +1 -1
- package/dist/shell-mode-I5OAFZVD.js +1 -0
- package/dist/shell-mode.d.ts +4 -3
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
- package/server/setup-client.txt +40 -40
- package/src/types.ts +2 -0
- package/dist/chunk-UCK64LMS.js +0 -1
- package/dist/shell-mode-RPV7AVA4.js +0 -1
package/dist/setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,d as o}from"./chunk-
|
|
1
|
+
import{a as n,d as o}from"./chunk-AAFGCZLH.js";import"./chunk-KLPQTFVH.js";import"./chunk-RBHY7UDS.js";import"./chunk-LMXFSXO6.js";import"./chunk-DU7H4TEX.js";import"./chunk-5HZI7HRR.js";import"./chunk-2BS2OWWH.js";import"./chunk-J47R52WX.js";import"./chunk-VX6XCU4E.js";import"./chunk-4HBBEVFK.js";function r(r){return(t={})=>o(n({...r,...t}))}var t=r;export{t as defineKomo,r as definePalette};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e="palette-shell",t="palette:shell";function o(t,o){let a=new URL(t,location.href);return a.searchParams.delete("komo-shell"),o?a.searchParams.set(e,o):a.searchParams.delete(e),a.href}function a(e,a=""){try{sessionStorage.removeItem(t),sessionStorage.removeItem("komo:shell"),a&&sessionStorage.setItem("palette:shell-off",a)}catch{}location.replace(o(e,""))}function l(e,a,l,r){try{let n=sessionStorage.getItem("palette:shell-off");if(n)return r(n);if(a&&l&&!confirm("Reload in Frame?\n\nUnposted Design changes will be lost."))return r("Reload cancelled.");let s=Array.from(crypto.getRandomValues(new Uint8Array(16)),e=>e.toString(16).padStart(2,"0")).join("");sessionStorage.setItem(t,JSON.stringify({v:1,project:e,nonce:s,origin:location.origin})),location.replace(o(location.href,s))}catch{return r("Storage blocked.")}setTimeout(r,3e3,"Reload cancelled.")}function r(e,t){try{let a=e.location.href,l=o(a,t);a.startsWith(location.origin)&&l!==location.href&&history.replaceState(history.state,"",l)}catch{}}export{l as enterShell,a as leaveShellPage,o as shellUrl,r as syncShell};
|
package/dist/shell-mode.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ export declare function shellUrl(href: string, nonce: string): string;
|
|
|
3
3
|
/** Ends the shell: clears it, notes why when it ended early, and loads `href` as the normal page. */
|
|
4
4
|
export declare function leaveShellPage(href: string, reason?: string): void;
|
|
5
5
|
/**
|
|
6
|
-
* Reloads this page as the shell. `ask
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Reloads this page as the shell. With `ask`, it confirms only when `edited` (unposted
|
|
7
|
+
* Design changes would be lost); the app's own unsaved-changes guard covers app state.
|
|
8
|
+
* `fallback` runs when the reviewer cancels, storage is blocked, or the page didn't
|
|
9
|
+
* unload (that guard can keep it).
|
|
9
10
|
*/
|
|
10
11
|
export declare function enterShell(project: string, ask: boolean, edited: boolean, fallback: (reason: string) => void): void;
|
|
11
12
|
/** The shell's URL follows the frame's route, so reloading or sharing it keeps the page. */
|
package/dist/types.d.ts
CHANGED
|
@@ -352,6 +352,8 @@ export interface CommentsController {
|
|
|
352
352
|
comment(element: Element): void;
|
|
353
353
|
destroy(): void;
|
|
354
354
|
open(): void;
|
|
355
|
+
/** Bring back a toolbar the reviewer dismissed, without opening the sidebar. */
|
|
356
|
+
restore(): void;
|
|
355
357
|
close(): void;
|
|
356
358
|
refresh(): Promise<void>;
|
|
357
359
|
}
|