zova-module-a-icon 5.1.27 → 5.1.28
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/.metadata/component/icon.d.ts +2 -2
- package/dist/.metadata/index.d.ts +11 -11
- package/dist/.metadata/index.d.ts.map +1 -1
- package/dist/.metadata/this.d.ts +1 -1
- package/dist/bean/sys.icon.d.ts +1 -1
- package/dist/bean/tool.icon.d.ts +1 -1
- package/dist/component/icon/controller.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/useZovaIcon.d.ts +1 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/types/icon.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/.metadata/component/icon.ts +2 -2
- package/src/.metadata/index.ts +11 -11
- package/src/.metadata/this.ts +1 -1
- package/src/bean/sys.icon.ts +2 -2
- package/src/bean/tool.icon.ts +2 -2
- package/src/component/icon/controller.tsx +3 -3
- package/src/index.ts +3 -3
- package/src/lib/index.ts +3 -3
- package/src/lib/useZovaIcon.ts +1 -1
- package/src/lib/utils.ts +2 -2
- package/src/monkeySys.ts +1 -1
- package/src/types/icon.ts +2 -2
- package/src/types/index.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypeControllerInnerProps } from 'zova';
|
|
2
|
-
import type { ControllerIconProps } from '../../component/icon/controller.
|
|
3
|
-
import { ControllerIcon } from '../../component/icon/controller.
|
|
2
|
+
import type { ControllerIconProps } from '../../component/icon/controller.tsx';
|
|
3
|
+
import { ControllerIcon } from '../../component/icon/controller.tsx';
|
|
4
4
|
export type ZIconProps = {
|
|
5
5
|
controllerRef?: (ref: ControllerIcon) => void;
|
|
6
6
|
} & ControllerIconProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** sys: begin */
|
|
2
|
-
export * from '../bean/sys.icon.
|
|
2
|
+
export * from '../bean/sys.icon.ts';
|
|
3
3
|
import 'zova';
|
|
4
4
|
declare module 'zova' {
|
|
5
5
|
}
|
|
@@ -13,7 +13,7 @@ declare module 'zova-module-a-icon' {
|
|
|
13
13
|
}
|
|
14
14
|
/** sys: end */
|
|
15
15
|
/** sys: begin */
|
|
16
|
-
import { SysIcon } from '../bean/sys.icon.
|
|
16
|
+
import type { SysIcon } from '../bean/sys.icon.ts';
|
|
17
17
|
import 'zova';
|
|
18
18
|
declare module 'zova' {
|
|
19
19
|
interface IBeanRecordGeneral {
|
|
@@ -22,7 +22,7 @@ declare module 'zova' {
|
|
|
22
22
|
}
|
|
23
23
|
/** sys: end */
|
|
24
24
|
/** tool: begin */
|
|
25
|
-
export * from '../bean/tool.icon.
|
|
25
|
+
export * from '../bean/tool.icon.ts';
|
|
26
26
|
import 'zova';
|
|
27
27
|
declare module 'zova' {
|
|
28
28
|
}
|
|
@@ -36,7 +36,7 @@ declare module 'zova-module-a-icon' {
|
|
|
36
36
|
}
|
|
37
37
|
/** tool: end */
|
|
38
38
|
/** tool: begin */
|
|
39
|
-
import { ToolIcon } from '../bean/tool.icon.
|
|
39
|
+
import type { ToolIcon } from '../bean/tool.icon.ts';
|
|
40
40
|
import 'zova';
|
|
41
41
|
declare module 'zova' {
|
|
42
42
|
interface IBeanRecordGeneral {
|
|
@@ -45,7 +45,7 @@ declare module 'zova' {
|
|
|
45
45
|
}
|
|
46
46
|
/** tool: end */
|
|
47
47
|
/** controller: begin */
|
|
48
|
-
export * from '../component/icon/controller.
|
|
48
|
+
export * from '../component/icon/controller.tsx';
|
|
49
49
|
import 'zova';
|
|
50
50
|
declare module 'zova' {
|
|
51
51
|
}
|
|
@@ -55,7 +55,7 @@ declare module 'zova-module-a-icon' {
|
|
|
55
55
|
}
|
|
56
56
|
/** controller: end */
|
|
57
57
|
/** controller: begin */
|
|
58
|
-
import { ControllerIcon } from '../component/icon/controller.
|
|
58
|
+
import type { ControllerIcon } from '../component/icon/controller.tsx';
|
|
59
59
|
import 'zova';
|
|
60
60
|
declare module 'zova' {
|
|
61
61
|
interface IBeanRecordLocal {
|
|
@@ -64,8 +64,8 @@ declare module 'zova' {
|
|
|
64
64
|
}
|
|
65
65
|
/** controller: end */
|
|
66
66
|
/** components: begin */
|
|
67
|
-
export * from './component/icon.
|
|
68
|
-
import { ZIcon } from './component/icon.
|
|
67
|
+
export * from './component/icon.ts';
|
|
68
|
+
import { ZIcon } from './component/icon.ts';
|
|
69
69
|
export declare const components: {
|
|
70
70
|
icon: import("vue").DefineSetupFnComponent<import("zova-module-a-icon").ZIconProps, import("vue").EmitsOptions, import("vue").SlotsType<Record<string, any>>, {
|
|
71
71
|
controllerRef?: (ref: ControllerIcon) => void;
|
|
@@ -86,11 +86,11 @@ declare module 'zova' {
|
|
|
86
86
|
}
|
|
87
87
|
/** components: end */
|
|
88
88
|
/** config: begin */
|
|
89
|
-
export * from '../config/config.
|
|
90
|
-
import { config } from '../config/config.
|
|
89
|
+
export * from '../config/config.ts';
|
|
90
|
+
import { config } from '../config/config.ts';
|
|
91
91
|
/** config: end */
|
|
92
92
|
/** monkeySys: begin */
|
|
93
|
-
export * from '../monkeySys.
|
|
93
|
+
export * from '../monkeySys.ts';
|
|
94
94
|
/** monkeySys: end */
|
|
95
95
|
/** scope: begin */
|
|
96
96
|
import { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/.metadata/index.ts"],"names":[],"mappings":"AACA,iBAAiB;AACjB,cAAc,qBAAqB,CAAC;AAEpC,OAAO,MAAM,CAAC;AACd,OAAO,QAAQ,MAAM,CAAC;CAGrB;AACD,OAAO,QAAQ,oBAAoB,CAAC;IAE5B,UAAiB,OAAO;KAGvB;IAED,UAAiB,OAAO;QACtB,IAAI,aAAa,IAAI,iBAAiB,CAAC;QACvC,IAAI,UAAU,IAAI,a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AAM,CAAC,CAAC;KACrC;CAKF;AAED,iBAAiB"}
|
package/dist/.metadata/this.d.ts
CHANGED
package/dist/bean/sys.icon.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BeanBase } from 'zova';
|
|
2
|
-
import { IIconInfo, IIconMeta, TypeIconModules, TypeIconSymbols } from '../types/icon.
|
|
2
|
+
import { IIconInfo, IIconMeta, TypeIconModules, TypeIconSymbols } from '../types/icon.ts';
|
|
3
3
|
export declare class SysIcon extends BeanBase {
|
|
4
4
|
protected _iconSymbols: TypeIconSymbols;
|
|
5
5
|
protected _iconMoudles: TypeIconModules;
|
package/dist/bean/tool.icon.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BeanControllerBase } from 'zova';
|
|
2
|
-
import { ToolIcon } from '../../bean/tool.icon.
|
|
3
|
-
import { IIconRecord } from '../../types/icon.
|
|
2
|
+
import { ToolIcon } from '../../bean/tool.icon.ts';
|
|
3
|
+
import { IIconRecord } from '../../types/icon.ts';
|
|
4
4
|
export interface ControllerIconProps {
|
|
5
5
|
name?: keyof IIconRecord;
|
|
6
6
|
href?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './.metadata/index.
|
|
2
|
-
export * from './lib/index.
|
|
3
|
-
export * from './types/index.
|
|
1
|
+
export * from './.metadata/index.ts';
|
|
2
|
+
export * from './lib/index.ts';
|
|
3
|
+
export * from './types/index.ts';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,9 @@ var IconGroup = class {
|
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/bean/sys.icon.ts
|
|
14
|
-
var _dec$3
|
|
14
|
+
var _dec$3;
|
|
15
|
+
var _dec2$3;
|
|
16
|
+
var _class$3;
|
|
15
17
|
var XMLNS = "http://www.w3.org/2000/svg";
|
|
16
18
|
var XMLNS_LINK = "http://www.w3.org/1999/xlink";
|
|
17
19
|
var SysIcon = (_dec$3 = Sys(), _dec2$3 = BeanInfo({ module: "a-icon" }), _dec$3(_class$3 = _dec2$3(_class$3 = class SysIcon extends BeanBase {
|
|
@@ -167,7 +169,13 @@ var SysIcon = (_dec$3 = Sys(), _dec2$3 = BeanInfo({ module: "a-icon" }), _dec$3(
|
|
|
167
169
|
}) || _class$3) || _class$3);
|
|
168
170
|
//#endregion
|
|
169
171
|
//#region src/bean/tool.icon.ts
|
|
170
|
-
var _dec$2
|
|
172
|
+
var _dec$2;
|
|
173
|
+
var _dec2$2;
|
|
174
|
+
var _dec3$1;
|
|
175
|
+
var _dec4$1;
|
|
176
|
+
var _class$2;
|
|
177
|
+
var _class2$1;
|
|
178
|
+
var _descriptor$1;
|
|
171
179
|
function _initializerDefineProperty$1(e, i, r, l) {
|
|
172
180
|
r && Object.defineProperty(e, i, {
|
|
173
181
|
enumerable: r.enumerable,
|
|
@@ -250,7 +258,14 @@ function $useZovaIcon(iconGetter) {
|
|
|
250
258
|
}
|
|
251
259
|
//#endregion
|
|
252
260
|
//#region src/component/icon/controller.tsx
|
|
253
|
-
var _dec$1
|
|
261
|
+
var _dec$1;
|
|
262
|
+
var _dec2$1;
|
|
263
|
+
var _dec3;
|
|
264
|
+
var _dec4;
|
|
265
|
+
var _class$1;
|
|
266
|
+
var _class2;
|
|
267
|
+
var _descriptor;
|
|
268
|
+
var _ControllerIcon;
|
|
254
269
|
function _initializerDefineProperty(e, i, r, l) {
|
|
255
270
|
r && Object.defineProperty(e, i, {
|
|
256
271
|
enumerable: r.enumerable,
|
|
@@ -342,9 +357,9 @@ var MonkeySys = class extends BeanSimple {
|
|
|
342
357
|
};
|
|
343
358
|
//#endregion
|
|
344
359
|
//#region src/.metadata/index.ts
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
var
|
|
360
|
+
var _dec;
|
|
361
|
+
var _dec2;
|
|
362
|
+
var _class;
|
|
348
363
|
var components = { "icon": ZIcon };
|
|
349
364
|
var ScopeModuleAIcon = (_dec = Scope(), _dec2 = BeanInfo({ module: "a-icon" }), _dec(_class = _dec2(_class = class ScopeModuleAIcon extends BeanScopeBase {}) || _class) || _class);
|
|
350
365
|
/** scope: end */
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BeanControllerBase","convertToUnit","isHttpUrl","Use","Controller","ToolIcon","$getZovaIcon","ControllerIcon","_dec","_dec2","__z_BeanInfo","module","_dec3","_dec4","Reflect","metadata","Object","_class","_class2","_ControllerIcon","constructor","args","_initializerDefineProperty","_descriptor","__init__","_load","name","$props","promise","$$toolIcon","parseIconInfo","process","env","SSR","render","width","height","href","_parseHref","endsWith","_createVNode","color","iconInfo","symbolId","$propsDefault","_applyDecoratedDescriptor","prototype","configurable","enumerable","writable","initializer"],"sources":["../src/lib/iconGroup.ts","../src/bean/sys.icon.ts","../src/bean/tool.icon.ts","../src/lib/useZovaIcon.ts","../src/component/icon/controller.tsx","../src/.metadata/component/icon.ts","../src/config/config.ts","../src/monkeySys.ts","../src/.metadata/index.ts","../src/lib/utils.ts"],"sourcesContent":["import { StateLock } from 'zova';\nexport class IconGroup {\n constructor() {\n this.svg = void 0;\n this.loaded = void 0;\n this.loaded = StateLock.create();\n }\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { reactive } from 'vue';\nimport { BeanBase } from 'zova';\nimport { Sys } from 'zova-module-a-bean';\nimport { IconGroup } from '../lib/iconGroup.js';\nconst XMLNS = 'http://www.w3.org/2000/svg';\nconst XMLNS_LINK = 'http://www.w3.org/1999/xlink';\nexport let SysIcon = (_dec = Sys(), _dec2 = __z_BeanInfo({\n module: \"a-icon\"\n}), _dec(_class = _dec2(_class = class SysIcon extends BeanBase {\n constructor(...args) {\n super(...args);\n this._iconSymbols = reactive({});\n this._iconMoudles = {};\n }\n // undefined: ignore\n // '': empty icon\n parseIconInfoSync(iconName) {\n // parts\n const meta = this.parseIconMeta(iconName);\n if (!meta) return undefined;\n // empty\n const iconEmpty = {\n meta,\n symbolId: ''\n };\n // ok\n const iconOk = {\n meta,\n symbolId: meta.symbolId\n };\n // check if exists\n if (this._iconSymbols[meta.fullName]) return iconOk;\n // check if dom exists\n if (process.env.CLIENT) {\n const domIcon = document.getElementById(meta.symbolId);\n if (domIcon) return iconOk;\n }\n // check if exists\n if (this._iconSymbols[meta.fullName] === undefined) {\n this.parseIconInfo(iconName);\n return iconEmpty;\n } else if (this._iconSymbols[meta.fullName] === '') {\n return iconEmpty;\n }\n }\n async parseIconInfo(iconName) {\n // parts\n const meta = this.parseIconMeta(iconName);\n if (!meta) return undefined;\n // check if exists\n if (this._iconSymbols[meta.fullName]) {\n return {\n meta,\n symbolId: this._iconSymbols[meta.fullName]\n };\n }\n // pre set\n this._iconSymbols[meta.fullName] = '';\n // icon group\n const iconGroup = await this.parseIconGroup(meta.module, meta.group);\n if (!iconGroup) return undefined;\n // icon inject\n this._injectIconClient(meta);\n const symbolId = this._iconSymbols[meta.fullName] = meta.symbolId;\n // ok\n return {\n meta,\n symbolId\n };\n }\n async parseIconGroup(moduleName, groupName) {\n // check if exists\n const iconModule = this.getIconModule(moduleName);\n if (iconModule[groupName]) {\n await iconModule[groupName].loaded.wait();\n return iconModule[groupName].svg;\n }\n // record\n iconModule[groupName] = new IconGroup();\n // parse\n const svg = await this._parseIconGroupInner(moduleName, groupName);\n // touch\n iconModule[groupName].svg = svg;\n iconModule[groupName].loaded.touch();\n // ok\n return iconModule[groupName].svg;\n }\n async _parseIconGroupInner(moduleName, groupName) {\n // module\n const module = await this.sys.meta.module.use(moduleName);\n if (!module) return;\n // icons\n const icons = module.resource.icons;\n let groupUrl = icons[groupName];\n if (!groupUrl) return;\n // inline\n if (groupUrl.startsWith('data:image/svg+xml')) throw new Error('inline svg not supported');\n // fetch\n let svg;\n if (process.env.SERVER) {\n // publicPath\n groupUrl = this.sys.util.getPagePathFromAbsoluteUrl(groupUrl);\n const path = await import('node:path');\n const fs = await import('node:fs/promises');\n let filePath;\n if (process.env.DEV) {\n filePath = path.join(process.cwd(), groupUrl);\n } else {\n const {\n fileURLToPath\n } = await import('node:url');\n const rootFolder = fileURLToPath(new URL(/* @vite-ignore */'.', import.meta.url));\n filePath = path.join(rootFolder, 'client', groupUrl);\n }\n svg = await fs.readFile(filePath, {\n encoding: 'utf8'\n });\n } else {\n const res = await fetch(groupUrl);\n if (!res.ok) return;\n svg = await res.text();\n }\n return svg;\n }\n _injectIconClient(meta) {\n if (process.env.SERVER) return;\n // client\n const iconModule = this.getIconModule(meta.module);\n const iconGroup = iconModule[meta.group];\n // inject container\n let domContainer = document.getElementById('zova-svg-container');\n if (!domContainer) {\n domContainer = document.createElement('div');\n domContainer.style.position = 'absolute';\n domContainer.style.width = '0';\n domContainer.style.height = '0';\n domContainer.style.display = 'none';\n domContainer.id = 'zova-svg-container';\n document.body.appendChild(domContainer);\n }\n // inject module\n let domModule = document.getElementById(`zova-svg-module-${meta.module}`);\n if (!domModule) {\n domModule = document.createElement('div');\n domModule.id = `zova-svg-module-${meta.module}`;\n domContainer.appendChild(domModule);\n }\n // inject group\n let domGroup = document.getElementById(`zova-svg-group-${meta.module}-${meta.group}`);\n if (!domGroup) {\n domGroup = document.createElementNS(XMLNS, 'svg');\n domGroup.id = `zova-svg-group-${meta.module}-${meta.group}`;\n domGroup.setAttribute('xmlns', XMLNS);\n domGroup.setAttribute('xmlns:link', XMLNS_LINK);\n domModule.appendChild(domGroup);\n }\n // inject icon\n const domIcon = document.getElementById(meta.symbolId);\n if (!domIcon) {\n const iconContent = this.extractIconContent(iconGroup.svg, meta.symbolId);\n if (iconContent) {\n domGroup.insertAdjacentHTML('beforeend', iconContent);\n }\n }\n }\n extractIconContent(svg, symbolId) {\n if (!svg) return undefined;\n let pos = svg.indexOf(`'${symbolId}'`);\n if (pos === -1) pos = svg.indexOf(`\"${symbolId}\"`);\n if (pos === -1) return undefined;\n const posB = svg.indexOf('</symbol>', pos);\n const posA = svg.lastIndexOf('<symbol', pos);\n return svg.substring(posA, posB + '</symbol>'.length);\n // const symbolPattern = new RegExp(`<symbol.*?id=['\"]${symbolId}['\"].*?>.*?</symbol>`);\n // const matched = symbolPattern.exec(svg || '');\n // return matched && matched[0];\n }\n getIconModule(moduleName) {\n if (!this._iconMoudles[moduleName]) {\n this._iconMoudles[moduleName] = {};\n }\n return this._iconMoudles[moduleName];\n }\n parseIconMeta(iconName) {\n if (!iconName) return;\n // split module:group:name\n const parts = iconName.split(':');\n if (parts.length !== 3) {\n return;\n }\n const module = parts[0] || this.scope.config.defaultModule;\n const group = parts[1] || 'default';\n const name = parts[2] || '';\n if (!module.includes('-') || !name) {\n return;\n }\n return {\n module,\n group,\n name,\n fullName: this._getFullName(module, group, name),\n symbolId: this._getSymbolId(module, group, name)\n };\n }\n _getSymbolId(module, group, name) {\n return `zova-svg-icon-${module}-${group}-${name}`;\n }\n _getFullName(module, group, name) {\n return `${module}:${group}:${name}`;\n }\n}) || _class) || _class);","var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase, Use } from 'zova';\nimport { Tool } from 'zova-module-a-bean';\nimport { SysIcon } from './sys.icon.js';\nexport let ToolIcon = (_dec = Tool(), _dec2 = __z_BeanInfo({\n module: \"a-icon\"\n}), _dec3 = Use(), _dec4 = Reflect.metadata(\"design:type\", typeof SysIcon === \"undefined\" ? Object : SysIcon), _dec(_class = _dec2(_class = (_class2 = class ToolIcon extends BeanBase {\n constructor(...args) {\n super(...args);\n this._iconSSR = {};\n _initializerDefineProperty(this, \"$$sysIcon\", _descriptor, this);\n }\n async __init__() {\n if (process.env.SERVER) {\n this.ctx.meta.$ssr.context.onRendered(err => {\n if (err) return;\n this._onRendered();\n });\n }\n }\n async parseIconInfo(iconName) {\n const iconInfo = await this.$$sysIcon.parseIconInfo(iconName);\n if (!iconInfo) return iconInfo;\n this._injectIconSSR(iconInfo.meta);\n return iconInfo;\n }\n _onRendered() {\n this.ctx.meta.$ssr.context._meta.bodyTags += this._renderSSRContainer();\n }\n _renderSSRContainer() {\n const contentModules = this._renderSSRModules();\n return `<div id=\"zova-svg-container\" style=\"position: absolute; width: 0px; height: 0px; display: none;\">${contentModules}</div>`;\n }\n _renderSSRModules() {\n return Object.keys(this._iconSSR).map(moduleName => {\n const moduleId = `zova-svg-module-${moduleName}`;\n const contentGroups = this._renderSSRGroups(this._iconSSR[moduleName], moduleName);\n return `<div id=\"${moduleId}\">${contentGroups}</div>`;\n }).join('');\n }\n _renderSSRGroups(iconSSRGroups, moduleName) {\n return Object.keys(iconSSRGroups).map(groupName => {\n const groupId = `zova-svg-group-${moduleName}-${groupName}`;\n const contentIcons = this._renderSSRIcons(iconSSRGroups[groupName]);\n return `<svg id=\"${groupId}\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:link=\"http://www.w3.org/1999/xlink\">${contentIcons}</svg>`;\n }).join('');\n }\n _renderSSRIcons(iconSSRIcons) {\n return Object.keys(iconSSRIcons).map(symbolId => {\n return iconSSRIcons[symbolId];\n }).join('');\n }\n _injectIconSSR(meta) {\n if (process.env.CLIENT) return;\n const iconModule = this.$$sysIcon.getIconModule(meta.module);\n const iconGroup = iconModule[meta.group];\n if (!this._iconSSR[meta.module]) this._iconSSR[meta.module] = {};\n if (!this._iconSSR[meta.module][meta.group]) this._iconSSR[meta.module][meta.group] = {};\n this._iconSSR[meta.module][meta.group][meta.symbolId] = this.$$sysIcon.extractIconContent(iconGroup.svg, meta.symbolId);\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"$$sysIcon\", [_dec3, _dec4], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2)) || _class) || _class);","import { ref, watchEffect } from 'vue';\nimport { sys } from 'zova';\nexport function $getZovaIcon(iconName) {\n return sys.meta.$icon.parseIconInfoSync(iconName);\n}\nexport function $useZovaIcon(iconGetter) {\n const iconInfo = ref();\n watchEffect(() => {\n iconInfo.value = $getZovaIcon(iconGetter());\n });\n return {\n iconInfo\n };\n}","import { BeanControllerBase, convertToUnit, isHttpUrl, Use } from 'zova';\nimport { Controller } from 'zova-module-a-bean';\n\nimport { ToolIcon } from '../../bean/tool.icon.js';\nimport { $getZovaIcon } from '../../lib/useZovaIcon.js';\nimport { IIconRecord } from '../../types/icon.js';\n\nexport interface ControllerIconProps {\n name?: keyof IIconRecord;\n href?: string;\n width?: string | number;\n height?: string | number;\n color?: string;\n}\n\n@Controller()\nexport class ControllerIcon extends BeanControllerBase {\n static $propsDefault = {};\n\n @Use()\n $$toolIcon: ToolIcon;\n\n protected async __init__() {\n await this._load();\n }\n\n private async _load() {\n const name = this.$props.name;\n if (name === ('none' as any) || !name) {\n return;\n }\n if (isHttpUrl(name)) {\n return;\n }\n const promise = this.$$toolIcon.parseIconInfo(name);\n if (process.env.SSR) {\n await promise;\n }\n }\n\n protected render() {\n // width/height\n const width = this.$props.width ?? this.$props.height;\n const height = this.$props.height ?? this.$props.width;\n const href = this._parseHref();\n if (isHttpUrl(href) && !href?.endsWith('.svg')) {\n return (\n <img\n class=\"zova-icon__img\"\n style={{\n width: convertToUnit(width),\n height: convertToUnit(height),\n }}\n src={href}\n ></img>\n );\n }\n return (\n <svg\n class=\"zova-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n role=\"img\"\n aria-hidden=\"true\"\n style={{\n width: convertToUnit(width),\n height: convertToUnit(height),\n color: this.$props.color,\n }}\n >\n <use xlinkHref={href}></use>\n </svg>\n );\n }\n\n private _parseHref() {\n let href = this.$props.href;\n const name = this.$props.name;\n if (href) return href;\n if (isHttpUrl(name)) return name;\n // icon info\n const iconInfo = $getZovaIcon(name);\n // href\n href = `#${iconInfo?.symbolId || ''}`;\n return href;\n }\n}\n","import { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\nimport { ControllerIcon } from '../../component/icon/controller.jsx';\nexport const ZIcon = defineComponent(_props => {\n useController(ControllerIcon, undefined, undefined);\n return () => {};\n}, prepareComponentOptions());","export const config = _sys => {\n return {\n defaultModule: 'home-icon'\n };\n};","import { BeanSimple } from 'zova';\nimport { SysIcon } from './bean/sys.icon.js';\nexport class MonkeySys extends BeanSimple {\n async sysInitialize() {\n // $icon\n this.sys.meta.$icon = await this.bean._getBean(SysIcon, false);\n }\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** sys: begin */\nexport * from '../bean/sys.icon.js';\nimport 'zova';\n/** sys: end */\n/** sys: begin */\nimport { SysIcon } from '../bean/sys.icon.js';\nimport 'zova';\n/** sys: end */\n/** tool: begin */\nexport * from '../bean/tool.icon.js';\nimport 'zova';\n/** tool: end */\n/** tool: begin */\nimport { ToolIcon } from '../bean/tool.icon.js';\nimport 'zova';\n/** tool: end */\n/** controller: begin */\nexport * from '../component/icon/controller.jsx';\nimport 'zova';\n/** controller: end */\n/** controller: begin */\nimport { ControllerIcon } from '../component/icon/controller.jsx';\nimport 'zova';\n/** controller: end */\n\n/** components: begin */\nexport * from './component/icon.js';\nimport { ZIcon } from './component/icon.js';\nexport const components = {\n 'icon': ZIcon\n};\nimport 'zova';\n/** components: end */\n/** config: begin */\nexport * from '../config/config.js';\n/** config: end */\n/** monkeySys: begin */\nexport * from '../monkeySys.js';\n/** monkeySys: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAIcon = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-icon\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAIcon extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */","import { createVNode } from 'vue';\nimport { ZIcon } from '../.metadata/index.js';\nexport function $icon(name, size, color) {\n return createVNode(ZIcon, {\n name,\n color,\n width: size,\n height: size\n });\n}\nexport function $iconName(name) {\n return name;\n}"],"mappings":";;;;AACA,IAAa,YAAb,MAAuB;CACrB,cAAc;EACZ,KAAK,MAAM,KAAK;EAChB,KAAK,SAAS,KAAK;EACnB,KAAK,SAAS,UAAU,OAAO;CACjC;AACF;;;ACPA,IAAI,QAAM,SAAO;AAMjB,IAAM,QAAQ;AACd,IAAM,aAAa;AACnB,IAAW,WAAW,SAAO,IAAI,GAAG,UAAQ,SAAa,EACvD,QAAQ,SACV,CAAC,GAAG,OAAK,WAAS,QAAM,WAAS,MAAM,gBAAgB,SAAS;CAC9D,YAAY,GAAG,MAAM;EACnB,MAAM,GAAG,IAAI;EACb,KAAK,eAAe,SAAS,CAAC,CAAC;EAC/B,KAAK,eAAe,CAAC;CACvB;CAGA,kBAAkB,UAAU;EAE1B,MAAM,OAAO,KAAK,cAAc,QAAQ;EACxC,IAAI,CAAC,MAAM,OAAO,KAAA;EAElB,MAAM,YAAY;GAChB;GACA,UAAU;EACZ;EAEA,MAAM,SAAS;GACb;GACA,UAAU,KAAK;EACjB;EAEA,IAAI,KAAK,aAAa,KAAK,WAAW,OAAO;EAE7C,IAAI,QAAQ,IAAI;OACE,SAAS,eAAe,KAAK,QACzC,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5B,IAAa,UAAS,SAAQ;CAC5B,OAAO,EACL,eAAe,YACjB;AACF;;;ACFA,IAAa,YAAb,cAA+B,WAAW;CACxC,MAAM,gBAAgB;EAEpB,KAAK,IAAI,KAAK,QAAQ,MAAM,KAAK,KAAK,SAAS,SAAS,KAAK;CAC/D;AACF;;;;;ACPA,IAAI,MAAM,OAAO;AA+BjB,IAAa,aAAa,EACxB,QAAQ,MACV;AAYA,IAAW,oBAAoB,OAAO,MAAM,GAAG,QAAQ,SAAa,EAClE,QAAQ,SACV,CAAC,GAAG,KAAK,SAAS,MAAM,SAAS,MAAM,yBAAyB,cAAc,CAAC,CAAC,KAAK,MAAM,KAAK;;;;AC7ChG,SAAgB,MAAM,MAAM,MAAM,OAAO;CACvC,OAAO,YAAY,OAAO;EACxB;EACA;EACA,OAAO;EACP,QAAQ;CACV,CAAC;AACH;AACA,SAAgB,UAAU,MAAM;CAC9B,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_dec","_dec2","_class","__z_BeanInfo","_dec","_dec2","_dec3","_dec4","_class","_class2","_descriptor","_initializerDefineProperty","_applyDecoratedDescriptor","__z_BeanInfo","BeanControllerBase","convertToUnit","isHttpUrl","Use","Controller","ToolIcon","$getZovaIcon","ControllerIcon","_dec","_dec2","__z_BeanInfo","module","_dec3","_dec4","Reflect","metadata","Object","_class","_class2","_ControllerIcon","constructor","args","_initializerDefineProperty","_descriptor","__init__","_load","name","$props","promise","$$toolIcon","parseIconInfo","process","env","SSR","render","width","height","href","_parseHref","endsWith","_createVNode","color","iconInfo","symbolId","$propsDefault","_applyDecoratedDescriptor","prototype","configurable","enumerable","writable","initializer","_dec","_dec2","_class","__z_BeanInfo","_createVNode","__z_BeanInfo"],"sources":["../src/lib/iconGroup.ts","../src/bean/sys.icon.ts","../src/bean/tool.icon.ts","../src/lib/useZovaIcon.ts","../src/component/icon/controller.tsx","../src/.metadata/component/icon.ts","../src/config/config.ts","../src/monkeySys.ts","../src/.metadata/index.ts","../src/lib/utils.ts"],"sourcesContent":["import { StateLock } from 'zova';\nexport class IconGroup {\n constructor() {\n this.svg = void 0;\n this.loaded = void 0;\n this.loaded = StateLock.create();\n }\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { reactive } from 'vue';\nimport { BeanBase } from 'zova';\nimport { Sys } from 'zova-module-a-bean';\nimport { IconGroup } from '../lib/iconGroup.ts';\nconst XMLNS = 'http://www.w3.org/2000/svg';\nconst XMLNS_LINK = 'http://www.w3.org/1999/xlink';\nexport let SysIcon = (_dec = Sys(), _dec2 = __z_BeanInfo({\n module: \"a-icon\"\n}), _dec(_class = _dec2(_class = class SysIcon extends BeanBase {\n constructor(...args) {\n super(...args);\n this._iconSymbols = reactive({});\n this._iconMoudles = {};\n }\n // undefined: ignore\n // '': empty icon\n parseIconInfoSync(iconName) {\n // parts\n const meta = this.parseIconMeta(iconName);\n if (!meta) return undefined;\n // empty\n const iconEmpty = {\n meta,\n symbolId: ''\n };\n // ok\n const iconOk = {\n meta,\n symbolId: meta.symbolId\n };\n // check if exists\n if (this._iconSymbols[meta.fullName]) return iconOk;\n // check if dom exists\n if (process.env.CLIENT) {\n const domIcon = document.getElementById(meta.symbolId);\n if (domIcon) return iconOk;\n }\n // check if exists\n if (this._iconSymbols[meta.fullName] === undefined) {\n this.parseIconInfo(iconName);\n return iconEmpty;\n } else if (this._iconSymbols[meta.fullName] === '') {\n return iconEmpty;\n }\n }\n async parseIconInfo(iconName) {\n // parts\n const meta = this.parseIconMeta(iconName);\n if (!meta) return undefined;\n // check if exists\n if (this._iconSymbols[meta.fullName]) {\n return {\n meta,\n symbolId: this._iconSymbols[meta.fullName]\n };\n }\n // pre set\n this._iconSymbols[meta.fullName] = '';\n // icon group\n const iconGroup = await this.parseIconGroup(meta.module, meta.group);\n if (!iconGroup) return undefined;\n // icon inject\n this._injectIconClient(meta);\n const symbolId = this._iconSymbols[meta.fullName] = meta.symbolId;\n // ok\n return {\n meta,\n symbolId\n };\n }\n async parseIconGroup(moduleName, groupName) {\n // check if exists\n const iconModule = this.getIconModule(moduleName);\n if (iconModule[groupName]) {\n await iconModule[groupName].loaded.wait();\n return iconModule[groupName].svg;\n }\n // record\n iconModule[groupName] = new IconGroup();\n // parse\n const svg = await this._parseIconGroupInner(moduleName, groupName);\n // touch\n iconModule[groupName].svg = svg;\n iconModule[groupName].loaded.touch();\n // ok\n return iconModule[groupName].svg;\n }\n async _parseIconGroupInner(moduleName, groupName) {\n // module\n const module = await this.sys.meta.module.use(moduleName);\n if (!module) return;\n // icons\n const icons = module.resource.icons;\n let groupUrl = icons[groupName];\n if (!groupUrl) return;\n // inline\n if (groupUrl.startsWith('data:image/svg+xml')) throw new Error('inline svg not supported');\n // fetch\n let svg;\n if (process.env.SERVER) {\n // publicPath\n groupUrl = this.sys.util.getPagePathFromAbsoluteUrl(groupUrl);\n const path = await import('node:path');\n const fs = await import('node:fs/promises');\n let filePath;\n if (process.env.DEV) {\n filePath = path.join(process.cwd(), groupUrl);\n } else {\n const {\n fileURLToPath\n } = await import('node:url');\n const rootFolder = fileURLToPath(new URL(/* @vite-ignore */'.', import.meta.url));\n filePath = path.join(rootFolder, 'client', groupUrl);\n }\n svg = await fs.readFile(filePath, {\n encoding: 'utf8'\n });\n } else {\n const res = await fetch(groupUrl);\n if (!res.ok) return;\n svg = await res.text();\n }\n return svg;\n }\n _injectIconClient(meta) {\n if (process.env.SERVER) return;\n // client\n const iconModule = this.getIconModule(meta.module);\n const iconGroup = iconModule[meta.group];\n // inject container\n let domContainer = document.getElementById('zova-svg-container');\n if (!domContainer) {\n domContainer = document.createElement('div');\n domContainer.style.position = 'absolute';\n domContainer.style.width = '0';\n domContainer.style.height = '0';\n domContainer.style.display = 'none';\n domContainer.id = 'zova-svg-container';\n document.body.appendChild(domContainer);\n }\n // inject module\n let domModule = document.getElementById(`zova-svg-module-${meta.module}`);\n if (!domModule) {\n domModule = document.createElement('div');\n domModule.id = `zova-svg-module-${meta.module}`;\n domContainer.appendChild(domModule);\n }\n // inject group\n let domGroup = document.getElementById(`zova-svg-group-${meta.module}-${meta.group}`);\n if (!domGroup) {\n domGroup = document.createElementNS(XMLNS, 'svg');\n domGroup.id = `zova-svg-group-${meta.module}-${meta.group}`;\n domGroup.setAttribute('xmlns', XMLNS);\n domGroup.setAttribute('xmlns:link', XMLNS_LINK);\n domModule.appendChild(domGroup);\n }\n // inject icon\n const domIcon = document.getElementById(meta.symbolId);\n if (!domIcon) {\n const iconContent = this.extractIconContent(iconGroup.svg, meta.symbolId);\n if (iconContent) {\n domGroup.insertAdjacentHTML('beforeend', iconContent);\n }\n }\n }\n extractIconContent(svg, symbolId) {\n if (!svg) return undefined;\n let pos = svg.indexOf(`'${symbolId}'`);\n if (pos === -1) pos = svg.indexOf(`\"${symbolId}\"`);\n if (pos === -1) return undefined;\n const posB = svg.indexOf('</symbol>', pos);\n const posA = svg.lastIndexOf('<symbol', pos);\n return svg.substring(posA, posB + '</symbol>'.length);\n // const symbolPattern = new RegExp(`<symbol.*?id=['\"]${symbolId}['\"].*?>.*?</symbol>`);\n // const matched = symbolPattern.exec(svg || '');\n // return matched && matched[0];\n }\n getIconModule(moduleName) {\n if (!this._iconMoudles[moduleName]) {\n this._iconMoudles[moduleName] = {};\n }\n return this._iconMoudles[moduleName];\n }\n parseIconMeta(iconName) {\n if (!iconName) return;\n // split module:group:name\n const parts = iconName.split(':');\n if (parts.length !== 3) {\n return;\n }\n const module = parts[0] || this.scope.config.defaultModule;\n const group = parts[1] || 'default';\n const name = parts[2] || '';\n if (!module.includes('-') || !name) {\n return;\n }\n return {\n module,\n group,\n name,\n fullName: this._getFullName(module, group, name),\n symbolId: this._getSymbolId(module, group, name)\n };\n }\n _getSymbolId(module, group, name) {\n return `zova-svg-icon-${module}-${group}-${name}`;\n }\n _getFullName(module, group, name) {\n return `${module}:${group}:${name}`;\n }\n}) || _class) || _class);","var _dec, _dec2, _dec3, _dec4, _class, _class2, _descriptor;\nfunction _initializerDefineProperty(e, i, r, l) { r && Object.defineProperty(e, i, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(l) : void 0 }); }\nfunction _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\"value\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }\nfunction _initializerWarningHelper(r, e) { throw Error(\"Decorating class property failed. Please ensure that transform-class-properties is enabled and runs after the decorators transform.\"); }\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\nimport { BeanBase, Use } from 'zova';\nimport { Tool } from 'zova-module-a-bean';\nimport { SysIcon } from './sys.icon.ts';\nexport let ToolIcon = (_dec = Tool(), _dec2 = __z_BeanInfo({\n module: \"a-icon\"\n}), _dec3 = Use(), _dec4 = Reflect.metadata(\"design:type\", typeof SysIcon === \"undefined\" ? Object : SysIcon), _dec(_class = _dec2(_class = (_class2 = class ToolIcon extends BeanBase {\n constructor(...args) {\n super(...args);\n this._iconSSR = {};\n _initializerDefineProperty(this, \"$$sysIcon\", _descriptor, this);\n }\n async __init__() {\n if (process.env.SERVER) {\n this.ctx.meta.$ssr.context.onRendered(err => {\n if (err) return;\n this._onRendered();\n });\n }\n }\n async parseIconInfo(iconName) {\n const iconInfo = await this.$$sysIcon.parseIconInfo(iconName);\n if (!iconInfo) return iconInfo;\n this._injectIconSSR(iconInfo.meta);\n return iconInfo;\n }\n _onRendered() {\n this.ctx.meta.$ssr.context._meta.bodyTags += this._renderSSRContainer();\n }\n _renderSSRContainer() {\n const contentModules = this._renderSSRModules();\n return `<div id=\"zova-svg-container\" style=\"position: absolute; width: 0px; height: 0px; display: none;\">${contentModules}</div>`;\n }\n _renderSSRModules() {\n return Object.keys(this._iconSSR).map(moduleName => {\n const moduleId = `zova-svg-module-${moduleName}`;\n const contentGroups = this._renderSSRGroups(this._iconSSR[moduleName], moduleName);\n return `<div id=\"${moduleId}\">${contentGroups}</div>`;\n }).join('');\n }\n _renderSSRGroups(iconSSRGroups, moduleName) {\n return Object.keys(iconSSRGroups).map(groupName => {\n const groupId = `zova-svg-group-${moduleName}-${groupName}`;\n const contentIcons = this._renderSSRIcons(iconSSRGroups[groupName]);\n return `<svg id=\"${groupId}\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:link=\"http://www.w3.org/1999/xlink\">${contentIcons}</svg>`;\n }).join('');\n }\n _renderSSRIcons(iconSSRIcons) {\n return Object.keys(iconSSRIcons).map(symbolId => {\n return iconSSRIcons[symbolId];\n }).join('');\n }\n _injectIconSSR(meta) {\n if (process.env.CLIENT) return;\n const iconModule = this.$$sysIcon.getIconModule(meta.module);\n const iconGroup = iconModule[meta.group];\n if (!this._iconSSR[meta.module]) this._iconSSR[meta.module] = {};\n if (!this._iconSSR[meta.module][meta.group]) this._iconSSR[meta.module][meta.group] = {};\n this._iconSSR[meta.module][meta.group][meta.symbolId] = this.$$sysIcon.extractIconContent(iconGroup.svg, meta.symbolId);\n }\n}, _descriptor = _applyDecoratedDescriptor(_class2.prototype, \"$$sysIcon\", [_dec3, _dec4], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n}), _class2)) || _class) || _class);","import { ref, watchEffect } from 'vue';\nimport { sys } from 'zova';\nexport function $getZovaIcon(iconName) {\n return sys.meta.$icon.parseIconInfoSync(iconName);\n}\nexport function $useZovaIcon(iconGetter) {\n const iconInfo = ref();\n watchEffect(() => {\n iconInfo.value = $getZovaIcon(iconGetter());\n });\n return {\n iconInfo\n };\n}","import { BeanControllerBase, convertToUnit, isHttpUrl, Use } from 'zova';\nimport { Controller } from 'zova-module-a-bean';\n\nimport { ToolIcon } from '../../bean/tool.icon.ts';\nimport { $getZovaIcon } from '../../lib/useZovaIcon.ts';\nimport { IIconRecord } from '../../types/icon.ts';\n\nexport interface ControllerIconProps {\n name?: keyof IIconRecord;\n href?: string;\n width?: string | number;\n height?: string | number;\n color?: string;\n}\n\n@Controller()\nexport class ControllerIcon extends BeanControllerBase {\n static $propsDefault = {};\n\n @Use()\n $$toolIcon: ToolIcon;\n\n protected async __init__() {\n await this._load();\n }\n\n private async _load() {\n const name = this.$props.name;\n if (name === ('none' as any) || !name) {\n return;\n }\n if (isHttpUrl(name)) {\n return;\n }\n const promise = this.$$toolIcon.parseIconInfo(name);\n if (process.env.SSR) {\n await promise;\n }\n }\n\n protected render() {\n // width/height\n const width = this.$props.width ?? this.$props.height;\n const height = this.$props.height ?? this.$props.width;\n const href = this._parseHref();\n if (isHttpUrl(href) && !href?.endsWith('.svg')) {\n return (\n <img\n class=\"zova-icon__img\"\n style={{\n width: convertToUnit(width),\n height: convertToUnit(height),\n }}\n src={href}\n ></img>\n );\n }\n return (\n <svg\n class=\"zova-icon__svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n role=\"img\"\n aria-hidden=\"true\"\n style={{\n width: convertToUnit(width),\n height: convertToUnit(height),\n color: this.$props.color,\n }}\n >\n <use xlinkHref={href}></use>\n </svg>\n );\n }\n\n private _parseHref() {\n let href = this.$props.href;\n const name = this.$props.name;\n if (href) return href;\n if (isHttpUrl(name)) return name;\n // icon info\n const iconInfo = $getZovaIcon(name);\n // href\n href = `#${iconInfo?.symbolId || ''}`;\n return href;\n }\n}\n","import { defineComponent } from 'vue';\nimport { prepareComponentOptions, useController } from 'zova';\nimport { ControllerIcon } from '../../component/icon/controller.tsx';\nexport const ZIcon = defineComponent(_props => {\n useController(ControllerIcon, undefined, undefined);\n return () => {};\n}, prepareComponentOptions());","export const config = _sys => {\n return {\n defaultModule: 'home-icon'\n };\n};","import { BeanSimple } from 'zova';\nimport { SysIcon } from './bean/sys.icon.ts';\nexport class MonkeySys extends BeanSimple {\n async sysInitialize() {\n // $icon\n this.sys.meta.$icon = await this.bean._getBean(SysIcon, false);\n }\n}","var _dec, _dec2, _class;\nimport { \"BeanInfo\" as __z_BeanInfo } from \"zova\";\n// eslint-disable\n/** sys: begin */\nexport * from '../bean/sys.icon.ts';\nimport 'zova';\n/** sys: end */\n/** sys: begin */\n\nimport 'zova';\n/** sys: end */\n/** tool: begin */\nexport * from '../bean/tool.icon.ts';\nimport 'zova';\n/** tool: end */\n/** tool: begin */\n\nimport 'zova';\n/** tool: end */\n/** controller: begin */\nexport * from '../component/icon/controller.tsx';\nimport 'zova';\n/** controller: end */\n/** controller: begin */\n\nimport 'zova';\n/** controller: end */\n\n/** components: begin */\nexport * from './component/icon.ts';\nimport { ZIcon } from './component/icon.ts';\nexport const components = {\n 'icon': ZIcon\n};\nimport 'zova';\n/** components: end */\n/** config: begin */\nexport * from '../config/config.ts';\n/** config: end */\n/** monkeySys: begin */\nexport * from '../monkeySys.ts';\n/** monkeySys: end */\n/** scope: begin */\nimport { BeanScopeBase } from 'zova';\nimport { Scope } from 'zova-module-a-bean';\nexport let ScopeModuleAIcon = (_dec = Scope(), _dec2 = __z_BeanInfo({\n module: \"a-icon\"\n}), _dec(_class = _dec2(_class = class ScopeModuleAIcon extends BeanScopeBase {}) || _class) || _class);\nimport 'zova';\n\n/** scope: end */","import { createVNode } from 'vue';\nimport { ZIcon } from '../.metadata/index.ts';\nexport function $icon(name, size, color) {\n return createVNode(ZIcon, {\n name,\n color,\n width: size,\n height: size\n });\n}\nexport function $iconName(name) {\n return name;\n}"],"mappings":";;;;AACA,IAAa,YAAb,MAAuB;CACrB,cAAc;EACZ,KAAK,MAAM,KAAK;EAChB,KAAK,SAAS,KAAK;EACnB,KAAK,SAAS,UAAU,OAAO;CACjC;AACF;;;ACPA,IAAIA;AAAMC,IAAAA;AAAOC,IAAAA;AAMjB,IAAM,QAAQ;AACd,IAAM,aAAa;AACnB,IAAW,WAAW,SAAO,IAAI,GAAG,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* from './useZovaIcon.
|
|
3
|
-
export * from './utils.
|
|
1
|
+
export * from './iconGroup.ts';
|
|
2
|
+
export * from './useZovaIcon.ts';
|
|
3
|
+
export * from './utils.ts';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IIconInfo, IIconRecord } from '../types/icon.
|
|
1
|
+
import type { IIconInfo, IIconRecord } from '../types/icon.ts';
|
|
2
2
|
export declare function $getZovaIcon(iconName?: keyof IIconRecord): IIconInfo | undefined;
|
|
3
3
|
export declare function $useZovaIcon(iconGetter: () => keyof IIconRecord | undefined): {
|
|
4
4
|
iconInfo: import("vue").Ref<IIconInfo | undefined, IIconInfo | undefined>;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { VNode } from 'vue';
|
|
2
|
-
import type { IIconRecord } from '../types/icon.
|
|
2
|
+
import type { IIconRecord } from '../types/icon.ts';
|
|
3
3
|
export declare function $icon<K extends keyof IIconRecord>(name: K, size?: string | number, color?: string): VNode;
|
|
4
4
|
export declare function $iconName<K extends keyof IIconRecord>(name: K): K;
|
|
5
5
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/types/icon.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SysIcon } from '../bean/sys.icon.
|
|
2
|
-
import type { IconGroup } from '../lib/iconGroup.
|
|
1
|
+
import type { SysIcon } from '../bean/sys.icon.ts';
|
|
2
|
+
import type { IconGroup } from '../lib/iconGroup.ts';
|
|
3
3
|
export interface IIconRecord {
|
|
4
4
|
}
|
|
5
5
|
export interface IIconMeta {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './icon.
|
|
1
|
+
export * from './icon.ts';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -3,9 +3,9 @@ import type { TypeControllerInnerProps } from 'zova';
|
|
|
3
3
|
import { defineComponent } from 'vue';
|
|
4
4
|
import { prepareComponentOptions, useController } from 'zova';
|
|
5
5
|
|
|
6
|
-
import type { ControllerIconProps } from '../../component/icon/controller.
|
|
6
|
+
import type { ControllerIconProps } from '../../component/icon/controller.tsx';
|
|
7
7
|
|
|
8
|
-
import { ControllerIcon } from '../../component/icon/controller.
|
|
8
|
+
import { ControllerIcon } from '../../component/icon/controller.tsx';
|
|
9
9
|
export type ZIconProps = {
|
|
10
10
|
controllerRef?: (ref: ControllerIcon) => void;
|
|
11
11
|
} & ControllerIconProps;
|
package/src/.metadata/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable
|
|
2
2
|
/** sys: begin */
|
|
3
|
-
export * from '../bean/sys.icon.
|
|
3
|
+
export * from '../bean/sys.icon.ts';
|
|
4
4
|
|
|
5
5
|
import 'zova';
|
|
6
6
|
declare module 'zova' {
|
|
@@ -22,7 +22,7 @@ declare module 'zova-module-a-icon' {
|
|
|
22
22
|
}
|
|
23
23
|
/** sys: end */
|
|
24
24
|
/** sys: begin */
|
|
25
|
-
import { SysIcon } from '../bean/sys.icon.
|
|
25
|
+
import type { SysIcon } from '../bean/sys.icon.ts';
|
|
26
26
|
import 'zova';
|
|
27
27
|
declare module 'zova' {
|
|
28
28
|
export interface IBeanRecordGeneral {
|
|
@@ -31,7 +31,7 @@ declare module 'zova' {
|
|
|
31
31
|
}
|
|
32
32
|
/** sys: end */
|
|
33
33
|
/** tool: begin */
|
|
34
|
-
export * from '../bean/tool.icon.
|
|
34
|
+
export * from '../bean/tool.icon.ts';
|
|
35
35
|
|
|
36
36
|
import 'zova';
|
|
37
37
|
declare module 'zova' {
|
|
@@ -53,7 +53,7 @@ declare module 'zova-module-a-icon' {
|
|
|
53
53
|
}
|
|
54
54
|
/** tool: end */
|
|
55
55
|
/** tool: begin */
|
|
56
|
-
import { ToolIcon } from '../bean/tool.icon.
|
|
56
|
+
import type { ToolIcon } from '../bean/tool.icon.ts';
|
|
57
57
|
import 'zova';
|
|
58
58
|
declare module 'zova' {
|
|
59
59
|
export interface IBeanRecordGeneral {
|
|
@@ -62,7 +62,7 @@ declare module 'zova' {
|
|
|
62
62
|
}
|
|
63
63
|
/** tool: end */
|
|
64
64
|
/** controller: begin */
|
|
65
|
-
export * from '../component/icon/controller.
|
|
65
|
+
export * from '../component/icon/controller.tsx';
|
|
66
66
|
|
|
67
67
|
import 'zova';
|
|
68
68
|
declare module 'zova' {
|
|
@@ -78,7 +78,7 @@ declare module 'zova-module-a-icon' {
|
|
|
78
78
|
}
|
|
79
79
|
/** controller: end */
|
|
80
80
|
/** controller: begin */
|
|
81
|
-
import { ControllerIcon } from '../component/icon/controller.
|
|
81
|
+
import type { ControllerIcon } from '../component/icon/controller.tsx';
|
|
82
82
|
import 'zova';
|
|
83
83
|
declare module 'zova' {
|
|
84
84
|
export interface IBeanRecordLocal {
|
|
@@ -88,8 +88,8 @@ declare module 'zova' {
|
|
|
88
88
|
/** controller: end */
|
|
89
89
|
|
|
90
90
|
/** components: begin */
|
|
91
|
-
export * from './component/icon.
|
|
92
|
-
import { ZIcon } from './component/icon.
|
|
91
|
+
export * from './component/icon.ts';
|
|
92
|
+
import { ZIcon } from './component/icon.ts';
|
|
93
93
|
export const components = {
|
|
94
94
|
'icon': ZIcon,
|
|
95
95
|
};
|
|
@@ -104,11 +104,11 @@ export interface IZovaComponentRecord {
|
|
|
104
104
|
}
|
|
105
105
|
/** components: end */
|
|
106
106
|
/** config: begin */
|
|
107
|
-
export * from '../config/config.
|
|
108
|
-
import { config } from '../config/config.
|
|
107
|
+
export * from '../config/config.ts';
|
|
108
|
+
import { config } from '../config/config.ts';
|
|
109
109
|
/** config: end */
|
|
110
110
|
/** monkeySys: begin */
|
|
111
|
-
export * from '../monkeySys.
|
|
111
|
+
export * from '../monkeySys.ts';
|
|
112
112
|
/** monkeySys: end */
|
|
113
113
|
/** scope: begin */
|
|
114
114
|
import { BeanScopeBase, type BeanScopeUtil, TypeModuleConfig } from 'zova';
|
package/src/.metadata/this.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const __ThisModule__ = 'a-icon';
|
|
2
|
-
export { ScopeModuleAIcon as ScopeModule } from './index.
|
|
2
|
+
export { ScopeModuleAIcon as ScopeModule } from './index.ts';
|
package/src/bean/sys.icon.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { reactive } from 'vue';
|
|
|
2
2
|
import { BeanBase } from 'zova';
|
|
3
3
|
import { Sys } from 'zova-module-a-bean';
|
|
4
4
|
|
|
5
|
-
import { IconGroup } from '../lib/iconGroup.
|
|
6
|
-
import { IIconInfo, IIconMeta, TypeIconModules, TypeIconSymbols } from '../types/icon.
|
|
5
|
+
import { IconGroup } from '../lib/iconGroup.ts';
|
|
6
|
+
import { IIconInfo, IIconMeta, TypeIconModules, TypeIconSymbols } from '../types/icon.ts';
|
|
7
7
|
|
|
8
8
|
const XMLNS = 'http://www.w3.org/2000/svg';
|
|
9
9
|
const XMLNS_LINK = 'http://www.w3.org/1999/xlink';
|
package/src/bean/tool.icon.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BeanBase, Use } from 'zova';
|
|
2
2
|
import { Tool } from 'zova-module-a-bean';
|
|
3
3
|
|
|
4
|
-
import { IIconInfo, IIconMeta } from '../types/icon.
|
|
5
|
-
import { SysIcon } from './sys.icon.
|
|
4
|
+
import { IIconInfo, IIconMeta } from '../types/icon.ts';
|
|
5
|
+
import { SysIcon } from './sys.icon.ts';
|
|
6
6
|
|
|
7
7
|
@Tool()
|
|
8
8
|
export class ToolIcon extends BeanBase {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { BeanControllerBase, convertToUnit, isHttpUrl, Use } from 'zova';
|
|
2
2
|
import { Controller } from 'zova-module-a-bean';
|
|
3
3
|
|
|
4
|
-
import { ToolIcon } from '../../bean/tool.icon.
|
|
5
|
-
import { $getZovaIcon } from '../../lib/useZovaIcon.
|
|
6
|
-
import { IIconRecord } from '../../types/icon.
|
|
4
|
+
import { ToolIcon } from '../../bean/tool.icon.ts';
|
|
5
|
+
import { $getZovaIcon } from '../../lib/useZovaIcon.ts';
|
|
6
|
+
import { IIconRecord } from '../../types/icon.ts';
|
|
7
7
|
|
|
8
8
|
export interface ControllerIconProps {
|
|
9
9
|
name?: keyof IIconRecord;
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './.metadata/index.
|
|
2
|
-
export * from './lib/index.
|
|
3
|
-
export * from './types/index.
|
|
1
|
+
export * from './.metadata/index.ts';
|
|
2
|
+
export * from './lib/index.ts';
|
|
3
|
+
export * from './types/index.ts';
|
package/src/lib/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './iconGroup.
|
|
2
|
-
export * from './useZovaIcon.
|
|
3
|
-
export * from './utils.
|
|
1
|
+
export * from './iconGroup.ts';
|
|
2
|
+
export * from './useZovaIcon.ts';
|
|
3
|
+
export * from './utils.ts';
|
package/src/lib/useZovaIcon.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, watchEffect } from 'vue';
|
|
2
2
|
import { sys } from 'zova';
|
|
3
3
|
|
|
4
|
-
import type { IIconInfo, IIconRecord } from '../types/icon.
|
|
4
|
+
import type { IIconInfo, IIconRecord } from '../types/icon.ts';
|
|
5
5
|
|
|
6
6
|
export function $getZovaIcon(iconName?: keyof IIconRecord): IIconInfo | undefined {
|
|
7
7
|
return sys.meta.$icon.parseIconInfoSync(iconName);
|
package/src/lib/utils.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type { VNode } from 'vue';
|
|
|
2
2
|
|
|
3
3
|
import { createVNode } from 'vue';
|
|
4
4
|
|
|
5
|
-
import type { IIconRecord } from '../types/icon.
|
|
5
|
+
import type { IIconRecord } from '../types/icon.ts';
|
|
6
6
|
|
|
7
|
-
import { ZIcon } from '../.metadata/index.
|
|
7
|
+
import { ZIcon } from '../.metadata/index.ts';
|
|
8
8
|
|
|
9
9
|
export function $icon<K extends keyof IIconRecord>(
|
|
10
10
|
name: K,
|
package/src/monkeySys.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { IMonkeySysInitialize } from 'zova';
|
|
|
2
2
|
|
|
3
3
|
import { BeanSimple } from 'zova';
|
|
4
4
|
|
|
5
|
-
import { SysIcon } from './bean/sys.icon.
|
|
5
|
+
import { SysIcon } from './bean/sys.icon.ts';
|
|
6
6
|
|
|
7
7
|
export class MonkeySys extends BeanSimple implements IMonkeySysInitialize {
|
|
8
8
|
async sysInitialize() {
|
package/src/types/icon.ts
CHANGED
package/src/types/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './icon.
|
|
1
|
+
export * from './icon.ts';
|