abstract-image 12.0.2 → 12.0.3

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.
@@ -0,0 +1,2 @@
1
+ export declare const xsd = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n targetNamespace=\"urn:adml\"\n xmlns=\"urn:adml\"\n elementFormDefault=\"qualified\"\n attributeFormDefault=\"unqualified\">\n\n <!-- ========= Root ========= -->\n <xs:element name=\"abstractImage\" type=\"AbstractImage\"/>\n\n <xs:group name=\"Component\">\n <xs:choice>\n <xs:element name=\"image\" type=\"Image\"/>\n <xs:element name=\"ellipse\" type=\"Ellipse\"/>\n <xs:element name=\"line\" type=\"Line\"/>\n <xs:element name=\"polyline\" type=\"PolyLine\"/>\n <xs:element name=\"polygon\" type=\"Polygon\"/>\n <xs:element name=\"rectangle\" type=\"Rectangle\"/>\n <xs:element name=\"text\" type=\"Text\"/>\n <xs:element name=\"group\" type=\"Group\"/>\n </xs:choice>\n </xs:group>\n\n <xs:complexType name=\"AbstractImage\">\n <xs:sequence>\n <xs:element name=\"components\">\n <xs:complexType>\n <xs:sequence>\n <xs:group ref=\"Component\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n </xs:sequence>\n </xs:complexType>\n </xs:element>\n </xs:sequence>\n <xs:attribute name=\"topLeft\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"size\" type=\"SizeString\" use=\"required\"/>\n <xs:attribute name=\"backgroundColor\" type=\"ColorString\" use=\"optional\"/>\n </xs:complexType>\n\n <xs:simpleType name=\"PointString\"><xs:restriction base=\"xs:string\"/></xs:simpleType>\n <xs:simpleType name=\"SizeString\"><xs:restriction base=\"xs:string\"/></xs:simpleType>\n <xs:simpleType name=\"ColorString\"><xs:restriction base=\"xs:string\"/></xs:simpleType>\n <xs:simpleType name=\"PointsString\"><xs:restriction base=\"xs:string\"/></xs:simpleType>\n <xs:simpleType name=\"DashArray\"><xs:restriction base=\"xs:string\"/></xs:simpleType>\n <xs:simpleType name=\"DashOffset\"><xs:restriction base=\"xs:string\"/></xs:simpleType>\n\n <!-- ========= Components ========= -->\n\n <!-- Group -->\n <xs:complexType name=\"Group\">\n <xs:sequence>\n <xs:element name=\"children\">\n <xs:complexType>\n <xs:sequence>\n <xs:group ref=\"Component\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n </xs:sequence>\n </xs:complexType>\n </xs:element>\n </xs:sequence>\n <xs:attribute name=\"name\" type=\"xs:string\" use=\"optional\"/>\n </xs:complexType>\n\n <!-- Image -->\n <xs:complexType name=\"Image\">\n <xs:attribute name=\"url\" type=\"xs:anyURI\" use=\"required\"/>\n <xs:attribute name=\"topLeft\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"bottomRight\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\"/>\n </xs:complexType>\n\n <!-- Ellipse -->\n <xs:complexType name=\"Ellipse\">\n <xs:attribute name=\"topLeft\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"bottomRight\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"strokeColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"strokeThickness\" type=\"xs:double\" use=\"optional\"/>\n <xs:attribute name=\"strokeDashArray\" type=\"DashArray\" use=\"optional\"/> \n <xs:attribute name=\"strokeDashOffset\" type=\"DashOffset\" use=\"optional\"/>\n <xs:attribute name=\"fillColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\"/>\n </xs:complexType>\n\n <!-- Line -->\n <xs:complexType name=\"Line\">\n <xs:attribute name=\"start\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"end\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"strokeColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"strokeThickness\" type=\"xs:double\" use=\"optional\"/>\n <xs:attribute name=\"strokeDashArray\" type=\"DashArray\" use=\"optional\"/> \n <xs:attribute name=\"strokeDashOffset\" type=\"DashOffset\" use=\"optional\"/>\n <xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\"/>\n </xs:complexType>\n\n <!-- PolyLine -->\n <xs:complexType name=\"PolyLine\">\n <xs:attribute name=\"points\" type=\"PointsString\" use=\"required\"/>\n <xs:attribute name=\"strokeColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"strokeThickness\" type=\"xs:double\" use=\"optional\"/>\n <xs:attribute name=\"strokeDashArray\" type=\"DashArray\" use=\"optional\"/> \n <xs:attribute name=\"strokeDashOffset\" type=\"DashOffset\" use=\"optional\"/>\n <xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\"/>\n </xs:complexType>\n\n <!-- Polygon -->\n <xs:complexType name=\"Polygon\">\n <xs:attribute name=\"points\" type=\"PointsString\" use=\"required\"/>\n <xs:attribute name=\"strokeColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"strokeThickness\" type=\"xs:double\" use=\"optional\"/>\n <xs:attribute name=\"strokeDashArray\" type=\"DashArray\" use=\"optional\"/> \n <xs:attribute name=\"strokeDashOffset\" type=\"DashOffset\" use=\"optional\"/>\n <xs:attribute name=\"fillColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\"/>\n </xs:complexType>\n\n <!-- Rectangle -->\n <xs:complexType name=\"Rectangle\">\n <xs:attribute name=\"topLeft\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"bottomRight\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"strokeColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"strokeThickness\" type=\"xs:double\" use=\"optional\"/>\n <xs:attribute name=\"strokeDashArray\" type=\"DashArray\" use=\"optional\"/> \n <xs:attribute name=\"strokeDashOffset\" type=\"DashOffset\" use=\"optional\"/>\n <xs:attribute name=\"fillColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\"/>\n <xs:attribute name=\"radius\" type=\"PointString\" use=\"optional\"/>\n </xs:complexType>\n\n <!-- Text -->\n <xs:complexType name=\"Text\">\n <xs:attribute name=\"position\" type=\"PointString\" use=\"required\"/>\n <xs:attribute name=\"text\" type=\"xs:string\" use=\"required\"/>\n <xs:attribute name=\"fontFamily\" type=\"xs:string\" use=\"optional\"/>\n <xs:attribute name=\"fontSize\" type=\"xs:double\" use=\"optional\"/>\n <xs:attribute name=\"textColor\" type=\"ColorString\" use=\"optional\"/>\n\t<xs:attribute name=\"fontWeight\" use=\"optional\">\n\t\t<xs:simpleType>\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"light\"/>\n\t\t\t<xs:enumeration value=\"normal\"/>\n\t\t\t<xs:enumeration value=\"mediumBold\"/>\n\t\t\t<xs:enumeration value=\"bold\"/>\n\t\t\t<xs:enumeration value=\"extraBold\"/>\n\t\t</xs:restriction>\n\t\t</xs:simpleType>\n\t</xs:attribute>\n\t<xs:attribute name=\"clockwiseRotationDegrees\" type=\"xs:double\" use=\"optional\"/>\n\t<xs:attribute name=\"textAlignment\" use=\"optional\">\n\t\t<xs:simpleType>\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"left\"/>\n\t\t\t<xs:enumeration value=\"center\"/>\n\t\t\t<xs:enumeration value=\"right\"/>\n\t\t</xs:restriction>\n\t\t</xs:simpleType>\n\t</xs:attribute>\n\t<xs:attribute name=\"horizontalGrowthDirection\" use=\"optional\">\n\t\t<xs:simpleType>\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"up\"/>\n\t\t\t<xs:enumeration value=\"down\"/>\n\t\t\t<xs:enumeration value=\"uniform\"/>\n\t\t\t<xs:enumeration value=\"left\"/>\n\t\t\t<xs:enumeration value=\"right\"/>\n\t\t</xs:restriction>\n\t\t</xs:simpleType>\n\t</xs:attribute>\n\t<xs:attribute name=\"verticalGrowthDirection\" use=\"optional\">\n\t\t<xs:simpleType>\n\t\t<xs:restriction base=\"xs:string\">\n\t\t\t<xs:enumeration value=\"up\"/>\n\t\t\t<xs:enumeration value=\"down\"/>\n\t\t\t<xs:enumeration value=\"uniform\"/>\n\t\t\t<xs:enumeration value=\"left\"/>\n\t\t\t<xs:enumeration value=\"right\"/>\n\t\t</xs:restriction>\n\t\t</xs:simpleType>\n\t</xs:attribute>\n <xs:attribute name=\"strokeThickness\" type=\"xs:double\" use=\"optional\"/>\n <xs:attribute name=\"strokeColor\" type=\"ColorString\" use=\"optional\"/>\n <xs:attribute name=\"italic\" type=\"xs:boolean\" use=\"optional\"/>\n <xs:attribute name=\"id\" type=\"xs:string\" use=\"optional\"/>\n </xs:complexType>\n\n</xs:schema>\n";
2
+ //# sourceMappingURL=dynamic-image-xsd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-image-xsd.d.ts","sourceRoot":"","sources":["../../src/dynamic-image/dynamic-image-xsd.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,w2QAuLf,CAAC"}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.xsd = void 0;
4
+ exports.xsd = `<?xml version="1.0" encoding="UTF-8"?>
5
+ <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6
+ targetNamespace="urn:adml"
7
+ xmlns="urn:adml"
8
+ elementFormDefault="qualified"
9
+ attributeFormDefault="unqualified">
10
+
11
+ <!-- ========= Root ========= -->
12
+ <xs:element name="abstractImage" type="AbstractImage"/>
13
+
14
+ <xs:group name="Component">
15
+ <xs:choice>
16
+ <xs:element name="image" type="Image"/>
17
+ <xs:element name="ellipse" type="Ellipse"/>
18
+ <xs:element name="line" type="Line"/>
19
+ <xs:element name="polyline" type="PolyLine"/>
20
+ <xs:element name="polygon" type="Polygon"/>
21
+ <xs:element name="rectangle" type="Rectangle"/>
22
+ <xs:element name="text" type="Text"/>
23
+ <xs:element name="group" type="Group"/>
24
+ </xs:choice>
25
+ </xs:group>
26
+
27
+ <xs:complexType name="AbstractImage">
28
+ <xs:sequence>
29
+ <xs:element name="components">
30
+ <xs:complexType>
31
+ <xs:sequence>
32
+ <xs:group ref="Component" minOccurs="0" maxOccurs="unbounded"/>
33
+ </xs:sequence>
34
+ </xs:complexType>
35
+ </xs:element>
36
+ </xs:sequence>
37
+ <xs:attribute name="topLeft" type="PointString" use="required"/>
38
+ <xs:attribute name="size" type="SizeString" use="required"/>
39
+ <xs:attribute name="backgroundColor" type="ColorString" use="optional"/>
40
+ </xs:complexType>
41
+
42
+ <xs:simpleType name="PointString"><xs:restriction base="xs:string"/></xs:simpleType>
43
+ <xs:simpleType name="SizeString"><xs:restriction base="xs:string"/></xs:simpleType>
44
+ <xs:simpleType name="ColorString"><xs:restriction base="xs:string"/></xs:simpleType>
45
+ <xs:simpleType name="PointsString"><xs:restriction base="xs:string"/></xs:simpleType>
46
+ <xs:simpleType name="DashArray"><xs:restriction base="xs:string"/></xs:simpleType>
47
+ <xs:simpleType name="DashOffset"><xs:restriction base="xs:string"/></xs:simpleType>
48
+
49
+ <!-- ========= Components ========= -->
50
+
51
+ <!-- Group -->
52
+ <xs:complexType name="Group">
53
+ <xs:sequence>
54
+ <xs:element name="children">
55
+ <xs:complexType>
56
+ <xs:sequence>
57
+ <xs:group ref="Component" minOccurs="0" maxOccurs="unbounded"/>
58
+ </xs:sequence>
59
+ </xs:complexType>
60
+ </xs:element>
61
+ </xs:sequence>
62
+ <xs:attribute name="name" type="xs:string" use="optional"/>
63
+ </xs:complexType>
64
+
65
+ <!-- Image -->
66
+ <xs:complexType name="Image">
67
+ <xs:attribute name="url" type="xs:anyURI" use="required"/>
68
+ <xs:attribute name="topLeft" type="PointString" use="required"/>
69
+ <xs:attribute name="bottomRight" type="PointString" use="required"/>
70
+ <xs:attribute name="id" type="xs:string" use="optional"/>
71
+ </xs:complexType>
72
+
73
+ <!-- Ellipse -->
74
+ <xs:complexType name="Ellipse">
75
+ <xs:attribute name="topLeft" type="PointString" use="required"/>
76
+ <xs:attribute name="bottomRight" type="PointString" use="required"/>
77
+ <xs:attribute name="strokeColor" type="ColorString" use="optional"/>
78
+ <xs:attribute name="strokeThickness" type="xs:double" use="optional"/>
79
+ <xs:attribute name="strokeDashArray" type="DashArray" use="optional"/>
80
+ <xs:attribute name="strokeDashOffset" type="DashOffset" use="optional"/>
81
+ <xs:attribute name="fillColor" type="ColorString" use="optional"/>
82
+ <xs:attribute name="id" type="xs:string" use="optional"/>
83
+ </xs:complexType>
84
+
85
+ <!-- Line -->
86
+ <xs:complexType name="Line">
87
+ <xs:attribute name="start" type="PointString" use="required"/>
88
+ <xs:attribute name="end" type="PointString" use="required"/>
89
+ <xs:attribute name="strokeColor" type="ColorString" use="optional"/>
90
+ <xs:attribute name="strokeThickness" type="xs:double" use="optional"/>
91
+ <xs:attribute name="strokeDashArray" type="DashArray" use="optional"/>
92
+ <xs:attribute name="strokeDashOffset" type="DashOffset" use="optional"/>
93
+ <xs:attribute name="id" type="xs:string" use="optional"/>
94
+ </xs:complexType>
95
+
96
+ <!-- PolyLine -->
97
+ <xs:complexType name="PolyLine">
98
+ <xs:attribute name="points" type="PointsString" use="required"/>
99
+ <xs:attribute name="strokeColor" type="ColorString" use="optional"/>
100
+ <xs:attribute name="strokeThickness" type="xs:double" use="optional"/>
101
+ <xs:attribute name="strokeDashArray" type="DashArray" use="optional"/>
102
+ <xs:attribute name="strokeDashOffset" type="DashOffset" use="optional"/>
103
+ <xs:attribute name="id" type="xs:string" use="optional"/>
104
+ </xs:complexType>
105
+
106
+ <!-- Polygon -->
107
+ <xs:complexType name="Polygon">
108
+ <xs:attribute name="points" type="PointsString" use="required"/>
109
+ <xs:attribute name="strokeColor" type="ColorString" use="optional"/>
110
+ <xs:attribute name="strokeThickness" type="xs:double" use="optional"/>
111
+ <xs:attribute name="strokeDashArray" type="DashArray" use="optional"/>
112
+ <xs:attribute name="strokeDashOffset" type="DashOffset" use="optional"/>
113
+ <xs:attribute name="fillColor" type="ColorString" use="optional"/>
114
+ <xs:attribute name="id" type="xs:string" use="optional"/>
115
+ </xs:complexType>
116
+
117
+ <!-- Rectangle -->
118
+ <xs:complexType name="Rectangle">
119
+ <xs:attribute name="topLeft" type="PointString" use="required"/>
120
+ <xs:attribute name="bottomRight" type="PointString" use="required"/>
121
+ <xs:attribute name="strokeColor" type="ColorString" use="optional"/>
122
+ <xs:attribute name="strokeThickness" type="xs:double" use="optional"/>
123
+ <xs:attribute name="strokeDashArray" type="DashArray" use="optional"/>
124
+ <xs:attribute name="strokeDashOffset" type="DashOffset" use="optional"/>
125
+ <xs:attribute name="fillColor" type="ColorString" use="optional"/>
126
+ <xs:attribute name="id" type="xs:string" use="optional"/>
127
+ <xs:attribute name="radius" type="PointString" use="optional"/>
128
+ </xs:complexType>
129
+
130
+ <!-- Text -->
131
+ <xs:complexType name="Text">
132
+ <xs:attribute name="position" type="PointString" use="required"/>
133
+ <xs:attribute name="text" type="xs:string" use="required"/>
134
+ <xs:attribute name="fontFamily" type="xs:string" use="optional"/>
135
+ <xs:attribute name="fontSize" type="xs:double" use="optional"/>
136
+ <xs:attribute name="textColor" type="ColorString" use="optional"/>
137
+ <xs:attribute name="fontWeight" use="optional">
138
+ <xs:simpleType>
139
+ <xs:restriction base="xs:string">
140
+ <xs:enumeration value="light"/>
141
+ <xs:enumeration value="normal"/>
142
+ <xs:enumeration value="mediumBold"/>
143
+ <xs:enumeration value="bold"/>
144
+ <xs:enumeration value="extraBold"/>
145
+ </xs:restriction>
146
+ </xs:simpleType>
147
+ </xs:attribute>
148
+ <xs:attribute name="clockwiseRotationDegrees" type="xs:double" use="optional"/>
149
+ <xs:attribute name="textAlignment" use="optional">
150
+ <xs:simpleType>
151
+ <xs:restriction base="xs:string">
152
+ <xs:enumeration value="left"/>
153
+ <xs:enumeration value="center"/>
154
+ <xs:enumeration value="right"/>
155
+ </xs:restriction>
156
+ </xs:simpleType>
157
+ </xs:attribute>
158
+ <xs:attribute name="horizontalGrowthDirection" use="optional">
159
+ <xs:simpleType>
160
+ <xs:restriction base="xs:string">
161
+ <xs:enumeration value="up"/>
162
+ <xs:enumeration value="down"/>
163
+ <xs:enumeration value="uniform"/>
164
+ <xs:enumeration value="left"/>
165
+ <xs:enumeration value="right"/>
166
+ </xs:restriction>
167
+ </xs:simpleType>
168
+ </xs:attribute>
169
+ <xs:attribute name="verticalGrowthDirection" use="optional">
170
+ <xs:simpleType>
171
+ <xs:restriction base="xs:string">
172
+ <xs:enumeration value="up"/>
173
+ <xs:enumeration value="down"/>
174
+ <xs:enumeration value="uniform"/>
175
+ <xs:enumeration value="left"/>
176
+ <xs:enumeration value="right"/>
177
+ </xs:restriction>
178
+ </xs:simpleType>
179
+ </xs:attribute>
180
+ <xs:attribute name="strokeThickness" type="xs:double" use="optional"/>
181
+ <xs:attribute name="strokeColor" type="ColorString" use="optional"/>
182
+ <xs:attribute name="italic" type="xs:boolean" use="optional"/>
183
+ <xs:attribute name="id" type="xs:string" use="optional"/>
184
+ </xs:complexType>
185
+
186
+ </xs:schema>
187
+ `;
188
+ //# sourceMappingURL=dynamic-image-xsd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamic-image-xsd.js","sourceRoot":"","sources":["../../src/dynamic-image/dynamic-image-xsd.ts"],"names":[],"mappings":";;;AAAa,QAAA,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuLlB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abstract-image",
3
- "version": "12.0.2",
3
+ "version": "12.0.3",
4
4
  "description": "Dynamically create images using code or JSX and render to any format",
5
5
  "repository": "https://github.com/dividab/abstract-visuals/tree/master/packages/abstract-image",
6
6
  "main": "lib/index.js",
@@ -24,7 +24,7 @@
24
24
  "base64-js": "^1.5.1",
25
25
  "fast-xml-parser": "^4.5.0",
26
26
  "handlebars": "4.7.8",
27
- "handlebars-xml": "^0.1.7",
27
+ "handlebars-xml": "^0.2.0",
28
28
  "jsxpression": "^0.1.12"
29
29
  },
30
30
  "peerDependencies": {
@@ -37,5 +37,5 @@
37
37
  "vite": "^6.0.1",
38
38
  "vitest": "^2.1.6"
39
39
  },
40
- "gitHead": "1ea6c651c991af0dae56b69b8c9789177fd7b66f"
40
+ "gitHead": "910452719abd13d213bb986906790f8dd7d0df72"
41
41
  }