@pi-outpost/embed 0.23.0 → 0.24.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/{PdfViewer-D5anbvST.js → PdfViewer-CDo7oG-p.js} +23 -22
- package/dist/PdfViewer-DJJoRd17.cjs +1 -0
- package/dist/docxExport-Ct9-zCCP.cjs +283 -0
- package/dist/{docxExport-BO9Dyd6M.js → docxExport-_j7ragkM.js} +3208 -3035
- package/dist/findInPage-0EBwjKZe.cjs +1 -0
- package/dist/findInPage-xFP831JH.js +67 -0
- package/dist/pi-outpost-embed.cjs +59 -59
- package/dist/pi-outpost-embed.js +88 -68
- package/dist/workspacePath-CfDl0V4n.js +24 -0
- package/dist/workspacePath-EgAFT36l.cjs +1 -0
- package/package.json +1 -1
- package/dist/PdfViewer-Cqn4OIhw.cjs +0 -1
- package/dist/docxExport-B5U9ZQcd.cjs +0 -283
- package/dist/findInPage-BtPAvay_.js +0 -89
- package/dist/findInPage-CTLp-wZT.cjs +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region ../ui/src/util/workspacePath.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("//");
|
|
4
|
+
}
|
|
5
|
+
function t(e, t) {
|
|
6
|
+
let n = t.split(/[?#]/)[0], r = n.startsWith("/") ? n.split("/") : [...e.split("/").slice(0, -1), ...n.split("/")], i = [];
|
|
7
|
+
for (let e of r) e !== "" && e !== "." && (e === ".." ? i.pop() : i.push(e));
|
|
8
|
+
return i.join("/");
|
|
9
|
+
}
|
|
10
|
+
function n(e) {
|
|
11
|
+
return /\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e);
|
|
12
|
+
}
|
|
13
|
+
function r(e) {
|
|
14
|
+
return /\.pdf$/i.test(e);
|
|
15
|
+
}
|
|
16
|
+
function i(e) {
|
|
17
|
+
return /\.(docx|xlsx|pptx)$/i.test(e);
|
|
18
|
+
}
|
|
19
|
+
function a(e, t, n, r) {
|
|
20
|
+
let i = n ? `&token=${encodeURIComponent(n)}` : "", a = r === void 0 ? "" : `&v=${encodeURIComponent(String(r))}`;
|
|
21
|
+
return `${e}/files/raw?path=${encodeURIComponent(t)}${i}${a}`;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a, r as i, e as n, t as o, n as r, i as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith(`//`)}function t(e,t){let n=t.split(/[?#]/)[0],r=n.startsWith(`/`)?n.split(`/`):[...e.split(`/`).slice(0,-1),...n.split(`/`)],i=[];for(let e of r)e!==``&&e!==`.`&&(e===`..`?i.pop():i.push(e));return i.join(`/`)}function n(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function r(e){return/\.pdf$/i.test(e)}function i(e){return/\.(docx|xlsx|pptx)$/i.test(e)}function a(e,t,n,r){let i=n?`&token=${encodeURIComponent(n)}`:``,a=r===void 0?``:`&v=${encodeURIComponent(String(r))}`;return`${e}/files/raw?path=${encodeURIComponent(t)}${i}${a}`}Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|