@elastic/isomer-sdk 0.0.0 → 0.2.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 (492) hide show
  1. package/LICENSE.txt +93 -0
  2. package/NOTICE.txt +1861 -0
  3. package/README.md +69 -0
  4. package/THIRD_PARTY_LICENSES.md +957 -0
  5. package/dist/author/authored_fields.d.ts +153 -0
  6. package/dist/author/authored_fields.d.ts.map +1 -0
  7. package/dist/author/authored_fields.js +227 -0
  8. package/dist/author/authored_fields.js.map +1 -0
  9. package/dist/author/authoring_input.d.ts +7 -0
  10. package/dist/author/authoring_input.d.ts.map +1 -0
  11. package/dist/author/authoring_input.js +60 -0
  12. package/dist/author/authoring_input.js.map +1 -0
  13. package/dist/author/authoring_model.d.ts +27 -0
  14. package/dist/author/authoring_model.d.ts.map +1 -0
  15. package/dist/author/authoring_model.js +98 -0
  16. package/dist/author/authoring_model.js.map +1 -0
  17. package/dist/author/declarations.d.ts +13 -0
  18. package/dist/author/declarations.d.ts.map +1 -0
  19. package/dist/author/declarations.js +277 -0
  20. package/dist/author/declarations.js.map +1 -0
  21. package/dist/author/index.d.ts +7 -0
  22. package/dist/author/index.d.ts.map +1 -0
  23. package/dist/author/index.js +12 -0
  24. package/dist/author/index.js.map +1 -0
  25. package/dist/author/jsx.d.ts +21 -0
  26. package/dist/author/jsx.d.ts.map +1 -0
  27. package/dist/author/jsx.js +20 -0
  28. package/dist/author/jsx.js.map +1 -0
  29. package/dist/author/jsx_shim.d.ts +117 -0
  30. package/dist/author/jsx_shim.d.ts.map +1 -0
  31. package/dist/author/jsx_shim.js +270 -0
  32. package/dist/author/jsx_shim.js.map +1 -0
  33. package/dist/author/prompt.d.ts +58 -0
  34. package/dist/author/prompt.d.ts.map +1 -0
  35. package/dist/author/prompt.js +148 -0
  36. package/dist/author/prompt.js.map +1 -0
  37. package/dist/author/schema_to_typescript.d.ts +37 -0
  38. package/dist/author/schema_to_typescript.d.ts.map +1 -0
  39. package/dist/author/schema_to_typescript.js +286 -0
  40. package/dist/author/schema_to_typescript.js.map +1 -0
  41. package/dist/cjs/author/authored_fields.js +233 -0
  42. package/dist/cjs/author/authored_fields.js.map +1 -0
  43. package/dist/cjs/author/authoring_input.js +64 -0
  44. package/dist/cjs/author/authoring_input.js.map +1 -0
  45. package/dist/cjs/author/authoring_model.js +104 -0
  46. package/dist/cjs/author/authoring_model.js.map +1 -0
  47. package/dist/cjs/author/declarations.js +281 -0
  48. package/dist/cjs/author/declarations.js.map +1 -0
  49. package/dist/cjs/author/index.js +25 -0
  50. package/dist/cjs/author/index.js.map +1 -0
  51. package/dist/cjs/author/jsx.js +24 -0
  52. package/dist/cjs/author/jsx.js.map +1 -0
  53. package/dist/cjs/author/jsx_shim.js +276 -0
  54. package/dist/cjs/author/jsx_shim.js.map +1 -0
  55. package/dist/cjs/author/prompt.js +153 -0
  56. package/dist/cjs/author/prompt.js.map +1 -0
  57. package/dist/cjs/author/schema_to_typescript.js +295 -0
  58. package/dist/cjs/author/schema_to_typescript.js.map +1 -0
  59. package/dist/cjs/composition/action_event.js +9 -0
  60. package/dist/cjs/composition/action_event.js.map +1 -0
  61. package/dist/cjs/composition/body_node_base.js +112 -0
  62. package/dist/cjs/composition/body_node_base.js.map +1 -0
  63. package/dist/cjs/composition/composition.js +9 -0
  64. package/dist/cjs/composition/composition.js.map +1 -0
  65. package/dist/cjs/composition/error.js +73 -0
  66. package/dist/cjs/composition/error.js.map +1 -0
  67. package/dist/cjs/composition/index.js +32 -0
  68. package/dist/cjs/composition/index.js.map +1 -0
  69. package/dist/cjs/composition/map_nodes.js +85 -0
  70. package/dist/cjs/composition/map_nodes.js.map +1 -0
  71. package/dist/cjs/composition/named_color.js +20 -0
  72. package/dist/cjs/composition/named_color.js.map +1 -0
  73. package/dist/cjs/composition/node.js +9 -0
  74. package/dist/cjs/composition/node.js.map +1 -0
  75. package/dist/cjs/composition/one_line.js +23 -0
  76. package/dist/cjs/composition/one_line.js.map +1 -0
  77. package/dist/cjs/composition/structured_value.js +21 -0
  78. package/dist/cjs/composition/structured_value.js.map +1 -0
  79. package/dist/cjs/composition/validation_error.js +40 -0
  80. package/dist/cjs/composition/validation_error.js.map +1 -0
  81. package/dist/cjs/define/frame.js +31 -0
  82. package/dist/cjs/define/frame.js.map +1 -0
  83. package/dist/cjs/define/index.js +31 -0
  84. package/dist/cjs/define/index.js.map +1 -0
  85. package/dist/cjs/define/markdown_content.js +12 -0
  86. package/dist/cjs/define/markdown_content.js.map +1 -0
  87. package/dist/cjs/define/primitive_example.js +26 -0
  88. package/dist/cjs/define/primitive_example.js.map +1 -0
  89. package/dist/cjs/define/primitive_icon.js +17 -0
  90. package/dist/cjs/define/primitive_icon.js.map +1 -0
  91. package/dist/cjs/define/primitive_module.js +118 -0
  92. package/dist/cjs/define/primitive_module.js.map +1 -0
  93. package/dist/cjs/define/slack_assets.js +9 -0
  94. package/dist/cjs/define/slack_assets.js.map +1 -0
  95. package/dist/cjs/define/slack_blocks.js +9 -0
  96. package/dist/cjs/define/slack_blocks.js.map +1 -0
  97. package/dist/cjs/define/zod_format.js +122 -0
  98. package/dist/cjs/define/zod_format.js.map +1 -0
  99. package/dist/cjs/define/zod_helpers.js +26 -0
  100. package/dist/cjs/define/zod_helpers.js.map +1 -0
  101. package/dist/cjs/entries/html.js +12 -0
  102. package/dist/cjs/entries/html.js.map +1 -0
  103. package/dist/cjs/entries/index.js +80 -0
  104. package/dist/cjs/entries/index.js.map +1 -0
  105. package/dist/cjs/entries/markdown.js +14 -0
  106. package/dist/cjs/entries/markdown.js.map +1 -0
  107. package/dist/cjs/entries/react.js +20 -0
  108. package/dist/cjs/entries/react.js.map +1 -0
  109. package/dist/cjs/entries/slack.js +25 -0
  110. package/dist/cjs/entries/slack.js.map +1 -0
  111. package/dist/cjs/entries/text.js +12 -0
  112. package/dist/cjs/entries/text.js.map +1 -0
  113. package/dist/cjs/pack/capabilities.js +40 -0
  114. package/dist/cjs/pack/capabilities.js.map +1 -0
  115. package/dist/cjs/pack/compose.js +59 -0
  116. package/dist/cjs/pack/compose.js.map +1 -0
  117. package/dist/cjs/pack/enhancements.js +65 -0
  118. package/dist/cjs/pack/enhancements.js.map +1 -0
  119. package/dist/cjs/pack/index.js +18 -0
  120. package/dist/cjs/pack/index.js.map +1 -0
  121. package/dist/cjs/pack/primitive_pack.js +97 -0
  122. package/dist/cjs/pack/primitive_pack.js.map +1 -0
  123. package/dist/cjs/package.json +3 -0
  124. package/dist/cjs/render/anchors.js +167 -0
  125. package/dist/cjs/render/anchors.js.map +1 -0
  126. package/dist/cjs/render/context_view.js +54 -0
  127. package/dist/cjs/render/context_view.js.map +1 -0
  128. package/dist/cjs/render/format_display_value.js +143 -0
  129. package/dist/cjs/render/format_display_value.js.map +1 -0
  130. package/dist/cjs/render/format_number.js +46 -0
  131. package/dist/cjs/render/format_number.js.map +1 -0
  132. package/dist/cjs/render/html/enhancements.js +30 -0
  133. package/dist/cjs/render/html/enhancements.js.map +1 -0
  134. package/dist/cjs/render/html/envelope.js +218 -0
  135. package/dist/cjs/render/html/envelope.js.map +1 -0
  136. package/dist/cjs/render/html/index.js +12 -0
  137. package/dist/cjs/render/html/index.js.map +1 -0
  138. package/dist/cjs/render/index.js +25 -0
  139. package/dist/cjs/render/index.js.map +1 -0
  140. package/dist/cjs/render/layout_check.js +133 -0
  141. package/dist/cjs/render/layout_check.js.map +1 -0
  142. package/dist/cjs/render/markdown/builder.js +195 -0
  143. package/dist/cjs/render/markdown/builder.js.map +1 -0
  144. package/dist/cjs/render/markdown/envelope.js +33 -0
  145. package/dist/cjs/render/markdown/envelope.js.map +1 -0
  146. package/dist/cjs/render/markdown/format.js +208 -0
  147. package/dist/cjs/render/markdown/format.js.map +1 -0
  148. package/dist/cjs/render/markdown/index.js +15 -0
  149. package/dist/cjs/render/markdown/index.js.map +1 -0
  150. package/dist/cjs/render/measure_dom.js +61 -0
  151. package/dist/cjs/render/measure_dom.js.map +1 -0
  152. package/dist/cjs/render/payload.js +13 -0
  153. package/dist/cjs/render/payload.js.map +1 -0
  154. package/dist/cjs/render/primitive_dispatch.js +173 -0
  155. package/dist/cjs/render/primitive_dispatch.js.map +1 -0
  156. package/dist/cjs/render/react/content.js +44 -0
  157. package/dist/cjs/render/react/content.js.map +1 -0
  158. package/dist/cjs/render/react/enhancements.js +32 -0
  159. package/dist/cjs/render/react/enhancements.js.map +1 -0
  160. package/dist/cjs/render/react/index.js +15 -0
  161. package/dist/cjs/render/react/index.js.map +1 -0
  162. package/dist/cjs/render/slack/assets.js +45 -0
  163. package/dist/cjs/render/slack/assets.js.map +1 -0
  164. package/dist/cjs/render/slack/blocks.js +80 -0
  165. package/dist/cjs/render/slack/blocks.js.map +1 -0
  166. package/dist/cjs/render/slack/envelope.js +551 -0
  167. package/dist/cjs/render/slack/envelope.js.map +1 -0
  168. package/dist/cjs/render/slack/format.js +225 -0
  169. package/dist/cjs/render/slack/format.js.map +1 -0
  170. package/dist/cjs/render/slack/index.js +30 -0
  171. package/dist/cjs/render/slack/index.js.map +1 -0
  172. package/dist/cjs/render/slack/markdown_content.js +409 -0
  173. package/dist/cjs/render/slack/markdown_content.js.map +1 -0
  174. package/dist/cjs/render/text/envelope.js +21 -0
  175. package/dist/cjs/render/text/envelope.js.map +1 -0
  176. package/dist/cjs/render/text/index.js +12 -0
  177. package/dist/cjs/render/text/index.js.map +1 -0
  178. package/dist/cjs/testing/conformance.js +312 -0
  179. package/dist/cjs/testing/conformance.js.map +1 -0
  180. package/dist/cjs/testing/icon.js +248 -0
  181. package/dist/cjs/testing/icon.js.map +1 -0
  182. package/dist/cjs/testing/index.js +18 -0
  183. package/dist/cjs/testing/index.js.map +1 -0
  184. package/dist/cjs/testing/registration.js +142 -0
  185. package/dist/cjs/testing/registration.js.map +1 -0
  186. package/dist/cjs/validate/authoring_schema.js +312 -0
  187. package/dist/cjs/validate/authoring_schema.js.map +1 -0
  188. package/dist/cjs/validate/composition_schema.js +135 -0
  189. package/dist/cjs/validate/composition_schema.js.map +1 -0
  190. package/dist/cjs/validate/index.js +53 -0
  191. package/dist/cjs/validate/index.js.map +1 -0
  192. package/dist/cjs/validate/input_budget.js +156 -0
  193. package/dist/cjs/validate/input_budget.js.map +1 -0
  194. package/dist/cjs/validate/json_schema.js +72 -0
  195. package/dist/cjs/validate/json_schema.js.map +1 -0
  196. package/dist/cjs/validate/node_issues.js +65 -0
  197. package/dist/cjs/validate/node_issues.js.map +1 -0
  198. package/dist/cjs/validate/url.js +116 -0
  199. package/dist/cjs/validate/url.js.map +1 -0
  200. package/dist/cjs/validate/validation.js +165 -0
  201. package/dist/cjs/validate/validation.js.map +1 -0
  202. package/dist/cjs/validate/value_schemas.js +53 -0
  203. package/dist/cjs/validate/value_schemas.js.map +1 -0
  204. package/dist/composition/action_event.d.ts +13 -0
  205. package/dist/composition/action_event.d.ts.map +1 -0
  206. package/dist/composition/action_event.js +8 -0
  207. package/dist/composition/action_event.js.map +1 -0
  208. package/dist/composition/body_node_base.d.ts +72 -0
  209. package/dist/composition/body_node_base.d.ts.map +1 -0
  210. package/dist/composition/body_node_base.js +104 -0
  211. package/dist/composition/body_node_base.js.map +1 -0
  212. package/dist/composition/composition.d.ts +71 -0
  213. package/dist/composition/composition.d.ts.map +1 -0
  214. package/dist/composition/composition.js +8 -0
  215. package/dist/composition/composition.js.map +1 -0
  216. package/dist/composition/error.d.ts +61 -0
  217. package/dist/composition/error.d.ts.map +1 -0
  218. package/dist/composition/error.js +69 -0
  219. package/dist/composition/error.js.map +1 -0
  220. package/dist/composition/index.d.ts +11 -0
  221. package/dist/composition/index.d.ts.map +1 -0
  222. package/dist/composition/index.js +14 -0
  223. package/dist/composition/index.js.map +1 -0
  224. package/dist/composition/map_nodes.d.ts +16 -0
  225. package/dist/composition/map_nodes.d.ts.map +1 -0
  226. package/dist/composition/map_nodes.js +81 -0
  227. package/dist/composition/map_nodes.js.map +1 -0
  228. package/dist/composition/named_color.d.ts +9 -0
  229. package/dist/composition/named_color.d.ts.map +1 -0
  230. package/dist/composition/named_color.js +17 -0
  231. package/dist/composition/named_color.js.map +1 -0
  232. package/dist/composition/node.d.ts +11 -0
  233. package/dist/composition/node.d.ts.map +1 -0
  234. package/dist/composition/node.js +8 -0
  235. package/dist/composition/node.js.map +1 -0
  236. package/dist/composition/one_line.d.ts +7 -0
  237. package/dist/composition/one_line.d.ts.map +1 -0
  238. package/dist/composition/one_line.js +17 -0
  239. package/dist/composition/one_line.js.map +1 -0
  240. package/dist/composition/structured_value.d.ts +27 -0
  241. package/dist/composition/structured_value.d.ts.map +1 -0
  242. package/dist/composition/structured_value.js +18 -0
  243. package/dist/composition/structured_value.js.map +1 -0
  244. package/dist/composition/validation_error.d.ts +33 -0
  245. package/dist/composition/validation_error.d.ts.map +1 -0
  246. package/dist/composition/validation_error.js +35 -0
  247. package/dist/composition/validation_error.js.map +1 -0
  248. package/dist/define/frame.d.ts +155 -0
  249. package/dist/define/frame.d.ts.map +1 -0
  250. package/dist/define/frame.js +27 -0
  251. package/dist/define/frame.js.map +1 -0
  252. package/dist/define/index.d.ts +10 -0
  253. package/dist/define/index.d.ts.map +1 -0
  254. package/dist/define/index.js +13 -0
  255. package/dist/define/index.js.map +1 -0
  256. package/dist/define/markdown_content.d.ts +15 -0
  257. package/dist/define/markdown_content.d.ts.map +1 -0
  258. package/dist/define/markdown_content.js +9 -0
  259. package/dist/define/markdown_content.js.map +1 -0
  260. package/dist/define/primitive_example.d.ts +30 -0
  261. package/dist/define/primitive_example.d.ts.map +1 -0
  262. package/dist/define/primitive_example.js +21 -0
  263. package/dist/define/primitive_example.js.map +1 -0
  264. package/dist/define/primitive_icon.d.ts +11 -0
  265. package/dist/define/primitive_icon.d.ts.map +1 -0
  266. package/dist/define/primitive_icon.js +14 -0
  267. package/dist/define/primitive_icon.js.map +1 -0
  268. package/dist/define/primitive_module.d.ts +435 -0
  269. package/dist/define/primitive_module.d.ts.map +1 -0
  270. package/dist/define/primitive_module.js +112 -0
  271. package/dist/define/primitive_module.js.map +1 -0
  272. package/dist/define/slack_assets.d.ts +28 -0
  273. package/dist/define/slack_assets.d.ts.map +1 -0
  274. package/dist/define/slack_assets.js +8 -0
  275. package/dist/define/slack_assets.js.map +1 -0
  276. package/dist/define/slack_blocks.d.ts +234 -0
  277. package/dist/define/slack_blocks.d.ts.map +1 -0
  278. package/dist/define/slack_blocks.js +8 -0
  279. package/dist/define/slack_blocks.js.map +1 -0
  280. package/dist/define/zod_format.d.ts +33 -0
  281. package/dist/define/zod_format.d.ts.map +1 -0
  282. package/dist/define/zod_format.js +114 -0
  283. package/dist/define/zod_format.js.map +1 -0
  284. package/dist/define/zod_helpers.d.ts +10 -0
  285. package/dist/define/zod_helpers.d.ts.map +1 -0
  286. package/dist/define/zod_helpers.js +22 -0
  287. package/dist/define/zod_helpers.js.map +1 -0
  288. package/dist/entries/html.d.ts +3 -0
  289. package/dist/entries/html.d.ts.map +1 -0
  290. package/dist/entries/html.js +8 -0
  291. package/dist/entries/html.js.map +1 -0
  292. package/dist/entries/index.d.ts +6 -0
  293. package/dist/entries/index.d.ts.map +1 -0
  294. package/dist/entries/index.js +12 -0
  295. package/dist/entries/index.js.map +1 -0
  296. package/dist/entries/markdown.d.ts +3 -0
  297. package/dist/entries/markdown.d.ts.map +1 -0
  298. package/dist/entries/markdown.js +8 -0
  299. package/dist/entries/markdown.js.map +1 -0
  300. package/dist/entries/react.d.ts +5 -0
  301. package/dist/entries/react.d.ts.map +1 -0
  302. package/dist/entries/react.js +11 -0
  303. package/dist/entries/react.js.map +1 -0
  304. package/dist/entries/slack.d.ts +2 -0
  305. package/dist/entries/slack.d.ts.map +1 -0
  306. package/dist/entries/slack.js +8 -0
  307. package/dist/entries/slack.js.map +1 -0
  308. package/dist/entries/text.d.ts +2 -0
  309. package/dist/entries/text.d.ts.map +1 -0
  310. package/dist/entries/text.js +8 -0
  311. package/dist/entries/text.js.map +1 -0
  312. package/dist/pack/capabilities.d.ts +41 -0
  313. package/dist/pack/capabilities.d.ts.map +1 -0
  314. package/dist/pack/capabilities.js +36 -0
  315. package/dist/pack/capabilities.js.map +1 -0
  316. package/dist/pack/compose.d.ts +24 -0
  317. package/dist/pack/compose.d.ts.map +1 -0
  318. package/dist/pack/compose.js +55 -0
  319. package/dist/pack/compose.js.map +1 -0
  320. package/dist/pack/enhancements.d.ts +65 -0
  321. package/dist/pack/enhancements.d.ts.map +1 -0
  322. package/dist/pack/enhancements.js +59 -0
  323. package/dist/pack/enhancements.js.map +1 -0
  324. package/dist/pack/index.d.ts +5 -0
  325. package/dist/pack/index.d.ts.map +1 -0
  326. package/dist/pack/index.js +11 -0
  327. package/dist/pack/index.js.map +1 -0
  328. package/dist/pack/primitive_pack.d.ts +164 -0
  329. package/dist/pack/primitive_pack.d.ts.map +1 -0
  330. package/dist/pack/primitive_pack.js +92 -0
  331. package/dist/pack/primitive_pack.js.map +1 -0
  332. package/dist/render/anchors.d.ts +82 -0
  333. package/dist/render/anchors.d.ts.map +1 -0
  334. package/dist/render/anchors.js +153 -0
  335. package/dist/render/anchors.js.map +1 -0
  336. package/dist/render/context_view.d.ts +10 -0
  337. package/dist/render/context_view.d.ts.map +1 -0
  338. package/dist/render/context_view.js +49 -0
  339. package/dist/render/context_view.js.map +1 -0
  340. package/dist/render/format_display_value.d.ts +20 -0
  341. package/dist/render/format_display_value.d.ts.map +1 -0
  342. package/dist/render/format_display_value.js +137 -0
  343. package/dist/render/format_display_value.js.map +1 -0
  344. package/dist/render/format_number.d.ts +9 -0
  345. package/dist/render/format_number.d.ts.map +1 -0
  346. package/dist/render/format_number.js +42 -0
  347. package/dist/render/format_number.js.map +1 -0
  348. package/dist/render/html/enhancements.d.ts +10 -0
  349. package/dist/render/html/enhancements.d.ts.map +1 -0
  350. package/dist/render/html/enhancements.js +25 -0
  351. package/dist/render/html/enhancements.js.map +1 -0
  352. package/dist/render/html/envelope.d.ts +182 -0
  353. package/dist/render/html/envelope.d.ts.map +1 -0
  354. package/dist/render/html/envelope.js +214 -0
  355. package/dist/render/html/envelope.js.map +1 -0
  356. package/dist/render/html/index.d.ts +3 -0
  357. package/dist/render/html/index.d.ts.map +1 -0
  358. package/dist/render/html/index.js +8 -0
  359. package/dist/render/html/index.js.map +1 -0
  360. package/dist/render/index.d.ts +6 -0
  361. package/dist/render/index.d.ts.map +1 -0
  362. package/dist/render/index.js +11 -0
  363. package/dist/render/index.js.map +1 -0
  364. package/dist/render/layout_check.d.ts +43 -0
  365. package/dist/render/layout_check.d.ts.map +1 -0
  366. package/dist/render/layout_check.js +129 -0
  367. package/dist/render/layout_check.js.map +1 -0
  368. package/dist/render/markdown/builder.d.ts +46 -0
  369. package/dist/render/markdown/builder.d.ts.map +1 -0
  370. package/dist/render/markdown/builder.js +190 -0
  371. package/dist/render/markdown/builder.js.map +1 -0
  372. package/dist/render/markdown/envelope.d.ts +20 -0
  373. package/dist/render/markdown/envelope.d.ts.map +1 -0
  374. package/dist/render/markdown/envelope.js +29 -0
  375. package/dist/render/markdown/envelope.js.map +1 -0
  376. package/dist/render/markdown/format.d.ts +10 -0
  377. package/dist/render/markdown/format.d.ts.map +1 -0
  378. package/dist/render/markdown/format.js +202 -0
  379. package/dist/render/markdown/format.js.map +1 -0
  380. package/dist/render/markdown/index.d.ts +3 -0
  381. package/dist/render/markdown/index.d.ts.map +1 -0
  382. package/dist/render/markdown/index.js +9 -0
  383. package/dist/render/markdown/index.js.map +1 -0
  384. package/dist/render/measure_dom.d.ts +10 -0
  385. package/dist/render/measure_dom.d.ts.map +1 -0
  386. package/dist/render/measure_dom.js +57 -0
  387. package/dist/render/measure_dom.js.map +1 -0
  388. package/dist/render/payload.d.ts +16 -0
  389. package/dist/render/payload.d.ts.map +1 -0
  390. package/dist/render/payload.js +9 -0
  391. package/dist/render/payload.js.map +1 -0
  392. package/dist/render/primitive_dispatch.d.ts +72 -0
  393. package/dist/render/primitive_dispatch.d.ts.map +1 -0
  394. package/dist/render/primitive_dispatch.js +169 -0
  395. package/dist/render/primitive_dispatch.js.map +1 -0
  396. package/dist/render/react/content.d.ts +40 -0
  397. package/dist/render/react/content.d.ts.map +1 -0
  398. package/dist/render/react/content.js +39 -0
  399. package/dist/render/react/content.js.map +1 -0
  400. package/dist/render/react/enhancements.d.ts +15 -0
  401. package/dist/render/react/enhancements.d.ts.map +1 -0
  402. package/dist/render/react/enhancements.js +28 -0
  403. package/dist/render/react/enhancements.js.map +1 -0
  404. package/dist/render/react/index.d.ts +3 -0
  405. package/dist/render/react/index.d.ts.map +1 -0
  406. package/dist/render/react/index.js +9 -0
  407. package/dist/render/react/index.js.map +1 -0
  408. package/dist/render/slack/assets.d.ts +16 -0
  409. package/dist/render/slack/assets.d.ts.map +1 -0
  410. package/dist/render/slack/assets.js +40 -0
  411. package/dist/render/slack/assets.js.map +1 -0
  412. package/dist/render/slack/blocks.d.ts +72 -0
  413. package/dist/render/slack/blocks.d.ts.map +1 -0
  414. package/dist/render/slack/blocks.js +77 -0
  415. package/dist/render/slack/blocks.js.map +1 -0
  416. package/dist/render/slack/envelope.d.ts +52 -0
  417. package/dist/render/slack/envelope.d.ts.map +1 -0
  418. package/dist/render/slack/envelope.js +547 -0
  419. package/dist/render/slack/envelope.js.map +1 -0
  420. package/dist/render/slack/format.d.ts +70 -0
  421. package/dist/render/slack/format.d.ts.map +1 -0
  422. package/dist/render/slack/format.js +209 -0
  423. package/dist/render/slack/format.js.map +1 -0
  424. package/dist/render/slack/index.d.ts +6 -0
  425. package/dist/render/slack/index.d.ts.map +1 -0
  426. package/dist/render/slack/index.js +12 -0
  427. package/dist/render/slack/index.js.map +1 -0
  428. package/dist/render/slack/markdown_content.d.ts +17 -0
  429. package/dist/render/slack/markdown_content.d.ts.map +1 -0
  430. package/dist/render/slack/markdown_content.js +404 -0
  431. package/dist/render/slack/markdown_content.js.map +1 -0
  432. package/dist/render/text/envelope.d.ts +15 -0
  433. package/dist/render/text/envelope.d.ts.map +1 -0
  434. package/dist/render/text/envelope.js +17 -0
  435. package/dist/render/text/envelope.js.map +1 -0
  436. package/dist/render/text/index.d.ts +2 -0
  437. package/dist/render/text/index.d.ts.map +1 -0
  438. package/dist/render/text/index.js +8 -0
  439. package/dist/render/text/index.js.map +1 -0
  440. package/dist/testing/conformance.d.ts +145 -0
  441. package/dist/testing/conformance.d.ts.map +1 -0
  442. package/dist/testing/conformance.js +303 -0
  443. package/dist/testing/conformance.js.map +1 -0
  444. package/dist/testing/icon.d.ts +11 -0
  445. package/dist/testing/icon.d.ts.map +1 -0
  446. package/dist/testing/icon.js +244 -0
  447. package/dist/testing/icon.js.map +1 -0
  448. package/dist/testing/index.d.ts +4 -0
  449. package/dist/testing/index.d.ts.map +1 -0
  450. package/dist/testing/index.js +10 -0
  451. package/dist/testing/index.js.map +1 -0
  452. package/dist/testing/registration.d.ts +32 -0
  453. package/dist/testing/registration.d.ts.map +1 -0
  454. package/dist/testing/registration.js +105 -0
  455. package/dist/testing/registration.js.map +1 -0
  456. package/dist/validate/authoring_schema.d.ts +33 -0
  457. package/dist/validate/authoring_schema.d.ts.map +1 -0
  458. package/dist/validate/authoring_schema.js +306 -0
  459. package/dist/validate/authoring_schema.js.map +1 -0
  460. package/dist/validate/composition_schema.d.ts +80 -0
  461. package/dist/validate/composition_schema.d.ts.map +1 -0
  462. package/dist/validate/composition_schema.js +127 -0
  463. package/dist/validate/composition_schema.js.map +1 -0
  464. package/dist/validate/index.d.ts +9 -0
  465. package/dist/validate/index.d.ts.map +1 -0
  466. package/dist/validate/index.js +15 -0
  467. package/dist/validate/index.js.map +1 -0
  468. package/dist/validate/input_budget.d.ts +35 -0
  469. package/dist/validate/input_budget.d.ts.map +1 -0
  470. package/dist/validate/input_budget.js +151 -0
  471. package/dist/validate/input_budget.js.map +1 -0
  472. package/dist/validate/json_schema.d.ts +32 -0
  473. package/dist/validate/json_schema.d.ts.map +1 -0
  474. package/dist/validate/json_schema.js +68 -0
  475. package/dist/validate/json_schema.js.map +1 -0
  476. package/dist/validate/node_issues.d.ts +12 -0
  477. package/dist/validate/node_issues.d.ts.map +1 -0
  478. package/dist/validate/node_issues.js +61 -0
  479. package/dist/validate/node_issues.js.map +1 -0
  480. package/dist/validate/url.d.ts +50 -0
  481. package/dist/validate/url.d.ts.map +1 -0
  482. package/dist/validate/url.js +107 -0
  483. package/dist/validate/url.js.map +1 -0
  484. package/dist/validate/validation.d.ts +95 -0
  485. package/dist/validate/validation.d.ts.map +1 -0
  486. package/dist/validate/validation.js +157 -0
  487. package/dist/validate/validation.js.map +1 -0
  488. package/dist/validate/value_schemas.d.ts +53 -0
  489. package/dist/validate/value_schemas.d.ts.map +1 -0
  490. package/dist/validate/value_schemas.js +50 -0
  491. package/dist/validate/value_schemas.js.map +1 -0
  492. package/package.json +119 -5
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../../src/entries/react.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAIL,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC","sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0; you may not use this file except in compliance with the Elastic License\n * 2.0.\n */\n\nexport { runEnhancementScript } from '../pack/enhancements';\nexport { findNodeElementPairs } from '../render/anchors';\nexport { measureDom } from '../render/measure_dom';\nexport {\n type CompositionWrapperOptions,\n type ReactContentDispatcher,\n type ReactContentOptions,\n applyEnhancements,\n renderCompositionContent,\n wrapCompositionContent,\n} from '../render/react';\n"]}
@@ -0,0 +1,2 @@
1
+ export { type SlackActionElement, type SlackActionsBlock, type SlackAssetCollector, type SlackAssetRequest, type SlackBlock, type SlackButtonElement, type SlackCheckboxesElement, type SlackContextBlock, type SlackDividerBlock, type SlackEnvelopeDispatcher, type SlackEnvelopeOptions, type SlackEnvelopeResult, type SlackFileReference, type SlackHeaderBlock, type SlackHeaderLevel, type SlackImageBlock, type SlackImageElement, type SlackMrkdwnTextObject, type SlackMultiStaticSelectElement, type SlackOptionGroup, type SlackOptionObject, type SlackOverflowElement, type SlackPlainTextObject, type SlackRadioButtonsElement, type SlackRawTextElement, type SlackRichTextBlock, type SlackRichTextBlockElement, type SlackRichTextInline, type SlackRichTextLink, type SlackRichTextList, type SlackRichTextPreformatted, type SlackRichTextQuote, type SlackRichTextSection, type SlackRichTextStyle, type SlackRichTextTag, type SlackRichTextText, type SlackSectionAccessory, type SlackSectionBlock, type SlackStaticSelectElement, type SlackTableBlock, type SlackTableCell, type SlackTableColumnSetting, type SlackTagColor, type SlackTextObject, type SlackVideoBlock, SLACK_LIMITS, bold, clampSlackText, code, codeBlock, createSlackAssetCollector, escapeMrkdwn, isSlackReachableImageUrl, italic, link, markdownContentToSlackBlocks, renderSlackEnvelope, slackLinkUrl, strike, } from '../render/slack/index.js';
2
+ //# sourceMappingURL=slack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slack.d.ts","sourceRoot":"","sources":["../../src/entries/slack.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,YAAY,EACZ,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,SAAS,EACT,yBAAyB,EACzB,YAAY,EACZ,wBAAwB,EACxB,MAAM,EACN,IAAI,EACJ,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EACZ,MAAM,GACP,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0; you may not use this file except in compliance with the Elastic License
5
+ * 2.0.
6
+ */
7
+ export { SLACK_LIMITS, bold, clampSlackText, code, codeBlock, createSlackAssetCollector, escapeMrkdwn, isSlackReachableImageUrl, italic, link, markdownContentToSlackBlocks, renderSlackEnvelope, slackLinkUrl, strike, } from '../render/slack/index.js';
8
+ //# sourceMappingURL=slack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slack.js","sourceRoot":"","sources":["../../src/entries/slack.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EA8CL,YAAY,EACZ,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,SAAS,EACT,yBAAyB,EACzB,YAAY,EACZ,wBAAwB,EACxB,MAAM,EACN,IAAI,EACJ,4BAA4B,EAC5B,mBAAmB,EACnB,YAAY,EACZ,MAAM,GACP,MAAM,iBAAiB,CAAC","sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0; you may not use this file except in compliance with the Elastic License\n * 2.0.\n */\n\nexport {\n type SlackActionElement,\n type SlackActionsBlock,\n type SlackAssetCollector,\n type SlackAssetRequest,\n type SlackBlock,\n type SlackButtonElement,\n type SlackCheckboxesElement,\n type SlackContextBlock,\n type SlackDividerBlock,\n type SlackEnvelopeDispatcher,\n type SlackEnvelopeOptions,\n type SlackEnvelopeResult,\n type SlackFileReference,\n type SlackHeaderBlock,\n type SlackHeaderLevel,\n type SlackImageBlock,\n type SlackImageElement,\n type SlackMrkdwnTextObject,\n type SlackMultiStaticSelectElement,\n type SlackOptionGroup,\n type SlackOptionObject,\n type SlackOverflowElement,\n type SlackPlainTextObject,\n type SlackRadioButtonsElement,\n type SlackRawTextElement,\n type SlackRichTextBlock,\n type SlackRichTextBlockElement,\n type SlackRichTextInline,\n type SlackRichTextLink,\n type SlackRichTextList,\n type SlackRichTextPreformatted,\n type SlackRichTextQuote,\n type SlackRichTextSection,\n type SlackRichTextStyle,\n type SlackRichTextTag,\n type SlackRichTextText,\n type SlackSectionAccessory,\n type SlackSectionBlock,\n type SlackStaticSelectElement,\n type SlackTableBlock,\n type SlackTableCell,\n type SlackTableColumnSetting,\n type SlackTagColor,\n type SlackTextObject,\n type SlackVideoBlock,\n SLACK_LIMITS,\n bold,\n clampSlackText,\n code,\n codeBlock,\n createSlackAssetCollector,\n escapeMrkdwn,\n isSlackReachableImageUrl,\n italic,\n link,\n markdownContentToSlackBlocks,\n renderSlackEnvelope,\n slackLinkUrl,\n strike,\n} from '../render/slack';\n"]}
@@ -0,0 +1,2 @@
1
+ export { type TextEnvelopeDispatcher, type TextEnvelopeOptions, renderTextEnvelope, } from '../render/text/index.js';
2
+ //# sourceMappingURL=text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/entries/text.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0; you may not use this file except in compliance with the Elastic License
5
+ * 2.0.
6
+ */
7
+ export { renderTextEnvelope, } from '../render/text/index.js';
8
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/entries/text.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAGL,kBAAkB,GACnB,MAAM,gBAAgB,CAAC","sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0; you may not use this file except in compliance with the Elastic License\n * 2.0.\n */\n\nexport {\n type TextEnvelopeDispatcher,\n type TextEnvelopeOptions,\n renderTextEnvelope,\n} from '../render/text';\n"]}
@@ -0,0 +1,41 @@
1
+ import type { AnyPrimitivePack } from './primitive_pack.js';
2
+ /** `native` renders through the primitive's own renderer, `fallback` through another surface's (Slack via markdown). */
3
+ export type SurfaceSupport = 'native' | 'fallback';
4
+ /**
5
+ * What a runtime or a pack supports. Enhancement ids are open strings: each
6
+ * pack declares its own on {@link PrimitivePack.enhancements}, and a runtime
7
+ * reports the union.
8
+ */
9
+ export interface HostCapabilities<TEnhancement extends string = string> {
10
+ /** Primitive `type` values that can be dispatched. */
11
+ primitives: string[];
12
+ /** Surfaces that render, e.g. `html`, `slack`, `snapshot`. */
13
+ surfaces: string[];
14
+ /** Formats the host can ship, e.g. `html`, `slack`, `png`. Never `snapshot`, which only a rasterizer turns into a format. */
15
+ formats: string[];
16
+ /**
17
+ * How each of `surfaces` renders each primitive, keyed by `type` then surface.
18
+ * `slack` is `fallback` for a primitive with no `slack` renderer; every other
19
+ * surface renders from `react`, `text`, or `markdown`, which are required.
20
+ */
21
+ support: Record<string, Record<string, SurfaceSupport>>;
22
+ /** Progressive enhancements the packs declare, by id, which an HTML or React render may request. */
23
+ enhancements?: Partial<Record<TEnhancement, boolean>>;
24
+ }
25
+ /** What {@link describeCapabilities} reports beyond the packs themselves. */
26
+ export interface CapabilitySources {
27
+ /** The surfaces the caller built; `snapshot` exists only when a host supplied a frame. */
28
+ surfaces: readonly string[];
29
+ /** Formats produced outside the surfaces, such as a rasterizer's `png`. */
30
+ formats?: readonly string[];
31
+ }
32
+ /**
33
+ * Reports the primitive types, surfaces, and formats a set of packs supports.
34
+ *
35
+ * `surfaces` is passed rather than derived because only the caller knows which
36
+ * exist. Every surface but `snapshot` is also a format; `formats` adds the ones
37
+ * no surface produces on its own, so a `png` is reported only when a host
38
+ * registers the rasterizer that writes it.
39
+ */
40
+ export declare const describeCapabilities: (packs: readonly AnyPrimitivePack[], { surfaces, formats }: CapabilitySources) => HostCapabilities;
41
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../src/pack/capabilities.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,wHAAwH;AACxH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB,CAAC,YAAY,SAAS,MAAM,GAAG,MAAM;IACpE,sDAAsD;IACtD,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,6HAA6H;IAC7H,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IACxD,oGAAoG;IACpG,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC;CACvD;AAED,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAKD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,SAAS,gBAAgB,EAAE,EAClC,uBAA4B,iBAAiB,KAC5C,gBA2BF,CAAC"}
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0; you may not use this file except in compliance with the Elastic License
5
+ * 2.0.
6
+ */
7
+ /** The one surface whose output is not itself a shippable format. */
8
+ const SNAPSHOT = 'snapshot';
9
+ /**
10
+ * Reports the primitive types, surfaces, and formats a set of packs supports.
11
+ *
12
+ * `surfaces` is passed rather than derived because only the caller knows which
13
+ * exist. Every surface but `snapshot` is also a format; `formats` adds the ones
14
+ * no surface produces on its own, so a `png` is reported only when a host
15
+ * registers the rasterizer that writes it.
16
+ */
17
+ export const describeCapabilities = (packs, { surfaces, formats = [] }) => {
18
+ const enhancementIds = packs.flatMap((pack) => pack.enhancements.map((definition) => definition.id));
19
+ const definitions = packs.flatMap((pack) => pack.primitives);
20
+ return {
21
+ primitives: definitions.map(({ type }) => type),
22
+ surfaces: [...surfaces],
23
+ formats: [...new Set([...surfaces, ...formats])].filter((format) => format !== SNAPSHOT),
24
+ support: Object.fromEntries(definitions.map((definition) => [
25
+ definition.type,
26
+ Object.fromEntries(surfaces.map((surface) => [surface, supportOn(definition, surface)])),
27
+ ])),
28
+ ...(enhancementIds.length > 0
29
+ ? {
30
+ enhancements: Object.fromEntries(enhancementIds.map((id) => [id, true])),
31
+ }
32
+ : {}),
33
+ };
34
+ };
35
+ const supportOn = ({ renderers }, surface) => surface === 'slack' && renderers.slack === undefined ? 'fallback' : 'native';
36
+ //# sourceMappingURL=capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/pack/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4CH,qEAAqE;AACrE,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,KAAkC,EAClC,EAAE,QAAQ,EAAE,OAAO,GAAG,EAAE,EAAqB,EAC3B,EAAE;IACpB,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAC5C,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CACrD,CAAC;IACF,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC7D,OAAO;QACL,UAAU,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;QAC/C,QAAQ,EAAE,CAAC,GAAG,QAAQ,CAAC;QACvB,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,QAAQ,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CACrD,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,QAAQ,CAChC;QACD,OAAO,EAAE,MAAM,CAAC,WAAW,CACzB,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC;YAC9B,UAAU,CAAC,IAAI;YACf,MAAM,CAAC,WAAW,CAChB,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,CACrE;SACF,CAAC,CACH;QACD,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;YAC3B,CAAC,CAAC;gBACE,YAAY,EAAE,MAAM,CAAC,WAAW,CAC9B,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CACvC;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAChB,EAAE,SAAS,EAA0B,EACrC,OAAe,EACC,EAAE,CAClB,OAAO,KAAK,OAAO,IAAI,SAAS,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC","sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0; you may not use this file except in compliance with the Elastic License\n * 2.0.\n */\n\n// What a host can render, reported from packs rather than asserted by hand.\n//\n// Lives in the sdk so both the assembly layer and a pack import it from the\n// same place; a pack must not have to depend on the assembly layer for it.\n\nimport type { AnyPrimitiveDefinition } from '../define/primitive_module';\n\nimport type { AnyPrimitivePack } from './primitive_pack';\n\n/** `native` renders through the primitive's own renderer, `fallback` through another surface's (Slack via markdown). */\nexport type SurfaceSupport = 'native' | 'fallback';\n\n/**\n * What a runtime or a pack supports. Enhancement ids are open strings: each\n * pack declares its own on {@link PrimitivePack.enhancements}, and a runtime\n * reports the union.\n */\nexport interface HostCapabilities<TEnhancement extends string = string> {\n /** Primitive `type` values that can be dispatched. */\n primitives: string[];\n /** Surfaces that render, e.g. `html`, `slack`, `snapshot`. */\n surfaces: string[];\n /** Formats the host can ship, e.g. `html`, `slack`, `png`. Never `snapshot`, which only a rasterizer turns into a format. */\n formats: string[];\n /**\n * How each of `surfaces` renders each primitive, keyed by `type` then surface.\n * `slack` is `fallback` for a primitive with no `slack` renderer; every other\n * surface renders from `react`, `text`, or `markdown`, which are required.\n */\n support: Record<string, Record<string, SurfaceSupport>>;\n /** Progressive enhancements the packs declare, by id, which an HTML or React render may request. */\n enhancements?: Partial<Record<TEnhancement, boolean>>;\n}\n\n/** What {@link describeCapabilities} reports beyond the packs themselves. */\nexport interface CapabilitySources {\n /** The surfaces the caller built; `snapshot` exists only when a host supplied a frame. */\n surfaces: readonly string[];\n /** Formats produced outside the surfaces, such as a rasterizer's `png`. */\n formats?: readonly string[];\n}\n\n/** The one surface whose output is not itself a shippable format. */\nconst SNAPSHOT = 'snapshot';\n\n/**\n * Reports the primitive types, surfaces, and formats a set of packs supports.\n *\n * `surfaces` is passed rather than derived because only the caller knows which\n * exist. Every surface but `snapshot` is also a format; `formats` adds the ones\n * no surface produces on its own, so a `png` is reported only when a host\n * registers the rasterizer that writes it.\n */\nexport const describeCapabilities = (\n packs: readonly AnyPrimitivePack[],\n { surfaces, formats = [] }: CapabilitySources\n): HostCapabilities => {\n const enhancementIds = packs.flatMap((pack) =>\n pack.enhancements.map((definition) => definition.id)\n );\n const definitions = packs.flatMap((pack) => pack.primitives);\n return {\n primitives: definitions.map(({ type }) => type),\n surfaces: [...surfaces],\n formats: [...new Set([...surfaces, ...formats])].filter(\n (format) => format !== SNAPSHOT\n ),\n support: Object.fromEntries(\n definitions.map((definition) => [\n definition.type,\n Object.fromEntries(\n surfaces.map((surface) => [surface, supportOn(definition, surface)])\n ),\n ])\n ),\n ...(enhancementIds.length > 0\n ? {\n enhancements: Object.fromEntries(\n enhancementIds.map((id) => [id, true])\n ),\n }\n : {}),\n };\n};\n\nconst supportOn = (\n { renderers }: AnyPrimitiveDefinition,\n surface: string\n): SurfaceSupport =>\n surface === 'slack' && renderers.slack === undefined ? 'fallback' : 'native';\n"]}
@@ -0,0 +1,24 @@
1
+ import type { PrimitiveIcon } from '../define/primitive_icon.js';
2
+ import type { AnyPrimitiveDefinition } from '../define/primitive_module.js';
3
+ import type { EnhancementDefinition } from './enhancements.js';
4
+ import { type AnyPrimitivePack } from './primitive_pack.js';
5
+ /**
6
+ * One flattened inventory owned by {@link composePacks}.
7
+ *
8
+ * `definitions` is a stable array identity, which is what the composition
9
+ * schema cache keys on — pass it through rather than flattening packs per call.
10
+ */
11
+ export interface ComposedPacks {
12
+ readonly definitions: readonly AnyPrimitiveDefinition[];
13
+ readonly enhancements: readonly EnhancementDefinition[];
14
+ /** Every definition's `icon` by type, in one frozen null-prototype dictionary. */
15
+ readonly icons: Readonly<Record<string, PrimitiveIcon>>;
16
+ readonly slackAssetTypes: ReadonlySet<string>;
17
+ }
18
+ /**
19
+ * Flattens `packs` into one inventory, rejecting cross-pack duplicate node
20
+ * types and duplicate enhancement ids. Every offender is named in one error,
21
+ * so a bad three-pack composition reports all three at once.
22
+ */
23
+ export declare const composePacks: (packs: readonly AnyPrimitivePack[]) => ComposedPacks;
24
+ //# sourceMappingURL=compose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose.d.ts","sourceRoot":"","sources":["../../src/pack/compose.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,kBAAkB,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,SAAS,qBAAqB,EAAE,CAAC;IACxD,kFAAkF;IAClF,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC/C;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,GACvB,OAAO,SAAS,gBAAgB,EAAE,KACjC,aAyCF,CAAC"}
@@ -0,0 +1,55 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0; you may not use this file except in compliance with the Elastic License
5
+ * 2.0.
6
+ */
7
+ import { IsomerError } from '../composition/error.js';
8
+ import { iconsByType } from './primitive_pack.js';
9
+ /**
10
+ * Flattens `packs` into one inventory, rejecting cross-pack duplicate node
11
+ * types and duplicate enhancement ids. Every offender is named in one error,
12
+ * so a bad three-pack composition reports all three at once.
13
+ */
14
+ export const composePacks = (packs) => {
15
+ const typeOwners = new Map();
16
+ const enhancementOwners = new Map();
17
+ for (const pack of packs) {
18
+ for (const { type } of pack.primitives) {
19
+ typeOwners.set(type, [...(typeOwners.get(type) ?? []), pack.id]);
20
+ }
21
+ for (const { id } of pack.enhancements) {
22
+ enhancementOwners.set(id, [
23
+ ...(enhancementOwners.get(id) ?? []),
24
+ pack.id,
25
+ ]);
26
+ }
27
+ }
28
+ const repeated = [
29
+ ...new Set(packs
30
+ .map(({ id }) => id)
31
+ .filter((id, index, ids) => ids.indexOf(id) !== index)),
32
+ ];
33
+ if (repeated.length > 0) {
34
+ throw new IsomerError('DUPLICATE_PACK_ID', `composePacks: ${repeated.map((id) => `"${id}"`).join(', ')} names more than one pack; pack ids must be unique`);
35
+ }
36
+ assertUnique('DUPLICATE_PRIMITIVE_TYPE', 'primitive type', typeOwners);
37
+ assertUnique('DUPLICATE_ENHANCEMENT', 'enhancement', enhancementOwners);
38
+ const definitions = packs.flatMap((pack) => [...pack.primitives]);
39
+ return Object.freeze({
40
+ definitions: Object.freeze(definitions),
41
+ enhancements: Object.freeze(packs.flatMap((pack) => [...pack.enhancements])),
42
+ icons: iconsByType(definitions),
43
+ slackAssetTypes: new Set(packs.flatMap((pack) => [...pack.slackAssetTypes])),
44
+ });
45
+ };
46
+ const assertUnique = (code, noun, owners) => {
47
+ const duplicates = [...owners].filter(([, packs]) => packs.length > 1);
48
+ if (duplicates.length === 0) {
49
+ return;
50
+ }
51
+ throw new IsomerError(code, duplicates
52
+ .map(([key, packs]) => `${noun} "${key}" registered by ${packs.map((id) => `"${id}"`).join(' and ')}`)
53
+ .join('; '));
54
+ };
55
+ //# sourceMappingURL=compose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compose.js","sourceRoot":"","sources":["../../src/pack/compose.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0; you may not use this file except in compliance with the Elastic License\n * 2.0.\n */\n\nimport { IsomerError } from '../composition/error';\nimport type { PrimitiveIcon } from '../define/primitive_icon';\nimport type { AnyPrimitiveDefinition } from '../define/primitive_module';\n\nimport type { EnhancementDefinition } from './enhancements';\nimport { type AnyPrimitivePack, iconsByType } from './primitive_pack';\n\n/**\n * One flattened inventory owned by {@link composePacks}.\n *\n * `definitions` is a stable array identity, which is what the composition\n * schema cache keys on — pass it through rather than flattening packs per call.\n */\nexport interface ComposedPacks {\n readonly definitions: readonly AnyPrimitiveDefinition[];\n readonly enhancements: readonly EnhancementDefinition[];\n /** Every definition's `icon` by type, in one frozen null-prototype dictionary. */\n readonly icons: Readonly<Record<string, PrimitiveIcon>>;\n readonly slackAssetTypes: ReadonlySet<string>;\n}\n\n/**\n * Flattens `packs` into one inventory, rejecting cross-pack duplicate node\n * types and duplicate enhancement ids. Every offender is named in one error,\n * so a bad three-pack composition reports all three at once.\n */\nexport const composePacks = (\n packs: readonly AnyPrimitivePack[]\n): ComposedPacks => {\n const typeOwners = new Map<string, string[]>();\n const enhancementOwners = new Map<string, string[]>();\n for (const pack of packs) {\n for (const { type } of pack.primitives) {\n typeOwners.set(type, [...(typeOwners.get(type) ?? []), pack.id]);\n }\n for (const { id } of pack.enhancements) {\n enhancementOwners.set(id, [\n ...(enhancementOwners.get(id) ?? []),\n pack.id,\n ]);\n }\n }\n const repeated = [\n ...new Set(\n packs\n .map(({ id }) => id)\n .filter((id, index, ids) => ids.indexOf(id) !== index)\n ),\n ];\n if (repeated.length > 0) {\n throw new IsomerError(\n 'DUPLICATE_PACK_ID',\n `composePacks: ${repeated.map((id) => `\"${id}\"`).join(', ')} names more than one pack; pack ids must be unique`\n );\n }\n assertUnique('DUPLICATE_PRIMITIVE_TYPE', 'primitive type', typeOwners);\n assertUnique('DUPLICATE_ENHANCEMENT', 'enhancement', enhancementOwners);\n\n const definitions = packs.flatMap((pack) => [...pack.primitives]);\n return Object.freeze({\n definitions: Object.freeze(definitions),\n enhancements: Object.freeze(\n packs.flatMap((pack) => [...pack.enhancements])\n ),\n icons: iconsByType(definitions),\n slackAssetTypes: new Set(\n packs.flatMap((pack) => [...pack.slackAssetTypes])\n ),\n });\n};\n\nconst assertUnique = (\n code: 'DUPLICATE_ENHANCEMENT' | 'DUPLICATE_PRIMITIVE_TYPE',\n noun: string,\n owners: ReadonlyMap<string, readonly string[]>\n): void => {\n const duplicates = [...owners].filter(([, packs]) => packs.length > 1);\n if (duplicates.length === 0) {\n return;\n }\n throw new IsomerError(\n code,\n duplicates\n .map(\n ([key, packs]) =>\n `${noun} \"${key}\" registered by ${packs.map((id) => `\"${id}\"`).join(' and ')}`\n )\n .join('; ')\n );\n};\n"]}
@@ -0,0 +1,65 @@
1
+ import type { ChildNodeWalker } from '../composition/body_node_base.js';
2
+ import type { PrimitiveNode } from '../composition/node.js';
3
+ /**
4
+ * A progressive enhancement any vocabulary pack may declare.
5
+ *
6
+ * Ids are open strings rather than a closed union so a second pack can
7
+ * register one without editing a shared type. Duplicate ids across packs in
8
+ * one runtime are rejected at construction.
9
+ */
10
+ export interface EnhancementDefinition {
11
+ /** What a renderer tests for via `context.enhancements`. Unique across a runtime's packs. */
12
+ id: string;
13
+ /**
14
+ * Whether this composition has anything for the enhancement to act on.
15
+ * Gating on content rather than the opt-in alone is what keeps a composition
16
+ * with no matching node from shipping the script.
17
+ *
18
+ * `walk` is the composition's child walker, so a match nested inside a
19
+ * container from another pack is still found.
20
+ */
21
+ appliesTo: (body: readonly PrimitiveNode[], walk: ChildNodeWalker) => boolean;
22
+ /**
23
+ * A function body with `root: Element`, the render's `.isomer` section, in
24
+ * scope. It runs in its own function, so a top-level `const` or `return`
25
+ * cannot reach another enhancement. Absent when the host drives the
26
+ * enhancement itself.
27
+ *
28
+ * It must not look for its root through `document.currentScript`, which is
29
+ * `null` inside a shadow root. It must address markup through `data-*`
30
+ * attributes rather than class names: class names are minified per render,
31
+ * and a selector written against one is a contract nothing checks. An event
32
+ * meant for the host sets `composed: true` as well as `bubbles: true`, or it
33
+ * stops at a shadow boundary.
34
+ */
35
+ script?: string;
36
+ /** Renders node anchors when resolved, for an enhancement that finds nodes with `findNodeElementPairs`. */
37
+ anchors?: true;
38
+ }
39
+ /**
40
+ * The `definitions` that apply to `body`, the first of each id, limited to
41
+ * `requested` ids when given. The HTML and React surfaces both resolve through
42
+ * it, so the two cannot disagree on which enhancements a render carries.
43
+ */
44
+ export declare const resolveEnhancements: (body: readonly PrimitiveNode[], walk: ChildNodeWalker, definitions: readonly EnhancementDefinition[], requested?: readonly string[]) => EnhancementDefinition[];
45
+ /**
46
+ * Wraps one script body in its own function, so its `const`s and a top-level
47
+ * `return` stay its own. Anything that joins script bodies scopes each first.
48
+ */
49
+ export declare const scopeScript: (body: string) => string;
50
+ /** Marks the `<script>` a `scripts: 'embedded'` render emits. */
51
+ export declare const EMBEDDED_SCRIPT_ATTRIBUTE = "data-isomer-script";
52
+ /**
53
+ * Runs a `scripts: 'host'` render's `js` against the
54
+ * `.isomer` section the host inserted.
55
+ *
56
+ * Needed wherever the HTML is inserted by the host rather than parsed with the
57
+ * page, including every shadow root: such a `<script>` never runs, and one
58
+ * that did would find no `document.currentScript`.
59
+ *
60
+ * Compiles with `new Function`, so a strict Content-Security-Policy must allow
61
+ * `'unsafe-eval'`. A host that cannot should render with `scripts: 'embedded'`
62
+ * into light DOM.
63
+ */
64
+ export declare const runEnhancementScript: (js: string, root: Element) => void;
65
+ //# sourceMappingURL=enhancements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enhancements.d.ts","sourceRoot":"","sources":["../../src/pack/enhancements.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,6FAA6F;IAC7F,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;;OAOG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,aAAa,EAAE,EAAE,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC;IAC9E;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2GAA2G;IAC3G,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,MAAM,SAAS,aAAa,EAAE,EAC9B,MAAM,eAAe,EACrB,aAAa,SAAS,qBAAqB,EAAE,EAC7C,YAAY,SAAS,MAAM,EAAE,KAC5B,qBAAqB,EAcvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,KAAG,MAAoC,CAAC;AAEhF,iEAAiE;AACjE,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,GAAI,IAAI,MAAM,EAAE,MAAM,OAAO,KAAG,IAkBhE,CAAC"}
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0; you may not use this file except in compliance with the Elastic License
5
+ * 2.0.
6
+ */
7
+ import { IsomerError } from '../composition/error.js';
8
+ /**
9
+ * The `definitions` that apply to `body`, the first of each id, limited to
10
+ * `requested` ids when given. The HTML and React surfaces both resolve through
11
+ * it, so the two cannot disagree on which enhancements a render carries.
12
+ */
13
+ export const resolveEnhancements = (body, walk, definitions, requested) => {
14
+ const wanted = requested && new Set(requested);
15
+ const ids = new Set();
16
+ return definitions.filter((definition) => {
17
+ if (ids.has(definition.id) ||
18
+ (wanted && !wanted.has(definition.id)) ||
19
+ !definition.appliesTo(body, walk)) {
20
+ return false;
21
+ }
22
+ ids.add(definition.id);
23
+ return true;
24
+ });
25
+ };
26
+ /**
27
+ * Wraps one script body in its own function, so its `const`s and a top-level
28
+ * `return` stay its own. Anything that joins script bodies scopes each first.
29
+ */
30
+ export const scopeScript = (body) => `(() => {\n${body}\n})();`;
31
+ /** Marks the `<script>` a `scripts: 'embedded'` render emits. */
32
+ export const EMBEDDED_SCRIPT_ATTRIBUTE = 'data-isomer-script';
33
+ /**
34
+ * Runs a `scripts: 'host'` render's `js` against the
35
+ * `.isomer` section the host inserted.
36
+ *
37
+ * Needed wherever the HTML is inserted by the host rather than parsed with the
38
+ * page, including every shadow root: such a `<script>` never runs, and one
39
+ * that did would find no `document.currentScript`.
40
+ *
41
+ * Compiles with `new Function`, so a strict Content-Security-Policy must allow
42
+ * `'unsafe-eval'`. A host that cannot should render with `scripts: 'embedded'`
43
+ * into light DOM.
44
+ */
45
+ export const runEnhancementScript = (js, root) => {
46
+ // Guards untyped callers; typed ones already handled `querySelector`'s null.
47
+ if (!root) {
48
+ throw new IsomerError('ENHANCEMENT_ROOT_MISSING', 'runEnhancementScript: no root element; pass the `.isomer` section the render produced');
49
+ }
50
+ if (root.querySelector(`script[${EMBEDDED_SCRIPT_ATTRIBUTE}]`)) {
51
+ console.warn("isomer: this HTML was rendered with scripts: 'embedded'; render with scripts: 'host' so its enhancements run once");
52
+ }
53
+ if (js) {
54
+ // eslint-disable-next-line @typescript-eslint/no-implied-eval -- compiling the render's script is the point.
55
+ const run = new Function('root', js);
56
+ run(root);
57
+ }
58
+ };
59
+ //# sourceMappingURL=enhancements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enhancements.js","sourceRoot":"","sources":["../../src/pack/enhancements.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAwCnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,IAA8B,EAC9B,IAAqB,EACrB,WAA6C,EAC7C,SAA6B,EACJ,EAAE;IAC3B,MAAM,MAAM,GAAG,SAAS,IAAI,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IAC/C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE;QACvC,IACE,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACtB,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACtC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,EACjC,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,aAAa,IAAI,SAAS,CAAC;AAEhF,iEAAiE;AACjE,MAAM,CAAC,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAU,EAAE,IAAa,EAAQ,EAAE;IACtE,6EAA6E;IAC7E,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,WAAW,CACnB,0BAA0B,EAC1B,uFAAuF,CACxF,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,aAAa,CAAC,UAAU,yBAAyB,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,CAAC,IAAI,CACV,mHAAmH,CACpH,CAAC;IACJ,CAAC;IACD,IAAI,EAAE,EAAE,CAAC;QACP,6GAA6G;QAC7G,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE,CAA4B,CAAC;QAChE,GAAG,CAAC,IAAI,CAAC,CAAC;IACZ,CAAC;AACH,CAAC,CAAC","sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0; you may not use this file except in compliance with the Elastic License\n * 2.0.\n */\n\nimport type { ChildNodeWalker } from '../composition/body_node_base';\nimport { IsomerError } from '../composition/error';\nimport type { PrimitiveNode } from '../composition/node';\n\n/**\n * A progressive enhancement any vocabulary pack may declare.\n *\n * Ids are open strings rather than a closed union so a second pack can\n * register one without editing a shared type. Duplicate ids across packs in\n * one runtime are rejected at construction.\n */\nexport interface EnhancementDefinition {\n /** What a renderer tests for via `context.enhancements`. Unique across a runtime's packs. */\n id: string;\n /**\n * Whether this composition has anything for the enhancement to act on.\n * Gating on content rather than the opt-in alone is what keeps a composition\n * with no matching node from shipping the script.\n *\n * `walk` is the composition's child walker, so a match nested inside a\n * container from another pack is still found.\n */\n appliesTo: (body: readonly PrimitiveNode[], walk: ChildNodeWalker) => boolean;\n /**\n * A function body with `root: Element`, the render's `.isomer` section, in\n * scope. It runs in its own function, so a top-level `const` or `return`\n * cannot reach another enhancement. Absent when the host drives the\n * enhancement itself.\n *\n * It must not look for its root through `document.currentScript`, which is\n * `null` inside a shadow root. It must address markup through `data-*`\n * attributes rather than class names: class names are minified per render,\n * and a selector written against one is a contract nothing checks. An event\n * meant for the host sets `composed: true` as well as `bubbles: true`, or it\n * stops at a shadow boundary.\n */\n script?: string;\n /** Renders node anchors when resolved, for an enhancement that finds nodes with `findNodeElementPairs`. */\n anchors?: true;\n}\n\n/**\n * The `definitions` that apply to `body`, the first of each id, limited to\n * `requested` ids when given. The HTML and React surfaces both resolve through\n * it, so the two cannot disagree on which enhancements a render carries.\n */\nexport const resolveEnhancements = (\n body: readonly PrimitiveNode[],\n walk: ChildNodeWalker,\n definitions: readonly EnhancementDefinition[],\n requested?: readonly string[]\n): EnhancementDefinition[] => {\n const wanted = requested && new Set(requested);\n const ids = new Set<string>();\n return definitions.filter((definition) => {\n if (\n ids.has(definition.id) ||\n (wanted && !wanted.has(definition.id)) ||\n !definition.appliesTo(body, walk)\n ) {\n return false;\n }\n ids.add(definition.id);\n return true;\n });\n};\n\n/**\n * Wraps one script body in its own function, so its `const`s and a top-level\n * `return` stay its own. Anything that joins script bodies scopes each first.\n */\nexport const scopeScript = (body: string): string => `(() => {\\n${body}\\n})();`;\n\n/** Marks the `<script>` a `scripts: 'embedded'` render emits. */\nexport const EMBEDDED_SCRIPT_ATTRIBUTE = 'data-isomer-script';\n\n/**\n * Runs a `scripts: 'host'` render's `js` against the\n * `.isomer` section the host inserted.\n *\n * Needed wherever the HTML is inserted by the host rather than parsed with the\n * page, including every shadow root: such a `<script>` never runs, and one\n * that did would find no `document.currentScript`.\n *\n * Compiles with `new Function`, so a strict Content-Security-Policy must allow\n * `'unsafe-eval'`. A host that cannot should render with `scripts: 'embedded'`\n * into light DOM.\n */\nexport const runEnhancementScript = (js: string, root: Element): void => {\n // Guards untyped callers; typed ones already handled `querySelector`'s null.\n if (!root) {\n throw new IsomerError(\n 'ENHANCEMENT_ROOT_MISSING',\n 'runEnhancementScript: no root element; pass the `.isomer` section the render produced'\n );\n }\n if (root.querySelector(`script[${EMBEDDED_SCRIPT_ATTRIBUTE}]`)) {\n console.warn(\n \"isomer: this HTML was rendered with scripts: 'embedded'; render with scripts: 'host' so its enhancements run once\"\n );\n }\n if (js) {\n // eslint-disable-next-line @typescript-eslint/no-implied-eval -- compiling the render's script is the point.\n const run = new Function('root', js) as (root: Element) => void;\n run(root);\n }\n};\n"]}
@@ -0,0 +1,5 @@
1
+ export { type CapabilitySources, type HostCapabilities, type SurfaceSupport, describeCapabilities, } from './capabilities.js';
2
+ export { type ComposedPacks, composePacks } from './compose.js';
3
+ export { type EnhancementDefinition, scopeScript } from './enhancements.js';
4
+ export { type AnyPrimitivePack, type PackAuthoringOptions, type PackStyleAdapter, type PrimitiveGroup, type PrimitivePack, type PrimitivePackInput, definePrimitivePack, } from './primitive_pack.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pack/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,aAAa,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,KAAK,qBAAqB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0; you may not use this file except in compliance with the Elastic License
5
+ * 2.0.
6
+ */
7
+ export { describeCapabilities, } from './capabilities.js';
8
+ export { composePacks } from './compose.js';
9
+ export { scopeScript } from './enhancements.js';
10
+ export { definePrimitivePack, } from './primitive_pack.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/pack/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAsB,YAAY,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAA8B,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAOL,mBAAmB,GACpB,MAAM,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contributor license agreements. Licensed under the Elastic License\n * 2.0; you may not use this file except in compliance with the Elastic License\n * 2.0.\n */\n\nexport {\n type CapabilitySources,\n type HostCapabilities,\n type SurfaceSupport,\n describeCapabilities,\n} from './capabilities';\nexport { type ComposedPacks, composePacks } from './compose';\nexport { type EnhancementDefinition, scopeScript } from './enhancements';\nexport {\n type AnyPrimitivePack,\n type PackAuthoringOptions,\n type PackStyleAdapter,\n type PrimitiveGroup,\n type PrimitivePack,\n type PrimitivePackInput,\n definePrimitivePack,\n} from './primitive_pack';\n"]}
@@ -0,0 +1,164 @@
1
+ import type { PrimitiveIcon } from '../define/primitive_icon.js';
2
+ import type { AnyPrimitiveDefinition, OptionalSurface, StyleHandle } from '../define/primitive_module.js';
3
+ import type { EnhancementDefinition } from './enhancements.js';
4
+ /**
5
+ * The authoring-schema material a pack contributes for its own primitives.
6
+ *
7
+ * A subset of `AuthoringJsonSchemaOptions`: `$id`, `title`, `description`, and
8
+ * `composition` describe the whole authoring schema a runtime builds, which is
9
+ * a host decision, not a pack one. `pack/` does not import `validate/` for
10
+ * this, so the shape is declared here rather than reused by reference.
11
+ */
12
+ export interface PackAuthoringOptions {
13
+ /** `$def` id to `description`, for this pack's own primitives. */
14
+ describe?: Readonly<Record<string, string>>;
15
+ /** `$defId.property` paths to drop, from this pack's own primitives. */
16
+ omitProperties?: readonly string[];
17
+ /** Headings an index catalog sorts this pack's primitives under, in order. */
18
+ groups?: readonly PrimitiveGroup[];
19
+ }
20
+ /** A titled set of primitive types, listed together in an index catalog. */
21
+ export interface PrimitiveGroup {
22
+ title: string;
23
+ types: readonly string[];
24
+ }
25
+ /**
26
+ * The HTML style-adapter hooks a pack may declare. Typed loosely here so `pack/` does not import `render/`.
27
+ */
28
+ export type PackStyleAdapter = {
29
+ /** See {@link PrimitivePackInput.styleCollector}. */
30
+ styleCollector?: string;
31
+ /** The hooks of `HTMLStyleAdapter` from `./html`, erased: a fresh collector per render, the context renderers receive, and the stylesheet the collector produced. */
32
+ createCollector: (...args: never[]) => object;
33
+ createRenderContext: (...args: never[]) => unknown;
34
+ renderStyles: (...args: never[]) => string;
35
+ /**
36
+ * Whether `handle` belongs to this adapter's stylesheet. Required for a runtime to combine several packs' CSS: without it their handles cannot be routed and the host must pick one adapter.
37
+ */
38
+ ownsHandle?: (handle: StyleHandle) => boolean;
39
+ };
40
+ /** What a pack author passes to {@link definePrimitivePack}. */
41
+ export interface PrimitivePackInput {
42
+ /** Stable identifier, used in capability reports and error messages. */
43
+ id: string;
44
+ /**
45
+ * The optional surfaces this pack's primitives implement.
46
+ *
47
+ * Only `slack`, and it stays optional per primitive: the dispatcher converts
48
+ * the mandatory markdown to Block Kit, so declaring it reports an intent
49
+ * rather than imposing a requirement. Omit it entirely for a pack that
50
+ * renders Slack through that fallback.
51
+ */
52
+ surfaces?: readonly OptionalSurface[];
53
+ /** This pack's vocabulary. Node types must be unique within it, or construction throws. */
54
+ primitives: readonly AnyPrimitiveDefinition[];
55
+ /**
56
+ * Progressive enhancements this pack's primitives can apply, by id.
57
+ *
58
+ * Declared by the pack because an enhancement is a fact about its
59
+ * vocabulary — a sortable table, a copyable code block — and a host
60
+ * composing packs it did not write cannot be expected to know the ids.
61
+ * The runtime flattens these across packs; duplicate ids are rejected.
62
+ */
63
+ enhancements?: readonly EnhancementDefinition[];
64
+ /**
65
+ * Types that render as a self-contained picture rather than as text.
66
+ *
67
+ * A channel that cannot draw them inline uploads an image instead: the Slack
68
+ * dispatcher swaps such a node for an `image` block and an upload request, so
69
+ * a chart arrives as a PNG rather than as a markdown approximation of one.
70
+ *
71
+ * Declared by the pack because it is a fact about the vocabulary, and a host
72
+ * composing packs it did not write cannot be expected to know it.
73
+ */
74
+ slackAssetTypes?: readonly string[];
75
+ /**
76
+ * Default HTML style adapter for this pack. A runtime that omits
77
+ * `styleAdapter` runs the packs' own adapters, combined when more than one
78
+ * pack declares one and each answers `ownsHandle`. Pass `styleAdapter` on
79
+ * the runtime to replace them all.
80
+ */
81
+ styleAdapter?: PackStyleAdapter;
82
+ /**
83
+ * Names the collector shape this pack's `collectStyles` hooks mutate, so a
84
+ * runtime can reject a pack paired with an adapter of a different tag.
85
+ * Defaults to `styleAdapter.styleCollector`; a pack with neither opts out of
86
+ * the check.
87
+ */
88
+ styleCollector?: string;
89
+ /**
90
+ * This pack's own contribution to the runtime's authoring JSON Schema.
91
+ *
92
+ * Merged across every composed pack, so a host does not hand-merge each
93
+ * pack's `describe`/`omitProperties` into one options object itself. The
94
+ * runtime-level `authoring` option is merged in last and wins on conflict.
95
+ */
96
+ authoring?: PackAuthoringOptions;
97
+ }
98
+ /**
99
+ * A pack as the runtime sees it.
100
+ *
101
+ * `TTheme` is the palette this pack's `react` renderers read as `env.theme`
102
+ * when drawn through the `snapshot` surface — a *lower bound* on whatever theme
103
+ * the runtime holding it supplies. It is carried by
104
+ * {@link PrimitivePack.__theme} rather than by any real field, because
105
+ * `primitives` is erased to `AnyPrimitiveDefinition[]` and a heterogeneous
106
+ * inventory has no single node type to be generic over.
107
+ *
108
+ * The bound is declared, not derived: nothing checks it against what the
109
+ * renderers actually read. State it at the definition as
110
+ * `definePrimitivePack<T>(input)`.
111
+ * Bare `PrimitivePack` requires nothing and fits any runtime; a slot that must
112
+ * hold packs of every palette is typed {@link AnyPrimitivePack}.
113
+ */
114
+ export interface PrimitivePack<TTheme = unknown> {
115
+ /** Unique among the packs a runtime composes, and used in error messages. */
116
+ readonly id: string;
117
+ /** See {@link PrimitivePackInput.surfaces}. */
118
+ readonly surfaces: readonly OptionalSurface[];
119
+ /** See {@link PrimitivePackInput.primitives}. */
120
+ readonly primitives: readonly AnyPrimitiveDefinition[];
121
+ /** Node types this pack owns, for duplicate detection across packs. */
122
+ readonly types: ReadonlySet<string>;
123
+ /**
124
+ * Each primitive's `icon` by type, for the primitives that declare one, so a host listing them need not walk `primitives`.
125
+ *
126
+ * A frozen null-prototype dictionary: an absent type reads `undefined`, even `constructor`. Absent on a pack built by an SDK that predates icons; {@link iconsByType} derives it from `primitives`.
127
+ */
128
+ readonly icons?: Readonly<Record<string, PrimitiveIcon>>;
129
+ /** See {@link PrimitivePackInput.enhancements}. */
130
+ readonly enhancements: readonly EnhancementDefinition[];
131
+ /** See {@link PrimitivePackInput.slackAssetTypes}. */
132
+ readonly slackAssetTypes: ReadonlySet<string>;
133
+ /** See {@link PrimitivePackInput.styleAdapter}. */
134
+ readonly styleAdapter?: PackStyleAdapter;
135
+ /** See {@link PrimitivePackInput.styleCollector}. */
136
+ readonly styleCollector?: string;
137
+ /** See {@link PrimitivePackInput.authoring}. */
138
+ readonly authoring?: PackAuthoringOptions;
139
+ /**
140
+ * Phantom: never present at runtime, never read.
141
+ *
142
+ * A property rather than a method so `strictFunctionTypes` checks it
143
+ * contravariantly. A method signature is bivariant, which would let a pack
144
+ * needing richer tokens sit in a slot supplying fewer and then read a field
145
+ * nothing supplies — the exact failure this marker exists to prevent.
146
+ */
147
+ readonly __theme?: (theme: TTheme) => void;
148
+ }
149
+ /**
150
+ * A pack of any palette, for storage positions: `never` is assignable to every
151
+ * requirement, so a slot typed this way holds every pack.
152
+ */
153
+ export type AnyPrimitivePack = PrimitivePack<never>;
154
+ /**
155
+ * Builds a {@link PrimitivePack}.
156
+ *
157
+ * `TTheme` is the palette a frame must supply for this pack's nodes to be drawn
158
+ * on the `snapshot` surface: `definePrimitivePack<CoreTokens>(input)`. Omitted, it is
159
+ * `unknown`, which requires nothing.
160
+ */
161
+ export declare const definePrimitivePack: <TTheme = unknown>(input: PrimitivePackInput) => PrimitivePack<TTheme>;
162
+ /** Each definition's `icon` by type, null-prototype so a type such as `__proto__` is an ordinary key. */
163
+ export declare const iconsByType: (primitives: readonly AnyPrimitiveDefinition[]) => Readonly<Record<string, PrimitiveIcon>>;
164
+ //# sourceMappingURL=primitive_pack.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive_pack.d.ts","sourceRoot":"","sources":["../../src/pack/primitive_pack.ts"],"names":[],"mappings":"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"}