@officedk/pptxdk 0.1.0 → 0.2.1

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 (338) hide show
  1. package/dist/build.d.ts +14 -76
  2. package/dist/build.js +69 -97
  3. package/dist/cli.js +1 -1
  4. package/dist/core/dist/capabilities/audio/audio-declaration.js +7 -0
  5. package/dist/core/dist/capabilities/audio/audio-source.js +172 -0
  6. package/dist/core/dist/capabilities/audio/entry.js +122 -0
  7. package/dist/core/dist/capabilities/box/box-codegen.js +83 -0
  8. package/dist/core/dist/capabilities/box/box-declaration.js +32 -0
  9. package/dist/{capabilities/dist → core/dist/capabilities}/box/box.js +32 -29
  10. package/dist/core/dist/capabilities/box/entry.js +2 -0
  11. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-codegen.js +17 -22
  12. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-declaration.js +2 -2
  13. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-import.js +1025 -471
  14. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-labels.js +30 -3
  15. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-model.js +3 -3
  16. package/dist/{capabilities/dist/chart/preview/number-format.js → core/dist/capabilities/chart/chart-number-format.js} +1 -1
  17. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-schemas.js +216 -212
  18. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart-xml.js +41 -36
  19. package/dist/{capabilities/dist → core/dist/capabilities}/chart/chart.js +228 -171
  20. package/dist/core/dist/capabilities/chart/entry.js +2 -0
  21. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/axes-and-grid.js +23 -10
  22. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/bar-column.js +1 -1
  23. package/dist/core/dist/capabilities/chart/preview/data-labels.js +474 -0
  24. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/error-bars.js +3 -1
  25. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/index.js +30 -9
  26. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/layout.js +160 -89
  27. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/legend.js +4 -4
  28. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/line-area.js +4 -4
  29. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/markers.js +1 -1
  30. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/pie-doughnut.js +39 -60
  31. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/scales.js +1 -1
  32. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/scatter.js +3 -3
  33. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/style.js +15 -3
  34. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/text-render.js +34 -24
  35. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/trendlines.js +5 -5
  36. package/dist/{capabilities/dist → core/dist/capabilities}/chart/preview/types.js +1 -1
  37. package/dist/core/dist/capabilities/comment/comment-codegen.js +25 -0
  38. package/dist/core/dist/capabilities/comment/comment-declaration.js +37 -0
  39. package/dist/core/dist/capabilities/comment/comment-import.js +176 -0
  40. package/dist/core/dist/capabilities/comment/comment.js +141 -0
  41. package/dist/core/dist/capabilities/comment/entry.js +1 -0
  42. package/dist/core/dist/capabilities/footer-placeholder/entry.js +2 -0
  43. package/dist/core/dist/capabilities/footer-placeholder/footer-placeholder-codegen.js +16 -0
  44. package/dist/{capabilities/dist/masters → core/dist/capabilities/footer-placeholder}/footer-placeholder.js +194 -133
  45. package/dist/core/dist/capabilities/footer-placeholder/print-header-footer-import.js +121 -0
  46. package/dist/core/dist/capabilities/footer-placeholder/print-header-footer.js +123 -0
  47. package/dist/core/dist/capabilities/group/entry.js +2 -0
  48. package/dist/core/dist/capabilities/group/group-codegen.js +73 -0
  49. package/dist/core/dist/capabilities/group/group-declaration.js +41 -0
  50. package/dist/core/dist/capabilities/group/group-import.js +608 -0
  51. package/dist/{capabilities/dist → core/dist/capabilities}/group/group-xml.js +4 -3
  52. package/dist/core/dist/capabilities/group/group.js +260 -0
  53. package/dist/core/dist/capabilities/image/entry.js +4 -0
  54. package/dist/core/dist/capabilities/image/image-codegen.js +59 -0
  55. package/dist/core/dist/capabilities/image/image-declaration.js +8 -0
  56. package/dist/core/dist/capabilities/image/image-import.js +26 -0
  57. package/dist/core/dist/capabilities/image/image.js +57 -0
  58. package/dist/core/dist/capabilities/line/entry.js +3 -0
  59. package/dist/core/dist/capabilities/line/line-codegen.js +88 -0
  60. package/dist/core/dist/capabilities/line/line-declaration.js +78 -0
  61. package/dist/core/dist/capabilities/line/line-import.js +424 -0
  62. package/dist/core/dist/capabilities/line/line-xml.js +9 -0
  63. package/dist/core/dist/capabilities/line/line.js +329 -0
  64. package/dist/core/dist/capabilities/masters/entry.js +1 -0
  65. package/dist/core/dist/capabilities/masters/masters-codegen.js +50 -0
  66. package/dist/{capabilities/dist → core/dist/capabilities}/masters/masters.js +35 -47
  67. package/dist/core/dist/capabilities/motion/entry.js +5 -0
  68. package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-codegen.js +97 -51
  69. package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-import.js +653 -102
  70. package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-plan.js +317 -163
  71. package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion-query.js +9 -6
  72. package/dist/{capabilities/dist → core/dist/capabilities}/motion/motion.js +357 -108
  73. package/dist/core/dist/capabilities/notes/entry.js +2 -0
  74. package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-codegen.js +5 -7
  75. package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-declaration.js +2 -2
  76. package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-import.js +16 -13
  77. package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes-schemas.js +12 -9
  78. package/dist/{capabilities/dist → core/dist/capabilities}/notes/notes.js +20 -42
  79. package/dist/{import/dist/sections.js → core/dist/capabilities/notes/sections-import.js} +5 -5
  80. package/dist/core/dist/capabilities/placeholder/entry.js +3 -0
  81. package/dist/core/dist/capabilities/placeholder/placeholder-codegen.js +44 -0
  82. package/dist/core/dist/capabilities/placeholder/placeholder-schemas.js +31 -0
  83. package/dist/core/dist/capabilities/placeholder/placeholder.js +394 -0
  84. package/dist/core/dist/capabilities/shape/entry.js +6 -0
  85. package/dist/core/dist/capabilities/shape/shape-codegen.js +112 -0
  86. package/dist/core/dist/capabilities/shape/shape-import.js +152 -0
  87. package/dist/{capabilities/dist → core/dist/capabilities}/shape/shape-xml.js +1 -1
  88. package/dist/{capabilities/dist → core/dist/capabilities}/shape/shape.js +100 -103
  89. package/dist/core/dist/capabilities/shared/container-slots.js +59 -0
  90. package/dist/core/dist/capabilities/shared/date-time.js +98 -0
  91. package/dist/core/dist/capabilities/shared/font/font-embedding.js +118 -0
  92. package/dist/core/dist/capabilities/shared/font/font-engine.js +855 -0
  93. package/dist/core/dist/capabilities/shared/font/font-import.js +805 -0
  94. package/dist/{capabilities/dist → core/dist/capabilities/shared}/font/font-subset.js +24 -9
  95. package/dist/core/dist/capabilities/shared/font/font.js +72 -0
  96. package/dist/{capabilities/dist/shape/shape-codegen.js → core/dist/capabilities/shared/geometry-codegen.js} +4 -69
  97. package/dist/{capabilities/dist → core/dist/capabilities}/shared/geometry.js +384 -123
  98. package/dist/{capabilities/dist → core/dist/capabilities}/shared/identity.js +56 -38
  99. package/dist/core/dist/capabilities/shared/image-codegen.js +94 -0
  100. package/dist/{capabilities/dist/image → core/dist/capabilities/shared}/image-decode.js +17 -56
  101. package/dist/{capabilities/dist/image → core/dist/capabilities/shared}/image-schemas.js +49 -61
  102. package/dist/core/dist/capabilities/shared/line-match.js +78 -0
  103. package/dist/core/dist/capabilities/shared/media-codegen.js +86 -0
  104. package/dist/core/dist/capabilities/shared/media-import.js +156 -0
  105. package/dist/core/dist/capabilities/shared/media-placement.js +20 -0
  106. package/dist/core/dist/capabilities/shared/media-poster.js +50 -0
  107. package/dist/core/dist/capabilities/shared/media-schemas.js +60 -0
  108. package/dist/core/dist/capabilities/shared/media-source.js +107 -0
  109. package/dist/core/dist/capabilities/shared/media-trim.js +102 -0
  110. package/dist/core/dist/capabilities/shared/media.js +134 -0
  111. package/dist/{capabilities/dist → core/dist/capabilities}/shared/morph-api.js +5 -5
  112. package/dist/core/dist/capabilities/shared/motion-api.js +770 -0
  113. package/dist/core/dist/capabilities/shared/motion-schemas.js +353 -0
  114. package/dist/{capabilities/dist/image/image-import.js → core/dist/capabilities/shared/picture-import.js} +313 -168
  115. package/dist/core/dist/capabilities/shared/picture-xml.js +13 -0
  116. package/dist/core/dist/capabilities/shared/picture.js +510 -0
  117. package/dist/core/dist/capabilities/shared/placeholder-import.js +268 -0
  118. package/dist/core/dist/capabilities/shared/placeholder-roles.js +42 -0
  119. package/dist/{capabilities/dist → core/dist/capabilities}/shared/preset-definitions.js +1221 -188
  120. package/dist/core/dist/capabilities/shared/print-xml.js +77 -0
  121. package/dist/core/dist/capabilities/shared/rich-text-codegen.js +119 -0
  122. package/dist/core/dist/capabilities/shared/rich-text-import.js +472 -0
  123. package/dist/core/dist/capabilities/shared/shape-declaration.js +45 -0
  124. package/dist/{capabilities/dist → core/dist/capabilities}/shared/style-inheritance.js +26 -24
  125. package/dist/core/dist/capabilities/shared/text-declaration.js +31 -0
  126. package/dist/core/dist/capabilities/shared/text-schemas.js +241 -0
  127. package/dist/core/dist/capabilities/shared/text-service.js +2563 -0
  128. package/dist/{capabilities/dist → core/dist/capabilities}/shared/visual.js +441 -137
  129. package/dist/core/dist/capabilities/slide-background/entry.js +1 -0
  130. package/dist/core/dist/capabilities/slide-background/slide-background-codegen.js +15 -0
  131. package/dist/{capabilities/dist → core/dist/capabilities}/slide-background/slide-background-import.js +12 -7
  132. package/dist/core/dist/capabilities/slide-background/slide-background-xml.js +33 -0
  133. package/dist/{capabilities/dist → core/dist/capabilities}/slide-background/slide-background.js +61 -50
  134. package/dist/core/dist/capabilities/table/entry.js +2 -0
  135. package/dist/core/dist/capabilities/table/table-codegen.js +118 -0
  136. package/dist/{capabilities/dist → core/dist/capabilities}/table/table-declaration.js +2 -2
  137. package/dist/{capabilities/dist → core/dist/capabilities}/table/table-import.js +116 -84
  138. package/dist/core/dist/capabilities/table/table-schemas.js +337 -0
  139. package/dist/{capabilities/dist → core/dist/capabilities}/table/table-xml.js +13 -15
  140. package/dist/{capabilities/dist → core/dist/capabilities}/table/table.js +284 -192
  141. package/dist/core/dist/capabilities/text/entry.js +3 -0
  142. package/dist/core/dist/capabilities/text/text-codegen.js +66 -0
  143. package/dist/core/dist/capabilities/text/text-import.js +468 -0
  144. package/dist/{capabilities/dist → core/dist/capabilities}/text/text-xml.js +3 -4
  145. package/dist/{capabilities/dist → core/dist/capabilities}/text/text.js +103 -111
  146. package/dist/core/dist/capabilities/transition/entry.js +3 -0
  147. package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-api.js +13 -16
  148. package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-codegen.js +2 -3
  149. package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition-import.js +25 -27
  150. package/dist/{capabilities/dist → core/dist/capabilities}/transition/transition.js +23 -23
  151. package/dist/core/dist/capabilities/video/entry.js +77 -0
  152. package/dist/core/dist/capabilities/video/video-declaration.js +7 -0
  153. package/dist/core/dist/capabilities/video/video-source.js +42 -0
  154. package/dist/{codegen/dist → core/dist/codegen}/assets.js +16 -10
  155. package/dist/{codegen/dist → core/dist/codegen}/codegen.js +152 -140
  156. package/dist/{codegen/dist → core/dist/codegen}/identifiers.js +27 -1
  157. package/dist/{codegen/dist → core/dist/codegen}/index.js +2 -2
  158. package/dist/{codegen/dist → core/dist/codegen}/printer.js +23 -4
  159. package/dist/core/dist/document/all.js +41 -0
  160. package/dist/core/dist/document/default.js +10 -0
  161. package/dist/core/dist/document/document.js +218 -0
  162. package/dist/core/dist/document/index.js +62 -0
  163. package/dist/core/dist/document/stages.js +54 -0
  164. package/dist/{emit/dist → core/dist/emit}/emit.js +173 -90
  165. package/dist/core/dist/emit/index.js +6 -0
  166. package/dist/core/dist/emit/ooxml.js +241 -0
  167. package/dist/core/dist/import/import.js +547 -0
  168. package/dist/core/dist/import/index.js +19 -0
  169. package/dist/{import/dist → core/dist/import}/masters.js +404 -328
  170. package/dist/core/dist/import/media-timing.js +233 -0
  171. package/dist/{import/dist → core/dist/import}/notes-masters.js +48 -45
  172. package/dist/core/dist/index.js +47 -15
  173. package/dist/core/dist/{author-ids.js → kernel/author-ids.js} +9 -6
  174. package/dist/core/dist/{author-schemas.js → kernel/author-schemas.js} +105 -127
  175. package/dist/core/dist/{block-flex-layout.js → kernel/block-flex-layout.js} +225 -142
  176. package/dist/core/dist/kernel/build.js +4 -0
  177. package/dist/core/dist/kernel/capability.js +17 -0
  178. package/dist/core/dist/kernel/codegen.js +97 -0
  179. package/dist/core/dist/kernel/container-slots.js +104 -0
  180. package/dist/core/dist/kernel/date-time-format.js +18 -0
  181. package/dist/core/dist/kernel/declaration-snapshot.js +68 -0
  182. package/dist/core/dist/{declaration.js → kernel/declaration.js} +3 -2
  183. package/dist/core/dist/kernel/diagnostics.js +370 -0
  184. package/dist/core/dist/kernel/document-internals.js +26 -0
  185. package/dist/core/dist/{document.js → kernel/document.js} +23 -13
  186. package/dist/core/dist/kernel/drawing-units.js +14 -0
  187. package/dist/core/dist/kernel/font-seal.js +204 -0
  188. package/dist/core/dist/{geometry-schemas.js → kernel/geometry-schemas.js} +21 -18
  189. package/dist/core/dist/{grid-layout.js → kernel/grid-layout.js} +177 -72
  190. package/dist/core/dist/{host.js → kernel/host.js} +1 -1
  191. package/dist/core/dist/kernel/index.js +24 -0
  192. package/dist/core/dist/kernel/input-values.js +62 -0
  193. package/dist/core/dist/kernel/layout-definition.js +7 -0
  194. package/dist/core/dist/{layout-protocol.js → kernel/layout-protocol.js} +5 -10
  195. package/dist/core/dist/{layout-schemas.js → kernel/layout-schemas.js} +33 -44
  196. package/dist/core/dist/kernel/layout.js +339 -0
  197. package/dist/core/dist/kernel/masters.js +171 -0
  198. package/dist/core/dist/{morph.js → kernel/morph.js} +1 -1
  199. package/dist/core/dist/kernel/placeholders.js +289 -0
  200. package/dist/{import/dist → core/dist/kernel/pptx-read}/alternate-content.js +1 -1
  201. package/dist/{import/dist → core/dist/kernel/pptx-read}/diagnostics.js +33 -29
  202. package/dist/core/dist/kernel/pptx-read/drawing-list-import.js +251 -0
  203. package/dist/{import/dist → core/dist/kernel/pptx-read}/fonts.js +71 -12
  204. package/dist/core/dist/kernel/pptx-read/index.js +15 -0
  205. package/dist/{import/dist → core/dist/kernel/pptx-read}/mechanism.js +1 -1
  206. package/dist/core/dist/kernel/pptx-read/media.js +26 -0
  207. package/dist/{import/dist → core/dist/kernel/pptx-read}/namespaces.js +6 -7
  208. package/dist/{import/dist → core/dist/kernel/pptx-read}/opc.js +62 -13
  209. package/dist/{import/dist → core/dist/kernel/pptx-read}/resources.js +1 -1
  210. package/dist/core/dist/kernel/pptx-read/shape-tree.js +57 -0
  211. package/dist/{import/dist → core/dist/kernel/pptx-read}/themes.js +182 -41
  212. package/dist/{import/dist → core/dist/kernel/pptx-read}/visual.js +175 -88
  213. package/dist/core/dist/kernel/pptx-read/xml-fragments.js +320 -0
  214. package/dist/{import/dist → core/dist/kernel/pptx-read}/xml-reader.js +8 -1
  215. package/dist/{emit/dist → core/dist/kernel/pptx-write}/shape-tree.js +1 -1
  216. package/dist/core/dist/kernel/pptx-write/timing.js +52 -0
  217. package/dist/{emit/dist/ooxml.js → core/dist/kernel/pptx-write/xml.js} +133 -290
  218. package/dist/core/dist/{query.js → kernel/query.js} +76 -37
  219. package/dist/core/dist/{resolution.js → kernel/resolution.js} +2 -1
  220. package/dist/core/dist/kernel/resolve-work.js +58 -0
  221. package/dist/core/dist/{resolve.js → kernel/resolve.js} +797 -409
  222. package/dist/core/dist/kernel/resource-source.js +11 -0
  223. package/dist/core/dist/kernel/stage-options.js +312 -0
  224. package/dist/core/dist/{theme.js → kernel/theme.js} +399 -289
  225. package/dist/core/dist/kernel/transform-geometry.js +72 -0
  226. package/dist/core/dist/kernel/xml-values.js +13 -0
  227. package/dist/document-C0lPlH-L.d.ts +1442 -0
  228. package/dist/index-B9_OUeA-.d.ts +2238 -0
  229. package/dist/index-BJEzQxWV.d.ts +75 -0
  230. package/dist/index-DA9flrlR.d.ts +146 -0
  231. package/dist/index-GSt0t9VO.d.ts +54 -0
  232. package/dist/index.d.ts +7 -7
  233. package/dist/index.js +75 -61
  234. package/dist/node.d.ts +37 -35
  235. package/dist/node.js +125 -51
  236. package/dist/pptxdk/src/cli-commands.js +79 -81
  237. package/dist/pptxdk/src/compose.js +32 -24
  238. package/dist/pptxdk/src/preview-result.js +24 -0
  239. package/dist/{capabilities/dist/image → preview/dist}/gif-decoder.js +5 -5
  240. package/dist/preview/dist/index.js +229 -77
  241. package/dist/preview/dist/options.js +17 -26
  242. package/dist/preview/dist/raster.js +66 -0
  243. package/dist/preview/dist/svg-guard.js +1090 -0
  244. package/dist/preview.d.ts +6 -3
  245. package/dist/preview.js +8 -24
  246. package/dist/react/dist/append.js +3 -3
  247. package/dist/react/dist/author/audio-elements.js +14 -0
  248. package/dist/{capabilities/dist/box → react/dist/author}/box-elements.js +5 -3
  249. package/dist/react/dist/author/chart-elements.js +14 -0
  250. package/dist/react/dist/author/comment-elements.js +15 -0
  251. package/dist/react/dist/author/group-elements.js +14 -0
  252. package/dist/react/dist/author/image-elements.js +14 -0
  253. package/dist/react/dist/author/line-elements.js +14 -0
  254. package/dist/{capabilities/dist/motion → react/dist/author}/motion-elements.js +6 -4
  255. package/dist/react/dist/author/notes-elements.js +14 -0
  256. package/dist/react/dist/author/placeholder-elements.js +14 -0
  257. package/dist/react/dist/author/shape-elements.js +14 -0
  258. package/dist/{capabilities/dist/table → react/dist/author}/table-elements.js +6 -4
  259. package/dist/react/dist/author/text-elements.js +64 -0
  260. package/dist/react/dist/author/video-elements.js +14 -0
  261. package/dist/react/dist/document-adapter.js +376 -37
  262. package/dist/react/dist/elements.js +30 -4
  263. package/dist/react/dist/from-vanilla.js +57 -0
  264. package/dist/react/dist/index.js +47 -12
  265. package/dist/react/dist/mount.js +34 -0
  266. package/dist/react/dist/reconciler.js +26 -26
  267. package/dist/react.d.ts +174 -50
  268. package/dist/react.js +31 -27
  269. package/dist/stages-DYHSHKt4.d.ts +80 -0
  270. package/dist/vanilla.d.ts +4 -4
  271. package/dist/vanilla.js +14 -14
  272. package/package.json +6 -8
  273. package/README.md +0 -49
  274. package/dist/capabilities/dist/all.js +0 -32
  275. package/dist/capabilities/dist/box/box-codegen.js +0 -51
  276. package/dist/capabilities/dist/box/box-declaration.js +0 -31
  277. package/dist/capabilities/dist/chart/chart-elements.js +0 -12
  278. package/dist/capabilities/dist/chart/preview/data-labels.js +0 -334
  279. package/dist/capabilities/dist/document.js +0 -148
  280. package/dist/capabilities/dist/font/font-embedding.js +0 -289
  281. package/dist/capabilities/dist/font/font-family.js +0 -10
  282. package/dist/capabilities/dist/font/font-import.js +0 -302
  283. package/dist/capabilities/dist/font/font.js +0 -25
  284. package/dist/capabilities/dist/group/group-codegen.js +0 -51
  285. package/dist/capabilities/dist/group/group-declaration.js +0 -42
  286. package/dist/capabilities/dist/group/group-elements.js +0 -12
  287. package/dist/capabilities/dist/group/group-import.js +0 -319
  288. package/dist/capabilities/dist/group/group.js +0 -211
  289. package/dist/capabilities/dist/image/image-codegen.js +0 -94
  290. package/dist/capabilities/dist/image/image-declaration.js +0 -8
  291. package/dist/capabilities/dist/image/image-elements.js +0 -12
  292. package/dist/capabilities/dist/image/image-xml.js +0 -12
  293. package/dist/capabilities/dist/image/image.js +0 -472
  294. package/dist/capabilities/dist/masters/masters-codegen.js +0 -21
  295. package/dist/capabilities/dist/motion/motion-api.js +0 -527
  296. package/dist/capabilities/dist/motion/motion-schemas.js +0 -216
  297. package/dist/capabilities/dist/notes/notes-elements.js +0 -12
  298. package/dist/capabilities/dist/notes/notes-xml.js +0 -38
  299. package/dist/capabilities/dist/placeholder/placeholder-codegen.js +0 -23
  300. package/dist/capabilities/dist/placeholder/placeholder-elements.js +0 -12
  301. package/dist/capabilities/dist/placeholder/placeholder.js +0 -292
  302. package/dist/capabilities/dist/shape/shape-declaration.js +0 -57
  303. package/dist/capabilities/dist/shape/shape-elements.js +0 -12
  304. package/dist/capabilities/dist/shape/shape-import.js +0 -579
  305. package/dist/capabilities/dist/shared/placeholder-import.js +0 -113
  306. package/dist/capabilities/dist/shared/style-parse.js +0 -11
  307. package/dist/capabilities/dist/shared/text-schemas.js +0 -216
  308. package/dist/capabilities/dist/shared/text-service.js +0 -1883
  309. package/dist/capabilities/dist/slide-background/slide-background-codegen.js +0 -44
  310. package/dist/capabilities/dist/slide-background/slide-background-xml.js +0 -21
  311. package/dist/capabilities/dist/table/table-codegen.js +0 -81
  312. package/dist/capabilities/dist/table/table-schemas.js +0 -279
  313. package/dist/capabilities/dist/text/text-codegen.js +0 -129
  314. package/dist/capabilities/dist/text/text-declaration.js +0 -19
  315. package/dist/capabilities/dist/text/text-elements.js +0 -38
  316. package/dist/capabilities/dist/text/text-import.js +0 -1077
  317. package/dist/capability-D_xeNVIw.d.ts +0 -29496
  318. package/dist/codegen/dist/types.js +0 -49
  319. package/dist/core/dist/build.js +0 -4
  320. package/dist/core/dist/capability.js +0 -13
  321. package/dist/core/dist/diagnostics.js +0 -21
  322. package/dist/core/dist/document-internals.js +0 -13
  323. package/dist/core/dist/input-values.js +0 -45
  324. package/dist/core/dist/layout.js +0 -299
  325. package/dist/core/dist/masters.js +0 -169
  326. package/dist/core/dist/placeholders.js +0 -213
  327. package/dist/core/dist/stage-options.js +0 -67
  328. package/dist/document-BHPUODPP.d.ts +0 -27759
  329. package/dist/emit/dist/index.js +0 -5
  330. package/dist/import/dist/import.js +0 -504
  331. package/dist/import/dist/index.js +0 -16
  332. package/dist/import/dist/xml-fragments.js +0 -36
  333. package/dist/index-B5m3hqjC.d.ts +0 -7
  334. package/dist/index-CCy-Yo8G.d.ts +0 -1208
  335. package/dist/index-DpxcZ4Gs.d.ts +0 -725
  336. package/dist/pptxdk/src/slide.js +0 -9
  337. package/dist/preview-Cfw0QdMM.d.ts +0 -86
  338. package/dist/transition-Cips9wma.d.ts +0 -82
