polotno 2.1.0 → 2.1.2

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.
@@ -20,6 +20,9 @@
20
20
  width: 100%;
21
21
  cursor: pointer;
22
22
  display: block;
23
+ max-height: 200px;
24
+ min-height: 50px;
25
+ object-fit: contain;
23
26
  `,CreditWrap=(0,styled_1.default)("div")`
24
27
  position: absolute;
25
28
  bottom: 0px;
@@ -13,7 +13,7 @@
13
13
  border-radius: 5px;
14
14
  background-color: rgba(0, 0, 0, 0.4);
15
15
  position: relative;
16
- font-size: 25;
16
+ font-size: 25px;
17
17
  display: flex;
18
18
  justify-content: center;
19
19
  align-content: center;
@@ -0,0 +1,2 @@
1
+ var e,r;(r=(e=globalThis.parcelRequirea566).register)("igKPH",function(r,t){Object.defineProperty(r.exports,"splitPathsBySizeLoader",{get:()=>c,set:void 0,enumerable:!0,configurable:!0});var n=e("gztBd"),a=e("704DA"),i=e("leH9B"),c=function(r,t){return(0,n.__awaiter)(void 0,void 0,void 0,function(){var c,o;return(0,n.__generator)(this,function(n){switch(n.label){case 0:if(c=(0,a.pascalCase)(r),t!==i.IconSize.STANDARD)return[3,2];return[4,e("gkAjY")];case 1:return o=n.sent(),[3,4];case 2:return[4,e("acBRE")];case 3:o=n.sent(),n.label=4;case 4:return[2,o[c]]}})})}}),r("gkAjY",function(r,t){r.exports=e("dNLwc")(e("kI8SP").resolve("5Jk1P")).then(()=>e("lyZPJ"))}),r("acBRE",function(r,t){r.exports=e("dNLwc")(e("kI8SP").resolve("2qcgR")).then(()=>e("adNjr"))});
2
+ //# sourceMappingURL=splitPathsBySizeLoader.4c72427c.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"I,E,E,C,E,C,E,A,W,iB,E,Q,E,Q,S,C,C,C,E,O,c,C,E,O,C,yB,C,I,I,E,I,K,E,W,C,E,a,C,C,GEcG,IAAA,EAAA,EAAA,S,E,E,S,E,E,SAYU,EAA0C,SAAO,CAAI,CAAE,CAAI,EAAxE,MAAA,AAAA,CAAA,EAAA,EAAA,SAAA,AAAA,EAAA,KAAA,EAAA,KAAA,EAAA,KAAA,EAAA,W,I,E,E,M,A,C,E,E,W,A,E,I,C,S,C,E,O,E,K,E,K,EAIQ,GAHE,EAAM,AAAA,CAAA,EAAA,EAAA,UAAA,AAAA,EAAW,GAGnB,AAAA,IAAS,AAAA,EAAA,QAAA,CAAS,QAAA,CAAlB,MAAA,CAAA,EAAA,EAAA,CACc,MAAA,CAAA,EAAM,EAAA,SAGnB,A,M,E,OAHD,EAAc,EAAA,IAAA,G,C,E,E,AAKA,MAAA,EAAA,MAAA,CAAA,EAAM,EAAA,SAGnB,A,M,EAHD,EAAc,EAAA,IAAA,G,E,K,C,CAMlB,MAAA,EAAA,MAAA,CAAA,EAAO,CAAW,CAAC,EAAI,CAAA,A,C,EAC1B,EAAA,C,G,E,Q,S,C,C,C,EC3CD,EAAA,OAAA,CAAkB,AAAA,EAAA,SAAuC,AAAA,EAAA,SAAA,OAAA,CAA6C,UAAW,IAAI,CAAC,IAAM,EAAc,S,G,E,Q,S,C,C,C,ECA1I,EAAA,OAAA,CAAkB,AAAA,EAAA,SAAuC,AAAA,EAAA,SAAA,OAAA,CAA6C,UAAW,IAAI,CAAC,IAAM,EAAc,S","sources":["<anon>","node_modules/@blueprintjs/icons/lib/esm/paths-loaders/splitPathsBySizeLoader.js","node_modules/@blueprintjs/icons/src/paths-loaders/splitPathsBySizeLoader.ts","node_modules/@parcel/runtime-js/lib/runtime-070efae507a67add.js","node_modules/@parcel/runtime-js/lib/runtime-5066f19db35e7a04.js"],"sourcesContent":["(() => {\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n var parcelRequire = $parcel$global[\"parcelRequirea566\"];\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"igKPH\", function(module, exports) {\n\n$parcel$export(module.exports, \"splitPathsBySizeLoader\", () => $d4ce0ca9183abc81$export$c977b52d171987bb);\n/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \nvar $gztBd = parcelRequire(\"gztBd\");\n\nvar $704DA = parcelRequire(\"704DA\");\n\nvar $leH9B = parcelRequire(\"leH9B\");\n\n\nvar $d4ce0ca9183abc81$export$c977b52d171987bb = function(name, size) {\n return (0, $gztBd.__awaiter)(void 0, void 0, void 0, function() {\n var key, pathsRecord;\n return (0, $gztBd.__generator)(this, function(_a) {\n switch(_a.label){\n case 0:\n key = (0, $704DA.pascalCase)(name);\n if (!(size === (0, $leH9B.IconSize).STANDARD)) return [\n 3 /*break*/ ,\n 2\n ];\n return [\n 4 /*yield*/ ,\n (parcelRequire(\"gkAjY\"))\n ];\n case 1:\n pathsRecord = _a.sent();\n return [\n 3 /*break*/ ,\n 4\n ];\n case 2:\n return [\n 4 /*yield*/ ,\n (parcelRequire(\"acBRE\"))\n ];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4:\n return [\n 2 /*return*/ ,\n pathsRecord[key]\n ];\n }\n });\n });\n};\n\n});\nparcelRegister(\"gkAjY\", function(module, exports) {\n\n\nmodule.exports = (parcelRequire(\"dNLwc\"))((parcelRequire(\"kI8SP\")).resolve(\"5Jk1P\")).then(()=>parcelRequire(\"lyZPJ\"));\n\n});\n\nparcelRegister(\"acBRE\", function(module, exports) {\n\n\nmodule.exports = (parcelRequire(\"dNLwc\"))((parcelRequire(\"kI8SP\")).resolve(\"2qcgR\")).then(()=>parcelRequire(\"adNjr\"));\n\n});\n\n\n})();\n//# sourceMappingURL=splitPathsBySizeLoader.4c72427c.js.map\n","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\nimport { pascalCase } from \"change-case\";\nimport { IconSize } from \"../iconTypes\";\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport var splitPathsBySizeLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var key, pathsRecord;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n key = pascalCase(name);\n if (!(size === IconSize.STANDARD)) return [3 /*break*/, 2];\n return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\")];\n case 1:\n pathsRecord = _a.sent();\n return [3 /*break*/, 4];\n case 2: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\")];\n case 3:\n pathsRecord = _a.sent();\n _a.label = 4;\n case 4: return [2 /*return*/, pathsRecord[key]];\n }\n });\n}); };\n//# sourceMappingURL=splitPathsBySizeLoader.js.map","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { pascalCase } from \"change-case\";\n\nimport type { IconPathsLoader } from \"../iconLoader\";\nimport type { IconName } from \"../iconNames\";\nimport { type IconPaths, IconSize } from \"../iconTypes\";\nimport type { PascalCase } from \"../type-utils\";\n\n/**\n * A dynamic loader for icon paths that generates separate chunks for the two size variants.\n */\nexport const splitPathsBySizeLoader: IconPathsLoader = async (name, size) => {\n const key = pascalCase(name) as PascalCase<IconName>;\n let pathsRecord: Record<PascalCase<IconName>, IconPaths>;\n\n if (size === IconSize.STANDARD) {\n pathsRecord = await import(\n /* webpackChunkName: \"blueprint-icons-16px-paths\" */\n \"../generated/16px/paths\"\n );\n } else {\n pathsRecord = await import(\n /* webpackChunkName: \"blueprint-icons-20px-paths\" */\n \"../generated/20px/paths\"\n );\n }\n\n return pathsRecord[key];\n};\n","module.exports = (require(\"./helpers/browser/js-loader\")(require('./helpers/bundle-manifest').resolve(\"5Jk1P\"))).then(() => parcelRequire('lyZPJ'));","module.exports = (require(\"./helpers/browser/js-loader\")(require('./helpers/bundle-manifest').resolve(\"2qcgR\"))).then(() => parcelRequire('adNjr'));"],"names":["parcelRequire","parcelRegister","$parcel$global","globalThis","register","module","exports","Object","defineProperty","get","$d4ce0ca9183abc81$export$c977b52d171987bb","set","s","enumerable","configurable","$gztBd","$704DA","$leH9B","name","size","__awaiter","key","pathsRecord","__generator","_a","label","pascalCase","IconSize","STANDARD","sent","resolve","then"],"version":3,"file":"splitPathsBySizeLoader.4c72427c.js.map"}
@@ -3,6 +3,7 @@ import { StoreType } from '../model/store';
3
3
  type Props = {
4
4
  store: StoreType;
5
5
  components?: any;
6
+ element: any;
6
7
  };
