modern-idoc 0.2.11 → 0.2.12

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
@@ -150,7 +150,7 @@ type HighlightSize = StyleUnit | `${number}rem` | 'cover';
150
150
  type HighlightThickness = StyleUnit;
151
151
 
152
152
  interface LayoutStyleDeclaration {
153
- overflow?: Overflow;
153
+ overflow: Overflow;
154
154
  direction?: Direction;
155
155
  display?: Display;
156
156
  boxSizing?: BoxSizing;
@@ -220,6 +220,7 @@ interface ElementStyleDeclaration extends LayoutStyleDeclaration, TransformStyle
220
220
  filter: string;
221
221
  opacity: number;
222
222
  pointerEvents: PointerEvents;
223
+ maskImage: None | string;
223
224
  }
224
225
 
225
226
  interface HighlightDeclaration {
@@ -349,6 +350,8 @@ interface IDOCDocumentDeclaration extends IDOCElementDeclaration {
349
350
 
350
351
  declare function getDefaultElementStyle(): ElementStyleDeclaration;
351
352
 
353
+ declare function getDefaultLayoutStyle(): LayoutStyleDeclaration;
354
+
352
355
  declare function getDefaultShadowStyle(): ShadowStyleDeclaration;
353
356
 
354
357
  declare function getDefaultStyle(): StyleDeclaration;
@@ -380,4 +383,4 @@ declare function normalizeTextContent(content?: TextContent): TextContentDeclara
380
383
 
381
384
  declare function normalizeVideo(video?: VideoProp): VideoDeclaration | undefined;
382
385
 
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 };
386
+ 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, getDefaultLayoutStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
package/dist/index.d.mts CHANGED
@@ -150,7 +150,7 @@ type HighlightSize = StyleUnit | `${number}rem` | 'cover';
150
150
  type HighlightThickness = StyleUnit;
151
151
 
152
152
  interface LayoutStyleDeclaration {
153
- overflow?: Overflow;
153
+ overflow: Overflow;
154
154
  direction?: Direction;
155
155
  display?: Display;
156
156
  boxSizing?: BoxSizing;
@@ -220,6 +220,7 @@ interface ElementStyleDeclaration extends LayoutStyleDeclaration, TransformStyle
220
220
  filter: string;
221
221
  opacity: number;
222
222
  pointerEvents: PointerEvents;
223
+ maskImage: None | string;
223
224
  }
224
225
 
225
226
  interface HighlightDeclaration {
@@ -349,6 +350,8 @@ interface IDOCDocumentDeclaration extends IDOCElementDeclaration {
349
350
 
350
351
  declare function getDefaultElementStyle(): ElementStyleDeclaration;
351
352
 
353
+ declare function getDefaultLayoutStyle(): LayoutStyleDeclaration;
354
+
352
355
  declare function getDefaultShadowStyle(): ShadowStyleDeclaration;
353
356
 
354
357
  declare function getDefaultStyle(): StyleDeclaration;
@@ -380,4 +383,4 @@ declare function normalizeTextContent(content?: TextContent): TextContentDeclara
380
383
 
381
384
  declare function normalizeVideo(video?: VideoProp): VideoDeclaration | undefined;
382
385
 
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 };
386
+ 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, getDefaultLayoutStyle, getDefaultShadowStyle, getDefaultStyle, getDefaultTextStyle, getDefaultTransformStyle, normalizeAudio, normalizeElement, normalizeFill, normalizeGeometry, normalizeImage, normalizeOutline, normalizeShadow, normalizeText, normalizeTextContent, normalizeVideo };
package/dist/index.d.ts CHANGED
@@ -150,7 +150,7 @@ type HighlightSize = StyleUnit | `${number}rem` | 'cover';
150
150
  type HighlightThickness = StyleUnit;
151
151
 
152
152
  interface LayoutStyleDeclaration {
153
- overflow?: Overflow;
153
+ overflow: Overflow;
154
154
  direction?: Direction;
155
155
  display?: Display;
156
156
  boxSizing?: BoxSizing;
@@ -220,6 +220,7 @@ interface ElementStyleDeclaration extends LayoutStyleDeclaration, TransformStyle
220
220
  filter: string;
221
221
  opacity: number;
222
222
  pointerEvents: PointerEvents;
223
+ maskImage: None | string;
223
224
  }
224
225
 
225
226
  interface HighlightDeclaration {
@@ -349,6 +350,8 @@ interface IDOCDocumentDeclaration extends IDOCElementDeclaration {
349
350
 
350
351
  declare function getDefaultElementStyle(): ElementStyleDeclaration;
351
352
 
353
+ declare function getDefaultLayoutStyle(): LayoutStyleDeclaration;
354
+
352
355
  declare function getDefaultShadowStyle(): ShadowStyleDeclaration;
353
356
 
354
357
  declare function getDefaultStyle(): StyleDeclaration;
@@ -380,4 +383,4 @@ declare function normalizeTextContent(content?: TextContent): TextContentDeclara
380
383
 
381
384
  declare function normalizeVideo(video?: VideoProp): VideoDeclaration | undefined;
382
385
 
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 };
386
+ 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, 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.12",
5
5
  "packageManager": "pnpm@9.15.1",
6
6
  "description": "Intermediate document for modern codec libs",
7
7
  "author": "wxm",