modern-idoc 0.1.1 → 0.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.
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -157,7 +157,7 @@ function normalizeImage(image) {
|
|
|
157
157
|
return void 0;
|
|
158
158
|
} else if (typeof image === "string") {
|
|
159
159
|
return {
|
|
160
|
-
|
|
160
|
+
url: image
|
|
161
161
|
};
|
|
162
162
|
} else {
|
|
163
163
|
return image;
|
|
@@ -246,7 +246,7 @@ function normalizeVideo(video) {
|
|
|
246
246
|
return void 0;
|
|
247
247
|
} else if (typeof video === "string") {
|
|
248
248
|
return {
|
|
249
|
-
|
|
249
|
+
url: video
|
|
250
250
|
};
|
|
251
251
|
} else {
|
|
252
252
|
return {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface IDOCFillDeclaration {
|
|
2
|
+
url?: string;
|
|
2
3
|
color?: string;
|
|
3
|
-
image?: string;
|
|
4
4
|
opacity?: number;
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ interface IDOCGeometryDeclaration {
|
|
|
40
40
|
type IDOCGeometryProp = 'none' | SVGPathData | SVGPathData[] | IDOCGeometryDeclaration;
|
|
41
41
|
|
|
42
42
|
interface IDOCImageDeclaration {
|
|
43
|
-
|
|
43
|
+
url: string;
|
|
44
44
|
opacity?: number;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -57,8 +57,8 @@ interface IDOCNode {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface IDOCStrokeDeclaration {
|
|
60
|
+
url?: string;
|
|
60
61
|
color?: string;
|
|
61
|
-
image?: string;
|
|
62
62
|
opacity?: number;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -220,7 +220,7 @@ type IDOCTextProp = string | IDOCTextContent | (IDOCTextDeclaration & {
|
|
|
220
220
|
}) | IDOCTextDeclaration;
|
|
221
221
|
|
|
222
222
|
interface IDOCVideoDeclaration {
|
|
223
|
-
|
|
223
|
+
url: string;
|
|
224
224
|
opacity?: number;
|
|
225
225
|
}
|
|
226
226
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface IDOCFillDeclaration {
|
|
2
|
+
url?: string;
|
|
2
3
|
color?: string;
|
|
3
|
-
image?: string;
|
|
4
4
|
opacity?: number;
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ interface IDOCGeometryDeclaration {
|
|
|
40
40
|
type IDOCGeometryProp = 'none' | SVGPathData | SVGPathData[] | IDOCGeometryDeclaration;
|
|
41
41
|
|
|
42
42
|
interface IDOCImageDeclaration {
|
|
43
|
-
|
|
43
|
+
url: string;
|
|
44
44
|
opacity?: number;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -57,8 +57,8 @@ interface IDOCNode {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface IDOCStrokeDeclaration {
|
|
60
|
+
url?: string;
|
|
60
61
|
color?: string;
|
|
61
|
-
image?: string;
|
|
62
62
|
opacity?: number;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -220,7 +220,7 @@ type IDOCTextProp = string | IDOCTextContent | (IDOCTextDeclaration & {
|
|
|
220
220
|
}) | IDOCTextDeclaration;
|
|
221
221
|
|
|
222
222
|
interface IDOCVideoDeclaration {
|
|
223
|
-
|
|
223
|
+
url: string;
|
|
224
224
|
opacity?: number;
|
|
225
225
|
}
|
|
226
226
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface IDOCFillDeclaration {
|
|
2
|
+
url?: string;
|
|
2
3
|
color?: string;
|
|
3
|
-
image?: string;
|
|
4
4
|
opacity?: number;
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -40,7 +40,7 @@ interface IDOCGeometryDeclaration {
|
|
|
40
40
|
type IDOCGeometryProp = 'none' | SVGPathData | SVGPathData[] | IDOCGeometryDeclaration;
|
|
41
41
|
|
|
42
42
|
interface IDOCImageDeclaration {
|
|
43
|
-
|
|
43
|
+
url: string;
|
|
44
44
|
opacity?: number;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -57,8 +57,8 @@ interface IDOCNode {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface IDOCStrokeDeclaration {
|
|
60
|
+
url?: string;
|
|
60
61
|
color?: string;
|
|
61
|
-
image?: string;
|
|
62
62
|
opacity?: number;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -220,7 +220,7 @@ type IDOCTextProp = string | IDOCTextContent | (IDOCTextDeclaration & {
|
|
|
220
220
|
}) | IDOCTextDeclaration;
|
|
221
221
|
|
|
222
222
|
interface IDOCVideoDeclaration {
|
|
223
|
-
|
|
223
|
+
url: string;
|
|
224
224
|
opacity?: number;
|
|
225
225
|
}
|
|
226
226
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.modernIdoc={}))})(this,function(n){"use strict";function i(){return{overflow:"visible",visibility:"visible",filter:"none",left:0,top:0,width:0,height:0,rotate:0,opacity:1,marginLeft:0,marginTop:0,marginRight:0,marginBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"50% 50%",backgroundImage:"none",backgroundColor:"transparent",shadowColor:"transparent",shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,borderRadius:0,borderColor:"transparent",borderWidth:1}}function l(){return{writingMode:"horizontal-tb",verticalAlign:"baseline",lineHeight:1.2,letterSpacing:0,wordSpacing:0,fontSize:14,fontWeight:"normal",fontFamily:"",fontStyle:"normal",fontKerning:"normal",textWrap:"wrap",textAlign:"start",textIndent:0,textTransform:"none",textOrientation:"mixed",textDecoration:"none",textStrokeWidth:0,textStrokeColor:"black",color:"black",listStyleType:"none",listStyleImage:"none",listStyleColormap:"none",listStyleSize:"cover",listStylePosition:"outside",highlightImage:"none",highlightReferImage:"none",highlightColormap:"none",highlightLine:"none",highlightSize:"cover",highlightThickness:"100%",scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"50% 50%",shadowColor:"transparent",shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0}}function h(){return{...i(),...l()}}function
|
|
1
|
+
(function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.modernIdoc={}))})(this,function(n){"use strict";function i(){return{overflow:"visible",visibility:"visible",filter:"none",left:0,top:0,width:0,height:0,rotate:0,opacity:1,marginLeft:0,marginTop:0,marginRight:0,marginBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"50% 50%",backgroundImage:"none",backgroundColor:"transparent",shadowColor:"transparent",shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,borderRadius:0,borderColor:"transparent",borderWidth:1}}function l(){return{writingMode:"horizontal-tb",verticalAlign:"baseline",lineHeight:1.2,letterSpacing:0,wordSpacing:0,fontSize:14,fontWeight:"normal",fontFamily:"",fontStyle:"normal",fontKerning:"normal",textWrap:"wrap",textAlign:"start",textIndent:0,textTransform:"none",textOrientation:"mixed",textDecoration:"none",textStrokeWidth:0,textStrokeColor:"black",color:"black",listStyleType:"none",listStyleImage:"none",listStyleColormap:"none",listStyleSize:"cover",listStylePosition:"outside",highlightImage:"none",highlightReferImage:"none",highlightColormap:"none",highlightLine:"none",highlightSize:"cover",highlightThickness:"100%",scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"50% 50%",shadowColor:"transparent",shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0}}function h(){return{...i(),...l()}}function f(e){if(!(!e||e==="none"))return typeof e=="string"?{color:e}:e}function s(e){if(!(!e||e==="none"))return typeof e=="string"?{data:[{data:e}]}:Array.isArray(e)?{data:e.map(r=>({data:r}))}:{...e,data:e.data.map(r=>typeof r=="string"?{data:r}:r)}}function u(e){if(!(!e||e==="none"))return typeof e=="string"?{url:e}:e}function g(e){if(!(!e||e==="none"))return typeof e=="string"?{color:e}:e}function a(e=""){return(Array.isArray(e)?e:[e]).map(t=>typeof t=="string"?{fragments:[{content:t}]}:"content"in t?{fragments:[{...t}]}:"fragments"in t?{...t,fragments:t.fragments.map(o=>({...o}))}:Array.isArray(t)?{fragments:t.map(o=>typeof o=="string"?{content:o}:{...o})}:{fragments:[]})}function d(e){if(!(!e||e==="none"))return typeof e=="string"?{content:[{fragments:[{content:e}]}]}:"content"in e?{...e,content:a(e.content)}:{content:a(e)}}function m(e){if(!(!e||e==="none"))return typeof e=="string"?{url:e}:{...e}}function c(e){var r;return{...e,image:u(e.image),video:m(e.video),text:d(e.text),geometry:s(e.geometry),fill:f(e.fill),stroke:g(e.stroke),children:(r=e.children)==null?void 0:r.map(t=>c(t))}}n.getDefaultElementStyle=i,n.getDefaultStyle=h,n.getDefaultTextStyle=l,n.normalizeElement=c,n.normalizeFill=f,n.normalizeGeometry=s,n.normalizeImage=u,n.normalizeStroke=g,n.normalizeText=d,n.normalizeTextContent=a,n.normalizeVideo=m,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|
package/dist/index.mjs
CHANGED
|
@@ -155,7 +155,7 @@ function normalizeImage(image) {
|
|
|
155
155
|
return void 0;
|
|
156
156
|
} else if (typeof image === "string") {
|
|
157
157
|
return {
|
|
158
|
-
|
|
158
|
+
url: image
|
|
159
159
|
};
|
|
160
160
|
} else {
|
|
161
161
|
return image;
|
|
@@ -244,7 +244,7 @@ function normalizeVideo(video) {
|
|
|
244
244
|
return void 0;
|
|
245
245
|
} else if (typeof video === "string") {
|
|
246
246
|
return {
|
|
247
|
-
|
|
247
|
+
url: video
|
|
248
248
|
};
|
|
249
249
|
} else {
|
|
250
250
|
return {
|