@mateuszjs/magic-render 0.1.0-next.6 → 0.1.0-next.64

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.
Files changed (232) hide show
  1. package/lib/index.mjs +1 -1
  2. package/lib/index.mjs.map +1 -1
  3. package/lib/types/WebGPU/canvasSizeObserver.d.ts.map +1 -0
  4. package/lib/types/WebGPU/device.d.ts +5 -0
  5. package/lib/types/WebGPU/device.d.ts.map +1 -0
  6. package/lib/types/WebGPU/generatePreview.d.ts +3 -0
  7. package/lib/types/WebGPU/generatePreview.d.ts.map +1 -0
  8. package/lib/types/WebGPU/getTexture/createCheckedImageData.d.ts.map +1 -0
  9. package/lib/types/WebGPU/getTexture/generateMimapsArray.d.ts.map +1 -0
  10. package/lib/types/{src/WebGPU → WebGPU}/getTexture/index.d.ts +3 -3
  11. package/lib/types/WebGPU/getTexture/index.d.ts.map +1 -0
  12. package/lib/types/WebGPU/m3.d.ts.map +1 -0
  13. package/lib/types/{src/WebGPU → WebGPU}/pick.d.ts +1 -2
  14. package/lib/types/WebGPU/pick.d.ts.map +1 -0
  15. package/lib/types/WebGPU/programs/blur/getProgram.d.ts +2 -0
  16. package/lib/types/WebGPU/programs/blur/getProgram.d.ts.map +1 -0
  17. package/lib/types/WebGPU/programs/clearComputeDepth/getProgram.d.ts +2 -0
  18. package/lib/types/WebGPU/programs/clearComputeDepth/getProgram.d.ts.map +1 -0
  19. package/lib/types/WebGPU/programs/clearSdf/getProgram.d.ts +2 -0
  20. package/lib/types/WebGPU/programs/clearSdf/getProgram.d.ts.map +1 -0
  21. package/lib/types/WebGPU/programs/combineSdf/getProgram.d.ts +2 -0
  22. package/lib/types/WebGPU/programs/combineSdf/getProgram.d.ts.map +1 -0
  23. package/lib/types/WebGPU/programs/computeShape/getProgram.d.ts +2 -0
  24. package/lib/types/WebGPU/programs/computeShape/getProgram.d.ts.map +1 -0
  25. package/lib/types/WebGPU/programs/drawShape/getProgram.d.ts +2 -0
  26. package/lib/types/WebGPU/programs/drawShape/getProgram.d.ts.map +1 -0
  27. package/lib/types/WebGPU/programs/drawTexture/getProgram.d.ts +2 -0
  28. package/lib/types/WebGPU/programs/drawTexture/getProgram.d.ts.map +1 -0
  29. package/lib/types/WebGPU/programs/drawTriangle/getProgram.d.ts +2 -0
  30. package/lib/types/WebGPU/programs/drawTriangle/getProgram.d.ts.map +1 -0
  31. package/lib/types/WebGPU/programs/initPrograms.d.ts +32 -0
  32. package/lib/types/WebGPU/programs/initPrograms.d.ts.map +1 -0
  33. package/lib/types/WebGPU/programs/pickShape/getProgram.d.ts +2 -0
  34. package/lib/types/WebGPU/programs/pickShape/getProgram.d.ts.map +1 -0
  35. package/lib/types/WebGPU/programs/pickTexture/getProgram.d.ts +2 -0
  36. package/lib/types/WebGPU/programs/pickTexture/getProgram.d.ts.map +1 -0
  37. package/lib/types/WebGPU/programs/pickTriangle/getProgram.d.ts +2 -0
  38. package/lib/types/WebGPU/programs/pickTriangle/getProgram.d.ts.map +1 -0
  39. package/lib/types/WebGPU/textureCache.d.ts +4 -0
  40. package/lib/types/WebGPU/textureCache.d.ts.map +1 -0
  41. package/lib/types/consts.d.ts +2 -0
  42. package/lib/types/consts.d.ts.map +1 -0
  43. package/lib/types/customPrograms.d.ts +16 -0
  44. package/lib/types/customPrograms.d.ts.map +1 -0
  45. package/lib/types/fonts.d.ts +6 -0
  46. package/lib/types/fonts.d.ts.map +1 -0
  47. package/lib/types/getCanvasMatrix.d.ts +2 -0
  48. package/lib/types/getCanvasMatrix.d.ts.map +1 -0
  49. package/lib/types/{src/getCanvasRenderDescriptor.d.ts → getCanvasRenderDescriptor.d.ts} +1 -0
  50. package/lib/types/getCanvasRenderDescriptor.d.ts.map +1 -0
  51. package/lib/types/{src/getDepthTexture.d.ts → getDepthTexture.d.ts} +1 -0
  52. package/lib/types/getDepthTexture.d.ts.map +1 -0
  53. package/lib/types/getMultisampleTexture.d.ts +2 -0
  54. package/lib/types/getMultisampleTexture.d.ts.map +1 -0
  55. package/lib/types/getRenderDescriptor.d.ts.map +1 -0
  56. package/lib/types/index.d.ts +5 -0
  57. package/lib/types/index.d.ts.map +1 -0
  58. package/lib/types/loadingTexture.d.ts +3 -0
  59. package/lib/types/loadingTexture.d.ts.map +1 -0
  60. package/lib/types/pointer.d.ts +15 -0
  61. package/lib/types/pointer.d.ts.map +1 -0
  62. package/lib/types/run.d.ts +6 -0
  63. package/lib/types/run.d.ts.map +1 -0
  64. package/lib/types/snapshots/convert.d.ts +8 -0
  65. package/lib/types/snapshots/convert.d.ts.map +1 -0
  66. package/lib/types/snapshots/fill.d.ts +4 -0
  67. package/lib/types/snapshots/fill.d.ts.map +1 -0
  68. package/lib/types/snapshots/snapshots.d.ts +6 -0
  69. package/lib/types/snapshots/snapshots.d.ts.map +1 -0
  70. package/lib/types/snapshots/toZigAsset.d.ts +3 -0
  71. package/lib/types/snapshots/toZigAsset.d.ts.map +1 -0
  72. package/lib/types/svgToShapes/addUiElement.d.ts +3 -0
  73. package/lib/types/svgToShapes/addUiElement.d.ts.map +1 -0
  74. package/lib/types/svgToShapes/arcToBezier.d.ts +11 -0
  75. package/lib/types/svgToShapes/arcToBezier.d.ts.map +1 -0
  76. package/lib/types/svgToShapes/boundingBox.d.ts +18 -0
  77. package/lib/types/svgToShapes/boundingBox.d.ts.map +1 -0
  78. package/lib/types/svgToShapes/collectShapesData.d.ts +12 -0
  79. package/lib/types/svgToShapes/collectShapesData.d.ts.map +1 -0
  80. package/lib/types/svgToShapes/const.d.ts +5 -0
  81. package/lib/types/svgToShapes/const.d.ts.map +1 -0
  82. package/lib/types/svgToShapes/definitions.d.ts +44 -0
  83. package/lib/types/svgToShapes/definitions.d.ts.map +1 -0
  84. package/lib/types/svgToShapes/getProps.d.ts +4 -0
  85. package/lib/types/svgToShapes/getProps.d.ts.map +1 -0
  86. package/lib/types/svgToShapes/getShapesAssets.d.ts +5 -0
  87. package/lib/types/svgToShapes/getShapesAssets.d.ts.map +1 -0
  88. package/lib/types/svgToShapes/parseEllipse.d.ts +3 -0
  89. package/lib/types/svgToShapes/parseEllipse.d.ts.map +1 -0
  90. package/lib/types/svgToShapes/parsePathData.d.ts +3 -0
  91. package/lib/types/svgToShapes/parsePathData.d.ts.map +1 -0
  92. package/lib/types/svgToShapes/parseRect.d.ts +3 -0
  93. package/lib/types/svgToShapes/parseRect.d.ts.map +1 -0
  94. package/lib/types/svgToShapes/radialGradient.d.ts +16 -0
  95. package/lib/types/svgToShapes/radialGradient.d.ts.map +1 -0
  96. package/lib/types/svgToShapes/utils.d.ts +10 -0
  97. package/lib/types/svgToShapes/utils.d.ts.map +1 -0
  98. package/lib/types/textures.d.ts +30 -0
  99. package/lib/types/textures.d.ts.map +1 -0
  100. package/lib/types/types.d.ts +166 -0
  101. package/lib/types/types.d.ts.map +1 -0
  102. package/lib/types/typing.d.ts +7 -0
  103. package/lib/types/typing.d.ts.map +1 -0
  104. package/lib/types/utils/assertUnreachable.d.ts +2 -0
  105. package/lib/types/utils/assertUnreachable.d.ts.map +1 -0
  106. package/lib/types/utils/atNormIndex.d.ts.map +1 -0
  107. package/lib/types/utils/captureCanvasStream.d.ts.map +1 -0
  108. package/lib/types/utils/captureCanvasStreamWasm.d.ts.map +1 -0
  109. package/lib/types/utils/clamp.d.ts.map +1 -0
  110. package/lib/types/utils/debounce.d.ts +2 -0
  111. package/lib/types/utils/debounce.d.ts.map +1 -0
  112. package/lib/types/utils/decompressWoff2.d.mts +3 -0
  113. package/lib/types/utils/decompressWoff2.d.mts.map +1 -0
  114. package/lib/types/{src/utils → utils}/distancePointToLine.d.ts +1 -0
  115. package/lib/types/utils/distancePointToLine.d.ts.map +1 -0
  116. package/lib/types/utils/fitCurve.d.ts.map +1 -0
  117. package/lib/types/utils/getAngle.d.ts +3 -0
  118. package/lib/types/utils/getAngle.d.ts.map +1 -0
  119. package/lib/types/utils/getAngleDiff.d.ts.map +1 -0
  120. package/lib/types/{src/utils → utils}/getBezierPos.d.ts +1 -0
  121. package/lib/types/utils/getBezierPos.d.ts.map +1 -0
  122. package/lib/types/{src/utils → utils}/getBezierTan.d.ts +1 -0
  123. package/lib/types/utils/getBezierTan.d.ts.map +1 -0
  124. package/lib/types/{src/utils → utils}/getCurveLength.d.ts +1 -0
  125. package/lib/types/utils/getCurveLength.d.ts.map +1 -0
  126. package/lib/types/utils/getDefaultPoints.d.ts +3 -0
  127. package/lib/types/utils/getDefaultPoints.d.ts.map +1 -0
  128. package/lib/types/utils/getDistance.d.ts +3 -0
  129. package/lib/types/utils/getDistance.d.ts.map +1 -0
  130. package/lib/types/utils/mat4.d.ts.map +1 -0
  131. package/lib/types/utils/normalizeVec2.d.ts +3 -0
  132. package/lib/types/utils/normalizeVec2.d.ts.map +1 -0
  133. package/lib/types/utils/resizeArray.d.ts.map +1 -0
  134. package/lib/types/utils/setCamera.d.ts +2 -0
  135. package/lib/types/utils/setCamera.d.ts.map +1 -0
  136. package/lib/types/utils/throttle.d.ts +2 -0
  137. package/lib/types/utils/throttle.d.ts.map +1 -0
  138. package/lib/types/utils/vec3.d.ts.map +1 -0
  139. package/lib/types.mjs +2 -0
  140. package/lib/types.mjs.map +1 -0
  141. package/package.json +33 -14
  142. package/lib/e9072ac5eb734c67.png +0 -0
  143. package/lib/types/src/WebGPU/canvasSizeObserver.d.ts.map +0 -1
  144. package/lib/types/src/WebGPU/getDevice.d.ts +0 -2
  145. package/lib/types/src/WebGPU/getDevice.d.ts.map +0 -1
  146. package/lib/types/src/WebGPU/getTexture/createCheckedImageData.d.ts.map +0 -1
  147. package/lib/types/src/WebGPU/getTexture/generateMimapsArray.d.ts.map +0 -1
  148. package/lib/types/src/WebGPU/getTexture/index.d.ts.map +0 -1
  149. package/lib/types/src/WebGPU/m3.d.ts.map +0 -1
  150. package/lib/types/src/WebGPU/pick.d.ts.map +0 -1
  151. package/lib/types/src/WebGPU/pointer.d.ts +0 -7
  152. package/lib/types/src/WebGPU/pointer.d.ts.map +0 -1
  153. package/lib/types/src/WebGPU/programs/blur/getProgram.d.ts +0 -2
  154. package/lib/types/src/WebGPU/programs/blur/getProgram.d.ts.map +0 -1
  155. package/lib/types/src/WebGPU/programs/draw/getProgram.d.ts +0 -2
  156. package/lib/types/src/WebGPU/programs/draw/getProgram.d.ts.map +0 -1
  157. package/lib/types/src/WebGPU/programs/draw3dModel/getProgram.d.ts +0 -2
  158. package/lib/types/src/WebGPU/programs/draw3dModel/getProgram.d.ts.map +0 -1
  159. package/lib/types/src/WebGPU/programs/draw3dModelLight/getProgram.d.ts +0 -9
  160. package/lib/types/src/WebGPU/programs/draw3dModelLight/getProgram.d.ts.map +0 -1
  161. package/lib/types/src/WebGPU/programs/draw3dModelTexture/getProgram.d.ts +0 -2
  162. package/lib/types/src/WebGPU/programs/draw3dModelTexture/getProgram.d.ts.map +0 -1
  163. package/lib/types/src/WebGPU/programs/drawBezier/getProgram.d.ts +0 -2
  164. package/lib/types/src/WebGPU/programs/drawBezier/getProgram.d.ts.map +0 -1
  165. package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts +0 -2
  166. package/lib/types/src/WebGPU/programs/drawMSDF/getProgram.d.ts.map +0 -1
  167. package/lib/types/src/WebGPU/programs/drawTexture/getProgram.d.ts +0 -2
  168. package/lib/types/src/WebGPU/programs/drawTexture/getProgram.d.ts.map +0 -1
  169. package/lib/types/src/WebGPU/programs/drawTriangle/getProgram.d.ts +0 -2
  170. package/lib/types/src/WebGPU/programs/drawTriangle/getProgram.d.ts.map +0 -1
  171. package/lib/types/src/WebGPU/programs/initPrograms.d.ts +0 -22
  172. package/lib/types/src/WebGPU/programs/initPrograms.d.ts.map +0 -1
  173. package/lib/types/src/WebGPU/programs/pickTexture/getProgram.d.ts +0 -2
  174. package/lib/types/src/WebGPU/programs/pickTexture/getProgram.d.ts.map +0 -1
  175. package/lib/types/src/WebGPU/programs/pickTriangle/getProgram.d.ts +0 -2
  176. package/lib/types/src/WebGPU/programs/pickTriangle/getProgram.d.ts.map +0 -1
  177. package/lib/types/src/__test__/index.test.d.ts +0 -1
  178. package/lib/types/src/__test__/index.test.d.ts.map +0 -1
  179. package/lib/types/src/consts.d.ts +0 -16
  180. package/lib/types/src/consts.d.ts.map +0 -1
  181. package/lib/types/src/getCanvasMatrix.d.ts +0 -2
  182. package/lib/types/src/getCanvasMatrix.d.ts.map +0 -1
  183. package/lib/types/src/getCanvasRenderDescriptor.d.ts.map +0 -1
  184. package/lib/types/src/getDepthTexture.d.ts.map +0 -1
  185. package/lib/types/src/getMultisampleTexture.d.ts +0 -2
  186. package/lib/types/src/getMultisampleTexture.d.ts.map +0 -1
  187. package/lib/types/src/getRenderDescriptor.d.ts.map +0 -1
  188. package/lib/types/src/index.d.ts +0 -14
  189. package/lib/types/src/index.d.ts.map +0 -1
  190. package/lib/types/src/models/Video/MiniatureVideo.d.ts +0 -30
  191. package/lib/types/src/models/Video/MiniatureVideo.d.ts.map +0 -1
  192. package/lib/types/src/run.d.ts +0 -5
  193. package/lib/types/src/run.d.ts.map +0 -1
  194. package/lib/types/src/types.d.ts +0 -4
  195. package/lib/types/src/types.d.ts.map +0 -1
  196. package/lib/types/src/utils/atNormIndex.d.ts.map +0 -1
  197. package/lib/types/src/utils/captureCanvasStream.d.ts.map +0 -1
  198. package/lib/types/src/utils/captureCanvasStreamWasm.d.ts.map +0 -1
  199. package/lib/types/src/utils/clamp.d.ts.map +0 -1
  200. package/lib/types/src/utils/distancePointToLine.d.ts.map +0 -1
  201. package/lib/types/src/utils/fitCurve.d.ts.map +0 -1
  202. package/lib/types/src/utils/getAngle.d.ts +0 -2
  203. package/lib/types/src/utils/getAngle.d.ts.map +0 -1
  204. package/lib/types/src/utils/getAngleDiff.d.ts.map +0 -1
  205. package/lib/types/src/utils/getBezierPos.d.ts.map +0 -1
  206. package/lib/types/src/utils/getBezierTan.d.ts.map +0 -1
  207. package/lib/types/src/utils/getCurveLength.d.ts.map +0 -1
  208. package/lib/types/src/utils/getDefaultPoints.d.ts +0 -2
  209. package/lib/types/src/utils/getDefaultPoints.d.ts.map +0 -1
  210. package/lib/types/src/utils/getDistance.d.ts +0 -2
  211. package/lib/types/src/utils/getDistance.d.ts.map +0 -1
  212. package/lib/types/src/utils/getSvgSource.d.ts +0 -2
  213. package/lib/types/src/utils/getSvgSource.d.ts.map +0 -1
  214. package/lib/types/src/utils/mat4.d.ts.map +0 -1
  215. package/lib/types/src/utils/normalizeVec2.d.ts +0 -2
  216. package/lib/types/src/utils/normalizeVec2.d.ts.map +0 -1
  217. package/lib/types/src/utils/resizeArray.d.ts.map +0 -1
  218. package/lib/types/src/utils/vec3.d.ts.map +0 -1
  219. /package/lib/types/{src/WebGPU → WebGPU}/canvasSizeObserver.d.ts +0 -0
  220. /package/lib/types/{src/WebGPU → WebGPU}/getTexture/createCheckedImageData.d.ts +0 -0
  221. /package/lib/types/{src/WebGPU → WebGPU}/getTexture/generateMimapsArray.d.ts +0 -0
  222. /package/lib/types/{src/WebGPU → WebGPU}/m3.d.ts +0 -0
  223. /package/lib/types/{src/getRenderDescriptor.d.ts → getRenderDescriptor.d.ts} +0 -0
  224. /package/lib/types/{src/utils → utils}/atNormIndex.d.ts +0 -0
  225. /package/lib/types/{src/utils → utils}/captureCanvasStream.d.ts +0 -0
  226. /package/lib/types/{src/utils → utils}/captureCanvasStreamWasm.d.ts +0 -0
  227. /package/lib/types/{src/utils → utils}/clamp.d.ts +0 -0
  228. /package/lib/types/{src/utils → utils}/fitCurve.d.ts +0 -0
  229. /package/lib/types/{src/utils → utils}/getAngleDiff.d.ts +0 -0
  230. /package/lib/types/{src/utils → utils}/mat4.d.ts +0 -0
  231. /package/lib/types/{src/utils → utils}/resizeArray.d.ts +0 -0
  232. /package/lib/types/{src/utils → utils}/vec3.d.ts +0 -0