@@ -1,9 +1,9 @@
1
- import { CapabilityError } from "../../../core/dist/diagnostics.js";
2
- import "../../../core/dist/capability.js";
3
- import { maximumTimeNodeValue } from "./motion-schemas.js";
4
- import "./motion-api.js";
1
+ import { CapabilityError } from "../../kernel/diagnostics.js";
2
+ import "../shared/motion-api.js";
3
+ import { maximumTimeNodeValue } from "../shared/motion-schemas.js";
4
+ import "../../kernel/capability.js";
5
5
  import { createMotionQuery } from "./motion-query.js";
6
- // ../capabilities/dist/motion/motion-plan.js
6
+ // ../core/dist/capabilities/motion/motion-plan.js
7
7
  function planStartForGate(gate) {
8
8
  switch (gate.kind) {
9
9
  case "parent-start": return {
@@ -19,6 +19,7 @@ function planStartForGate(gate) {
19
19
  dependency: gate.dependency
20
20
  };
21
21
  case "plan-start": return gate.start;
22
+ default: return gate;
22
23
  }
23
24
  }
24
25
  function gateSourceDependencies(gate) {
@@ -101,8 +102,8 @@ function composeMotionPlanStarts(inherited, child) {
101
102
  if (child.kind === "condition-end") return;
102
103
  return addMotionPlanStartDelay(inherited, child.delayMs);
103
104
  }
104
- function fail(code, message, path) {
105
- throw new CapabilityError(code, message, path);
105
+ function fail(code, message, path, field) {
106
+ throw new CapabilityError(code, message, path, { field });
106
107
  }
107
108
  function isRecord(value) {
108
109
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -145,9 +146,17 @@ function timingParts(timing) {
145
146
  }
146
147
  function eventSource(event) {
147
148
  if ("scopeId" in event) return event.point === "start" ? `scope-start:${event.scopeId}` : `scope:${event.scopeId}`;
148
- if ("group" in event) return `target:${event.targetId}`;
149
+ if ("group" in event) {
150
+ const targetKey = event.targetKey;
151
+ return typeof targetKey === "string" ? `target:${targetKey}` : `target:${event.targetId}`;
152
+ }
149
153
  return `effect:${event.targetId}:${event.effectIndex}:${event.partIndex ?? ""}`;
150
154
  }
155
+ function stripPublicDependency(dependency) {
156
+ if (!("group" in dependency) || !("targetKey" in dependency)) return dependency;
157
+ const { targetKey: _targetKey, ...publicDependency } = dependency;
158
+ return publicDependency;
159
+ }
151
160
  function dependencyAtEvent(dependency, offsetMs = 0) {
152
161
  return {
153
162
  ...dependency,
@@ -441,7 +450,7 @@ function expansionFor(target, effect, path) {
441
450
  count: 1
442
451
  };
443
452
  if (effect.by === "word" || effect.by === "letter") {
444
- if (!target.textBody || !target.paragraphCount) fail("invalid-motion-granularity", `by: "${effect.by}" requires native object with text`, path);
453
+ if (!target.textBody || !target.paragraphCount) fail("invalid-motion-granularity", `by: "${effect.by}" requires native object with text`, path, `${effect.authorField}.by`);
445
454
  return {
446
455
  type: "iterate",
447
456
  count: 1,
@@ -451,7 +460,7 @@ function expansionFor(target, effect, path) {
451
460
  }
452
461
  if (effect.by === "paragraph") {
453
462
  const count = target.paragraphCount ?? 0;
454
- if (!target.textBody || count < 1) fail("invalid-motion-granularity", "by: \"paragraph\" requires native text object with paragraphs", path);
463
+ if (!target.textBody || count < 1) fail("invalid-motion-granularity", "by: \"paragraph\" requires native text object with paragraphs", path, `${effect.authorField}.by`);
455
464
  return {
456
465
  type: "parts",
457
466
  count,
@@ -463,7 +472,7 @@ function expansionFor(target, effect, path) {
463
472
  };
464
473
  }
465
474
  const pointCounts = target.chartSeriesPointCounts ?? [];
466
- if (target.kind !== "chart") fail("invalid-motion-granularity", `by: "${effect.by}" requires native chart`, path);
475
+ if (target.kind !== "chart") fail("invalid-motion-granularity", `by: "${effect.by}" requires native chart`, path, `${effect.authorField}.by`);
467
476
  const pointCount = Math.max(0, ...pointCounts);
468
477
  let dataRanges;
469
478
  if (effect.by === "series") dataRanges = pointCounts.map((_, seriesIndex) => ({
@@ -502,10 +511,6 @@ function expansionFor(target, effect, path) {
502
511
  ranges
503
512
  };
504
513
  }
505
- function effectEnd(base, target, effect, effectIndex, expansion, facts) {
506
- const partIndex = expansion.type === "parts" ? expansion.count - 1 : void 0;
507
- return effectTimingAt(add(base, Math.round(effect.delay) + (partIndex === void 0 ? 0 : partIndex * Math.round(effect.duration))), target, effect, effectIndex, partIndex, expansion, facts).end;
508
- }
509
514
  function effectTimingAt(startExpression, target, effect, effectIndex, partIndex, expansion, facts) {
510
515
  if (startExpression.state === "no-natural-completion") return {
511
516
  start: startExpression,
@@ -523,7 +528,7 @@ function effectTimingAt(startExpression, target, effect, effectIndex, partIndex,
523
528
  };
524
529
  const rounds = effect.repeatCount ?? 1;
525
530
  const durationMs = Math.round(effect.duration) * rounds;
526
- if (start.state === "known" && !Number.isSafeInteger(start.timeMs + durationMs)) fail("invalid-motion-time", "Effect completion moment must be a safe integer in milliseconds", target.path);
531
+ if (start.state === "known" && !Number.isSafeInteger(start.timeMs + durationMs)) fail("invalid-motion-time", "Effect completion moment must be a safe integer in milliseconds", target.path, `${effect.authorField}.duration`);
527
532
  const dependency = {
528
533
  targetId: target.id,
529
534
  effectIndex,
@@ -559,17 +564,26 @@ function effectTimingAt(startExpression, target, effect, effectIndex, partIndex,
559
564
  function motionScope(value) {
560
565
  return typeof value.identity === "string" && typeof value.mode === "string" && typeof value.delay === "number";
561
566
  }
567
+ function targetRangeKey(range) {
568
+ if (range === void 0) return "";
569
+ return range.type === "paragraph" ? `p:${range.start}:${range.end}` : `c:${range.step}:${range.seriesIndex}:${range.categoryIndex}`;
570
+ }
571
+ function slotEndExpression(ends, facts) {
572
+ if (ends.length === 1) return asExpression(ends[0]);
573
+ return maximum(ends, facts);
574
+ }
562
575
  function motionPlan(contributions) {
563
576
  const stepRootHostIdentity = "\0motion-step-root";
564
577
  const scopes = /* @__PURE__ */ new Map();
565
578
  const targets = /* @__PURE__ */ new Map();
579
+ const nextEffectIndexByTargetId = /* @__PURE__ */ new Map();
566
580
  const roots = [];
567
581
  const effectExpansions = /* @__PURE__ */ new Map();
568
- const getExpansion = (target, effectIndex) => {
569
- const key = `${target.id}:${effectIndex}`;
582
+ const getExpansion = (target, rawIndex) => {
583
+ const key = `${target.entryKey}:${rawIndex}`;
570
584
  const existing = effectExpansions.get(key);
571
585
  if (existing !== void 0) return existing;
572
- const effect = target.value.effects[effectIndex];
586
+ const effect = target.value.effects[rawIndex];
573
587
  if (effect === void 0) fail("invalid-motion", "Motion effect index does not exist", target.path);
574
588
  const expansion = expansionFor(target.value.target, effect, target.path);
575
589
  effectExpansions.set(key, expansion);
@@ -592,9 +606,14 @@ function motionPlan(contributions) {
592
606
  if (!isMotionValue(contribution.value)) fail("invalid-motion", `motion annotation is invalid at ${contribution.path}`, contribution.path);
593
607
  if (contribution.targetId === void 0) fail("invalid-motion", "Object motion lacks native object identity", contribution.path);
594
608
  const trigger = stepInfo(contribution.value.step);
595
- if (targets.has(contribution.targetId)) fail("invalid-motion", "Same native object repeatedly submitted motion declarations", contribution.path);
596
- targets.set(contribution.targetId, {
609
+ const entryKey = `${trigger.key}:${contribution.targetId}:${targetRangeKey(contribution.value.target.range)}`;
610
+ if (targets.has(entryKey)) fail("invalid-motion", "Same native object repeatedly submitted motion declarations", contribution.path);
611
+ const effectIndexBase = nextEffectIndexByTargetId.get(contribution.targetId) ?? 0;
612
+ nextEffectIndexByTargetId.set(contribution.targetId, effectIndexBase + contribution.value.effects.length);
613
+ targets.set(entryKey, {
597
614
  id: contribution.targetId,
615
+ entryKey,
616
+ effectIndexBase,
598
617
  path: contribution.path,
599
618
  order: contribution.order,
600
619
  value: contribution.value,
@@ -607,7 +626,9 @@ function motionPlan(contributions) {
607
626
  const granularities = new Set(target.value.effects.map(({ by }) => by).filter((by) => typeof by === "string"));
608
627
  const textGranularities = [...granularities].filter((by) => by === "paragraph" || by === "word" || by === "letter");
609
628
  const chartGranularities = [...granularities].filter((by) => by === "series" || by === "category" || by === "seriesElements" || by === "categoryElements");
610
- if (target.value.target.kind === "chart" ? chartGranularities.length > 1 : textGranularities.length > 1) fail("invalid-motion-granularity", "Parallel motions on the same native object cannot mix incompatible build granularities", target.path);
629
+ const conflictingGranularity = (target.value.target.kind === "chart" ? chartGranularities : textGranularities)[1];
630
+ const conflictingEffect = conflictingGranularity === void 0 ? void 0 : target.value.effects.find(({ by }) => by === conflictingGranularity);
631
+ if (conflictingEffect !== void 0) fail("invalid-motion-granularity", "Parallel motions on the same native object cannot mix incompatible build granularities", target.path, `${conflictingEffect.authorField}.by`);
611
632
  }
612
633
  for (const scope of scopes.values()) {
613
634
  const parentId = scope.declaration.parent;
@@ -636,6 +657,7 @@ function motionPlan(contributions) {
636
657
  }
637
658
  const member = {
638
659
  kind: "object",
660
+ key: target.entryKey,
639
661
  id: target.id,
640
662
  order: target.order
641
663
  };
@@ -658,7 +680,7 @@ function motionPlan(contributions) {
658
680
  const scope = scopes.get(identity);
659
681
  if (scope === void 0) return result;
660
682
  for (const member of scope.members) if (member.kind === "object") {
661
- const target = targets.get(member.id);
683
+ const target = targets.get(member.key);
662
684
  if (target !== void 0) result.add(target.stepKey);
663
685
  } else for (const key of collectActiveSteps(member.id)) result.add(key);
664
686
  return result;
@@ -667,7 +689,7 @@ function motionPlan(contributions) {
667
689
  const active = [...collectActiveSteps(scope.declaration.identity)];
668
690
  return active.length > 0 ? active : [stepKey(scope.declaration.step)];
669
691
  };
670
- const activeMemberSteps = (member) => member.kind === "object" ? [targets.get(member.id)?.stepKey ?? "slide-entry"] : [...collectActiveSteps(member.id)];
692
+ const activeMemberSteps = (member) => member.kind === "object" ? [targets.get(member.key)?.stepKey ?? "slide-entry"] : [...collectActiveSteps(member.id)];
671
693
  const memberExistsInStep = (member, key) => {
672
694
  const memberSteps = activeMemberSteps(member);
673
695
  if (memberSteps.length > 0) return memberSteps.includes(key);
@@ -705,9 +727,12 @@ function motionPlan(contributions) {
705
727
  else existing.order = Math.min(existing.order, order);
706
728
  };
707
729
  for (const target of targets.values()) registerStep(target.stepKey, target.trigger, target.number, target.order);
708
- for (const scope of scopes.values()) for (const key of scopeSteps(scope)) {
709
- const number = key.startsWith("explicit:") ? Number(key.slice(9)) : void 0;
710
- registerStep(key, key === "slide-entry" ? "auto" : "click", number, scope.order);
730
+ for (const scope of scopes.values()) {
731
+ if (scope.declaration.implicit === true) continue;
732
+ for (const key of scopeSteps(scope)) {
733
+ const number = key.startsWith("explicit:") ? Number(key.slice(9)) : void 0;
734
+ registerStep(key, key === "slide-entry" ? "auto" : "click", number, scope.order);
735
+ }
711
736
  }
712
737
  const allScheduledEffects = /* @__PURE__ */ new Map();
713
738
  const allStepNodes = /* @__PURE__ */ new Map();
@@ -737,19 +762,31 @@ function motionPlan(contributions) {
737
762
  const conditionStartsByEventId = /* @__PURE__ */ new Map();
738
763
  const resolvingStarts = /* @__PURE__ */ new Set();
739
764
  const resolvingEnds = /* @__PURE__ */ new Set();
740
- const scheduledObjects = /* @__PURE__ */ new Set();
741
765
  const queryScopes = [];
742
766
  const queryEffectSources = /* @__PURE__ */ new Map();
767
+ const visibleParentScope = (scope) => {
768
+ let current = scope.declaration.parent === void 0 ? void 0 : scopes.get(scope.declaration.parent);
769
+ while (current !== void 0 && current.declaration.implicit === true) current = current.declaration.parent === void 0 ? void 0 : scopes.get(current.declaration.parent);
770
+ return current;
771
+ };
743
772
  const queryScopeIdentities = /* @__PURE__ */ new Set();
744
773
  for (const scope of scopes.values()) {
774
+ if (scope.declaration.implicit === true) continue;
745
775
  if (!scopeSteps(scope).includes(key)) continue;
746
776
  let identity = scope.declaration.identity;
747
777
  while (identity !== void 0 && !queryScopeIdentities.has(identity)) {
748
- queryScopeIdentities.add(identity);
778
+ if (scopes.get(identity)?.declaration.implicit !== true) queryScopeIdentities.add(identity);
749
779
  identity = queryDeclarationIndex.get(identity)?.parent;
750
780
  }
751
781
  }
752
- const queryDeclarationMembers = (scope) => queryDeclarationIndex.get(scope.declaration.identity)?.members.filter((member) => member.kind === "scope" ? queryScopeIdentities.has(member.id) : memberIsActive(member, key)) ?? [];
782
+ const expandImplicitQueryMembers = (members) => members.flatMap((member) => {
783
+ if (member.kind === "scope") {
784
+ if (scopes.get(member.id)?.declaration.implicit === true) return expandImplicitQueryMembers(queryDeclarationIndex.get(member.id)?.members ?? []);
785
+ return queryScopeIdentities.has(member.id) ? [member] : [];
786
+ }
787
+ return memberIsActive(member, key) ? [member] : [];
788
+ });
789
+ const queryDeclarationMembers = (scope) => expandImplicitQueryMembers(queryDeclarationIndex.get(scope.declaration.identity)?.members ?? []);
753
790
  const projectedNodeHosts = /* @__PURE__ */ new Map();
754
791
  const projectedEndHosts = /* @__PURE__ */ new Map();
755
792
  const preservedScopeStarts = /* @__PURE__ */ new Set();
@@ -766,15 +803,20 @@ function motionPlan(contributions) {
766
803
  }
767
804
  return host.members.findIndex((member) => member.kind === "scope" && member.id === current.declaration.identity);
768
805
  };
806
+ const findTargetForDependency = (dependency) => {
807
+ const candidates = [...targets.values()].filter((target) => target.stepKey === key && target.id === dependency.targetId);
808
+ if ("effectIndex" in dependency) return candidates.find((target) => dependency.effectIndex >= target.effectIndexBase && dependency.effectIndex < target.effectIndexBase + target.value.effects.length) ?? candidates[0];
809
+ return candidates[0];
810
+ };
769
811
  const directMemberForDependency = (host, dependency) => {
770
812
  if ("scopeId" in dependency) {
771
813
  const source = [...scopes.values()].find((scope) => scopeId(scope.declaration.identity, scopes) === dependency.scopeId);
772
814
  return source === void 0 ? void 0 : directMemberForScope(host, source.declaration.identity);
773
815
  }
774
- const source = targets.get(dependency.targetId);
816
+ const source = findTargetForDependency(dependency);
775
817
  if (source === void 0) return void 0;
776
818
  const containingScope = source.value.scopes.at(-1)?.identity;
777
- if (containingScope === host.declaration.identity) return host.members.findIndex((member) => member.kind === "object" && member.id === source.id);
819
+ if (containingScope === host.declaration.identity) return host.members.findIndex((member) => member.kind === "object" && member.key === source.entryKey);
778
820
  return containingScope === void 0 ? void 0 : directMemberForScope(host, containingScope);
779
821
  };
780
822
  const rootMemberForScope = (identity) => {
@@ -786,22 +828,22 @@ function motionPlan(contributions) {
786
828
  const rootMemberForTarget = (target) => {
787
829
  const containingScope = target.value.scopes.at(-1)?.identity;
788
830
  if (containingScope !== void 0) return rootMemberForScope(containingScope);
789
- return target.stepKey === key ? roots.find((member) => member.kind === "object" && member.id === target.id) : void 0;
831
+ return target.stepKey === key ? roots.find((member) => member.kind === "object" && member.key === target.entryKey) : void 0;
790
832
  };
791
833
  const directRootMemberForDependency = (dependency) => {
792
834
  if ("scopeId" in dependency) {
793
835
  const source = scopeForPlanId(dependency.scopeId);
794
836
  return source === void 0 ? void 0 : rootMemberForScope(source.declaration.identity);
795
837
  }
796
- const source = targets.get(dependency.targetId);
838
+ const source = findTargetForDependency(dependency);
797
839
  return source === void 0 ? void 0 : rootMemberForTarget(source);
798
840
  };
799
841
  const directRootMemberForConsumer = (consumer) => {
800
842
  if (consumer.kind === "scope") return rootMemberForScope(consumer.id);
801
- const target = targets.get(consumer.id);
843
+ const target = targets.get(consumer.key);
802
844
  return target === void 0 ? void 0 : rootMemberForTarget(target);
803
845
  };
804
- const memberNodeId = (member) => member.kind === "scope" ? `scope:${scopeId(member.id, scopes)}` : `target:${member.id}`;
846
+ const memberNodeId = (member) => member.kind === "scope" ? `scope:${scopeId(member.id, scopes)}` : `target:${member.key}`;
805
847
  const directConsumerAtHost = (candidateHost, actualParent, consumer) => {
806
848
  if (candidateHost.declaration.identity === actualParent.declaration.identity) return consumer;
807
849
  let current = consumer.kind === "scope" ? scopes.get(consumer.id) : actualParent;
@@ -1176,18 +1218,51 @@ function motionPlan(contributions) {
1176
1218
  }, candidate.offsetMs - exactParentOffset);
1177
1219
  if (lowered !== void 0) return lowered;
1178
1220
  }
1179
- fail("unknown-motion-start", "Unknown start has no provable parent activation or completion event source", path);
1221
+ return fail("unknown-motion-start", "Unknown start has no provable parent activation or completion event source", path);
1222
+ };
1223
+ const unwrapImplicitReportedDependencies = (dependency, seen = /* @__PURE__ */ new Set()) => {
1224
+ if (!("scopeId" in dependency)) return [dependency];
1225
+ const source = scopeForPlanId(dependency.scopeId);
1226
+ if (source === void 0 || source.declaration.implicit !== true || seen.has(source.declaration.identity)) return [dependency];
1227
+ const nextSeen = new Set(seen);
1228
+ nextSeen.add(source.declaration.identity);
1229
+ if (dependency.point === "start") {
1230
+ const original = scopeStartExpressions.get(source.declaration.identity);
1231
+ if (original === void 0 || original.state === "no-natural-completion") return [];
1232
+ return original.candidates.flatMap((candidate) => {
1233
+ let sourceDependency = candidate.dependency;
1234
+ if (sourceDependency === void 0) {
1235
+ const sourceStart = scopeForStartEvent(candidate.eventId);
1236
+ if (sourceStart !== void 0) sourceDependency = {
1237
+ scopeId: scopeId(sourceStart.declaration.identity, scopes),
1238
+ point: "start",
1239
+ offsetMs: 0
1240
+ };
1241
+ }
1242
+ if (sourceDependency === void 0) return [];
1243
+ return unwrapImplicitReportedDependencies(dependencyAtEvent(sourceDependency, candidate.offsetMs + dependency.offsetMs), nextSeen);
1244
+ });
1245
+ }
1246
+ const memberEnds = scopeCompletionMembers.get(source.declaration.identity);
1247
+ if (memberEnds === void 0) return [];
1248
+ return memberEnds.flatMap((memberEnd) => {
1249
+ if (memberEnd.state !== "unknown" || memberEnd.dependency === void 0) return [];
1250
+ return unwrapImplicitReportedDependencies(dependencyAtEvent(memberEnd.dependency, memberEnd.dependency.offsetMs + dependency.offsetMs), nextSeen);
1251
+ });
1180
1252
  };
1181
1253
  const reportedDependency = (nativeStart, parentStart) => {
1182
1254
  if (nativeStart.kind === "delay-layer") {
1183
1255
  const inherited = reportedDependency(nativeStart.start, parentStart);
1184
1256
  return inherited === void 0 ? void 0 : dependencyAtEvent(inherited, inherited.offsetMs + nativeStart.delayMs);
1185
1257
  }
1186
- if (nativeStart.kind === "end" || nativeStart.kind === "event") return nativeStart.dependency;
1258
+ if (nativeStart.kind === "end" || nativeStart.kind === "event") {
1259
+ const unwrapped = unwrapImplicitReportedDependencies(nativeStart.dependency);
1260
+ return unwrapped.length === 1 ? stripPublicDependency(unwrapped[0]) : void 0;
1261
+ }
1187
1262
  if (nativeStart.kind !== "parent-start") return void 0;
1188
1263
  if (parentStart.state === "no-natural-completion") return void 0;
1189
1264
  const inherited = parentStart.reportedStartAfter;
1190
- return inherited === void 0 ? void 0 : dependencyAtEvent(inherited, inherited.offsetMs + nativeStart.delayMs);
1265
+ return inherited === void 0 ? void 0 : stripPublicDependency(dependencyAtEvent(inherited, inherited.offsetMs + nativeStart.delayMs));
1191
1266
  };
1192
1267
  const reportedDependencies = (nativeStart, parentStart) => {
1193
1268
  if (nativeStart.kind === "delay-layer") {
@@ -1233,22 +1308,25 @@ function motionPlan(contributions) {
1233
1308
  }];
1234
1309
  return reportedDependencies(gate.start, parentStart) ?? [];
1235
1310
  };
1236
- if (nativeStart.kind === "end" || nativeStart.kind === "event") return Object.freeze(expandStartDependency(nativeStart.dependency));
1311
+ if (nativeStart.kind === "end" || nativeStart.kind === "event") {
1312
+ const expanded = expandStartDependency(nativeStart.dependency).flatMap((dependency) => unwrapImplicitReportedDependencies(dependency)).map(stripPublicDependency);
1313
+ return Object.freeze(expanded);
1314
+ }
1237
1315
  if (nativeStart.kind === "condition-join") {
1238
- const dependencies = nativeStart.gates.flatMap((gate) => reportedGateDependencies(gate, nativeStart.hostScopeId));
1316
+ const dependencies = nativeStart.gates.flatMap((gate) => reportedGateDependencies(gate, nativeStart.hostScopeId)).map(stripPublicDependency);
1239
1317
  return Object.freeze(dependencies);
1240
1318
  }
1241
1319
  if (nativeStart.kind === "condition-end") {
1242
1320
  const canonical = conditionJoinsById.get(nativeStart.id);
1243
1321
  if (canonical === void 0) throw new Error("MotionPlan condition alias lacks original condition collection");
1244
1322
  const dependencies = canonical.gates.flatMap((gate) => reportedGateDependencies(gate, canonical.hostScopeId));
1245
- return Object.freeze(dependencies.map((dependency) => dependencyAtEvent(dependency, dependency.offsetMs + nativeStart.delayMs)));
1323
+ return Object.freeze(dependencies.map((dependency) => stripPublicDependency(dependencyAtEvent(dependency, dependency.offsetMs + nativeStart.delayMs))));
1246
1324
  }
1247
1325
  if (nativeStart.kind !== "parent-start") return void 0;
1248
1326
  if (parentStart.state === "no-natural-completion") return void 0;
1249
1327
  const inherited = parentStart.reportedStartAfterAll;
1250
1328
  if (inherited === void 0) return void 0;
1251
- return Object.freeze(inherited.map((dependency) => dependencyAtEvent(dependency, dependency.offsetMs + nativeStart.delayMs)));
1329
+ return Object.freeze(inherited.map((dependency) => stripPublicDependency(dependencyAtEvent(dependency, dependency.offsetMs + nativeStart.delayMs))));
1252
1330
  };
1253
1331
  const pointExpression = (point) => asExpression(point);
1254
1332
  const scopeStartEventId = (scope) => `scope-start:${scope.declaration.identity}`;
@@ -1257,12 +1335,8 @@ function motionPlan(contributions) {
1257
1335
  if (stepKeysOf(scope).length !== 1) fail("cross-step-motion", "Moment of a single choreography scope cannot be determined across click steps", scope.path);
1258
1336
  };
1259
1337
  const resolveMoment = (reference, fromPath) => {
1260
- const owner = scopes.get(reference.scope);
1261
- if (owner === void 0) fail("missing-cue", "Choreography scope corresponding to moment handle does not exist", fromPath);
1262
- ensureSingleStep(owner);
1263
- if (scopeSteps(owner)[0] !== key) fail("cross-step-motion", "Moment dependencies cannot cross different click steps", fromPath);
1264
- let sourceScope = owner;
1265
- let point = reference.point === "end" ? "end" : "start";
1338
+ let sourceScope;
1339
+ let point;
1266
1340
  if (reference.point === "named") {
1267
1341
  const publisher = cuePublishers.get(momentKey(reference));
1268
1342
  if (publisher === void 0) fail("missing-cue", `No component published named moment ${reference.name ?? ""}`, fromPath);
@@ -1272,6 +1346,13 @@ function motionPlan(contributions) {
1272
1346
  if (scopeSteps(publishedScope)[0] !== key) fail("cross-step-motion", "Named moment dependencies cannot cross different click steps", fromPath);
1273
1347
  sourceScope = publishedScope;
1274
1348
  point = publisher.point;
1349
+ } else {
1350
+ const owner = scopes.get(reference.scope);
1351
+ if (owner === void 0) fail("missing-cue", "Choreography scope corresponding to moment handle does not exist", fromPath);
1352
+ ensureSingleStep(owner);
1353
+ if (scopeSteps(owner)[0] !== key) fail("cross-step-motion", "Moment dependencies cannot cross different click steps", fromPath);
1354
+ sourceScope = owner;
1355
+ point = reference.point === "end" ? "end" : "start";
1275
1356
  }
1276
1357
  if (point === "start") {
1277
1358
  const expression = asExpression(resolveScopeStart(sourceScope));
@@ -1293,30 +1374,83 @@ function motionPlan(contributions) {
1293
1374
  };
1294
1375
  const activeChildren = (scope) => membersInStep(scope, key).filter((member) => memberIsActive(member, key));
1295
1376
  const directChildren = (scope) => membersInStep(scope, key);
1377
+ const computeTargetSlotStarts = (target, base) => {
1378
+ const indexed = target.value.effects.map((effect, rawIndex) => ({
1379
+ rawIndex,
1380
+ effectIndex: target.effectIndexBase + rawIndex,
1381
+ effect
1382
+ }));
1383
+ const slotByRawIndex = /* @__PURE__ */ new Map();
1384
+ let slotBase = base;
1385
+ let isFirstSlot = true;
1386
+ for (const slotKind of [
1387
+ "entrance",
1388
+ "emphasis",
1389
+ "exit"
1390
+ ]) {
1391
+ const slotEffects = indexed.filter(({ effect }) => effect.kind === slotKind);
1392
+ if (slotEffects.length === 0) continue;
1393
+ const slotEnds = [];
1394
+ for (const { rawIndex, effectIndex, effect } of slotEffects) {
1395
+ const expansion = getExpansion(target, rawIndex);
1396
+ const entries = expansion.type === "parts" ? expansion.ranges.map((range, partIndex) => ({
1397
+ range,
1398
+ partIndex
1399
+ })) : [expansion.type === "iterate" ? { iterate: expansion } : {}];
1400
+ const parts = [];
1401
+ for (const entry of entries) {
1402
+ const partIndex = "partIndex" in entry ? entry.partIndex : void 0;
1403
+ const startOffsetMs = Math.round(effect.delay) + (partIndex === void 0 ? 0 : partIndex * Math.round(effect.duration));
1404
+ const start = add(slotBase, startOffsetMs);
1405
+ const timing = effectTimingAt(start, target, effect, effectIndex, partIndex, expansion, facts);
1406
+ parts.push({
1407
+ ...partIndex === void 0 ? {} : { partIndex },
1408
+ ..."range" in entry ? { range: entry.range } : {},
1409
+ ..."iterate" in entry ? { iterate: entry.iterate } : {},
1410
+ start,
1411
+ ...isFirstSlot ? { firstSlotOffsetMs: startOffsetMs } : {},
1412
+ timing
1413
+ });
1414
+ }
1415
+ const lastPart = parts.at(-1);
1416
+ if (lastPart !== void 0) slotEnds.push(lastPart.timing.end);
1417
+ slotByRawIndex.set(rawIndex, {
1418
+ rawIndex,
1419
+ effectIndex,
1420
+ effect,
1421
+ expansion,
1422
+ entries,
1423
+ parts
1424
+ });
1425
+ }
1426
+ slotBase = slotEndExpression(slotEnds, facts);
1427
+ isFirstSlot = false;
1428
+ }
1429
+ return indexed.map(({ rawIndex }) => slotByRawIndex.get(rawIndex));
1430
+ };
1296
1431
  const memberEnd = (parent, member) => {
1297
1432
  if (member.kind === "scope") {
1298
1433
  const child = scopes.get(member.id);
1299
1434
  if (child === void 0) fail("missing-scope", "Member declaration of choreography scope does not exist", parent.path);
1300
1435
  return resolveScopeEnd(child);
1301
1436
  }
1302
- const target = targets.get(member.id);
1437
+ const target = targets.get(member.key);
1303
1438
  if (target === void 0) fail("invalid-motion", "Object member declaration of choreography scope does not exist", parent.path);
1304
1439
  const base = memberStart(parent, member);
1305
- const effectEnds = target.value.effects.map((effect, effectIndex) => effectEnd(base, target, effect, effectIndex, getExpansion(target, effectIndex), facts));
1306
- if (target.value.effects.reduce((count, _effect, effectIndex) => {
1307
- const expansion = getExpansion(target, effectIndex);
1308
- return count + (expansion.type === "parts" ? expansion.count : 1);
1309
- }, 0) > 1) return completion(materializeEvent(base, `target-start:${target.id}`, void 0, facts, target.path), effectEnds, {
1440
+ const scheduledSlots = computeTargetSlotStarts(target, base);
1441
+ const effectEnds = scheduledSlots.map(({ parts }) => parts.at(-1)?.timing.end).filter((end) => end !== void 0);
1442
+ if (scheduledSlots.reduce((count, { parts }) => count + parts.length, 0) > 1) return completion(materializeEvent(base, `target-start:${target.entryKey}`, void 0, facts, target.path), effectEnds, {
1310
1443
  targetId: target.id,
1311
1444
  group: "effects",
1312
1445
  point: "end",
1313
- offsetMs: 0
1446
+ offsetMs: 0,
1447
+ ...target.value.target.range === void 0 ? {} : { targetKey: target.entryKey }
1314
1448
  }, facts, target.path);
1315
1449
  return effectEnds[0] ?? { state: "no-natural-completion" };
1316
1450
  };
1317
1451
  const memberStart = (parent, member) => {
1318
1452
  const parentStart = resolveScopeStart(parent);
1319
- const activeIndex = activeChildren(parent).findIndex((candidate) => candidate.kind === member.kind && candidate.id === member.id);
1453
+ const activeIndex = activeChildren(parent).findIndex((candidate) => candidate.kind !== member.kind ? false : candidate.kind === "scope" ? candidate.id === member.id : candidate.key === member.key);
1320
1454
  if (parent.declaration.mode === "parallel") return pointExpression(parentStart);
1321
1455
  if (parent.declaration.mode === "stagger") {
1322
1456
  if (activeIndex < 0) return pointExpression(parentStart);
@@ -1337,7 +1471,7 @@ function motionPlan(contributions) {
1337
1471
  const cached = starts.get(scope.declaration.identity);
1338
1472
  if (cached !== void 0) return cached;
1339
1473
  if (resolvingStarts.has(scope.declaration.identity)) fail("motion-cycle", "Choreography moment dependencies contain a cycle", scope.path);
1340
- if (scope.declaration.delay > 4294967295) fail("invalid-motion-time", "Single scope delay field exceeds ST_TLTime range", scope.path);
1474
+ if (scope.declaration.delay > 4294967295) fail("invalid-motion-time", "Single scope delay field exceeds ST_TLTime range", scope.path, "delay");
1341
1475
  resolvingStarts.add(scope.declaration.identity);
1342
1476
  let parentStart = origin;
1343
1477
  let parentScope;
@@ -1441,18 +1575,27 @@ function motionPlan(contributions) {
1441
1575
  if ((scope.declaration.mode === "sequence" || scope.declaration.mode === "stagger") && collectActiveSteps(scope.declaration.identity).size > 1) fail("cross-step-motion", "Sequence and stagger scopes cannot choreograph different click steps", scope.path);
1442
1576
  if (scope.declaration.startAt !== void 0 && collectActiveSteps(scope.declaration.identity).size > 1) fail("cross-step-motion", "Scope spanning multiple click steps cannot start from a single moment", scope.path);
1443
1577
  if (!scopeSteps(scope).includes(key)) continue;
1578
+ if (scope.declaration.implicit === true) continue;
1444
1579
  const start = resolveScopeStart(scope);
1445
1580
  const end = resolveScopeEnd(scope);
1446
- const parent = scope.declaration.parent === void 0 ? void 0 : scopes.get(scope.declaration.parent);
1581
+ const parent = visibleParentScope(scope);
1447
1582
  const id = scopeId(scope.declaration.identity, scopes);
1448
1583
  const parentId = parent === void 0 ? void 0 : scopeId(parent.declaration.identity, scopes);
1449
- const observedMembers = directChildren(scope).map((member) => member.kind === "scope" ? {
1450
- kind: "scope",
1451
- id: scopeId(member.id, scopes)
1452
- } : {
1453
- kind: "object",
1454
- id: member.id
1584
+ const observedMembersForScope = (targetScope) => directChildren(targetScope).flatMap((member) => {
1585
+ if (member.kind === "scope") {
1586
+ const child = scopes.get(member.id);
1587
+ if (child?.declaration.implicit === true) return observedMembersForScope(child);
1588
+ return [{
1589
+ kind: "scope",
1590
+ id: scopeId(member.id, scopes)
1591
+ }];
1592
+ }
1593
+ return [{
1594
+ kind: "object",
1595
+ id: member.id
1596
+ }];
1455
1597
  });
1598
+ const observedMembers = observedMembersForScope(scope);
1456
1599
  scopeObservations.push({
1457
1600
  id,
1458
1601
  ...parentId === void 0 ? {} : { parentId },
@@ -1469,7 +1612,7 @@ function motionPlan(contributions) {
1469
1612
  queryScopes.push({
1470
1613
  identity: scope.declaration.identity,
1471
1614
  id,
1472
- ...scope.declaration.parent === void 0 ? {} : { parentIdentity: scope.declaration.parent },
1615
+ ...parent === void 0 ? {} : { parentIdentity: parent.declaration.identity },
1473
1616
  mode: scope.declaration.mode,
1474
1617
  ...scope.declaration.each === void 0 ? {} : { eachMs: Math.round(scope.declaration.each) },
1475
1618
  delayMs: Math.round(scope.declaration.delay),
@@ -1485,113 +1628,115 @@ function motionPlan(contributions) {
1485
1628
  declaration: scope.declaration
1486
1629
  });
1487
1630
  }
1631
+ const scheduledObjects = /* @__PURE__ */ new Set();
1488
1632
  const targetsForStep = [...targets.values()].filter((target) => target.stepKey === key).sort((left, right) => left.order - right.order);
1489
1633
  for (const target of targetsForStep) {
1490
- if (scheduledObjects.has(target.id)) continue;
1634
+ if (scheduledObjects.has(target.entryKey)) continue;
1491
1635
  const containingScope = target.value.scopes.at(-1)?.identity;
1492
1636
  const parent = containingScope === void 0 ? void 0 : scopes.get(containingScope);
1493
1637
  const parentStart = parent === void 0 ? origin : resolveScopeStart(parent);
1494
- const base = parent === void 0 ? pointExpression(origin) : memberStart(parent, {
1638
+ const memberRef = {
1495
1639
  kind: "object",
1640
+ key: target.entryKey,
1496
1641
  id: target.id,
1497
1642
  order: target.order
1498
- });
1499
- for (const [index, effect] of target.value.effects.entries()) {
1500
- const expansion = getExpansion(target, index);
1501
- const entries = expansion.type === "parts" ? expansion.ranges.map((range, partIndex) => ({
1502
- range,
1503
- partIndex
1504
- })) : [expansion.type === "iterate" ? { iterate: expansion } : {}];
1505
- for (const entry of entries) {
1506
- const partIndex = "partIndex" in entry ? entry.partIndex : void 0;
1507
- const start = add(base, Math.round(effect.delay) + (partIndex === void 0 ? 0 : partIndex * Math.round(effect.duration)));
1508
- if (start.state === "no-natural-completion") fail("no-natural-completion", "Content without natural completion cannot start subsequent effects", target.path);
1509
- const nativeStart = resolveNativeStart(start, parentStart, target.path, `effect-start:${target.id}:${index}:${partIndex ?? ""}`, parent, {
1510
- kind: "object",
1643
+ };
1644
+ const base = parent === void 0 ? pointExpression(origin) : memberStart(parent, memberRef);
1645
+ const targetBasePoint = materializeEvent(base, `target-start:${target.entryKey}`, void 0, facts, target.path);
1646
+ const scheduledSlots = computeTargetSlotStarts(target, base);
1647
+ for (const { rawIndex, effectIndex, effect, expansion, parts } of scheduledSlots) for (const part of parts) {
1648
+ const { partIndex, start, timing } = part;
1649
+ if (start.state === "no-natural-completion") fail("no-natural-completion", "Content without natural completion cannot start subsequent effects", target.path);
1650
+ const nativeStart = resolveNativeStart(start, parentStart, target.path, `effect-start:${target.id}:${effectIndex}:${partIndex ?? ""}`, parent, memberRef);
1651
+ const groupNativeStart = part.firstSlotOffsetMs !== void 0 ? addMotionPlanStartDelay({
1652
+ kind: "parent-start",
1653
+ delayMs: 0
1654
+ }, part.firstSlotOffsetMs) ?? resolveNativeStart(start, targetBasePoint, target.path, `group-effect-start:${target.id}:${effectIndex}:${partIndex ?? ""}`, parent, memberRef) : start.state === "known" && targetBasePoint.state === "known" ? addMotionPlanStartDelay({
1655
+ kind: "parent-start",
1656
+ delayMs: 0
1657
+ }, start.timeMs - targetBasePoint.timeMs) ?? resolveNativeStart(start, targetBasePoint, target.path, `group-effect-start:${target.id}:${effectIndex}:${partIndex ?? ""}`, parent, memberRef) : resolveNativeStart(start, targetBasePoint, target.path, `group-effect-start:${target.id}:${effectIndex}:${partIndex ?? ""}`, parent, memberRef);
1658
+ const startAfter = start.state === "unknown" ? reportedDependency(nativeStart, parentStart) : void 0;
1659
+ const startAfterAll = start.state === "unknown" ? reportedDependencies(nativeStart, parentStart) : void 0;
1660
+ const knownStart = timing.start.state === "known" ? timing.start.timeMs : void 0;
1661
+ const endMs = timing.end.state === "known" ? timing.end.timeMs : void 0;
1662
+ const from = typeof effect.from === "number" ? Math.round(effect.from * 6e4) / 6e4 : effect.from;
1663
+ const to = typeof effect.to === "number" ? Math.round(effect.to * 6e4) / 6e4 : void 0;
1664
+ const by = typeof effect.by === "number" ? Math.round(effect.by * 6e4) / 6e4 : effect.by;
1665
+ const easing = normalizedEasing(effect.easing);
1666
+ const scheduledEffect = {
1667
+ target: {
1511
1668
  id: target.id,
1512
- order: target.order
1513
- });
1514
- const startAfter = start.state === "unknown" ? reportedDependency(nativeStart, parentStart) : void 0;
1515
- const startAfterAll = start.state === "unknown" ? reportedDependencies(nativeStart, parentStart) : void 0;
1516
- const timing = effectTimingAt(start, target, effect, index, partIndex, expansion, facts);
1517
- const knownStart = timing.start.state === "known" ? timing.start.timeMs : void 0;
1518
- const endMs = timing.end.state === "known" ? timing.end.timeMs : void 0;
1519
- const from = typeof effect.from === "number" ? Math.round(effect.from * 6e4) / 6e4 : effect.from;
1520
- const by = typeof effect.by === "number" ? Math.round(effect.by * 6e4) / 6e4 : effect.by;
1521
- const easing = normalizedEasing(effect.easing);
1522
- const scheduledEffect = {
1523
- target: {
1524
- id: target.id,
1525
- name: target.value.target.name,
1526
- ...target.value.target.authorId === void 0 ? {} : { authorId: target.value.target.authorId },
1527
- ..."range" in entry ? { range: entry.range } : {}
1528
- },
1529
- kind: effect.kind,
1530
- preset: effect.preset,
1531
- durationMs: Math.round(effect.duration),
1532
- ...effect.repeatCount === void 0 ? {} : { repeatCount: effect.repeatCount },
1533
- delayMs: Math.round(effect.delay),
1534
- ...by === void 0 ? {} : { by },
1535
- ...expansion.type === "iterate" ? { intervalMs: expansion.intervalMs } : {},
1536
- ...from === void 0 ? {} : { from },
1537
- ...easing === void 0 ? {} : { easing },
1538
- ...knownStart === void 0 ? {} : { startMs: knownStart },
1539
- ...effect.preset === "breathe" || effect.preset === "fillColor" ? {
1540
- ...effect.fromColor === void 0 ? {} : { fromColor: effect.fromColor },
1541
- ...effect.toColor === void 0 ? {} : { toColor: effect.toColor }
1542
- } : {},
1543
- ...timing.end.state === "no-natural-completion" ? { completion: "no-natural-completion" } : endMs === void 0 ? { completion: "unknown" } : { endMs },
1544
- ...startAfter === void 0 ? {} : { startAfter },
1545
- ...startAfterAll === void 0 ? {} : { startAfterAll },
1546
- stepKey: key,
1547
- order: target.order + index,
1548
- effectIndex: index,
1549
- ...partIndex === void 0 ? {} : { partIndex },
1550
- targetKind: target.value.target.kind,
1551
- targetTextBody: target.value.target.textBody,
1552
- targetFilled: target.value.target.filled,
1553
- ...target.value.target.box === void 0 ? {} : { targetBox: target.value.target.box },
1554
- ...target.value.target.rotationDegrees === void 0 ? {} : { targetRotationDegrees: target.value.target.rotationDegrees },
1555
- targetHasBackground: target.value.target.hasBackground ?? false,
1556
- ...target.value.target.paragraphCount === void 0 ? {} : { targetParagraphCount: target.value.target.paragraphCount },
1557
- ...target.value.target.members === void 0 ? {} : { targetMembers: target.value.target.members },
1558
- ...expansion.type === "iterate" ? { iterate: {
1559
- type: expansion.by === "word" ? "wd" : "lt",
1560
- intervalMs: expansion.intervalMs
1561
- } } : {}
1562
- };
1563
- addStepEffect(scheduledEffect);
1564
- queryEffectSources.set(motionEffectKey(target.id, index, partIndex), {
1565
- observation: scheduledEffect,
1566
- targetId: target.id,
1567
- effectIndex: index,
1568
- ...partIndex === void 0 ? {} : { partIndex },
1569
- start: queryMomentSource(timing.start),
1570
- end: queryMomentSource(timing.end),
1571
- scopeIdentities: target.value.scopes.map(({ identity }) => identity)
1572
- });
1573
- }
1669
+ name: target.value.target.name,
1670
+ ...target.value.target.authorId === void 0 ? {} : { authorId: target.value.target.authorId },
1671
+ ...part.range !== void 0 ? { range: part.range } : target.value.target.range !== void 0 ? { range: target.value.target.range } : {}
1672
+ },
1673
+ kind: effect.kind,
1674
+ preset: effect.preset,
1675
+ durationMs: Math.round(effect.duration),
1676
+ ...effect.repeatCount === void 0 ? {} : { repeatCount: effect.repeatCount },
1677
+ delayMs: Math.round(effect.delay),
1678
+ ...by === void 0 ? {} : { by },
1679
+ ...expansion.type === "iterate" ? { intervalMs: expansion.intervalMs } : {},
1680
+ ...from === void 0 ? {} : { from },
1681
+ ...to === void 0 ? {} : { to },
1682
+ ...easing === void 0 ? {} : { easing },
1683
+ ...knownStart === void 0 ? {} : { startMs: knownStart },
1684
+ ...effect.preset === "breathe" || effect.preset === "fillColor" ? {
1685
+ ...effect.fromColor === void 0 ? {} : { fromColor: effect.fromColor },
1686
+ ...effect.toColor === void 0 ? {} : { toColor: effect.toColor }
1687
+ } : {},
1688
+ ...timing.end.state === "no-natural-completion" ? { completion: "no-natural-completion" } : endMs === void 0 ? { completion: "unknown" } : { endMs },
1689
+ ...startAfter === void 0 ? {} : { startAfter },
1690
+ ...startAfterAll === void 0 ? {} : { startAfterAll },
1691
+ stepKey: key,
1692
+ targetKey: target.entryKey,
1693
+ order: target.order + rawIndex,
1694
+ effectIndex,
1695
+ ...partIndex === void 0 ? {} : { partIndex },
1696
+ targetKind: target.value.target.kind,
1697
+ targetTextBody: target.value.target.textBody,
1698
+ targetFilled: target.value.target.filled,
1699
+ ...target.value.target.box === void 0 ? {} : { targetBox: target.value.target.box },
1700
+ ...target.value.target.rotationDegrees === void 0 ? {} : { targetRotationDegrees: target.value.target.rotationDegrees },
1701
+ targetHasBackground: target.value.target.hasBackground ?? false,
1702
+ ...target.value.target.paragraphCount === void 0 ? {} : { targetParagraphCount: target.value.target.paragraphCount },
1703
+ ...target.value.target.members === void 0 ? {} : { targetMembers: target.value.target.members },
1704
+ groupNativeStart,
1705
+ ...expansion.type === "iterate" ? { iterate: {
1706
+ type: expansion.by === "word" ? "wd" : "lt",
1707
+ intervalMs: expansion.intervalMs
1708
+ } } : {}
1709
+ };
1710
+ addStepEffect(scheduledEffect);
1711
+ queryEffectSources.set(motionEffectKey(target.id, effectIndex, partIndex), {
1712
+ observation: scheduledEffect,
1713
+ targetId: target.id,
1714
+ effectIndex,
1715
+ ...partIndex === void 0 ? {} : { partIndex },
1716
+ start: queryMomentSource(timing.start),
1717
+ end: queryMomentSource(timing.end),
1718
+ scopeIdentities: target.value.scopes.filter(({ implicit }) => implicit !== true).map(({ identity }) => identity)
1719
+ });
1574
1720
  }
1575
- scheduledObjects.add(target.id);
1721
+ scheduledObjects.add(target.entryKey);
1576
1722
  }
1577
1723
  const targetNode = (target, parent) => {
1578
- const effects = (allScheduledEffects.get(key) ?? []).filter((effect) => effect.target.id === target.id);
1724
+ const effects = (allScheduledEffects.get(key) ?? []).filter((effect) => effect.targetKey === target.entryKey);
1579
1725
  if (effects.length === 0) return void 0;
1580
1726
  const parentStart = parent === void 0 ? origin : resolveScopeStart(parent);
1581
- const start = parent === void 0 ? pointExpression(origin) : memberStart(parent, {
1727
+ const memberRef = {
1582
1728
  kind: "object",
1729
+ key: target.entryKey,
1583
1730
  id: target.id,
1584
1731
  order: target.order
1585
- });
1586
- const nativeStart = resolveNativeStart(start, parentStart, target.path, `target-start:${target.id}`, parent, parent === void 0 ? void 0 : {
1587
- kind: "object",
1588
- id: target.id,
1589
- order: target.order
1590
- });
1732
+ };
1733
+ const start = parent === void 0 ? pointExpression(origin) : memberStart(parent, memberRef);
1734
+ const nativeStart = resolveNativeStart(start, parentStart, target.path, `target-start:${target.entryKey}`, parent, parent === void 0 ? void 0 : memberRef);
1591
1735
  recordStartCondition(nativeStart);
1592
1736
  return {
1593
1737
  kind: "target",
1594
1738
  targetId: target.id,
1739
+ targetKey: target.entryKey,
1595
1740
  nativeStart: consumerStart(nativeStart),
1596
1741
  effects
1597
1742
  };
@@ -1713,8 +1858,8 @@ function motionPlan(contributions) {
1713
1858
  return start;
1714
1859
  };
1715
1860
  const conditionEvent = (id) => `condition:${id}`;
1716
- const planNodeId = (node) => node.kind === "scope" ? `scope:${node.id}` : node.kind === "completion-collector" ? `completion:${node.scopeId}` : `target:${node.targetId}`;
1717
- const nodePath = (node) => node.kind === "scope" ? [...scopes.values()].find((scope) => scopeId(scope.declaration.identity, scopes) === node.id)?.path : node.kind === "completion-collector" ? [...scopes.values()].find((scope) => scopeId(scope.declaration.identity, scopes) === node.scopeId)?.path : targets.get(node.targetId)?.path;
1861
+ const planNodeId = (node) => node.kind === "scope" ? `scope:${node.id}` : node.kind === "completion-collector" ? `completion:${node.scopeId}` : `target:${node.targetKey}`;
1862
+ const nodePath = (node) => node.kind === "scope" ? [...scopes.values()].find((scope) => scopeId(scope.declaration.identity, scopes) === node.id)?.path : node.kind === "completion-collector" ? [...scopes.values()].find((scope) => scopeId(scope.declaration.identity, scopes) === node.scopeId)?.path : targets.get(node.targetKey)?.path;
1718
1863
  const sortNativeRoots = (rootNodes, conditionDefinitionsBefore = [], parentScope) => {
1719
1864
  const rootDefinitions = /* @__PURE__ */ new Map();
1720
1865
  const rootReferences = rootNodes.map(() => []);
@@ -1739,7 +1884,10 @@ function motionPlan(contributions) {
1739
1884
  rootDefinitions.set(`scope:${node.scopeId}`, rootIndex);
1740
1885
  for (const gate of node.gates) collectStartDependency(planStartForGate(gate), rootIndex, node);
1741
1886
  } else {
1742
- if (node.effects.length > 1) rootDefinitions.set(`target:${node.targetId}`, rootIndex);
1887
+ if (node.effects.length > 1) {
1888
+ rootDefinitions.set(`target:${node.targetKey}`, rootIndex);
1889
+ rootDefinitions.set(`target:${node.targetId}`, rootIndex);
1890
+ }
1743
1891
  for (const effect of node.effects) rootDefinitions.set(eventSource({
1744
1892
  targetId: effect.target.id,
1745
1893
  effectIndex: effect.effectIndex,
@@ -1815,7 +1963,7 @@ function motionPlan(contributions) {
1815
1963
  return parentId === void 0 ? void 0 : scopes.get(parentId);
1816
1964
  }
1817
1965
  if (consumerId.startsWith("target:")) {
1818
- const parentId = targets.get(Number(consumerId.slice(7)))?.value.scopes.at(-1)?.identity;
1966
+ const parentId = targets.get(consumerId.slice(7))?.value.scopes.at(-1)?.identity;
1819
1967
  return parentId === void 0 ? void 0 : scopes.get(parentId);
1820
1968
  }
1821
1969
  };
@@ -1894,11 +2042,11 @@ function motionPlan(contributions) {
1894
2042
  if (childScope === void 0) fail("missing-scope", "Member declaration of choreography scope does not exist", scope.path);
1895
2043
  return scopeNode(childScope);
1896
2044
  }
1897
- const target = targets.get(member.id);
2045
+ const target = targets.get(member.key);
1898
2046
  if (target === void 0) fail("invalid-motion", "Object member declaration of choreography scope does not exist", scope.path);
1899
2047
  const node = targetNode(target, scope);
1900
2048
  if (node === void 0) return [];
1901
- const projectedHost = projectedNodeHosts.get(`target:${target.id}`);
2049
+ const projectedHost = projectedNodeHosts.get(`target:${target.entryKey}`);
1902
2050
  if (projectedHost !== void 0 && projectedHost !== scope.declaration.identity) {
1903
2051
  const lifted = projectedNodesByHost.get(projectedHost) ?? [];
1904
2052
  lifted.push(node);
@@ -1957,7 +2105,7 @@ function motionPlan(contributions) {
1957
2105
  if (scope === void 0 || !scopeSteps(scope).includes(key)) return [];
1958
2106
  return scopeNode(scope);
1959
2107
  }
1960
- const target = targets.get(member.id);
2108
+ const target = targets.get(member.key);
1961
2109
  if (target === void 0 || target.stepKey !== key) return [];
1962
2110
  const node = targetNode(target);
1963
2111
  return node === void 0 ? [] : [node];
@@ -2007,7 +2155,10 @@ function motionPlan(contributions) {
2007
2155
  definedEvents.add(`scope-start:${node.id}`);
2008
2156
  if (node.splitCompletion !== true) definedEvents.add(`scope:${node.id}`);
2009
2157
  } else {
2010
- if (node.effects.length > 1) definedEvents.add(`target:${node.targetId}`);
2158
+ if (node.effects.length > 1) {
2159
+ definedEvents.add(`target:${node.targetKey}`);
2160
+ definedEvents.add(`target:${node.targetId}`);
2161
+ }
2011
2162
  for (const effect of node.effects) definedEvents.add(eventSource({
2012
2163
  targetId: effect.target.id,
2013
2164
  effectIndex: effect.effectIndex,
@@ -2053,10 +2204,11 @@ function motionPlan(contributions) {
2053
2204
  if (!queryScopeIdentities.has(identity) || queryScopesByIdentity.has(identity)) continue;
2054
2205
  const start = resolveScopeStart(scope);
2055
2206
  const end = resolveScopeEnd(scope);
2207
+ const parent = visibleParentScope(scope);
2056
2208
  queryScopesByIdentity.set(identity, {
2057
2209
  identity,
2058
2210
  id: scopeId(identity, scopes),
2059
- ...scope.declaration.parent === void 0 ? {} : { parentIdentity: scope.declaration.parent },
2211
+ ...parent === void 0 ? {} : { parentIdentity: parent.declaration.identity },
2060
2212
  mode: scope.declaration.mode,
2061
2213
  ...scope.declaration.each === void 0 ? {} : { eachMs: Math.round(scope.declaration.each) },
2062
2214
  delayMs: Math.round(scope.declaration.delay),
@@ -2107,6 +2259,7 @@ function motionPlan(contributions) {
2107
2259
  }
2108
2260
  const plans = [...stepStates.values()].sort((left, right) => {
2109
2261
  if (left.trigger !== right.trigger) return left.trigger === "auto" ? -1 : 1;
2262
+ if (left.number !== void 0 && right.number !== void 0) return left.number - right.number || left.order - right.order;
2110
2263
  return left.order - right.order;
2111
2264
  }).map((step) => {
2112
2265
  const effects = (allScheduledEffects.get(step.key) ?? []).slice().sort((left, right) => (left.startMs ?? Number.MAX_SAFE_INTEGER) - (right.startMs ?? Number.MAX_SAFE_INTEGER) || left.target.id - right.target.id || left.order - right.order);
@@ -2150,7 +2303,7 @@ function motionPlan(contributions) {
2150
2303
  steps: Object.freeze(plans.map(({ effects, trigger, number }) => ({
2151
2304
  trigger,
2152
2305
  ...number === void 0 ? {} : { number },
2153
- effects: Object.freeze(effects.map(({ stepKey: _stepKey, order: _order, targetKind: _targetKind, targetTextBody: _targetTextBody, targetFilled: _targetFilled, targetBox: _targetBox, targetRotationDegrees: _targetRotationDegrees, targetHasBackground: _targetHasBackground, targetParagraphCount: _targetParagraphCount, targetMembers: _targetMembers, effectIndex: _effectIndex, partIndex: _partIndex, iterate: _iterate, ...effect }) => Object.freeze(effect)))
2306
+ effects: Object.freeze(effects.map(({ stepKey: _stepKey, targetKey: _targetKey, groupNativeStart: _groupNativeStart, order: _order, targetKind: _targetKind, targetTextBody: _targetTextBody, targetFilled: _targetFilled, targetBox: _targetBox, targetRotationDegrees: _targetRotationDegrees, targetHasBackground: _targetHasBackground, targetParagraphCount: _targetParagraphCount, targetMembers: _targetMembers, effectIndex: _effectIndex, partIndex: _partIndex, iterate: _iterate, ...effect }) => Object.freeze(effect)))
2154
2307
  }))),
2155
2308
  ...scopesObservation.length === 0 ? {} : { scopes: Object.freeze(scopesObservation) }
2156
2309
  }),
@@ -2171,7 +2324,8 @@ function motionEffectKey(targetId, effectIndex, partIndex) {
2171
2324
  return `${targetId}:${effectIndex}:${partIndex ?? ""}`;
2172
2325
  }
2173
2326
  function scopeId(identity, scopes) {
2174
- return `scope-${[...scopes.values()].sort((left, right) => left.order - right.order).findIndex((scope) => scope.declaration.identity === identity) + 1}`;
2327
+ if (scopes.get(identity)?.declaration.implicit === true) return `implicit-scope-${[...scopes.values()].filter((scope) => scope.declaration.implicit === true).sort((left, right) => left.order - right.order).findIndex((scope) => scope.declaration.identity === identity) + 1}`;
2328
+ return `scope-${[...scopes.values()].filter((scope) => scope.declaration.implicit !== true).sort((left, right) => left.order - right.order).findIndex((scope) => scope.declaration.identity === identity) + 1}`;
2175
2329
  }
2176
2330
  function normalizedEasing(easing) {
2177
2331
  if (easing === void 0) return void 0;