@fangzhongya/page 0.0.23 → 0.0.25
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/expand/{chunk-N4QMKGK7.cjs → chunk-QFRDDTJR.cjs} +1 -1
- package/dist/expand/{chunk-IDXLBMRV.js → chunk-WMN3TQLR.js} +1 -1
- package/dist/expand/components.cjs +3 -3
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/render/common.cjs +11 -12
- package/dist/render/common.js +12 -13
- package/dist/utils/shared.cjs +19 -0
- package/dist/utils/shared.js +19 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// expand/config.ts
|
|
2
|
-
var components = ["container", "
|
|
2
|
+
var components = ["container", "grid-item", "grid-layout", "position"];
|
|
3
3
|
var sideEffects = ["grid-item", "grid-layout"];
|
|
4
4
|
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQFRDDTJRcjs = require('./chunk-QFRDDTJR.cjs');
|
|
5
5
|
|
|
6
6
|
// node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
|
|
7
7
|
function humpToLine(name) {
|
|
@@ -55,10 +55,10 @@ function namefilter(c, name) {
|
|
|
55
55
|
function getFrom(mc) {
|
|
56
56
|
const p = config.prefix ? config.prefix + "-" : "";
|
|
57
57
|
const filename = p ? mc.replace(new RegExp("^" + p), "") : mc;
|
|
58
|
-
if (
|
|
58
|
+
if (_chunkQFRDDTJRcjs.components.includes(filename)) {
|
|
59
59
|
const from = `${config.name}/assemblys/${filename}`;
|
|
60
60
|
let css;
|
|
61
|
-
if (
|
|
61
|
+
if (_chunkQFRDDTJRcjs.sideEffects.includes(filename)) {
|
|
62
62
|
css = `${config.name}/assemblys/${filename}.css`;
|
|
63
63
|
}
|
|
64
64
|
return {
|
package/dist/expand/config.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkQFRDDTJRcjs = require('./chunk-QFRDDTJR.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.components =
|
|
8
|
+
exports.components = _chunkQFRDDTJRcjs.components; exports.sideEffects = _chunkQFRDDTJRcjs.sideEffects;
|
package/dist/expand/config.js
CHANGED
package/dist/render/common.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const lineToLargeHump = require("@fangzhongya/utils/name/lineToLargeHump");
|
|
5
|
+
const shared = require("../utils/shared.cjs");
|
|
5
6
|
const humpToLine = require("@fangzhongya/utils/name/humpToLine");
|
|
6
7
|
const isObject = require("@fangzhongya/utils/basic/object/isObject");
|
|
7
8
|
const render = require("../utils/render.cjs");
|
|
@@ -28,20 +29,18 @@ function setComponString(name, attarObj, obj = {}, compons = {}) {
|
|
|
28
29
|
if (name === "Template") {
|
|
29
30
|
return vue.h(vue.Fragment, null, setSlots(obj).default?.());
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
32
|
+
compons = vue.inject("components", compons);
|
|
33
|
+
const tcom = humpToLine.humpToLine(name);
|
|
34
|
+
const cms = Object.keys(compons);
|
|
35
|
+
if (cms.includes(name)) {
|
|
36
|
+
return vue.h(compons[name], attarObj, setSlots(obj));
|
|
37
|
+
} else if (cms.includes(tcom)) {
|
|
38
|
+
return vue.h(compons[tcom], attarObj, setSlots(obj));
|
|
39
|
+
}
|
|
40
|
+
if (shared.isHTMLTag(tcom) || shared.isSVGTag(tcom)) {
|
|
41
41
|
return vue.h(tcom, attarObj, setSlots(obj).default?.());
|
|
42
|
-
} else {
|
|
43
|
-
return vue.h(rs, attarObj, setSlots(obj));
|
|
44
42
|
}
|
|
43
|
+
return vue.h(vue.resolveComponent(name), attarObj, setSlots(obj));
|
|
45
44
|
}
|
|
46
45
|
function useGetCompon(name, attarObj, obj = {}, compons) {
|
|
47
46
|
if (typeof name == "string") {
|
package/dist/render/common.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { isVNode, h, Fragment,
|
|
1
|
+
import { isVNode, h, Fragment, inject, resolveComponent } from "vue";
|
|
2
2
|
import { lineToLargeHump } from "@fangzhongya/utils/name/lineToLargeHump";
|
|
3
|
+
import { isHTMLTag, isSVGTag } from "../utils/shared.js";
|
|
3
4
|
import { humpToLine } from "@fangzhongya/utils/name/humpToLine";
|
|
4
5
|
import { isObject } from "@fangzhongya/utils/basic/object/isObject";
|
|
5
6
|
import { getRenderSlots, getClassId } from "../utils/render.js";
|
|
@@ -26,20 +27,18 @@ function setComponString(name, attarObj, obj = {}, compons = {}) {
|
|
|
26
27
|
if (name === "Template") {
|
|
27
28
|
return h(Fragment, null, setSlots(obj).default?.());
|
|
28
29
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
30
|
+
compons = inject("components", compons);
|
|
31
|
+
const tcom = humpToLine(name);
|
|
32
|
+
const cms = Object.keys(compons);
|
|
33
|
+
if (cms.includes(name)) {
|
|
34
|
+
return h(compons[name], attarObj, setSlots(obj));
|
|
35
|
+
} else if (cms.includes(tcom)) {
|
|
36
|
+
return h(compons[tcom], attarObj, setSlots(obj));
|
|
37
|
+
}
|
|
38
|
+
if (isHTMLTag(tcom) || isSVGTag(tcom)) {
|
|
39
39
|
return h(tcom, attarObj, setSlots(obj).default?.());
|
|
40
|
-
} else {
|
|
41
|
-
return h(rs, attarObj, setSlots(obj));
|
|
42
40
|
}
|
|
41
|
+
return h(resolveComponent(name), attarObj, setSlots(obj));
|
|
43
42
|
}
|
|
44
43
|
function useGetCompon(name, attarObj, obj = {}, compons) {
|
|
45
44
|
if (typeof name == "string") {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function makeMap(str) {
|
|
4
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
5
|
+
for (const key of str.split(",")) map[key] = 1;
|
|
6
|
+
return (val) => val in map;
|
|
7
|
+
}
|
|
8
|
+
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
9
|
+
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
10
|
+
const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
|
|
11
|
+
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
12
|
+
const isHTMLTag = makeMap(HTML_TAGS);
|
|
13
|
+
const isSVGTag = makeMap(SVG_TAGS);
|
|
14
|
+
const isMathMLTag = makeMap(MATH_TAGS);
|
|
15
|
+
const isVoidTag = makeMap(VOID_TAGS);
|
|
16
|
+
exports.isHTMLTag = isHTMLTag;
|
|
17
|
+
exports.isMathMLTag = isMathMLTag;
|
|
18
|
+
exports.isSVGTag = isSVGTag;
|
|
19
|
+
exports.isVoidTag = isVoidTag;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function makeMap(str) {
|
|
2
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
3
|
+
for (const key of str.split(",")) map[key] = 1;
|
|
4
|
+
return (val) => val in map;
|
|
5
|
+
}
|
|
6
|
+
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
7
|
+
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
|
|
8
|
+
const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
|
|
9
|
+
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
|
|
10
|
+
const isHTMLTag = makeMap(HTML_TAGS);
|
|
11
|
+
const isSVGTag = makeMap(SVG_TAGS);
|
|
12
|
+
const isMathMLTag = makeMap(MATH_TAGS);
|
|
13
|
+
const isVoidTag = makeMap(VOID_TAGS);
|
|
14
|
+
export {
|
|
15
|
+
isHTMLTag,
|
|
16
|
+
isMathMLTag,
|
|
17
|
+
isSVGTag,
|
|
18
|
+
isVoidTag
|
|
19
|
+
};
|