@@ -0,0 +1,16 @@
1
+ import { Point } from 'types';
2
+ /**
3
+ * Get the distance and ratio between two points for radial gradient
4
+ * When shape's boundary has aspect ratio different than 1:1,
5
+ * then scale affect radial gradient angle calculations.
6
+ * Thats why this function exists to eliminate that effect.
7
+ * @param center center of the radius gradient
8
+ * @param vx horizontal radius - distance between center of the gradient and further point on horizontal line(after transforming by angle of radial gradient)
9
+ * @param vy vertical radius - distance between center of the gradient and further point on vertical line(after transforming by angle of radial gradient)
10
+ * @returns The horizontal destination point and the ratio to calculate vertical destination point
11
+ */
12
+ export declare function getCorrectDestinationRatio(center: Point, vx: Point, vy: Point): {
13
+ destination: Point;
14
+ ratio: number;
15
+ };
16
+ //# sourceMappingURL=radialGradient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radialGradient.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/radialGradient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,KAAK,EACb,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,GACR;IACD,WAAW,EAAE,KAAK,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;CACd,CA2DA"}
@@ -0,0 +1,10 @@
1
+ import { ElementNode, Node } from 'svg-parser';
2
+ import { AttrValue } from './definitions';
3
+ import { Color, Point } from 'types';
4
+ export declare function isStraightHandle(p: Point): boolean;
5
+ export declare function parseColor(cssColor: string, overrideAlpha?: number): Color;
6
+ export declare function getNum(x: AttrValue, fallback?: number): number;
7
+ export declare function isElementNode(node: string | Node): node is ElementNode;
8
+ export declare const IDENTITY_MATRIX: number[];
9
+ export declare function parseTransform(str: string | undefined, initialMatrix?: number[]): number[];
10
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/svgToShapes/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIpC,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,WAExC;AAGD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,SAAI,GAAG,KAAK,CAoBrE;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAKjE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,IAAI,WAAW,CAEtE;AAED,eAAO,MAAM,eAAe,UAAqB,CAAA;AAgBjD,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,aAAa,GAAE,MAAM,EAAoB,GACxC,MAAM,EAAE,CAkDV"}
@@ -0,0 +1,30 @@
1
+ import { Asset } from 'types';
2
+ export declare function init(_updateProcessing: (loadingTextures: number) => void): void;
3
+ export interface TextureSource {
4
+ url: string;
5
+ texture?: GPUTexture;
6
+ hash?: string;
7
+ data?: Uint8ClampedArray;
8
+ }
9
+ interface ImageExtractedData {
10
+ width: number;
11
+ height: number;
12
+ isNewTexture?: boolean;
13
+ shapeAssets?: Asset[];
14
+ error?: unknown;
15
+ }
16
+ export declare function add(url: string, onLoad?: (data: ImageExtractedData) => void): number;
17
+ export declare function getTexture(textureId: number): GPUTexture;
18
+ export declare function getTextureSafe(textureId: number): GPUTexture;
19
+ export declare function getOptionTexture(textureId: number): GPUTexture | undefined;
20
+ export declare function createCacheTexture(): number;
21
+ export declare function createComputeDepthTexture(width: number, height: number): number;
22
+ export declare function createSDF(): number;
23
+ export declare function emptySDF(textureId: number, width: number, height: number): void;
24
+ export declare function update(textureId: number, width: number, height: number): void;
25
+ export declare function setCacheTexture(id: number, texture: GPUTexture): void;
26
+ export declare function getTextureCache(id: number, expectWidth: number, expectHeight: number): GPUTexture;
27
+ export declare function getUrl(textureId: number): string;
28
+ export declare function updateTextureUrl(textureId: number, url: string): void;
29
+ export {};
30
+ //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/E;AAED,wBAAgB,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAkB7E;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,QAM9D;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,UAAU,CAwBjG;AAED,wBAAgB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEhD;AA4CD,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAE9D"}
@@ -0,0 +1,166 @@
1
+ export type HTMLInputEvent = Event & {
2
+ target: HTMLInputElement & EventTarget;
3
+ };
4
+ export type Point = {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ export type PointUV = {
9
+ x: number;
10
+ y: number;
11
+ u: number;
12
+ v: number;
13
+ };
14
+ export type BoundingBox = {
15
+ min_x: number;
16
+ min_y: number;
17
+ max_x: number;
18
+ max_y: number;
19
+ };
20
+ export type Color = [number, number, number, number];
21
+ export type Id = [number, number, number, number];
22
+ export type GradientStop = {
23
+ color: Color;
24
+ offset: number;
25
+ };
26
+ export type LinearGradient = {
27
+ start: Point;
28
+ end: Point;
29
+ stops: GradientStop[];
30
+ };
31
+ export type RadialGradient = LinearGradient & {
32
+ radius_ratio: number;
33
+ };
34
+ type Program = {
35
+ code: string;
36
+ id?: number;
37
+ errors?: CustomProgramError[];
38
+ };
39
+ export type Fill = {
40
+ linear: LinearGradient;
41
+ } | {
42
+ radial: RadialGradient;
43
+ } | {
44
+ solid: Color;
45
+ } | {
46
+ program: Program;
47
+ };
48
+ export type Effect = {
49
+ dist_start: number;
50
+ dist_end: number;
51
+ fill: Fill;
52
+ };
53
+ export type BasicProps = {
54
+ blur: Point | null;
55
+ opacity: number;
56
+ };
57
+ export type TypoProps = {
58
+ font_size: number;
59
+ font_family_id: number;
60
+ line_height: number;
61
+ is_sdf_shared: boolean;
62
+ };
63
+ export type Image = {
64
+ id?: number;
65
+ bounds?: PointUV[];
66
+ url: string;
67
+ texture_id?: number;
68
+ };
69
+ export type Shape = {
70
+ id?: number;
71
+ paths: Point[][];
72
+ bounds: PointUV[];
73
+ props: BasicProps;
74
+ effects: Effect[];
75
+ sdf_texture_id?: number;
76
+ cache_texture_id?: number | null;
77
+ };
78
+ export type Text = {
79
+ id?: number;
80
+ content: string;
81
+ bounds: PointUV[];
82
+ props: BasicProps;
83
+ effects: Effect[];
84
+ typo_props: TypoProps;
85
+ sdf_texture_id: number | null;
86
+ };
87
+ export type Asset = Image | Shape | Text;
88
+ export type ProjectSnapshot = {
89
+ width: number;
90
+ height: number;
91
+ assets: Asset[];
92
+ };
93
+ export declare enum CreatorTool {
94
+ SelectAsset = 0,
95
+ DrawBezierCurve = 1,
96
+ SelectNode = 2,
97
+ Text = 3
98
+ }
99
+ export type ZigFill = OneOf<{
100
+ solid: Color;
101
+ linear: LinearGradient;
102
+ radial: RadialGradient;
103
+ program_id: number;
104
+ }>;
105
+ export type ZigEffect = {
106
+ dist_start: number;
107
+ dist_end: number;
108
+ fill: ZigFill;
109
+ };
110
+ type ZigImage = {
111
+ id: number;
112
+ bounds: PointUV[];
113
+ texture_id: number;
114
+ };
115
+ type ZigShape = {
116
+ id: number;
117
+ paths: Point[][];
118
+ bounds: PointUV[];
119
+ props: BasicProps;
120
+ effects: ZigEffect[];
121
+ sdf_texture_id: number;
122
+ cache_texture_id: number | null;
123
+ };
124
+ type ZigText = {
125
+ id: number;
126
+ content: string | null;
127
+ bounds: PointUV[];
128
+ props: BasicProps;
129
+ effects: ZigEffect[];
130
+ typo_props: TypoProps;
131
+ sdf_texture_id: number | null;
132
+ };
133
+ export type ZigAsset = {
134
+ img: ZigImage;
135
+ } | {
136
+ shape: ZigShape;
137
+ } | {
138
+ text: ZigText;
139
+ };
140
+ export type ZigProjectSnapshot = {
141
+ width: number;
142
+ height: number;
143
+ assets: ZigAsset[];
144
+ };
145
+ export type CustomProgramError = {
146
+ length: number;
147
+ lineNum: number;
148
+ linePos: number;
149
+ message: string;
150
+ offset: number;
151
+ };
152
+ export type CreatorAPI = {
153
+ addImages: (urls: string[]) => Promise<void>;
154
+ setSnapshot: (snapshot: ProjectSnapshot, withSnapshot: boolean) => Promise<void>;
155
+ removeAsset: VoidFunction;
156
+ destroy: VoidFunction;
157
+ setTool: (tool: CreatorTool) => void;
158
+ updateAssetTypoProps: (props: TypoProps, commit: boolean) => void;
159
+ updateAssetProps: (props: BasicProps, commit: boolean) => void;
160
+ updateAssetEffects: (effects: Effect[], commit: boolean) => void;
161
+ updateAssetBounds: (bounds: PointUV[], commit: boolean) => void;
162
+ INFINITE_DISTANCE_THRESHOLD: number;
163
+ INFINITE_DISTANCE: number;
164
+ };
165
+ export {};
166
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG;IACnC,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IACpB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,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f,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAChF,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,YAAY,CAAA;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAA;IAEpC,oBAAoB,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IACjE,gBAAgB,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9D,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAChE,iBAAiB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;IAC/D,2BAA2B,EAAE,MAAM,CAAA;IACnC,iBAAiB,EAAE,MAAM,CAAA;CAC1B,CAAA"}
@@ -0,0 +1,7 @@
1
+ export declare function sanitizeContent(text: string | null): string;
2
+ export declare function isEnabled(): boolean;
3
+ export declare function updateContent(text: string): void;
4
+ export declare function updateSelection(start: number, end: number): void;
5
+ export declare function enable(text: string): void;
6
+ export declare function disable(): void;
7
+ //# sourceMappingURL=typing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../../src/typing.ts"],"names":[],"mappings":"AAOA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAG3D;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAmCD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAkBhD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAKhE;AA0BD,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAqBzC;AAED,wBAAgB,OAAO,IAAI,IAAI,CAO9B"}
@@ -0,0 +1,2 @@
1
+ export default function assertUnreachable(x: never): never;
2
+ //# sourceMappingURL=assertUnreachable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertUnreachable.d.ts","sourceRoot":"","sources":["../../../src/utils/assertUnreachable.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAEzD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atNormIndex.d.ts","sourceRoot":"","sources":["../../../src/utils/atNormIndex.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,UAUnE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"captureCanvasStream.d.ts","sourceRoot":"","sources":["../../../src/utils/captureCanvasStream.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,UAAU,EAAE,iBAAiB,cAW5E"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"captureCanvasStreamWasm.d.ts","sourceRoot":"","sources":["../../../src/utils/captureCanvasStreamWasm.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clamp.d.ts","sourceRoot":"","sources":["../../../src/utils/clamp.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,UAEpE"}
@@ -0,0 +1,2 @@
1
+ export default function debounce(callback: Function, ms: number): (...args: unknown[]) => void;
2
+ //# sourceMappingURL=debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../src/utils/debounce.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,IAErD,GAAG,MAAM,OAAO,EAAE,UAM3B"}
@@ -0,0 +1,3 @@
1
+ export default Module;
2
+ declare var Module: any;
3
+ //# sourceMappingURL=decompressWoff2.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"decompressWoff2.d.mts","sourceRoot":"","sources":["../../../src/utils/decompressWoff2.mjs"],"names":[],"mappings":";AAEA,wBAAwD"}
@@ -1,2 +1,3 @@
1
+ import { Point } from 'types';
1
2
  export default function distancePointToLine(p: Point, l1: Point, l2: Point): number;
2
3
  //# sourceMappingURL=distancePointToLine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distancePointToLine.d.ts","sourceRoot":"","sources":["../../../src/utils/distancePointToLine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,UAKzE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fitCurve.d.ts","sourceRoot":"","sources":["../../../src/utils/fitCurve.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AAEH,yCALW,KAAK,CAAC,KAAK,QAAQ,CAAC,qBAElB,KAAK,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,CAAC,CAmBvC"}
@@ -0,0 +1,3 @@
1
+ import { Point } from 'types';
2
+ export default function getAngle(from: Point, to: Point): number;
3
+ //# sourceMappingURL=getAngle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAngle.d.ts","sourceRoot":"","sources":["../../../src/utils/getAngle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,UAEtD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAngleDiff.d.ts","sourceRoot":"","sources":["../../../src/utils/getAngleDiff.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAMxE"}
@@ -1,2 +1,3 @@
1
+ import { Point } from 'types';
1
2
  export default function getBezierPos(p1: Point, p2: Point, p3: Point, p4: Point, t: number): Point;
2
3
  //# sourceMappingURL=getBezierPos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBezierPos.d.ts","sourceRoot":"","sources":["../../../src/utils/getBezierPos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CAkBjG"}
@@ -1,2 +1,3 @@
1
+ import { Point } from 'types';
1
2
  export default function getBezierTan(p1: Point, p2: Point, p3: Point, p4: Point, t: number): Point;
2
3
  //# sourceMappingURL=getBezierTan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBezierTan.d.ts","sourceRoot":"","sources":["../../../src/utils/getBezierTan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAG7B,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,GAAG,KAAK,CASjG"}
@@ -1,2 +1,3 @@
1
+ import { Point } from 'types';
1
2
  export default function getCurveLength(p1: Point, p2: Point, p3: Point, p4: Point, precision: number): number[];
2
3
  //# sourceMappingURL=getCurveLength.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getCurveLength.d.ts","sourceRoot":"","sources":["../../../src/utils/getCurveLength.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAO7B,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,EACT,EAAE,EAAE,KAAK,EACT,SAAS,EAAE,MAAM,GAChB,MAAM,EAAE,CAYV"}
@@ -0,0 +1,3 @@
1
+ import { PointUV } from 'types';
2
+ export default function getDefaultPoints(texWidth: number, texHeight: number, projectWidth: number, projectHeight: number): PointUV[];
3
+ //# sourceMappingURL=getDefaultPoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDefaultPoints.d.ts","sourceRoot":"","sources":["../../../src/utils/getDefaultPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,GACpB,OAAO,EAAE,CAUX"}
@@ -0,0 +1,3 @@
1
+ import { Point } from 'types';
2
+ export default function getDistance(p1: Point, p2: Point): number;
3
+ //# sourceMappingURL=getDistance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDistance.d.ts","sourceRoot":"","sources":["../../../src/utils/getDistance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,UAEvD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mat4.d.ts","sourceRoot":"","sources":["../../../src/utils/mat4.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,IAAI;sBACU,MAAM,UAAU,MAAM,SAAS,MAAM,OAAO,YAAY;uCAKvC,MAAM,UAAU,MAAM,SAAS,MAAM,QAAQ,MAAM;gBA2B1E,MAAM,SAAS,MAAM,UAAU,MAAM,OAAO,MAAM,QAAQ,MAAM,OAAO,MAAM;;gBAgC7E,YAAY,KAAK,YAAY;mBAyD1B,MAAM,EAAE,GAAG,YAAY,UAAU,MAAM,EAAE,MAAM,MAAM,EAAE;eAa3D,YAAY;iBAwFV,YAAY;aAShB,YAAY,GAAG,MAAM,EAAE,UAAU,MAAM,EAAE,MAAM,MAAM,EAAE;gBAapD,MAAM,EAAE,GAAG,YAAY,UAAU,MAAM,EAAE,MAAM,MAAM,EAAE,QAAQ,YAAY;8BAI7D,MAAM,EAAE;8BAQR,MAAM;8BAUN,MAAM;8BAUN,MAAM;0BAUV,MAAM,EAAE;iBAQjB,YAAY,eAAe,MAAM,EAAE,QAAQ,YAAY;eAIzD,YAAY,kBAAkB,MAAM,QAAQ,YAAY;eAIxD,YAAY,kBAAkB,MAAM,QAAQ,YAAY;eAIxD,YAAY,kBAAkB,MAAM,QAAQ,YAAY;aAI1D,YAAY,SAAS,MAAM,EAAE,QAAQ,YAAY;CAG3D,CAAA;AAED,eAAe,IAAI,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { Point } from 'types';
2
+ export default function normalizeVec2(vec: Point): Point;
3
+ //# sourceMappingURL=normalizeVec2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeVec2.d.ts","sourceRoot":"","sources":["../../../src/utils/normalizeVec2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,GAAG,EAAE,KAAK,GAAG,KAAK,CAMvD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizeArray.d.ts","sourceRoot":"","sources":["../../../src/utils/resizeArray.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,YASnE"}
@@ -0,0 +1,2 @@
1
+ export default function setCamera(projectWidth: number, projectHeight: number, mode: 'fit' | 'fill', canvas: HTMLCanvasElement, padding?: number): void;
2
+ //# sourceMappingURL=setCamera.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setCamera.d.ts","sourceRoot":"","sources":["../../../src/utils/setCamera.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,KAAK,GAAG,MAAM,EACpB,MAAM,EAAE,iBAAiB,EACzB,OAAO,SAAI,QAWZ"}
@@ -0,0 +1,2 @@
1
+ export default function throttle<T extends (...args: never[]) => void>(func: T, limit: number): (...args: Parameters<T>) => void;
2
+ //# sourceMappingURL=throttle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["../../../src/utils/throttle.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,EACnE,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAmBlC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vec3.d.ts","sourceRoot":"","sources":["../../../src/utils/vec3.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;aACC,MAAM,EAAE,GAAG,YAAY,KAAK,MAAM,EAAE,GAAG,YAAY;gBAYhD,MAAM,EAAE,GAAG,YAAY,KAAK,MAAM,EAAE,GAAG,YAAY;iBAQjD,MAAM,EAAE,GAAG,YAAY;CAetC,CAAA;AAED,eAAe,IAAI,CAAA"}
package/lib/types.mjs ADDED
@@ -0,0 +1,2 @@
1
+ var e,r={d:(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r)},t={};r.d(t,{b:()=>e}),function(e){e[e.SelectAsset=0]="SelectAsset",e[e.DrawBezierCurve=1]="DrawBezierCurve",e[e.SelectNode=2]="SelectNode",e[e.Text=3]="Text"}(e||(e={}));var o=t.b;export{o as CreatorTool};
2
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","mappings":"AACA,IC6GYA,ED7GRC,EAAsB,CEA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,sBF8GlF,SAAYX,GACV,iCACA,yCACA,+BACA,kBACD,CALD,CAAYA,IAAAA,EAAW,K","sources":["webpack://@mateuszjs/magic-render/webpack/bootstrap","webpack://@mateuszjs/magic-render/./src/types.ts","webpack://@mateuszjs/magic-render/webpack/runtime/define property getters","webpack://@mateuszjs/magic-render/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","export type HTMLInputEvent = Event & {\n target: HTMLInputElement & EventTarget\n}\n\nexport type Point = {\n x: number\n y: number\n}\n\nexport type PointUV = {\n x: number\n y: number\n u: number\n v: number\n}\n\nexport type BoundingBox = {\n min_x: number\n min_y: number\n max_x: number\n max_y: number\n}\n\nexport type Color = [number, number, number, number]\nexport type Id = [number, number, number, number]\n\nexport type GradientStop = {\n color: Color\n offset: number // 0..1\n}\n\nexport type LinearGradient = {\n start: Point\n end: Point\n stops: GradientStop[]\n}\n\nexport type RadialGradient = LinearGradient & {\n radius_ratio: number\n}\n\ntype Program = {\n code: string\n id?: number\n errors?: CustomProgramError[]\n}\n\nexport type Fill =\n | { linear: LinearGradient }\n | { radial: RadialGradient }\n | { solid: Color }\n | { program: Program }\n\nexport type Effect = {\n dist_start: number\n dist_end: number\n fill: Fill\n}\n\n// Same for Zig and Api\nexport type BasicProps = {\n blur: Point | null\n opacity: number\n}\n\n// Same for Zig and API\nexport type TypoProps = {\n font_size: number\n font_family_id: number\n line_height: number\n is_sdf_shared: boolean\n}\n\n/* type WITHOUT prefix \"Zig\" are used in API */\n\nexport type Image = {\n id?: number // not needed while loading project but useful for undo/redo to maintain selection\n bounds?: PointUV[]\n url: string\n texture_id?: number\n}\n\nexport type Shape = {\n id?: number // not needed while loading project but useful for undo/redo to maintain selection\n paths: Point[][]\n bounds: PointUV[]\n props: BasicProps\n effects: Effect[]\n sdf_texture_id?: number\n cache_texture_id?: number | null\n}\n\nexport type Text = {\n id?: number // not needed while loading project but useful for undo/redo to maintain selection\n content: string\n bounds: PointUV[]\n props: BasicProps\n effects: Effect[]\n typo_props: TypoProps\n sdf_texture_id: number | null\n}\n\nexport type Asset = Image | Shape | Text\n\nexport type ProjectSnapshot = {\n width: number\n height: number\n assets: Asset[]\n}\n\nexport enum CreatorTool {\n SelectAsset = 0,\n DrawBezierCurve = 1,\n SelectNode = 2,\n Text = 3,\n}\n\n/* type with prefix \"Zig\" mirrors the data coming from/to the zig module */\n\nexport type ZigFill = OneOf<{\n solid: Color\n linear: LinearGradient\n radial: RadialGradient\n program_id: number\n}>\n\nexport type ZigEffect = {\n dist_start: number\n dist_end: number\n fill: ZigFill\n}\n\ntype ZigImage = {\n id: number\n bounds: PointUV[]\n texture_id: number\n}\n\ntype ZigShape = {\n id: number\n paths: Point[][]\n bounds: PointUV[]\n props: BasicProps\n effects: ZigEffect[]\n sdf_texture_id: number\n cache_texture_id: number | null\n}\n\ntype ZigText = {\n id: number\n content: string | null\n bounds: PointUV[]\n props: BasicProps\n effects: ZigEffect[]\n typo_props: TypoProps\n sdf_texture_id: number | null\n}\n\nexport type ZigAsset = { img: ZigImage } | { shape: ZigShape } | { text: ZigText }\n\nexport type ZigProjectSnapshot = {\n width: number\n height: number\n assets: ZigAsset[]\n}\n\nexport type CustomProgramError = {\n length: number\n lineNum: number\n linePos: number\n message: string\n offset: number\n}\n\nexport type CreatorAPI = {\n addImages: (urls: string[]) => Promise<void>\n setSnapshot: (snapshot: ProjectSnapshot, withSnapshot: boolean) => Promise<void>\n removeAsset: VoidFunction\n destroy: VoidFunction\n setTool: (tool: CreatorTool) => void\n // we need to obtain live update!\n updateAssetTypoProps: (props: TypoProps, commit: boolean) => void // updates typography properties of selected asset\n updateAssetProps: (props: BasicProps, commit: boolean) => void // updates basic properties of selected asset\n updateAssetEffects: (effects: Effect[], commit: boolean) => void // updates only effects of selected asset\n updateAssetBounds: (bounds: PointUV[], commit: boolean) => void // updates bounds of selected asset\n INFINITE_DISTANCE_THRESHOLD: number // threshold value for considering a distance as \"infinite\" in SDF fill effects\n INFINITE_DISTANCE: number // maximum f32 value, used for SDF fill effects\n}\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))"],"names":["CreatorTool","__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@mateuszjs/magic-render",
3
3
  "description": "Initial version of visual editor",
4
- "version": "0.1.0-next.6",
4
+ "version": "0.1.0-next.64",
5
5
  "author": "Mateusz Walendzik",
6
6
  "engines": {
7
- "node": ">=20.8.1"
7
+ "node": "^22.14.0 || >=24.10.0"
8
8
  },
9
+ "sideEffects": false,
9
10
  "publishConfig": {
10
11
  "access": "public",
11
12
  "provenance": true
@@ -21,11 +22,10 @@
21
22
  },
22
23
  "scripts": {
23
24
  "start": "export NODE_ENV=development && webpack serve --mode development",
24
- "build": "npm run generate-msdf && rm -rf lib lib-test && export NODE_ENV=production && webpack && tsc --project tsconfig.build.json --emitDeclarationOnly ",
25
+ "build": "rm -rf lib lib-test && export NODE_ENV=production && tsc --project tsconfig.build.json --emitDeclarationOnly && webpack",
25
26
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
26
27
  "test-e2e": "npx playwright test",
27
- "format": "eslint --fix \"src/**/*.{ts,js}\" \"integration-tests/**/*.{ts,js}\"",
28
- "generate-msdf": "node msdf/generate-msdf.js"
28
+ "format": "eslint --fix \"src/**/*.{ts,js}\" \"integration-tests/**/*.{ts,js}\""
29
29
  },
30
30
  "devDependencies": {
31
31
  "@eslint/eslintrc": "^3.3.1",
@@ -33,17 +33,20 @@
33
33
  "@playwright/test": "^1.50.1",
34
34
  "@stylistic/eslint-plugin-js": "^4.2.0",
35
35
  "@tsconfig/recommended": "^1.0.8",
36
+ "@types/fontkit": "^2.0.8",
36
37
  "@types/jest": "^29.5.14",
37
38
  "@types/node": "^22.13.9",
38
- "@webgpu/types": "^0.1.54",
39
+ "@types/opentype.js": "^1.3.8",
40
+ "@types/paper": "^0.11.14",
41
+ "@types/svg-parser": "^2.0.6",
42
+ "@types/wawoff2": "^1.0.2",
43
+ "@webgpu/types": "^0.1.65",
39
44
  "eslint": "^9.28.0",
40
45
  "html-webpack-plugin": "^5.6.3",
46
+ "http-server": "^14.1.1",
41
47
  "jest": "^29.7.0",
42
48
  "jest-environment-jsdom": "^29.7.0",
43
- "msdf-bmfont-xml": "^2.7.0",
44
- "semantic-release": "^24.2.3",
45
- "svg2ttf": "^6.0.3",
46
- "svgicons2svgfont": "^15.0.1",
49
+ "semantic-release": "^25.0.3",
47
50
  "ts-jest": "^29.2.6",
48
51
  "ts-loader": "^9.5.2",
49
52
  "ts-node": "^10.9.2",
@@ -53,10 +56,21 @@
53
56
  "webpack-bundle-analyzer": "^4.10.2",
54
57
  "webpack-cli": "^6.0.1",
55
58
  "webpack-dev-server": "^5.2.0",
56
- "zigar-loader": "^0.14.0"
59
+ "zigar-loader": "^0.14.1"
60
+ },
61
+ "exports": {
62
+ "./package.json": "./package.json",
63
+ ".": {
64
+ "types": "./lib/types/index.d.ts",
65
+ "import": "./lib/index.mjs",
66
+ "require": "./lib/index.mjs"
67
+ },
68
+ "./types": {
69
+ "types": "./lib/types/types.d.ts",
70
+ "import": "./lib/types.mjs",
71
+ "require": "./lib/types.mjs"
72
+ }
57
73
  },
58
- "types": "./lib/types/index.d.ts",
59
- "main": "./lib/index.mjs",
60
74
  "type": "module",
61
75
  "repository": {
62
76
  "type": "git",
@@ -69,5 +83,10 @@
69
83
  "homepage": "https://github.com/mateuszJS/magic-render#readme",
70
84
  "files": [
71
85
  "lib/**/*"
72
- ]
86
+ ],
87
+ "dependencies": {
88
+ "opentype.js": "^1.3.4",
89
+ "paper": "^0.12.18",
90
+ "svg-parser": "^2.0.4"
91
+ }
73
92
  }