7
8
  export declare const VideoTrim: (({ store, components, element }: Props) => React.JSX.Element) & {
8
9
  displayName: string;
@@ -1 +1 @@
1
- "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.VideoToolbar=exports.VideoTrim=void 0;const react_1=__importDefault(require("react")),mobx_react_lite_1=require("mobx-react-lite"),element_container_1=require("./element-container"),core_1=require("@blueprintjs/core"),animations_picker_1=require("./animations-picker"),flags_1=require("../utils/flags");exports.VideoTrim=(0,mobx_react_lite_1.observer)((({store:e,components:t,element:r})=>react_1.default.createElement(core_1.Popover,{position:"bottom",content:react_1.default.createElement(core_1.Navbar,{style:{boxShadow:"none",backgroundColor:"transparent",width:"calc(100vw - 300px)"}},react_1.default.createElement(core_1.NavbarGroup,null,react_1.default.createElement(core_1.Button,{icon:"play",minimal:!0}),react_1.default.createElement(core_1.NumericInput,{style:{width:"80px"},value:r.duration/1e3,buttonPosition:"none"})))},react_1.default.createElement(core_1.Button,{icon:"cut",minimal:!0},"Trim"))));const PROPS_MAP={VideoTrim:exports.VideoTrim,VideoAnimations:animations_picker_1.AnimationsPicker};exports.VideoToolbar=(0,mobx_react_lite_1.observer)((({store:e,components:t})=>{const r=e.selectedElements,o=[flags_1.flags.animationsEnabled&&"VideoAnimations"].filter((e=>!!e)),n=(0,element_container_1.extendToolbar)({type:"video",usedItems:o,components:t});return react_1.default.createElement(element_container_1.ElementContainer,{items:n,itemRender:o=>{const n=t[o]||PROPS_MAP[o];return react_1.default.createElement(n,{elements:r,element:r[0],store:e,key:o})}})})),exports.default=exports.VideoToolbar;
1
+ "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.VideoToolbar=exports.VideoTrim=void 0;const react_1=__importDefault(require("react")),mobx_react_lite_1=require("mobx-react-lite"),element_container_1=require("./element-container"),core_1=require("@blueprintjs/core"),animations_picker_1=require("./animations-picker"),flags_1=require("../utils/flags"),video_1=require("../utils/video");exports.VideoTrim=(0,mobx_react_lite_1.observer)((({store:e,components:t,element:r})=>{const o=react_1.default.useRef(null),[i,a]=react_1.default.useState([]),n=(e,t)=>{e.preventDefault();const i=e=>{e.preventDefault();const{clientX:i}=e,{left:a,width:n}=o.current.getBoundingClientRect(),{src:s}=r,l=(i-a)/n;"start"===t?r.set({startTime:Math.min(r.endTime,Math.max(0,l))}):"end"===t&&r.set({endTime:Math.min(1,Math.max(r.startTime,l))})};window.addEventListener("mousemove",i),window.addEventListener("mouseup",(()=>{window.removeEventListener("mousemove",i)}))};return react_1.default.createElement(core_1.Popover,{position:"bottom",onOpened:async()=>{const{width:e,height:t}=await(0,video_1.getVideoSize)(r.src),i=e/t,{src:n}=r,s=o.current.offsetHeight,l=o.current.offsetWidth,c=s*i,d=Math.ceil(l/c),u=await(0,video_1.getVideoDuration)(n),m=[];for(var _=0;_<d;_++){const e=await(0,video_1.getVideoPreview)(n,_*u/d);m.push(e)}a(m)},content:react_1.default.createElement(core_1.Navbar,{style:{boxShadow:"none",backgroundColor:"transparent",width:"calc(100vw - 300px)"}},react_1.default.createElement(core_1.NavbarGroup,null,react_1.default.createElement(core_1.NumericInput,{style:{width:"80px"},value:parseFloat((r.duration*(r.endTime-r.startTime)/1e3).toFixed(2)),minorStepSize:.01,stepSize:.1,buttonPosition:"none",readOnly:!0}),react_1.default.createElement("div",{style:{width:"calc(100vw - 420px)",height:"30px",display:"flex",position:"relative",overflow:"hidden",marginLeft:"10px"},ref:o},i.map(((e,t)=>react_1.default.createElement("img",{key:t,src:e,style:{width:"auto",height:"100%",objectFit:"cover"}}))),react_1.default.createElement("div",{style:{position:"absolute",top:"0",left:0,width:100*r.startTime+"%",height:"30px",backgroundColor:"rgb(0, 0, 0, 0.5)"}}),react_1.default.createElement("div",{style:{position:"absolute",top:"0",right:"0%",width:100-100*r.endTime+"%",height:"30px",backgroundColor:"rgb(0, 0, 0, 0.5)"}}),react_1.default.createElement("div",{style:{position:"absolute",top:"0",left:100*r.startTime+"%",width:"10px",height:"30px",borderRadius:"0px",backgroundColor:"rgb(0, 161, 255, 0.9)",cursor:"ew-resize"},onMouseDown:e=>{n(e,"start")}}),react_1.default.createElement("div",{style:{position:"absolute",top:"0",right:100-100*r.endTime+"%",width:"10px",height:"30px",borderRadius:"0px",backgroundColor:"rgb(0, 161, 255, 0.9)",cursor:"ew-resize"},onMouseDown:e=>{n(e,"end")}}))))},react_1.default.createElement(core_1.Button,{icon:"cut",minimal:!0},"Trim"))}));const PROPS_MAP={VideoTrim:exports.VideoTrim,VideoAnimations:animations_picker_1.AnimationsPicker};exports.VideoToolbar=(0,mobx_react_lite_1.observer)((({store:e,components:t})=>{const r=e.selectedElements,o=["VideoTrim",flags_1.flags.animationsEnabled&&"VideoAnimations"].filter((e=>!!e)),i=(0,element_container_1.extendToolbar)({type:"video",usedItems:o,components:t});return react_1.default.createElement(element_container_1.ElementContainer,{items:i,itemRender:o=>{const i=t[o]||PROPS_MAP[o];return react_1.default.createElement(i,{elements:r,element:r[0],store:e,key:o})}})})),exports.default=exports.VideoToolbar;
package/utils/video.d.ts CHANGED
@@ -2,4 +2,5 @@ export declare function getVideoSize(url: string): Promise<{
2
2
  width: number;
3
3
  height: number;
4
4
  }>;
5
+ export declare function getVideoDuration(url: string): Promise<number>;
5
6
  export declare function getVideoPreview(videoUrl: any, captureTime?: number): Promise<string>;
package/utils/video.js CHANGED
@@ -1 +1 @@
1
- "use strict";async function getVideoSize(e){const t=document.createElement("video");t.src=e,await t.play(),t.pause();const{videoWidth:i,videoHeight:d}=t;return{width:i,height:d}}async function getVideoPreview(e,t=5){return new Promise(((i,d)=>{var o=document.createElement("video"),r=document.createElement("canvas");r.width=480,r.height=360;var n=r.getContext("2d");o.src=e,o.addEventListener("error",(e=>{d(e)})),o.addEventListener("loadeddata",(function(){const e=o.videoWidth/o.videoHeight;r.width=480,r.height=480/e,o.currentTime=t})),o.addEventListener("seeked",(function(){n.drawImage(o,0,0,r.width,r.height);try{var e=r.toDataURL();i(e)}catch(e){d(e)}}))}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getVideoPreview=exports.getVideoSize=void 0,exports.getVideoSize=getVideoSize,exports.getVideoPreview=getVideoPreview;
1
+ "use strict";async function getVideoSize(e){const t=document.createElement("video");t.src=e,await t.play(),t.pause();const{videoWidth:i,videoHeight:o}=t;return{width:i,height:o}}async function getVideoDuration(e){const t=document.createElement("video");t.src=e,await t.play(),t.pause();const{duration:i}=t;return i}async function getVideoPreview(e,t=5){return new Promise(((i,o)=>{var r=document.createElement("video"),d=document.createElement("canvas");d.width=480,d.height=360;var n=d.getContext("2d");r.src=e,r.addEventListener("error",(e=>{o(e)})),r.addEventListener("loadeddata",(function(){const e=r.videoWidth/r.videoHeight;d.width=480,d.height=480/e,r.currentTime=t})),r.addEventListener("seeked",(function(){n.drawImage(r,0,0,d.width,d.height);try{var e=d.toDataURL();i(e)}catch(e){o(e)}}))}))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getVideoPreview=exports.getVideoDuration=exports.getVideoSize=void 0,exports.getVideoSize=getVideoSize,exports.getVideoDuration=getVideoDuration,exports.getVideoPreview=getVideoPreview;
@@ -1,17 +0,0 @@
1
- (()=>{function e(e,r,a,t){Object.defineProperty(e,r,{get:a,set:t,enumerable:!0,configurable:!0})}var r=globalThis.parcelRequirea566;(0,r.register)("7e3oI",function(a,t){e(a.exports,"getIconPaths",()=>i),e(a.exports,"iconNameToPathsRecordKey",()=>l),e(a.exports,"IconSvgPaths16",()=>r("lyZPJ")),e(a.exports,"IconSvgPaths20",()=>r("adNjr"));/*
2
- * Copyright 2021 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */var o=r("704DA"),n=r("lyZPJ"),c=r("adNjr"),s=r("leH9B");function i(e,r){var a=(0,o.pascalCase)(e);return r===s.IconSize.STANDARD?n[a]:c[a]}function l(e){return(0,o.pascalCase)(e)}})})();//# sourceMappingURL=allPaths.13d4619a.js.map
16
-
17
- //# sourceMappingURL=allPaths.13d4619a.js.map
@@ -1 +0,0 @@
1
- {"mappings":"A,C,K,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,E,A,W,iB,C,A,C,E,E,Q,A,E,Q,S,C,C,C,E,E,E,O,C,e,I,G,E,E,O,C,2B,I,G,E,E,O,C,iB,I,E,U,E,E,O,C,iB,I,E,SEAA;;;;;;;;;;;;;;C,EAcG,IAAA,EAAA,EAAA,S,E,E,S,E,E,S,E,E,SAoBG,SAAU,EAAa,CAAc,CAAE,CAAc,EACvD,IAAM,EAAM,AAAA,CAAA,EAAA,EAAA,UAAA,AAAA,EAAW,GACvB,OAAO,IAAS,AAAA,EAAA,QAAA,CAAS,QAAQ,CAAG,CAAc,CAAC,EAAI,CAAG,CAAc,CAAC,EAAI,AACjF,CAQM,SAAU,EAAyB,CAAc,EACnD,MAAO,AAAA,CAAA,EAAA,EAAA,UAAA,AAAA,EAAW,EACtB,C,E,C,G,+D","sources":["<anon>","node_modules/@blueprintjs/icons/lib/esm/allPaths.js","node_modules/@blueprintjs/icons/src/allPaths.ts"],"sourcesContent":["(() => {\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n var parcelRequire = $parcel$global[\"parcelRequirea566\"];\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"7e3oI\", function(module, exports) {\n\n$parcel$export(module.exports, \"getIconPaths\", () => $542c79ead65f1db4$export$66f32c9c70bb3715);\n$parcel$export(module.exports, \"iconNameToPathsRecordKey\", () => $542c79ead65f1db4$export$9425a11d2baa1c9);\n$parcel$export(module.exports, \"IconSvgPaths16\", () => (parcelRequire(\"lyZPJ\")));\n$parcel$export(module.exports, \"IconSvgPaths20\", () => (parcelRequire(\"adNjr\")));\n/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \nvar $704DA = parcelRequire(\"704DA\");\n\nvar $lyZPJ = parcelRequire(\"lyZPJ\");\n\nvar $adNjr = parcelRequire(\"adNjr\");\n\nvar $leH9B = parcelRequire(\"leH9B\");\nfunction $542c79ead65f1db4$export$66f32c9c70bb3715(name, size) {\n var key = (0, $704DA.pascalCase)(name);\n return size === (0, $leH9B.IconSize).STANDARD ? $lyZPJ[key] : $adNjr[key];\n}\nfunction $542c79ead65f1db4$export$9425a11d2baa1c9(name) {\n return (0, $704DA.pascalCase)(name);\n}\n\n});\n\n})();\n//# sourceMappingURL=allPaths.13d4619a.js.map\n","/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pascalCase } from \"change-case\";\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport { IconSize } from \"./iconTypes\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name, size) {\n var key = pascalCase(name);\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name) {\n return pascalCase(name);\n}\n//# sourceMappingURL=allPaths.js.map","/*\n * Copyright 2021 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { pascalCase } from \"change-case\";\n\nimport * as IconSvgPaths16 from \"./generated/16px/paths\";\nimport * as IconSvgPaths20 from \"./generated/20px/paths\";\nimport type { IconName } from \"./iconNames\";\nimport { type IconPaths, IconSize } from \"./iconTypes\";\nimport type { PascalCase } from \"./type-utils\";\nexport { IconSvgPaths16, IconSvgPaths20 };\n\n/**\n * Get the list of vector paths that define a given icon. These path strings are used to render `<path>`\n * elements inside an `<svg>` icon element. For full implementation details and nuances, see the icon component\n * handlebars template and `generate-icon-components` script in the __@blueprintjs/icons__ package.\n *\n * Note: this function loads all icon definitions __statically__, which means every icon is included in your\n * JS bundle. Only use this API if your app is likely to use all Blueprint icons at runtime. If you are looking for a\n * dynamic icon loader which loads icon definitions on-demand, use `{ Icons } from \"@blueprintjs/icons\"` instead.\n */\nexport function getIconPaths(name: IconName, size: IconSize): IconPaths {\n const key = pascalCase(name) as PascalCase<IconName>;\n return size === IconSize.STANDARD ? IconSvgPaths16[key] : IconSvgPaths20[key];\n}\n\n/**\n * Type safe string literal conversion of snake-case icon names to PascalCase icon names.\n * This is useful for indexing into the SVG paths record to extract a single icon's SVG path definition.\n *\n * @deprecated use `getIconPaths` instead\n */\nexport function iconNameToPathsRecordKey(name: IconName): PascalCase<IconName> {\n return pascalCase(name) as PascalCase<IconName>;\n}\n"],"names":["$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","parcelRequire","$parcel$global","globalThis","parcelRegister","register","module","exports","$542c79ead65f1db4$export$66f32c9c70bb3715","$542c79ead65f1db4$export$9425a11d2baa1c9","$704DA","$lyZPJ","$adNjr","$leH9B","name","size","key","pascalCase","IconSize","STANDARD"],"version":3,"file":"allPaths.13d4619a.js.map"}
@@ -1,17 +0,0 @@
1
- var e,r;(r=(e=globalThis.parcelRequirea566).register)("krlkt",function(r,t){Object.defineProperty(r.exports,"allPathsLoader",{get:()=>n,set:void 0,enumerable:!0,configurable:!0});/*
2
- * Copyright 2023 Palantir Technologies, Inc. All rights reserved.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */var o=e("gztBd"),n=function(r,t){return(0,o.__awaiter)(void 0,void 0,void 0,function(){return(0,o.__generator)(this,function(o){switch(o.label){case 0:return[4/*yield*/,e("dO4LZ")];case 1:return[2/*return*/,(0,o.sent().getIconPaths)(r,t)]}})})}}),r("dO4LZ",function(r,t){r.exports=Promise.all([e("dNLwc")(e("kI8SP").resolve("2qcgR")),e("dNLwc")(e("kI8SP").resolve("5Jk1P")),e("dNLwc")(e("kI8SP").resolve("5rPMS"))]).then(()=>e("7e3oI"))});//# sourceMappingURL=allPathsLoader.566dce63.js.map
16
-
17
- //# sourceMappingURL=allPathsLoader.566dce63.js.map
@@ -1 +0,0 @@
1
- {"mappings":"I,E,E,C,E,C,E,A,W,iB,E,Q,E,Q,S,C,C,C,E,O,c,C,E,O,C,iB,C,I,I,E,I,K,E,W,C,E,a,C,C,EEAA;;;;;;;;;;;;;;C,EAcG,IAAA,EAAA,EAAA,SAOU,EAAkC,SAAO,CAAI,CAAE,CAAI,EAAhE,MAAA,AAAA,CAAA,EAAA,EAAA,SAAA,AAAA,EAAA,KAAA,EAAA,KAAA,EAAA,KAAA,EAAA,W,M,A,C,E,E,W,A,E,I,C,S,C,E,O,E,K,EAC6B,KAAA,EAAA,MAAA,CAAA,CAAA,OAAA,GAAM,EAAA,SAG9B,A,M,EACD,MAAA,CAAA,CAAA,QAAA,GAAO,AAJkB,CAAA,EAAA,EAAA,IAAA,GAGxB,YAHmB,AAGnB,EACmB,EAAM,GAAK,A,C,EAClC,EAAA,C,G,E,Q,S,C,C,C,EC3BD,EAAA,OAAA,CAAiB,QAAQ,GAAG,CAAC,CAAC,AAAA,EAAA,SAAuC,AAAA,EAAA,SAAA,OAAA,CAA6C,UAAW,AAAA,EAAA,SAAuC,AAAA,EAAA,SAAA,OAAA,CAA6C,UAAW,AAAA,EAAA,SAAuC,AAAA,EAAA,SAAA,OAAA,CAA6C,UAAU,EAAE,IAAI,CAAC,IAAM,EAAc,S,E,qE","sources":["<anon>","node_modules/@blueprintjs/icons/lib/esm/paths-loaders/allPathsLoader.js","node_modules/@blueprintjs/icons/src/paths-loaders/allPathsLoader.ts","node_modules/@parcel/runtime-js/lib/runtime-0463d7b503ccac84.js"],"sourcesContent":["(() => {\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n var parcelRequire = $parcel$global[\"parcelRequirea566\"];\nvar parcelRegister = parcelRequire.register;\nparcelRegister(\"krlkt\", function(module, exports) {\n\n$parcel$export(module.exports, \"allPathsLoader\", () => $ee16dfd1f936e967$export$d40baad78635dc63);\n/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */ \nvar $gztBd = parcelRequire(\"gztBd\");\n\nvar $ee16dfd1f936e967$export$d40baad78635dc63 = function(name, size) {\n return (0, $gztBd.__awaiter)(void 0, void 0, void 0, function() {\n var getIconPaths;\n return (0, $gztBd.__generator)(this, function(_a) {\n switch(_a.label){\n case 0:\n return [\n 4 /*yield*/ ,\n (parcelRequire(\"dO4LZ\"))\n ];\n case 1:\n getIconPaths = _a.sent().getIconPaths;\n return [\n 2 /*return*/ ,\n getIconPaths(name, size)\n ];\n }\n });\n });\n};\n\n});\nparcelRegister(\"dO4LZ\", function(module, exports) {\n\n\n\n\n\n\nmodule.exports = Promise.all([\n (parcelRequire(\"dNLwc\"))((parcelRequire(\"kI8SP\")).resolve(\"2qcgR\")),\n (parcelRequire(\"dNLwc\"))((parcelRequire(\"kI8SP\")).resolve(\"5Jk1P\")),\n (parcelRequire(\"dNLwc\"))((parcelRequire(\"kI8SP\")).resolve(\"5rPMS\"))\n]).then(()=>parcelRequire(\"7e3oI\"));\n\n});\n\n\n})();\n//# sourceMappingURL=allPathsLoader.566dce63.js.map\n","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { __awaiter, __generator } from \"tslib\";\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport var allPathsLoader = function (name, size) { return __awaiter(void 0, void 0, void 0, function () {\n var getIconPaths;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\")];\n case 1:\n getIconPaths = (_a.sent()).getIconPaths;\n return [2 /*return*/, getIconPaths(name, size)];\n }\n });\n}); };\n//# sourceMappingURL=allPathsLoader.js.map","/*\n * Copyright 2023 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { IconPathsLoader } from \"../iconLoader\";\n\n/**\n * A simple module loader which concatenates all icon paths into a single chunk.\n */\nexport const allPathsLoader: IconPathsLoader = async (name, size) => {\n const { getIconPaths } = await import(\n /* webpackChunkName: \"blueprint-icons-all-paths\" */\n \"../allPaths\"\n );\n return getIconPaths(name, size);\n};\n","module.exports = Promise.all([require(\"./helpers/browser/js-loader\")(require('./helpers/bundle-manifest').resolve(\"2qcgR\")), require(\"./helpers/browser/js-loader\")(require('./helpers/bundle-manifest').resolve(\"5Jk1P\")), require(\"./helpers/browser/js-loader\")(require('./helpers/bundle-manifest').resolve(\"5rPMS\"))]).then(() => parcelRequire('7e3oI'));"],"names":["parcelRequire","parcelRegister","$parcel$global","globalThis","register","module","exports","Object","defineProperty","get","$ee16dfd1f936e967$export$d40baad78635dc63","set","s","enumerable","configurable","$gztBd","name","size","__awaiter","__generator","_a","label","getIconPaths","sent","Promise","all","resolve","then"],"version":3,"file":"allPathsLoader.566dce63.js.map"}