2021-04-19 11:27:15 +08:00
|
|
|
{"version":3,"file":"index.js","sources":["../build/src/DoricBundleLoader.js","../build/src/DoricPlugin.js","../build/src/shader/DoricViewNode.js","../build/src/plugins/ShaderPlugin.js","../build/src/shader/DoricStackNode.js","../build/src/shader/DoricVLayoutNode.js","../build/src/shader/DoricHLayoutNode.js","../build/src/shader/DoricTextNode.js","../build/src/shader/DoricImageNode.js","../build/src/shader/DoricScrollerNode.js","../build/src/plugins/ModalPlugin.js","../build/src/plugins/StoragePlugin.js","../build/src/navigate/NavigatorPlugin.js","../build/src/plugins/PopoverPlugin.js","../build/src/shader/DoricListItemNode.js","../build/src/shader/DoricListNode.js","../build/src/shader/DoricDraggableNode.js","../build/src/shader/DoricRefreshableNode.js","../build/src/plugins/AnimatePlugin.js","../build/src/shader/DoricSwitchNode.js","../build/src/DoricRegistry.js","../build/src/DoricDriver.js","../build/src/DoricContext.js","../build/src/DoricElement.js","../build/src/navigate/NavigationElement.js","../build/index.js"],"sourcesContent":["var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nimport axios from \"axios\";\nconst loaders = [\n {\n filter: () => true,\n request: (source) => __awaiter(void 0, void 0, void 0, function* () {\n const result = yield axios.get(source);\n return result.data;\n })\n }\n];\nexport function registerDoricJSLoader(loader) {\n loaders.push(loader);\n}\nexport function loadDoricJSBundle(source) {\n return __awaiter(this, void 0, void 0, function* () {\n const matched = loaders.filter(e => e.filter(source));\n if (matched.length > 0) {\n return matched[matched.length - 1].request(source);\n }\n throw new Error(`Cannot find matched loader for '${source}'`);\n });\n}\n//# sourceMappingURL=DoricBundleLoader.js.map","export class DoricPlugin {\n constructor(context) {\n this.context = context;\n }\n onTearDown() {\n }\n}\n//# sourceMappingURL=DoricPlugin.js.map","import { acquireViewNode } from \"../DoricRegistry\";\nexport var LayoutSpec;\n(function (LayoutSpec) {\n LayoutSpec[LayoutSpec[\"EXACTLY\"] = 0] = \"EXACTLY\";\n LayoutSpec[LayoutSpec[\"WRAP_CONTENT\"] = 1] = \"WRAP_CONTENT\";\n LayoutSpec[LayoutSpec[\"AT_MOST\"] = 2] = \"AT_MOST\";\n})(LayoutSpec || (LayoutSpec = {}));\nconst SPECIFIED = 1;\nconst START = 1 << 1;\nconst END = 1 << 2;\nconst SHIFT_X = 0;\nconst SHIFT_Y = 4;\nexport const LEFT = (START | SPECIFIED) << SHIFT_X;\nexport const RIGHT = (END | SPECIFIED) << SHIFT_X;\nexport const TOP = (START | SPECIFIED) << SHIFT_Y;\nexport const BOTTOM = (END | SPECIFIED) << SHIFT_Y;\nexport const CENTER_X = SPECIFIED << SHIFT_X;\nexport const CENTER_Y = SPECIFIED << SHIFT_Y;\nexport const CENTER = CENTER_X | CENTER_Y;\nexport function toPixelString(v) {\n return `${v}px`;\n}\nexport function pixelString2Number(v) {\n return parseFloat(v.substring(0, v.indexOf(\"px\")));\n}\nexport function toRGBAString(color) {\n let strs = [];\n for (let i = 0; i < 32; i += 8) {\n strs.push(((color >> i) & 0xff).toString(16));\n }\n strs = strs.map(e => {\n if (e.length === 1) {\n return '0' + e;\n }\n return e;\n }).reverse();\n /// RGBA\n return `#${strs[1]}${strs[2]}${strs[3]}${strs[0]}`;\n}\nexport class DoricViewNode {\n constructor(context) {\n this.viewId = \"\";\n
|