Binary file
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvasSizeObserver.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/canvasSizeObserver.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,EAAE,YAAY,QAgBvB"}
@@ -1,2 +0,0 @@
1
- export default function getDevice(): Promise<GPUDevice>;
2
- //# sourceMappingURL=getDevice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDevice.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/getDevice.ts"],"names":[],"mappings":"AAAA,wBAA8B,SAAS,uBAuBtC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"createCheckedImageData.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/getTexture/createCheckedImageData.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAwBrF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generateMimapsArray.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/getTexture/generateMimapsArray.ts"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACtB,cAAc,EAAE,oBAAoB,CAAC;IACrC,eAAe,EAAE,CAAC,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,EACnB,cAAc,EAAE,cAAc,QAuH/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/WebGPU/getTexture/index.ts"],"names":[],"mappings":"AAGA,UAAU,OAAO;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,KAAK,aAAa,GAChB,WAAW,GACX,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,CAAC;AAOlB,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,0BAA0B,CAAA;IAClC,WAAW,EAAE,OAAO,CAAA;CACrB;AAgCD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAUlG;AAGD,wBAAgB,WAAW,CACzB,MAAM,EAAE,SAAS,EACjB,aAAa,EAAE,UAAU,EACzB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,OAAY,QA0BtB;AAGD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAE,OAAY,cAWtG;AAiBD,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,wBAIhD;AAED,wBAAsB,sBAAsB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,uBAG5F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"m3.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/m3.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,IAAI;gBACI,YAAY;sBAON,MAAM,UAAU,MAAM;;gBAe5B,YAAY,KAAK,YAAY;0BAmCnB,CAAC,MAAM,EAAE,MAAM,CAAC;6BAOb,MAAM;sBAUb,CAAC,MAAM,EAAE,MAAM,CAAC;iBAOrB,YAAY,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;cAI9C,YAAY,kBAAkB,MAAM;aAIrC,YAAY,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;CAG/C,CAAA;AAED,eAAe,IAAI,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pick.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/pick.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,OAAO,CAAC,UAAU,CAAW;IAC7B,OAAO,CAAC,WAAW,CAAY;IAC/B,OAAO,CAAC,gBAAgB,CAAY;IACpC,OAAO,CAAC,kBAAkB,CAAO;gBAErB,MAAM,EAAE,SAAS;IAmB7B;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,iBAAiB,GAAG;QAAE,IAAI,EAAE,oBAAoB,CAAC;QAAC,GAAG,EAAE,YAAY,CAAA;KAAE;IAkD3F,YAAY,CAAC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY;IAkB5D,SAAS;CAsBhB"}
@@ -1,7 +0,0 @@
1
- export declare const pointer: {
2
- x: number;
3
- y: number;
4
- downCallback: VoidFunction | null;
5
- };
6
- export default function initMouseController(canvas: HTMLCanvasElement): void;
7
- //# sourceMappingURL=pointer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../../../src/WebGPU/pointer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO;;;kBAGI,YAAY,GAAG,IAAI;CAC1C,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,MAAM,EAAE,iBAAiB,QA+BpE"}
@@ -1,2 +0,0 @@
1
- export default function getProgram(device: GPUDevice): (texture: GPUTexture, commandEncoder: GPUCommandEncoder) => GPUTexture;
2
- //# sourceMappingURL=getProgram.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/blur/getProgram.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,IAehD,SAAS,UAAU,EACnB,gBAAgB,iBAAiB,KAChC,UAAU,CA2Kd"}
@@ -1,2 +0,0 @@
1
- export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder, worldProjectionMatrix: Float32Array, vertexData: Float32Array) => void;
2
- //# sourceMappingURL=getProgram.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/draw/getProgram.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IA6CtF,MAAM,oBAAoB,EAC1B,uBAAuB,YAAY,EACnC,YAAY,YAAY,UA0B3B"}
@@ -1,2 +0,0 @@
1
- export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder, matrix: Float32Array, vertexData: Float32Array, indexData: Uint32Array) => void;
2
- //# sourceMappingURL=getProgram.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/draw3dModel/getProgram.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IAwCtF,MAAM,oBAAoB,EAC1B,QAAQ,YAAY,EACpB,YAAY,YAAY,EACxB,WAAW,WAAW,UAmDzB"}
@@ -1,9 +0,0 @@
1
- interface Uniforms {
2
- worldViewProjection: Float32Array;
3
- normalMatrix: Float32Array;
4
- lightColor: Float32Array;
5
- lightDirection: Float32Array;
6
- }
7
- export default function getProgram(device: GPUDevice, presentationFormat: GPUTextureFormat): (pass: GPURenderPassEncoder, uniform: Uniforms, vertexData: Float32Array, indexData: Uint32Array) => void;
8
- export {};
9
- //# sourceMappingURL=getProgram.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getProgram.d.ts","sourceRoot":"","sources":["../../../../../../src/WebGPU/programs/draw3dModelLight/getProgram.ts"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,mBAAmB,EAAE,YAAY,CAAC;IAClC,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,YAAY,CAAC;IACzB,cAAc,EAAE,YAAY,CAAA;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,gBAAgB,IAyCtF,MAAM,oBAAoB,EAC1B,SAAS,QAAQ,EACjB,YAAY,YAAY,EACxB,WAAW,WAAW,UAqEzB"}