modern-idoc 0.2.11 → 0.2.13

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  function getDefaultLayoutStyle() {
4
4
  return {
5
5
  // box
6
- overflow: void 0,
6
+ overflow: "visible",
7
7
  direction: void 0,
8
8
  display: void 0,
9
9
  boxSizing: void 0,
@@ -94,7 +94,8 @@ function getDefaultElementStyle() {
94
94
  visibility: "visible",
95
95
  filter: "none",
96
96
  opacity: 1,
97
- pointerEvents: "auto"
97
+ pointerEvents: "auto",
98
+ maskImage: "none"
98
99
  };
99
100
  }
100
101
 
@@ -360,6 +361,7 @@ function normalizeElement(element) {
360
361
  exports.clearUndef = clearUndef;
361
362
  exports.deepClearUndef = deepClearUndef;
362
363
  exports.getDefaultElementStyle = getDefaultElementStyle;
364
+ exports.getDefaultLayoutStyle = getDefaultLayoutStyle;
363
365
  exports.getDefaultShadowStyle = getDefaultShadowStyle;
364
366
  exports.getDefaultStyle = getDefaultStyle;
365
367
  exports.getDefaultTextStyle = getDefaultTextStyle;
package/dist/index.d.cts CHANGED
@@ -6,6 +6,15 @@ interface AudioDeclaration {
6
6
  }
7
7
  type AudioProp = None | AudioSource | AudioDeclaration;
8
8
 
9
+ interface ImageFillStretchRect {
10
+ left?: number;
11
+ top?: number;
12
+ bottom?: number;
13
+ right?: number;
14
+ }
15
+ interface ImageFillStretch {
16
+ rect?: ImageFillStretchRect;
17
+ }
9
18
  interface ImageFillTile {
10
19
  alignment?: string;
11
20
  scaleX?: number;
@@ -23,6 +32,7 @@ interface ImageFillDeclaration extends CommonFillDeclaration {
23
32
  image: ImageFillSource;
24
33
  dpi?: number;
25
34
  rotateWithShape?: boolean;
35
+ stretch?: ImageFillStretch;
26
36
  tile?: ImageFillTile;
27
37
  }
28
38
  interface ColorFillDeclaration extends CommonFillDeclaration {
@@ -61,7 +71,9 @@ interface Path2DDeclaration extends Partial<Path2DStyle> {
61
71
  }
62
72
  interface GeometryDeclaration {
63
73
  name?: string;
64
- data: Path2DDeclaration[];
74
+ svg?: string;
75
+ viewBox?: number[];
76
+ data?: Path2DDeclaration[];
65
77
  }
66
78
  type GeometryProp = None | SVGPathData | SVGPathData[] | Path2DDeclaration[] | GeometryDeclaration;
67
79
 
@@ -150,7 +162,7 @@ type HighlightSize = StyleUnit | `${number}rem` | 'cover';
150
162
  type HighlightThickness = StyleUnit;
151
163
 
152
164
  interface LayoutStyleDeclaration {
153
- overflow?: Overflow;
165
+ overflow: Overflow;
154
166
  direction?: Direction;
155
167
  display?: Display;
156
168
  boxSizing?: BoxSizing;
@@ -220,6 +232,7 @@ interface ElementStyleDeclaration extends LayoutStyleDeclaration, TransformStyle
220
232
  filter: string;
221
233
  opacity: number;
222
234
  pointerEvents: PointerEvents;
235
+ maskImage: None | string;
223
236
  }
224
237
 
225
238
  interface HighlightDeclaration {
@@ -349,6 +362,8 @@ interface IDOCDocumentDeclaration extends IDOCElementDeclaration {
349
362
 
350
363
  declare function getDefaultElementStyle(): ElementStyleDeclaration;
351
364
 
365
+ declare function getDefaultLayoutStyle(): LayoutStyleDeclaration;
366
+
352
367
  declare function getDefaultShadowStyle(): ShadowStyleDeclaration;
353
368
 
354
369
  declare function getDefaultStyle(): StyleDeclaration;
@@ -380,4 +395,4 @@ declare function normalizeTextContent(content?: TextContent): TextContentDeclara
380
395
 
381
396
  declare function normalizeVideo(video?: VideoProp): VideoDeclaration | undefined;
382
397
 
383
- export { type Align, type AudioDeclaration, type AudioProp, type AudioSource, type BorderStyle, type BoxShadow, type BoxSizing, type ColorFillDeclaration, type CommonFillDeclaration, type Direction, type Display, type ElementStyleDeclaration, type FillDeclaration, type FillProp, type FillRule, type FlexDirection, type FlexWrap, type FontKerning, type FontStyle, type FontWeight, type FragmentContent, type GeometryDeclaration, type GeometryProp, type HighlightColormap, type HighlightDeclaration, type HighlightImage, type HighlightLine, type HighlightReferImage, type HighlightSize, type HighlightStyleDeclaration, type HighlightThickness, type IDOCDocument, type IDOCDocumentDeclaration, type IDOCElement, type IDOCElementDeclaration, type IDOCNode, type ImageDeclaration, type ImageFillDeclaration, type ImageFillSource, type ImageFillTile, type ImageProp, type ImageSource, type ImageSourceRect, type Justify, type LayoutStyleDeclaration, type ListStyleColormap, type ListStyleDeclaration, type ListStyleImage, type ListStylePosition, type ListStyleSize, type ListStyleStyleDeclaration, type ListStyleType, type MetaProp, type OutlineDeclaration, type OutlineProp, type Overflow, type ParagraphContent, type Path2DDeclaration, type Path2DStyle, type PointerEvents, type Position, type SVGPathData, type ShadowDeclaration, type ShadowProp, type ShadowStyleDeclaration, type StrokeLinecap, type StrokeLinejoin, type StyleDeclaration, type StyleProp, type StyleUnit, type TextAlign, type TextContent, type TextContentDeclaration, type TextContentFlat, type TextDeclaration, type TextDecoration, type TextDrawStyleDeclaration, type TextInlineStyleDeclaration, type TextLineStyleDeclaration, type TextOrientation, type TextProp, type TextStyleDeclaration, type TextTransform, type TextWrap, type TransformStyleDeclaration, type VerticalAlign, type VideoDeclaration, type VideoProp, type VideoSource, type Visibility, type WritingMode, clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
398
+ export { type Align, type AudioDeclaration, type AudioProp, type AudioSource, type BorderStyle, type BoxShadow, type BoxSizing, type ColorFillDeclaration, type CommonFillDeclaration, type Direction, type Display, type ElementStyleDeclaration, type FillDeclaration, type FillProp, type FillRule, type FlexDirection, type FlexWrap, type FontKerning, type FontStyle, type FontWeight, type FragmentContent, type GeometryDeclaration, type GeometryProp, type HighlightColormap, type HighlightDeclaration, type HighlightImage, type HighlightLine, type HighlightReferImage, type HighlightSize, type HighlightStyleDeclaration, type HighlightThickness, type IDOCDocument, type IDOCDocumentDeclaration, type IDOCElement, type IDOCElementDeclaration, type IDOCNode, type ImageDeclaration, type ImageFillDeclaration, type ImageFillSource, type ImageFillStretch, type ImageFillStretchRect, type ImageFillTile, type ImageProp, type ImageSource, type ImageSourceRect, type Justify, type LayoutStyleDeclaration, type ListStyleColormap, type ListStyleDeclaration, type ListStyleImage, type ListStylePosition, type ListStyleSize, type ListStyleStyleDeclaration, type ListStyleType, type MetaProp, type OutlineDeclaration, type OutlineProp, type Overflow, type ParagraphContent, type Path2DDeclaration, type Path2DStyle, type PointerEvents, type Position, type SVGPathData, type ShadowDeclaration, type ShadowProp, type ShadowStyleDeclaration, type StrokeLinecap, type StrokeLinejoin, type StyleDeclaration, type StyleProp, type StyleUnit, type TextAlign, type TextContent, type TextContentDeclaration, type TextContentFlat, type TextDeclaration, type TextDecoration, type TextDrawStyleDeclaration, type TextInlineStyleDeclaration, type TextLineStyleDeclaration, type TextOrientation, type TextProp, type TextStyleDeclaration, type TextTransform, type TextWrap, type TransformStyleDeclaration, type VerticalAlign, type VideoDeclaration, type VideoProp, type VideoSource, type Visibility, type WritingMode, clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultLayoutStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
package/dist/index.d.mts CHANGED
@@ -6,6 +6,15 @@ interface AudioDeclaration {
6
6
  }
7
7
  type AudioProp = None | AudioSource | AudioDeclaration;
8
8
 
9
+ interface ImageFillStretchRect {
10
+ left?: number;
11
+ top?: number;
12
+ bottom?: number;
13
+ right?: number;
14
+ }
15
+ interface ImageFillStretch {
16
+ rect?: ImageFillStretchRect;
17
+ }
9
18
  interface ImageFillTile {
10
19
  alignment?: string;
11
20
  scaleX?: number;
@@ -23,6 +32,7 @@ interface ImageFillDeclaration extends CommonFillDeclaration {
23
32
  image: ImageFillSource;
24
33
  dpi?: number;
25
34
  rotateWithShape?: boolean;
35
+ stretch?: ImageFillStretch;
26
36
  tile?: ImageFillTile;
27
37
  }
28
38
  interface ColorFillDeclaration extends CommonFillDeclaration {
@@ -61,7 +71,9 @@ interface Path2DDeclaration extends Partial<Path2DStyle> {
61
71
  }
62
72
  interface GeometryDeclaration {
63
73
  name?: string;
64
- data: Path2DDeclaration[];
74
+ svg?: string;
75
+ viewBox?: number[];
76
+ data?: Path2DDeclaration[];
65
77
  }
66
78
  type GeometryProp = None | SVGPathData | SVGPathData[] | Path2DDeclaration[] | GeometryDeclaration;
67
79
 
@@ -150,7 +162,7 @@ type HighlightSize = StyleUnit | `${number}rem` | 'cover';
150
162
  type HighlightThickness = StyleUnit;
151
163
 
152
164
  interface LayoutStyleDeclaration {
153
- overflow?: Overflow;
165
+ overflow: Overflow;
154
166
  direction?: Direction;
155
167
  display?: Display;
156
168
  boxSizing?: BoxSizing;
@@ -220,6 +232,7 @@ interface ElementStyleDeclaration extends LayoutStyleDeclaration, TransformStyle
220
232
  filter: string;
221
233
  opacity: number;
222
234
  pointerEvents: PointerEvents;
235
+ maskImage: None | string;
223
236
  }
224
237
 
225
238
  interface HighlightDeclaration {
@@ -349,6 +362,8 @@ interface IDOCDocumentDeclaration extends IDOCElementDeclaration {
349
362
 
350
363
  declare function getDefaultElementStyle(): ElementStyleDeclaration;
351
364
 
365
+ declare function getDefaultLayoutStyle(): LayoutStyleDeclaration;
366
+
352
367
  declare function getDefaultShadowStyle(): ShadowStyleDeclaration;
353
368
 
354
369
  declare function getDefaultStyle(): StyleDeclaration;
@@ -380,4 +395,4 @@ declare function normalizeTextContent(content?: TextContent): TextContentDeclara
380
395
 
381
396
  declare function normalizeVideo(video?: VideoProp): VideoDeclaration | undefined;
382
397
 
383
- export { type Align, type AudioDeclaration, type AudioProp, type AudioSource, type BorderStyle, type BoxShadow, type BoxSizing, type ColorFillDeclaration, type CommonFillDeclaration, type Direction, type Display, type ElementStyleDeclaration, type FillDeclaration, type FillProp, type FillRule, type FlexDirection, type FlexWrap, type FontKerning, type FontStyle, type FontWeight, type FragmentContent, type GeometryDeclaration, type GeometryProp, type HighlightColormap, type HighlightDeclaration, type HighlightImage, type HighlightLine, type HighlightReferImage, type HighlightSize, type HighlightStyleDeclaration, type HighlightThickness, type IDOCDocument, type IDOCDocumentDeclaration, type IDOCElement, type IDOCElementDeclaration, type IDOCNode, type ImageDeclaration, type ImageFillDeclaration, type ImageFillSource, type ImageFillTile, type ImageProp, type ImageSource, type ImageSourceRect, type Justify, type LayoutStyleDeclaration, type ListStyleColormap, type ListStyleDeclaration, type ListStyleImage, type ListStylePosition, type ListStyleSize, type ListStyleStyleDeclaration, type ListStyleType, type MetaProp, type OutlineDeclaration, type OutlineProp, type Overflow, type ParagraphContent, type Path2DDeclaration, type Path2DStyle, type PointerEvents, type Position, type SVGPathData, type ShadowDeclaration, type ShadowProp, type ShadowStyleDeclaration, type StrokeLinecap, type StrokeLinejoin, type StyleDeclaration, type StyleProp, type StyleUnit, type TextAlign, type TextContent, type TextContentDeclaration, type TextContentFlat, type TextDeclaration, type TextDecoration, type TextDrawStyleDeclaration, type TextInlineStyleDeclaration, type TextLineStyleDeclaration, type TextOrientation, type TextProp, type TextStyleDeclaration, type TextTransform, type TextWrap, type TransformStyleDeclaration, type VerticalAlign, type VideoDeclaration, type VideoProp, type VideoSource, type Visibility, type WritingMode, clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
398
+ export { type Align, type AudioDeclaration, type AudioProp, type AudioSource, type BorderStyle, type BoxShadow, type BoxSizing, type ColorFillDeclaration, type CommonFillDeclaration, type Direction, type Display, type ElementStyleDeclaration, type FillDeclaration, type FillProp, type FillRule, type FlexDirection, type FlexWrap, type FontKerning, type FontStyle, type FontWeight, type FragmentContent, type GeometryDeclaration, type GeometryProp, type HighlightColormap, type HighlightDeclaration, type HighlightImage, type HighlightLine, type HighlightReferImage, type HighlightSize, type HighlightStyleDeclaration, type HighlightThickness, type IDOCDocument, type IDOCDocumentDeclaration, type IDOCElement, type IDOCElementDeclaration, type IDOCNode, type ImageDeclaration, type ImageFillDeclaration, type ImageFillSource, type ImageFillStretch, type ImageFillStretchRect, type ImageFillTile, type ImageProp, type ImageSource, type ImageSourceRect, type Justify, type LayoutStyleDeclaration, type ListStyleColormap, type ListStyleDeclaration, type ListStyleImage, type ListStylePosition, type ListStyleSize, type ListStyleStyleDeclaration, type ListStyleType, type MetaProp, type OutlineDeclaration, type OutlineProp, type Overflow, type ParagraphContent, type Path2DDeclaration, type Path2DStyle, type PointerEvents, type Position, type SVGPathData, type ShadowDeclaration, type ShadowProp, type ShadowStyleDeclaration, type StrokeLinecap, type StrokeLinejoin, type StyleDeclaration, type StyleProp, type StyleUnit, type TextAlign, type TextContent, type TextContentDeclaration, type TextContentFlat, type TextDeclaration, type TextDecoration, type TextDrawStyleDeclaration, type TextInlineStyleDeclaration, type TextLineStyleDeclaration, type TextOrientation, type TextProp, type TextStyleDeclaration, type TextTransform, type TextWrap, type TransformStyleDeclaration, type VerticalAlign, type VideoDeclaration, type VideoProp, type VideoSource, type Visibility, type WritingMode, clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultLayoutStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
package/dist/index.d.ts CHANGED
@@ -6,6 +6,15 @@ interface AudioDeclaration {
6
6
  }
7
7
  type AudioProp = None | AudioSource | AudioDeclaration;
8
8
 
9
+ interface ImageFillStretchRect {
10
+ left?: number;
11
+ top?: number;
12
+ bottom?: number;
13
+ right?: number;
14
+ }
15
+ interface ImageFillStretch {
16
+ rect?: ImageFillStretchRect;
17
+ }
9
18
  interface ImageFillTile {
10
19
  alignment?: string;
11
20
  scaleX?: number;
@@ -23,6 +32,7 @@ interface ImageFillDeclaration extends CommonFillDeclaration {
23
32
  image: ImageFillSource;
24
33
  dpi?: number;
25
34
  rotateWithShape?: boolean;
35
+ stretch?: ImageFillStretch;
26
36
  tile?: ImageFillTile;
27
37
  }
28
38
  interface ColorFillDeclaration extends CommonFillDeclaration {
@@ -61,7 +71,9 @@ interface Path2DDeclaration extends Partial<Path2DStyle> {
61
71
  }
62
72
  interface GeometryDeclaration {
63
73
  name?: string;
64
- data: Path2DDeclaration[];
74
+ svg?: string;
75
+ viewBox?: number[];
76
+ data?: Path2DDeclaration[];
65
77
  }
66
78
  type GeometryProp = None | SVGPathData | SVGPathData[] | Path2DDeclaration[] | GeometryDeclaration;
67
79
 
@@ -150,7 +162,7 @@ type HighlightSize = StyleUnit | `${number}rem` | 'cover';
150
162
  type HighlightThickness = StyleUnit;
151
163
 
152
164
  interface LayoutStyleDeclaration {
153
- overflow?: Overflow;
165
+ overflow: Overflow;
154
166
  direction?: Direction;
155
167
  display?: Display;
156
168
  boxSizing?: BoxSizing;
@@ -220,6 +232,7 @@ interface ElementStyleDeclaration extends LayoutStyleDeclaration, TransformStyle
220
232
  filter: string;
221
233
  opacity: number;
222
234
  pointerEvents: PointerEvents;
235
+ maskImage: None | string;
223
236
  }
224
237
 
225
238
  interface HighlightDeclaration {
@@ -349,6 +362,8 @@ interface IDOCDocumentDeclaration extends IDOCElementDeclaration {
349
362
 
350
363
  declare function getDefaultElementStyle(): ElementStyleDeclaration;
351
364
 
365
+ declare function getDefaultLayoutStyle(): LayoutStyleDeclaration;
366
+
352
367
  declare function getDefaultShadowStyle(): ShadowStyleDeclaration;
353
368
 
354
369
  declare function getDefaultStyle(): StyleDeclaration;
@@ -380,4 +395,4 @@ declare function normalizeTextContent(content?: TextContent): TextContentDeclara
380
395
 
381
396
  declare function normalizeVideo(video?: VideoProp): VideoDeclaration | undefined;
382
397
 
383
- export { type Align, type AudioDeclaration, type AudioProp, type AudioSource, type BorderStyle, type BoxShadow, type BoxSizing, type ColorFillDeclaration, type CommonFillDeclaration, type Direction, type Display, type ElementStyleDeclaration, type FillDeclaration, type FillProp, type FillRule, type FlexDirection, type FlexWrap, type FontKerning, type FontStyle, type FontWeight, type FragmentContent, type GeometryDeclaration, type GeometryProp, type HighlightColormap, type HighlightDeclaration, type HighlightImage, type HighlightLine, type HighlightReferImage, type HighlightSize, type HighlightStyleDeclaration, type HighlightThickness, type IDOCDocument, type IDOCDocumentDeclaration, type IDOCElement, type IDOCElementDeclaration, type IDOCNode, type ImageDeclaration, type ImageFillDeclaration, type ImageFillSource, type ImageFillTile, type ImageProp, type ImageSource, type ImageSourceRect, type Justify, type LayoutStyleDeclaration, type ListStyleColormap, type ListStyleDeclaration, type ListStyleImage, type ListStylePosition, type ListStyleSize, type ListStyleStyleDeclaration, type ListStyleType, type MetaProp, type OutlineDeclaration, type OutlineProp, type Overflow, type ParagraphContent, type Path2DDeclaration, type Path2DStyle, type PointerEvents, type Position, type SVGPathData, type ShadowDeclaration, type ShadowProp, type ShadowStyleDeclaration, type StrokeLinecap, type StrokeLinejoin, type StyleDeclaration, type StyleProp, type StyleUnit, type TextAlign, type TextContent, type TextContentDeclaration, type TextContentFlat, type TextDeclaration, type TextDecoration, type TextDrawStyleDeclaration, type TextInlineStyleDeclaration, type TextLineStyleDeclaration, type TextOrientation, type TextProp, type TextStyleDeclaration, type TextTransform, type TextWrap, type TransformStyleDeclaration, type VerticalAlign, type VideoDeclaration, type VideoProp, type VideoSource, type Visibility, type WritingMode, clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
398
+ export { type Align, type AudioDeclaration, type AudioProp, type AudioSource, type BorderStyle, type BoxShadow, type BoxSizing, type ColorFillDeclaration, type CommonFillDeclaration, type Direction, type Display, type ElementStyleDeclaration, type FillDeclaration, type FillProp, type FillRule, type FlexDirection, type FlexWrap, type FontKerning, type FontStyle, type FontWeight, type FragmentContent, type GeometryDeclaration, type GeometryProp, type HighlightColormap, type HighlightDeclaration, type HighlightImage, type HighlightLine, type HighlightReferImage, type HighlightSize, type HighlightStyleDeclaration, type HighlightThickness, type IDOCDocument, type IDOCDocumentDeclaration, type IDOCElement, type IDOCElementDeclaration, type IDOCNode, type ImageDeclaration, type ImageFillDeclaration, type ImageFillSource, type ImageFillStretch, type ImageFillStretchRect, type ImageFillTile, type ImageProp, type ImageSource, type ImageSourceRect, type Justify, type LayoutStyleDeclaration, type ListStyleColormap, type ListStyleDeclaration, type ListStyleImage, type ListStylePosition, type ListStyleSize, type ListStyleStyleDeclaration, type ListStyleType, type MetaProp, type OutlineDeclaration, type OutlineProp, type Overflow, type ParagraphContent, type Path2DDeclaration, type Path2DStyle, type PointerEvents, type Position, type SVGPathData, type ShadowDeclaration, type ShadowProp, type ShadowStyleDeclaration, type StrokeLinecap, type StrokeLinejoin, type StyleDeclaration, type StyleProp, type StyleUnit, type TextAlign, type TextContent, type TextContentDeclaration, type TextContentFlat, type TextDeclaration, type TextDecoration, type TextDrawStyleDeclaration, type TextInlineStyleDeclaration, type TextLineStyleDeclaration, type TextOrientation, type TextProp, type TextStyleDeclaration, type TextTransform, type TextWrap, type TransformStyleDeclaration, type VerticalAlign, type VideoDeclaration, type VideoProp, type VideoSource, type Visibility, type WritingMode, clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultLayoutStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(n,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.modernIdoc={}))})(this,function(n){"use strict";function o(){return{overflow:void 0,direction:void 0,display:void 0,boxSizing:void 0,width:void 0,height:void 0,maxHeight:void 0,maxWidth:void 0,minHeight:void 0,minWidth:void 0,position:void 0,left:0,top:0,right:void 0,bottom:void 0,borderTop:void 0,borderLeft:void 0,borderRight:void 0,borderBottom:void 0,borderWidth:0,border:void 0,flex:void 0,flexBasis:void 0,flexDirection:void 0,flexGrow:void 0,flexShrink:void 0,flexWrap:void 0,justifyContent:void 0,gap:void 0,alignContent:void 0,alignItems:void 0,alignSelf:void 0,marginTop:void 0,marginLeft:void 0,marginRight:void 0,marginBottom:void 0,margin:void 0,paddingTop:void 0,paddingLeft:void 0,paddingRight:void 0,paddingBottom:void 0,padding:void 0}}function d(){return{boxShadow:"none"}}function u(){return{rotate:0,scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"center"}}function s(){return{...o(),...u(),...d(),backgroundImage:"none",backgroundColor:"none",borderRadius:0,borderColor:"none",borderStyle:"solid",outlineWidth:0,outlineOffset:0,outlineColor:"#000000",outlineStyle:"none",visibility:"visible",filter:"none",opacity:1,pointerEvents:"auto"}}function g(){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%"}}function T(){return{...s(),...g()}}function l(e,i=!1){if(typeof e!="object"||!e)return e;if(Array.isArray(e))return i?e.map(r=>l(r,i)):e;const t={};for(const r in e){const a=e[r];a!=null&&(i?t[r]=l(a,i):t[r]=a)}return t}function D(e){return l(e,!0)}function c(e){if(!(!e||e==="none"))return typeof e=="string"?{src:e}:{...e}}function m(e){if(!(!e||e==="none"))return typeof e=="string"?{type:"color",color:e}:e}function v(e){if(!(!e||e==="none"))return typeof e=="string"?{data:[{data:e}]}:Array.isArray(e)?{data:e.map(i=>typeof i=="string"?{data:i}:i)}:e}function y(e){if(!(!e||e==="none"))return typeof e=="string"?{src:e}:e}function h(e){if(!(!e||e==="none"))return typeof e=="string"?{color:e}:e}function S(e){if(!(!e||e==="none"))return typeof e=="string"?{color:e}:e}function f(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(r=>({...r}))}:Array.isArray(t)?{fragments:t.map(r=>typeof r=="string"?{content:r}:{...r})}:{fragments:[]})}function z(e){if(!(!e||e==="none"))return typeof e=="string"?{content:[{fragments:[{content:e}]}]}:"content"in e?{...e,content:f(e.content)}:{content:f(e)}}function p(e){if(!(!e||e==="none"))return typeof e=="string"?{src:e}:{...e}}function b(e){var i;return l({...e,image:y(e.image),video:p(e.video),audio:c(e.audio),text:z(e.text),geometry:v(e.geometry),fill:m(e.fill),outline:h(e.outline),shadow:S(e.shadow),children:(i=e.children)==null?void 0:i.map(t=>b(t))})}n.clearUndef=l,n.deepClearUndef=D,n.getDefaultElementStyle=s,n.getDefaultShadowStyle=d,n.getDefaultStyle=T,n.getDefaultTextStyle=g,n.getDefaultTransformStyle=u,n.normalizeAudio=c,n.normalizeElement=b,n.normalizeFill=m,n.normalizeGeometry=v,n.normalizeImage=y,n.normalizeOutline=h,n.normalizeShadow=S,n.normalizeText=z,n.normalizeTextContent=f,n.normalizeVideo=p,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
1
+ (function(n,o){typeof exports=="object"&&typeof module<"u"?o(exports):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.modernIdoc={}))})(this,function(n){"use strict";function o(){return{overflow:"visible",direction:void 0,display:void 0,boxSizing:void 0,width:void 0,height:void 0,maxHeight:void 0,maxWidth:void 0,minHeight:void 0,minWidth:void 0,position:void 0,left:0,top:0,right:void 0,bottom:void 0,borderTop:void 0,borderLeft:void 0,borderRight:void 0,borderBottom:void 0,borderWidth:0,border:void 0,flex:void 0,flexBasis:void 0,flexDirection:void 0,flexGrow:void 0,flexShrink:void 0,flexWrap:void 0,justifyContent:void 0,gap:void 0,alignContent:void 0,alignItems:void 0,alignSelf:void 0,marginTop:void 0,marginLeft:void 0,marginRight:void 0,marginBottom:void 0,margin:void 0,paddingTop:void 0,paddingLeft:void 0,paddingRight:void 0,paddingBottom:void 0,padding:void 0}}function d(){return{boxShadow:"none"}}function u(){return{rotate:0,scaleX:1,scaleY:1,skewX:0,skewY:0,translateX:0,translateY:0,transform:"none",transformOrigin:"center"}}function s(){return{...o(),...u(),...d(),backgroundImage:"none",backgroundColor:"none",borderRadius:0,borderColor:"none",borderStyle:"solid",outlineWidth:0,outlineOffset:0,outlineColor:"#000000",outlineStyle:"none",visibility:"visible",filter:"none",opacity:1,pointerEvents:"auto",maskImage:"none"}}function g(){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%"}}function T(){return{...s(),...g()}}function l(e,i=!1){if(typeof e!="object"||!e)return e;if(Array.isArray(e))return i?e.map(r=>l(r,i)):e;const t={};for(const r in e){const a=e[r];a!=null&&(i?t[r]=l(a,i):t[r]=a)}return t}function D(e){return l(e,!0)}function c(e){if(!(!e||e==="none"))return typeof e=="string"?{src:e}:{...e}}function m(e){if(!(!e||e==="none"))return typeof e=="string"?{type:"color",color:e}:e}function v(e){if(!(!e||e==="none"))return typeof e=="string"?{data:[{data:e}]}:Array.isArray(e)?{data:e.map(i=>typeof i=="string"?{data:i}:i)}:e}function y(e){if(!(!e||e==="none"))return typeof e=="string"?{src:e}:e}function h(e){if(!(!e||e==="none"))return typeof e=="string"?{color:e}:e}function S(e){if(!(!e||e==="none"))return typeof e=="string"?{color:e}:e}function f(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(r=>({...r}))}:Array.isArray(t)?{fragments:t.map(r=>typeof r=="string"?{content:r}:{...r})}:{fragments:[]})}function z(e){if(!(!e||e==="none"))return typeof e=="string"?{content:[{fragments:[{content:e}]}]}:"content"in e?{...e,content:f(e.content)}:{content:f(e)}}function p(e){if(!(!e||e==="none"))return typeof e=="string"?{src:e}:{...e}}function b(e){var i;return l({...e,image:y(e.image),video:p(e.video),audio:c(e.audio),text:z(e.text),geometry:v(e.geometry),fill:m(e.fill),outline:h(e.outline),shadow:S(e.shadow),children:(i=e.children)==null?void 0:i.map(t=>b(t))})}n.clearUndef=l,n.deepClearUndef=D,n.getDefaultElementStyle=s,n.getDefaultLayoutStyle=o,n.getDefaultShadowStyle=d,n.getDefaultStyle=T,n.getDefaultTextStyle=g,n.getDefaultTransformStyle=u,n.normalizeAudio=c,n.normalizeElement=b,n.normalizeFill=m,n.normalizeGeometry=v,n.normalizeImage=y,n.normalizeOutline=h,n.normalizeShadow=S,n.normalizeText=z,n.normalizeTextContent=f,n.normalizeVideo=p,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  function getDefaultLayoutStyle() {
2
2
  return {
3
3
  // box
4
- overflow: void 0,
4
+ overflow: "visible",
5
5
  direction: void 0,
6
6
  display: void 0,
7
7
  boxSizing: void 0,
@@ -92,7 +92,8 @@ function getDefaultElementStyle() {
92
92
  visibility: "visible",
93
93
  filter: "none",
94
94
  opacity: 1,
95
- pointerEvents: "auto"
95
+ pointerEvents: "auto",
96
+ maskImage: "none"
96
97
  };
97
98
  }
98
99
 
@@ -355,4 +356,4 @@ function normalizeElement(element) {
355
356
  });
356
357
  }
357
358
 
358
- export { clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
359
+ export { clearUndef, deepClearUndef, getDefaultElementStyle, getDefaultLayoutStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "modern-idoc",
3
3
  "type": "module",
4
- "version": "0.2.11",
4
+ "version": "0.2.13",
5
5
  "packageManager": "pnpm@9.15.1",
6
6
  "description": "Intermediate document for modern codec libs",
7
7
  "author": "wxm",