@asyra/preset 0.5.0

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 (279) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +14 -0
  3. package/dist/catalog.d.ts +3 -0
  4. package/dist/catalog.d.ts.map +1 -0
  5. package/dist/catalog.js +61 -0
  6. package/dist/catalog.js.map +1 -0
  7. package/dist/cleanup-reporter.d.ts +6 -0
  8. package/dist/cleanup-reporter.d.ts.map +1 -0
  9. package/dist/cleanup-reporter.js +14 -0
  10. package/dist/cleanup-reporter.js.map +1 -0
  11. package/dist/components/fills.d.ts +28 -0
  12. package/dist/components/fills.d.ts.map +1 -0
  13. package/dist/components/fills.js +180 -0
  14. package/dist/components/fills.js.map +1 -0
  15. package/dist/components/frame.d.ts +4 -0
  16. package/dist/components/frame.d.ts.map +1 -0
  17. package/dist/components/frame.js +44 -0
  18. package/dist/components/frame.js.map +1 -0
  19. package/dist/components/group.d.ts +72 -0
  20. package/dist/components/group.d.ts.map +1 -0
  21. package/dist/components/group.js +491 -0
  22. package/dist/components/group.js.map +1 -0
  23. package/dist/components/index.d.ts +24 -0
  24. package/dist/components/index.d.ts.map +1 -0
  25. package/dist/components/index.js +65 -0
  26. package/dist/components/index.js.map +1 -0
  27. package/dist/components/oval.d.ts +4 -0
  28. package/dist/components/oval.d.ts.map +1 -0
  29. package/dist/components/oval.js +56 -0
  30. package/dist/components/oval.js.map +1 -0
  31. package/dist/components/rectangle.d.ts +4 -0
  32. package/dist/components/rectangle.d.ts.map +1 -0
  33. package/dist/components/rectangle.js +54 -0
  34. package/dist/components/rectangle.js.map +1 -0
  35. package/dist/components/shape-hit-area.d.ts +8 -0
  36. package/dist/components/shape-hit-area.d.ts.map +1 -0
  37. package/dist/components/shape-hit-area.js +30 -0
  38. package/dist/components/shape-hit-area.js.map +1 -0
  39. package/dist/components/stroke-defaults.d.ts +5 -0
  40. package/dist/components/stroke-defaults.d.ts.map +1 -0
  41. package/dist/components/stroke-defaults.js +4 -0
  42. package/dist/components/stroke-defaults.js.map +1 -0
  43. package/dist/components/vector.d.ts +7 -0
  44. package/dist/components/vector.d.ts.map +1 -0
  45. package/dist/components/vector.js +961 -0
  46. package/dist/components/vector.js.map +1 -0
  47. package/dist/composition/error.d.ts +16 -0
  48. package/dist/composition/error.d.ts.map +1 -0
  49. package/dist/composition/error.js +12 -0
  50. package/dist/composition/error.js.map +1 -0
  51. package/dist/composition/profile-provider.d.ts +7 -0
  52. package/dist/composition/profile-provider.d.ts.map +1 -0
  53. package/dist/composition/profile-provider.js +24 -0
  54. package/dist/composition/profile-provider.js.map +1 -0
  55. package/dist/composition/resolve.d.ts +11 -0
  56. package/dist/composition/resolve.d.ts.map +1 -0
  57. package/dist/composition/resolve.js +96 -0
  58. package/dist/composition/resolve.js.map +1 -0
  59. package/dist/composition/result.d.ts +3 -0
  60. package/dist/composition/result.d.ts.map +1 -0
  61. package/dist/composition/result.js +7 -0
  62. package/dist/composition/result.js.map +1 -0
  63. package/dist/constants.d.ts +30 -0
  64. package/dist/constants.d.ts.map +1 -0
  65. package/dist/constants.js +30 -0
  66. package/dist/constants.js.map +1 -0
  67. package/dist/defaults/install.d.ts +16 -0
  68. package/dist/defaults/install.d.ts.map +1 -0
  69. package/dist/defaults/install.js +51 -0
  70. package/dist/defaults/install.js.map +1 -0
  71. package/dist/defaults/installation.d.ts +14 -0
  72. package/dist/defaults/installation.d.ts.map +1 -0
  73. package/dist/defaults/installation.js +85 -0
  74. package/dist/defaults/installation.js.map +1 -0
  75. package/dist/defaults/modules/basic-shapes.d.ts +3 -0
  76. package/dist/defaults/modules/basic-shapes.d.ts.map +1 -0
  77. package/dist/defaults/modules/basic-shapes.js +9 -0
  78. package/dist/defaults/modules/basic-shapes.js.map +1 -0
  79. package/dist/defaults/modules/containers.d.ts +3 -0
  80. package/dist/defaults/modules/containers.d.ts.map +1 -0
  81. package/dist/defaults/modules/containers.js +9 -0
  82. package/dist/defaults/modules/containers.js.map +1 -0
  83. package/dist/defaults/modules/input.d.ts +3 -0
  84. package/dist/defaults/modules/input.d.ts.map +1 -0
  85. package/dist/defaults/modules/input.js +7 -0
  86. package/dist/defaults/modules/input.js.map +1 -0
  87. package/dist/defaults/modules/selection.d.ts +3 -0
  88. package/dist/defaults/modules/selection.d.ts.map +1 -0
  89. package/dist/defaults/modules/selection.js +20 -0
  90. package/dist/defaults/modules/selection.js.map +1 -0
  91. package/dist/defaults/modules/ui-context.d.ts +3 -0
  92. package/dist/defaults/modules/ui-context.d.ts.map +1 -0
  93. package/dist/defaults/modules/ui-context.js +9 -0
  94. package/dist/defaults/modules/ui-context.js.map +1 -0
  95. package/dist/defaults/modules/vector-editing.d.ts +3 -0
  96. package/dist/defaults/modules/vector-editing.d.ts.map +1 -0
  97. package/dist/defaults/modules/vector-editing.js +22 -0
  98. package/dist/defaults/modules/vector-editing.js.map +1 -0
  99. package/dist/defaults/modules/vector.d.ts +3 -0
  100. package/dist/defaults/modules/vector.d.ts.map +1 -0
  101. package/dist/defaults/modules/vector.js +9 -0
  102. package/dist/defaults/modules/vector.js.map +1 -0
  103. package/dist/defaults/modules/viewport.d.ts +3 -0
  104. package/dist/defaults/modules/viewport.d.ts.map +1 -0
  105. package/dist/defaults/modules/viewport.js +7 -0
  106. package/dist/defaults/modules/viewport.js.map +1 -0
  107. package/dist/defaults/owned-state.d.ts +3 -0
  108. package/dist/defaults/owned-state.d.ts.map +1 -0
  109. package/dist/defaults/owned-state.js +72 -0
  110. package/dist/defaults/owned-state.js.map +1 -0
  111. package/dist/defaults/private-manager.d.ts +3 -0
  112. package/dist/defaults/private-manager.d.ts.map +1 -0
  113. package/dist/defaults/private-manager.js +15 -0
  114. package/dist/defaults/private-manager.js.map +1 -0
  115. package/dist/defaults/types.d.ts +12 -0
  116. package/dist/defaults/types.d.ts.map +1 -0
  117. package/dist/defaults/types.js +2 -0
  118. package/dist/defaults/types.js.map +1 -0
  119. package/dist/events/index.d.ts +3 -0
  120. package/dist/events/index.d.ts.map +1 -0
  121. package/dist/events/index.js +3 -0
  122. package/dist/events/index.js.map +1 -0
  123. package/dist/events/input-events.d.ts +19 -0
  124. package/dist/events/input-events.d.ts.map +1 -0
  125. package/dist/events/input-events.js +18 -0
  126. package/dist/events/input-events.js.map +1 -0
  127. package/dist/events/preset-event-names.d.ts +136 -0
  128. package/dist/events/preset-event-names.d.ts.map +1 -0
  129. package/dist/events/preset-event-names.js +18 -0
  130. package/dist/events/preset-event-names.js.map +1 -0
  131. package/dist/events/register-events.d.ts +4 -0
  132. package/dist/events/register-events.d.ts.map +1 -0
  133. package/dist/events/register-events.js +30 -0
  134. package/dist/events/register-events.js.map +1 -0
  135. package/dist/index.d.ts +15 -0
  136. package/dist/index.d.ts.map +1 -0
  137. package/dist/index.js +13 -0
  138. package/dist/index.js.map +1 -0
  139. package/dist/preset.d.ts +3 -0
  140. package/dist/preset.d.ts.map +1 -0
  141. package/dist/preset.js +86 -0
  142. package/dist/preset.js.map +1 -0
  143. package/dist/props/components/anchor-point-component.d.ts +3 -0
  144. package/dist/props/components/anchor-point-component.d.ts.map +1 -0
  145. package/dist/props/components/anchor-point-component.js +6 -0
  146. package/dist/props/components/anchor-point-component.js.map +1 -0
  147. package/dist/props/components/anchor-points-component.d.ts +3 -0
  148. package/dist/props/components/anchor-points-component.d.ts.map +1 -0
  149. package/dist/props/components/anchor-points-component.js +43 -0
  150. package/dist/props/components/anchor-points-component.js.map +1 -0
  151. package/dist/props/components/children-map-property-component.d.ts +15 -0
  152. package/dist/props/components/children-map-property-component.d.ts.map +1 -0
  153. package/dist/props/components/children-map-property-component.js +205 -0
  154. package/dist/props/components/children-map-property-component.js.map +1 -0
  155. package/dist/props/components/custom-component.d.ts +3 -0
  156. package/dist/props/components/custom-component.d.ts.map +1 -0
  157. package/dist/props/components/custom-component.js +6 -0
  158. package/dist/props/components/custom-component.js.map +1 -0
  159. package/dist/props/components/dimension-component.d.ts +3 -0
  160. package/dist/props/components/dimension-component.d.ts.map +1 -0
  161. package/dist/props/components/dimension-component.js +6 -0
  162. package/dist/props/components/dimension-component.js.map +1 -0
  163. package/dist/props/components/fill-component.d.ts +3 -0
  164. package/dist/props/components/fill-component.d.ts.map +1 -0
  165. package/dist/props/components/fill-component.js +25 -0
  166. package/dist/props/components/fill-component.js.map +1 -0
  167. package/dist/props/components/fills-component.d.ts +3 -0
  168. package/dist/props/components/fills-component.d.ts.map +1 -0
  169. package/dist/props/components/fills-component.js +33 -0
  170. package/dist/props/components/fills-component.js.map +1 -0
  171. package/dist/props/components/index.d.ts +7 -0
  172. package/dist/props/components/index.d.ts.map +1 -0
  173. package/dist/props/components/index.js +51 -0
  174. package/dist/props/components/index.js.map +1 -0
  175. package/dist/props/components/number-value.d.ts +2 -0
  176. package/dist/props/components/number-value.d.ts.map +1 -0
  177. package/dist/props/components/number-value.js +2 -0
  178. package/dist/props/components/number-value.js.map +1 -0
  179. package/dist/props/components/position-component.d.ts +3 -0
  180. package/dist/props/components/position-component.d.ts.map +1 -0
  181. package/dist/props/components/position-component.js +6 -0
  182. package/dist/props/components/position-component.js.map +1 -0
  183. package/dist/props/components/stroke-component.d.ts +3 -0
  184. package/dist/props/components/stroke-component.d.ts.map +1 -0
  185. package/dist/props/components/stroke-component.js +29 -0
  186. package/dist/props/components/stroke-component.js.map +1 -0
  187. package/dist/props/components/strokes-component.d.ts +3 -0
  188. package/dist/props/components/strokes-component.d.ts.map +1 -0
  189. package/dist/props/components/strokes-component.js +44 -0
  190. package/dist/props/components/strokes-component.js.map +1 -0
  191. package/dist/props/components/vector-network-component.d.ts +3 -0
  192. package/dist/props/components/vector-network-component.d.ts.map +1 -0
  193. package/dist/props/components/vector-network-component.js +10 -0
  194. package/dist/props/components/vector-network-component.js.map +1 -0
  195. package/dist/props/components/vector-networks-component.d.ts +2 -0
  196. package/dist/props/components/vector-networks-component.d.ts.map +1 -0
  197. package/dist/props/components/vector-networks-component.js +28 -0
  198. package/dist/props/components/vector-networks-component.js.map +1 -0
  199. package/dist/props/components/vector-point-component.d.ts +3 -0
  200. package/dist/props/components/vector-point-component.d.ts.map +1 -0
  201. package/dist/props/components/vector-point-component.js +15 -0
  202. package/dist/props/components/vector-point-component.js.map +1 -0
  203. package/dist/props/components/vector-points-component.d.ts +2 -0
  204. package/dist/props/components/vector-points-component.d.ts.map +1 -0
  205. package/dist/props/components/vector-points-component.js +66 -0
  206. package/dist/props/components/vector-points-component.js.map +1 -0
  207. package/dist/props/components/vector-segment-component.d.ts +3 -0
  208. package/dist/props/components/vector-segment-component.d.ts.map +1 -0
  209. package/dist/props/components/vector-segment-component.js +11 -0
  210. package/dist/props/components/vector-segment-component.js.map +1 -0
  211. package/dist/props/components/vector-segments-component.d.ts +2 -0
  212. package/dist/props/components/vector-segments-component.d.ts.map +1 -0
  213. package/dist/props/components/vector-segments-component.js +25 -0
  214. package/dist/props/components/vector-segments-component.js.map +1 -0
  215. package/dist/props/register-property-schemas.d.ts +7 -0
  216. package/dist/props/register-property-schemas.d.ts.map +1 -0
  217. package/dist/props/register-property-schemas.js +475 -0
  218. package/dist/props/register-property-schemas.js.map +1 -0
  219. package/dist/registration.d.ts +6 -0
  220. package/dist/registration.d.ts.map +1 -0
  221. package/dist/registration.js +15 -0
  222. package/dist/registration.js.map +1 -0
  223. package/dist/render-layers/index.d.ts +3 -0
  224. package/dist/render-layers/index.d.ts.map +1 -0
  225. package/dist/render-layers/index.js +3 -0
  226. package/dist/render-layers/index.js.map +1 -0
  227. package/dist/render-layers/selection-overlay-render-layer.d.ts +15 -0
  228. package/dist/render-layers/selection-overlay-render-layer.d.ts.map +1 -0
  229. package/dist/render-layers/selection-overlay-render-layer.js +393 -0
  230. package/dist/render-layers/selection-overlay-render-layer.js.map +1 -0
  231. package/dist/render-layers/vector-path-editing-render-layer.d.ts +31 -0
  232. package/dist/render-layers/vector-path-editing-render-layer.d.ts.map +1 -0
  233. package/dist/render-layers/vector-path-editing-render-layer.js +815 -0
  234. package/dist/render-layers/vector-path-editing-render-layer.js.map +1 -0
  235. package/dist/selection/channels.d.ts +23 -0
  236. package/dist/selection/channels.d.ts.map +1 -0
  237. package/dist/selection/channels.js +25 -0
  238. package/dist/selection/channels.js.map +1 -0
  239. package/dist/selection/ids.d.ts +8 -0
  240. package/dist/selection/ids.d.ts.map +1 -0
  241. package/dist/selection/ids.js +49 -0
  242. package/dist/selection/ids.js.map +1 -0
  243. package/dist/selection/register-default-selections.d.ts +6 -0
  244. package/dist/selection/register-default-selections.d.ts.map +1 -0
  245. package/dist/selection/register-default-selections.js +52 -0
  246. package/dist/selection/register-default-selections.js.map +1 -0
  247. package/dist/subscriptions/data-channel.d.ts +12 -0
  248. package/dist/subscriptions/data-channel.d.ts.map +1 -0
  249. package/dist/subscriptions/data-channel.js +1366 -0
  250. package/dist/subscriptions/data-channel.js.map +1 -0
  251. package/dist/subscriptions/index.d.ts +4 -0
  252. package/dist/subscriptions/index.d.ts.map +1 -0
  253. package/dist/subscriptions/index.js +4 -0
  254. package/dist/subscriptions/index.js.map +1 -0
  255. package/dist/subscriptions/render-system.d.ts +3 -0
  256. package/dist/subscriptions/render-system.d.ts.map +1 -0
  257. package/dist/subscriptions/render-system.js +41 -0
  258. package/dist/subscriptions/render-system.js.map +1 -0
  259. package/dist/subscriptions/shared-channels.d.ts +7 -0
  260. package/dist/subscriptions/shared-channels.d.ts.map +1 -0
  261. package/dist/subscriptions/shared-channels.js +67 -0
  262. package/dist/subscriptions/shared-channels.js.map +1 -0
  263. package/dist/system-property-keys.d.ts +69 -0
  264. package/dist/system-property-keys.d.ts.map +1 -0
  265. package/dist/system-property-keys.js +44 -0
  266. package/dist/system-property-keys.js.map +1 -0
  267. package/dist/types.d.ts +32 -0
  268. package/dist/types.d.ts.map +1 -0
  269. package/dist/types.js +2 -0
  270. package/dist/types.js.map +1 -0
  271. package/dist/ui/register-properties.d.ts +12 -0
  272. package/dist/ui/register-properties.d.ts.map +1 -0
  273. package/dist/ui/register-properties.js +318 -0
  274. package/dist/ui/register-properties.js.map +1 -0
  275. package/dist/vector/synthetic-handle.d.ts +3 -0
  276. package/dist/vector/synthetic-handle.d.ts.map +1 -0
  277. package/dist/vector/synthetic-handle.js +38 -0
  278. package/dist/vector/synthetic-handle.js.map +1 -0
  279. package/package.json +55 -0
@@ -0,0 +1,7 @@
1
+ import type { PropertyComponentDefinition } from '@asyra/core';
2
+ import type { PresetCoreAPIs } from '../../types.js';
3
+ export declare const BASE_PROPERTY_COMPONENT_DEFINITIONS: readonly PropertyComponentDefinition[];
4
+ export declare const VECTOR_PROPERTY_COMPONENT_DEFINITIONS: readonly PropertyComponentDefinition[];
5
+ export declare const DEFAULT_PROPERTY_COMPONENT_DEFINITIONS: readonly PropertyComponentDefinition[];
6
+ export declare const registerPropertyComponents: (core: Pick<PresetCoreAPIs, "definePropertyComponent">, definitions?: readonly PropertyComponentDefinition[]) => void;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/props/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAkBpD,eAAO,MAAM,mCAAmC,EAAE,SAAS,2BAA2B,EAQnF,CAAA;AAEH,eAAO,MAAM,qCAAqC,EAAE,SAAS,2BAA2B,EAWrF,CAAA;AAEH,eAAO,MAAM,sCAAsC,EAAE,SAAS,2BAA2B,EAItF,CAAA;AAEH,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,CAAC,cAAc,EAAE,yBAAyB,CAAC,EACrD,cAAa,SAAS,2BAA2B,EAA2C,KAC3F,IAUF,CAAA"}
@@ -0,0 +1,51 @@
1
+ import { anchorPointPropertyComponentDefinition } from './anchor-point-component.js';
2
+ import { anchorPointsPropertyComponentDefinition } from './anchor-points-component.js';
3
+ import { customPropertyComponentDefinition } from './custom-component.js';
4
+ import { dimensionPropertyComponentDefinition } from './dimension-component.js';
5
+ import { fillPropertyComponentDefinition } from './fill-component.js';
6
+ import { fillsPropertyComponentDefinition } from './fills-component.js';
7
+ import { positionPropertyComponentDefinition } from './position-component.js';
8
+ import { strokePropertyComponentDefinition } from './stroke-component.js';
9
+ import { strokesPropertyComponentDefinition } from './strokes-component.js';
10
+ import { vectorNetworkPropertyComponentDefinition } from './vector-network-component.js';
11
+ import { vectorNetworksPropertyComponentDefinition } from './vector-networks-component.js';
12
+ import { vectorPointPropertyComponentDefinition } from './vector-point-component.js';
13
+ import { vectorPointsPropertyComponentDefinition } from './vector-points-component.js';
14
+ import { vectorSegmentPropertyComponentDefinition } from './vector-segment-component.js';
15
+ import { vectorSegmentsPropertyComponentDefinition } from './vector-segments-component.js';
16
+ import { PRESET_REGISTRATION } from '../../registration.js';
17
+ export const BASE_PROPERTY_COMPONENT_DEFINITIONS = [
18
+ positionPropertyComponentDefinition,
19
+ dimensionPropertyComponentDefinition,
20
+ fillPropertyComponentDefinition,
21
+ fillsPropertyComponentDefinition,
22
+ strokePropertyComponentDefinition,
23
+ strokesPropertyComponentDefinition
24
+ ];
25
+ export const VECTOR_PROPERTY_COMPONENT_DEFINITIONS = [
26
+ customPropertyComponentDefinition,
27
+ anchorPointPropertyComponentDefinition,
28
+ anchorPointsPropertyComponentDefinition,
29
+ vectorPointPropertyComponentDefinition,
30
+ vectorPointsPropertyComponentDefinition,
31
+ vectorSegmentPropertyComponentDefinition,
32
+ vectorSegmentsPropertyComponentDefinition,
33
+ vectorNetworkPropertyComponentDefinition,
34
+ vectorNetworksPropertyComponentDefinition
35
+ ];
36
+ export const DEFAULT_PROPERTY_COMPONENT_DEFINITIONS = [
37
+ ...BASE_PROPERTY_COMPONENT_DEFINITIONS,
38
+ ...VECTOR_PROPERTY_COMPONENT_DEFINITIONS
39
+ ];
40
+ export const registerPropertyComponents = (core, definitions = DEFAULT_PROPERTY_COMPONENT_DEFINITIONS) => {
41
+ definitions.forEach((definition) => {
42
+ core.definePropertyComponent({
43
+ ...definition,
44
+ registration: {
45
+ ...PRESET_REGISTRATION,
46
+ relations: definition.registration?.relations
47
+ }
48
+ });
49
+ });
50
+ };
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/props/components/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sCAAsC,EAAE,MAAM,6BAA6B,CAAA;AACpF,OAAO,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAE,oCAAoC,EAAE,MAAM,0BAA0B,CAAA;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAA;AACrE,OAAO,EAAE,gCAAgC,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAA;AAC7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,EAAE,yCAAyC,EAAE,MAAM,gCAAgC,CAAA;AAC1F,OAAO,EAAE,sCAAsC,EAAE,MAAM,6BAA6B,CAAA;AACpF,OAAO,EAAE,uCAAuC,EAAE,MAAM,8BAA8B,CAAA;AACtF,OAAO,EAAE,wCAAwC,EAAE,MAAM,+BAA+B,CAAA;AACxF,OAAO,EAAE,yCAAyC,EAAE,MAAM,gCAAgC,CAAA;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D,MAAM,CAAC,MAAM,mCAAmC,GAC9C;IACE,mCAAmC;IACnC,oCAAoC;IACpC,+BAA+B;IAC/B,gCAAgC;IAChC,iCAAiC;IACjC,kCAAkC;CACnC,CAAA;AAEH,MAAM,CAAC,MAAM,qCAAqC,GAChD;IACE,iCAAiC;IACjC,sCAAsC;IACtC,uCAAuC;IACvC,sCAAsC;IACtC,uCAAuC;IACvC,wCAAwC;IACxC,yCAAyC;IACzC,wCAAwC;IACxC,yCAAyC;CAC1C,CAAA;AAEH,MAAM,CAAC,MAAM,sCAAsC,GACjD;IACE,GAAG,mCAAmC;IACtC,GAAG,qCAAqC;CACzC,CAAA;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,IAAqD,EACrD,cAAsD,sCAAsC,EACtF,EAAE;IACR,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACjC,IAAI,CAAC,uBAAuB,CAAC;YAC3B,GAAG,UAAU;YACb,YAAY,EAAE;gBACZ,GAAG,mBAAmB;gBACtB,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS;aAC9C;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const toNumberValue: (value: unknown, defaultValue?: number) => number;
2
+ //# sourceMappingURL=number-value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-value.d.ts","sourceRoot":"","sources":["../../../src/props/components/number-value.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,EAAE,qBAAgB,KAAG,MACf,CAAA"}
@@ -0,0 +1,2 @@
1
+ export const toNumberValue = (value, defaultValue = 0) => typeof value === 'number' ? value : defaultValue;
2
+ //# sourceMappingURL=number-value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-value.js","sourceRoot":"","sources":["../../../src/props/components/number-value.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAc,EAAE,YAAY,GAAG,CAAC,EAAU,EAAE,CACxE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { PropertyComponentDefinition } from '@asyra/core';
2
+ export declare const positionPropertyComponentDefinition: PropertyComponentDefinition;
3
+ //# sourceMappingURL=position-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/position-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAG9D,eAAO,MAAM,mCAAmC,EAAE,2BAI/C,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { DefaultPositionData, PropertyTypes } from '@asyra/utils';
2
+ export const positionPropertyComponentDefinition = {
3
+ type: PropertyTypes.POSITION,
4
+ defaults: DefaultPositionData
5
+ };
6
+ //# sourceMappingURL=position-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-component.js","sourceRoot":"","sources":["../../../src/props/components/position-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAEjE,MAAM,CAAC,MAAM,mCAAmC,GAC9C;IACE,IAAI,EAAE,aAAa,CAAC,QAAQ;IAC5B,QAAQ,EAAE,mBAAmB;CAC9B,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { PropertyComponentDefinition } from '@asyra/core';
2
+ export declare const strokePropertyComponentDefinition: PropertyComponentDefinition;
3
+ //# sourceMappingURL=stroke-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stroke-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/stroke-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAS9D,eAAO,MAAM,iCAAiC,EAAE,2BAyB/C,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { PropertyTypes, createDefaultStroke } from '@asyra/utils';
2
+ const { id: _strokeId, type: _strokeType, ...strokePropertyDefaults } = createDefaultStroke();
3
+ export const strokePropertyComponentDefinition = {
4
+ type: PropertyTypes.STROKE,
5
+ defaults: strokePropertyDefaults,
6
+ persistKeys: [
7
+ 'style',
8
+ 'position',
9
+ 'width',
10
+ 'dash',
11
+ 'gap',
12
+ 'fill',
13
+ 'joinType',
14
+ 'capType',
15
+ 'miterAngle'
16
+ ],
17
+ valueKeys: [
18
+ 'style',
19
+ 'position',
20
+ 'width',
21
+ 'dash',
22
+ 'gap',
23
+ 'fill',
24
+ 'joinType',
25
+ 'capType',
26
+ 'miterAngle'
27
+ ]
28
+ };
29
+ //# sourceMappingURL=stroke-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stroke-component.js","sourceRoot":"","sources":["../../../src/props/components/stroke-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAEjE,MAAM,EACJ,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,WAAW,EACjB,GAAG,sBAAsB,EAC1B,GAAG,mBAAmB,EAAE,CAAA;AAEzB,MAAM,CAAC,MAAM,iCAAiC,GAAgC;IAC5E,IAAI,EAAE,aAAa,CAAC,MAAM;IAC1B,QAAQ,EAAE,sBAAsB;IAChC,WAAW,EAAE;QACX,OAAO;QACP,UAAU;QACV,OAAO;QACP,MAAM;QACN,KAAK;QACL,MAAM;QACN,UAAU;QACV,SAAS;QACT,YAAY;KACb;IACD,SAAS,EAAE;QACT,OAAO;QACP,UAAU;QACV,OAAO;QACP,MAAM;QACN,KAAK;QACL,MAAM;QACN,UAAU;QACV,SAAS;QACT,YAAY;KACb;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { PropertyComponentDefinition } from '@asyra/core';
2
+ export declare const strokesPropertyComponentDefinition: PropertyComponentDefinition;
3
+ //# sourceMappingURL=strokes-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strokes-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/strokes-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAG9D,eAAO,MAAM,kCAAkC,EAAE,2BA0ChD,CAAA"}
@@ -0,0 +1,44 @@
1
+ import { PropertyTypes, createDefaultStroke, isRecord } from '@asyra/utils';
2
+ export const strokesPropertyComponentDefinition = {
3
+ type: PropertyTypes.STROKES,
4
+ defaults: { strokes: [] },
5
+ persistKeys: ['strokes'],
6
+ valueKeys: ['strokes'],
7
+ children: {
8
+ key: 'strokes',
9
+ childType: PropertyTypes.STROKE,
10
+ mode: 'ids-or-objects',
11
+ collection: 'array-or-record',
12
+ toChildData: (item, childId) => {
13
+ if (typeof item !== 'object' || item === null || Array.isArray(item)) {
14
+ return null;
15
+ }
16
+ return createDefaultStroke({
17
+ id: childId ?? '',
18
+ ...item
19
+ });
20
+ },
21
+ toValue: (child, childId) => {
22
+ const fill = child.get('fill');
23
+ return {
24
+ id: childId,
25
+ style: child.get('style'),
26
+ position: child.get('position'),
27
+ width: child.get('width'),
28
+ dash: child.get('dash'),
29
+ gap: child.get('gap'),
30
+ fill: isRecord(fill)
31
+ ? {
32
+ ...fill,
33
+ id: childId,
34
+ type: PropertyTypes.FILL
35
+ }
36
+ : fill,
37
+ joinType: child.get('joinType'),
38
+ capType: child.get('capType'),
39
+ miterAngle: child.get('miterAngle')
40
+ };
41
+ }
42
+ }
43
+ };
44
+ //# sourceMappingURL=strokes-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strokes-component.js","sourceRoot":"","sources":["../../../src/props/components/strokes-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAE3E,MAAM,CAAC,MAAM,kCAAkC,GAAgC;IAC7E,IAAI,EAAE,aAAa,CAAC,OAAO;IAC3B,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAc,EAAE;IACrC,WAAW,EAAE,CAAC,SAAS,CAAC;IACxB,SAAS,EAAE,CAAC,SAAS,CAAC;IACtB,QAAQ,EAAE;QACR,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,aAAa,CAAC,MAAM;QAC/B,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,iBAAiB;QAC7B,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;YAC7B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACrE,OAAO,IAAI,CAAA;YACb,CAAC;YAED,OAAO,mBAAmB,CAAC;gBACzB,EAAE,EAAE,OAAO,IAAI,EAAE;gBACjB,GAAG,IAAI;aACR,CAAuC,CAAA;QAC1C,CAAC;QACD,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC1B,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YAC9B,OAAO;gBACL,EAAE,EAAE,OAAO;gBACX,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;gBACzB,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC;gBAC/B,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;gBACzB,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;gBACvB,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;gBACrB,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;oBAClB,CAAC,CAAC;wBACE,GAAG,IAAI;wBACP,EAAE,EAAE,OAAO;wBACX,IAAI,EAAE,aAAa,CAAC,IAAI;qBACzB;oBACH,CAAC,CAAC,IAAI;gBACR,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC;gBAC/B,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC;gBAC7B,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;aACpC,CAAA;QACH,CAAC;KACF;CACF,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { PropertyComponentDefinition } from '@asyra/core';
2
+ export declare const vectorNetworkPropertyComponentDefinition: PropertyComponentDefinition;
3
+ //# sourceMappingURL=vector-network-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-network-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/vector-network-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAG9D,eAAO,MAAM,wCAAwC,EAAE,2BAQpD,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { PropertyTypes } from '@asyra/utils';
2
+ export const vectorNetworkPropertyComponentDefinition = {
3
+ type: PropertyTypes.VECTOR_NETWORK,
4
+ defaults: {
5
+ pointIds: [],
6
+ segmentIds: [],
7
+ closed: false
8
+ }
9
+ };
10
+ //# sourceMappingURL=vector-network-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-network-component.js","sourceRoot":"","sources":["../../../src/props/components/vector-network-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,CAAC,MAAM,wCAAwC,GACnD;IACE,IAAI,EAAE,aAAa,CAAC,cAAc;IAClC,QAAQ,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,MAAM,EAAE,KAAK;KACd;CACF,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const vectorNetworksPropertyComponentDefinition: import("@asyra/core").PropertyComponentDefinition;
2
+ //# sourceMappingURL=vector-networks-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-networks-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/vector-networks-component.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,yCAAyC,mDAiBlD,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { VECTOR_TOPOLOGY_NETWORK_ID_TYPE } from '@asyra/core';
2
+ import { PropertyTypes } from '@asyra/utils';
3
+ import { createChildrenMapPropertyComponentDefinition } from './children-map-property-component.js';
4
+ const toStringArray = (value) => {
5
+ if (!Array.isArray(value)) {
6
+ return [];
7
+ }
8
+ return value.filter((item) => typeof item === 'string');
9
+ };
10
+ const toBoolean = (value, defaultValue = false) => typeof value === 'boolean' ? value : defaultValue;
11
+ export const vectorNetworksPropertyComponentDefinition = createChildrenMapPropertyComponentDefinition({
12
+ type: PropertyTypes.VECTOR_NETWORKS,
13
+ key: 'networks',
14
+ childType: PropertyTypes.VECTOR_NETWORK,
15
+ childIdType: VECTOR_TOPOLOGY_NETWORK_ID_TYPE,
16
+ toChildData: (item) => ({
17
+ pointIds: toStringArray(item.pointIds),
18
+ segmentIds: toStringArray(item.segmentIds),
19
+ closed: toBoolean(item.closed)
20
+ }),
21
+ toValue: (child, childId) => ({
22
+ id: childId,
23
+ pointIds: toStringArray(child.get('pointIds')),
24
+ segmentIds: toStringArray(child.get('segmentIds')),
25
+ closed: toBoolean(child.get('closed'))
26
+ })
27
+ });
28
+ //# sourceMappingURL=vector-networks-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-networks-component.js","sourceRoot":"","sources":["../../../src/props/components/vector-networks-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,4CAA4C,EAAE,MAAM,sCAAsC,CAAA;AAEnG,MAAM,aAAa,GAAG,CAAC,KAAc,EAAY,EAAE;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAA;IACX,CAAC;IAED,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAA;AACzE,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,CAAC,KAAc,EAAE,YAAY,GAAG,KAAK,EAAE,EAAE,CACzD,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAA;AAEnD,MAAM,CAAC,MAAM,yCAAyC,GACpD,4CAA4C,CAAC;IAC3C,IAAI,EAAE,aAAa,CAAC,eAAe;IACnC,GAAG,EAAE,UAAU;IACf,SAAS,EAAE,aAAa,CAAC,cAAc;IACvC,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACtB,QAAQ,EAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtC,UAAU,EAAE,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC;QAC1C,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;KAC/B,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QAC5B,EAAE,EAAE,OAAO;QACX,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC9C,UAAU,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAClD,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;KACvC,CAAC;CACH,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { type PropertyComponentDefinition } from '@asyra/core';
2
+ export declare const vectorPointPropertyComponentDefinition: PropertyComponentDefinition;
3
+ //# sourceMappingURL=vector-point-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-point-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/vector-point-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,2BAA2B,EACjC,MAAM,aAAa,CAAA;AAGpB,eAAO,MAAM,sCAAsC,EAAE,2BAgBlD,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { VECTOR_HANDLE_MODES, VECTOR_TOKENS } from '@asyra/core';
2
+ import { PropertyTypes } from '@asyra/utils';
3
+ export const vectorPointPropertyComponentDefinition = {
4
+ type: PropertyTypes.VECTOR_POINT,
5
+ defaults: {
6
+ kind: VECTOR_TOKENS.POINT.KIND.ANCHOR,
7
+ anchorType: 'sharp',
8
+ controlForId: undefined,
9
+ controlRole: undefined,
10
+ handleMode: VECTOR_HANDLE_MODES.NONE,
11
+ x: 0,
12
+ y: 0
13
+ }
14
+ };
15
+ //# sourceMappingURL=vector-point-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-point-component.js","sourceRoot":"","sources":["../../../src/props/components/vector-point-component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,aAAa,EAEd,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,CAAC,MAAM,sCAAsC,GACjD;IACE,IAAI,EAAE,aAAa,CAAC,YAAY;IAChC,QAAQ,EAAE;QACR,IAAI,EAAE,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM;QACrC,UAAU,EAAE,OAAO;QACnB,YAAY,EAAE,SAA+B;QAC7C,WAAW,EAAE,SAGA;QACb,UAAU,EACR,mBAAmB,CAAC,IAAsE;QAC5F,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACL;CACF,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const vectorPointsPropertyComponentDefinition: import("@asyra/core").PropertyComponentDefinition;
2
+ //# sourceMappingURL=vector-points-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-points-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/vector-points-component.ts"],"names":[],"mappings":"AAsCA,eAAO,MAAM,uCAAuC,mDAoDhD,CAAA"}
@@ -0,0 +1,66 @@
1
+ import { VECTOR_HANDLE_MODES, VECTOR_TOKENS, VECTOR_TOPOLOGY_POINT_ID_TYPE, isVectorHandleMode } from '@asyra/core';
2
+ import { PropertyTypes } from '@asyra/utils';
3
+ import { createChildrenMapPropertyComponentDefinition } from './children-map-property-component.js';
4
+ import { toNumberValue } from './number-value.js';
5
+ const toAnchorType = (value) => value === 'smooth' ? 'smooth' : 'sharp';
6
+ const toHandleMode = (value) => isVectorHandleMode(value) ? value : VECTOR_HANDLE_MODES.NONE;
7
+ const toPointKind = (value) => value === VECTOR_TOKENS.POINT.KIND.CONTROL
8
+ ? VECTOR_TOKENS.POINT.KIND.CONTROL
9
+ : VECTOR_TOKENS.POINT.KIND.ANCHOR;
10
+ const toControlRole = (value) => {
11
+ if (value === VECTOR_TOKENS.CONTROL.ROLE.IN ||
12
+ value === VECTOR_TOKENS.CONTROL.ROLE.OUT) {
13
+ return value;
14
+ }
15
+ return;
16
+ };
17
+ const toStringOrUndefined = (value) => typeof value === 'string' ? value : undefined;
18
+ export const vectorPointsPropertyComponentDefinition = createChildrenMapPropertyComponentDefinition({
19
+ type: PropertyTypes.VECTOR_POINTS,
20
+ key: 'points',
21
+ childType: PropertyTypes.VECTOR_POINT,
22
+ childIdType: VECTOR_TOPOLOGY_POINT_ID_TYPE,
23
+ toChildData: (item) => {
24
+ const kind = toPointKind(item.kind);
25
+ if (kind === VECTOR_TOKENS.POINT.KIND.CONTROL) {
26
+ return {
27
+ kind,
28
+ x: toNumberValue(item.x),
29
+ y: toNumberValue(item.y),
30
+ controlForId: toStringOrUndefined(item.controlForId),
31
+ controlRole: toControlRole(item.controlRole)
32
+ };
33
+ }
34
+ return {
35
+ kind,
36
+ x: toNumberValue(item.x),
37
+ y: toNumberValue(item.y),
38
+ anchorType: toAnchorType(item.anchorType),
39
+ handleMode: toHandleMode(item.handleMode)
40
+ };
41
+ },
42
+ toValue: (child, childId) => {
43
+ const kind = toPointKind(child.get('kind'));
44
+ const x = toNumberValue(child.get('x'));
45
+ const y = toNumberValue(child.get('y'));
46
+ if (kind === VECTOR_TOKENS.POINT.KIND.CONTROL) {
47
+ return {
48
+ id: childId,
49
+ kind,
50
+ x,
51
+ y,
52
+ controlForId: toStringOrUndefined(child.get('controlForId')),
53
+ controlRole: toControlRole(child.get('controlRole'))
54
+ };
55
+ }
56
+ return {
57
+ id: childId,
58
+ kind,
59
+ x,
60
+ y,
61
+ anchorType: toAnchorType(child.get('anchorType')),
62
+ handleMode: toHandleMode(child.get('handleMode'))
63
+ };
64
+ }
65
+ });
66
+ //# sourceMappingURL=vector-points-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-points-component.js","sourceRoot":"","sources":["../../../src/props/components/vector-points-component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,6BAA6B,EAC7B,kBAAkB,EACnB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,4CAA4C,EAAE,MAAM,sCAAsC,CAAA;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAIjD,MAAM,YAAY,GAAG,CAAC,KAAc,EAAsB,EAAE,CAC1D,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAA;AAEzC,MAAM,YAAY,GAAG,CAAC,KAAc,EAAE,EAAE,CACtC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAA;AAE9D,MAAM,WAAW,GAAG,CAAC,KAAc,EAAmB,EAAE,CACtD,KAAK,KAAK,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;IACxC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO;IAClC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAA;AAErC,MAAM,aAAa,GAAG,CAAC,KAAc,EAAiC,EAAE;IACtE,IACE,KAAK,KAAK,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvC,KAAK,KAAK,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,EACxC,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAM;AACR,CAAC,CAAA;AAED,MAAM,mBAAmB,GAAG,CAAC,KAAc,EAAsB,EAAE,CACjE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AAE/C,MAAM,CAAC,MAAM,uCAAuC,GAClD,4CAA4C,CAAC;IAC3C,IAAI,EAAE,aAAa,CAAC,aAAa;IACjC,GAAG,EAAE,QAAQ;IACb,SAAS,EAAE,aAAa,CAAC,YAAY;IACrC,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE;QACpB,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAEnC,IAAI,IAAI,KAAK,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAC9C,OAAO;gBACL,IAAI;gBACJ,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;gBACxB,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;gBACxB,YAAY,EAAE,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC;gBACpD,WAAW,EAAE,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;aAC7C,CAAA;QACH,CAAC;QAED,OAAO;YACL,IAAI;YACJ,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;YACxB,CAAC,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;YACxB,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;YACzC,UAAU,EAAE,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;SAC1C,CAAA;IACH,CAAC;IACD,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QAC1B,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;QAC3C,MAAM,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QACvC,MAAM,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;QAEvC,IAAI,IAAI,KAAK,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAC9C,OAAO;gBACL,EAAE,EAAE,OAAO;gBACX,IAAI;gBACJ,CAAC;gBACD,CAAC;gBACD,YAAY,EAAE,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;gBAC5D,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;aACrD,CAAA;QACH,CAAC;QAED,OAAO;YACL,EAAE,EAAE,OAAO;YACX,IAAI;YACJ,CAAC;YACD,CAAC;YACD,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACjD,UAAU,EAAE,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;SAClD,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { PropertyComponentDefinition } from '@asyra/core';
2
+ export declare const vectorSegmentPropertyComponentDefinition: PropertyComponentDefinition;
3
+ //# sourceMappingURL=vector-segment-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-segment-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/vector-segment-component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAG9D,eAAO,MAAM,wCAAwC,EAAE,2BASpD,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { PropertyTypes } from '@asyra/utils';
2
+ export const vectorSegmentPropertyComponentDefinition = {
3
+ type: PropertyTypes.VECTOR_SEGMENT,
4
+ defaults: {
5
+ startId: '',
6
+ endId: '',
7
+ outControlId: null,
8
+ inControlId: null
9
+ }
10
+ };
11
+ //# sourceMappingURL=vector-segment-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-segment-component.js","sourceRoot":"","sources":["../../../src/props/components/vector-segment-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE5C,MAAM,CAAC,MAAM,wCAAwC,GACnD;IACE,IAAI,EAAE,aAAa,CAAC,cAAc;IAClC,QAAQ,EAAE;QACR,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,EAAE;QACT,YAAY,EAAE,IAAI;QAClB,WAAW,EAAE,IAAI;KAClB;CACF,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const vectorSegmentsPropertyComponentDefinition: import("@asyra/core").PropertyComponentDefinition;
2
+ //# sourceMappingURL=vector-segments-component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-segments-component.d.ts","sourceRoot":"","sources":["../../../src/props/components/vector-segments-component.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,yCAAyC,mDAmBlD,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { VECTOR_TOPOLOGY_SEGMENT_ID_TYPE } from '@asyra/core';
2
+ import { PropertyTypes } from '@asyra/utils';
3
+ import { createChildrenMapPropertyComponentDefinition } from './children-map-property-component.js';
4
+ const toString = (value, defaultValue = '') => typeof value === 'string' ? value : defaultValue;
5
+ const toNullableString = (value) => typeof value === 'string' ? value : null;
6
+ export const vectorSegmentsPropertyComponentDefinition = createChildrenMapPropertyComponentDefinition({
7
+ type: PropertyTypes.VECTOR_SEGMENTS,
8
+ key: 'segments',
9
+ childType: PropertyTypes.VECTOR_SEGMENT,
10
+ childIdType: VECTOR_TOPOLOGY_SEGMENT_ID_TYPE,
11
+ toChildData: (item) => ({
12
+ startId: toString(item.startId),
13
+ endId: toString(item.endId),
14
+ outControlId: toNullableString(item.outControlId),
15
+ inControlId: toNullableString(item.inControlId)
16
+ }),
17
+ toValue: (child, childId) => ({
18
+ id: childId,
19
+ startId: toString(child.get('startId')),
20
+ endId: toString(child.get('endId')),
21
+ outControlId: toNullableString(child.get('outControlId')),
22
+ inControlId: toNullableString(child.get('inControlId'))
23
+ })
24
+ });
25
+ //# sourceMappingURL=vector-segments-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vector-segments-component.js","sourceRoot":"","sources":["../../../src/props/components/vector-segments-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,4CAA4C,EAAE,MAAM,sCAAsC,CAAA;AAEnG,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAE,YAAY,GAAG,EAAE,EAAE,EAAE,CACrD,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAA;AAElD,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAiB,EAAE,CACzD,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;AAE1C,MAAM,CAAC,MAAM,yCAAyC,GACpD,4CAA4C,CAAC;IAC3C,IAAI,EAAE,aAAa,CAAC,eAAe;IACnC,GAAG,EAAE,UAAU;IACf,SAAS,EAAE,aAAa,CAAC,cAAc;IACvC,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACtB,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;QAC/B,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;QAC3B,YAAY,EAAE,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC;QACjD,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC;KAChD,CAAC;IACF,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QAC5B,EAAE,EAAE,OAAO;QACX,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACvC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACnC,YAAY,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzD,WAAW,EAAE,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;KACxD,CAAC;CACH,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { PropertySchema } from '@asyra/utils';
2
+ import type { PresetCoreAPIs } from '../types.js';
3
+ export declare const BASE_PROPERTY_SCHEMAS: readonly PropertySchema[];
4
+ export declare const VECTOR_PROPERTY_SCHEMAS: readonly PropertySchema[];
5
+ export declare const DEFAULT_PROPERTY_SCHEMAS: readonly PropertySchema[];
6
+ export declare const registerPropertySchemas: (core: Pick<PresetCoreAPIs, "registerPropertySchema">, schemas?: readonly PropertySchema[]) => void;
7
+ //# sourceMappingURL=register-property-schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register-property-schemas.d.ts","sourceRoot":"","sources":["../../src/props/register-property-schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,cAAc,EAUf,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAofjD,eAAO,MAAM,qBAAqB,EAAE,SAAS,cAAc,EAO1D,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,cAAc,EAS5D,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,SAAS,cAAc,EAG7D,CAAA;AAED,eAAO,MAAM,uBAAuB,GAClC,MAAM,IAAI,CAAC,cAAc,EAAE,wBAAwB,CAAC,EACpD,UAAS,SAAS,cAAc,EAA6B,SAK9D,CAAA"}