@refrakt-md/runes 0.8.5 → 0.9.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 (314) hide show
  1. package/dist/config.d.ts.map +1 -1
  2. package/dist/config.js +201 -29
  3. package/dist/config.js.map +1 -1
  4. package/dist/fence-escape.d.ts +19 -0
  5. package/dist/fence-escape.d.ts.map +1 -0
  6. package/dist/fence-escape.js +53 -0
  7. package/dist/fence-escape.js.map +1 -0
  8. package/dist/index.d.ts +6 -8
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +53 -50
  11. package/dist/index.js.map +1 -1
  12. package/dist/interfaces.d.ts +0 -4
  13. package/dist/interfaces.d.ts.map +1 -1
  14. package/dist/interfaces.js.map +1 -1
  15. package/dist/lib/component.d.ts +16 -10
  16. package/dist/lib/component.d.ts.map +1 -1
  17. package/dist/lib/component.js +11 -3
  18. package/dist/lib/component.js.map +1 -1
  19. package/dist/lib/index.d.ts +11 -16
  20. package/dist/lib/index.d.ts.map +1 -1
  21. package/dist/lib/index.js +7 -164
  22. package/dist/lib/index.js.map +1 -1
  23. package/dist/lib/node.d.ts +1 -15
  24. package/dist/lib/node.d.ts.map +1 -1
  25. package/dist/lib/node.js +0 -35
  26. package/dist/lib/node.js.map +1 -1
  27. package/dist/nodes.d.ts.map +1 -1
  28. package/dist/nodes.js +2 -1
  29. package/dist/nodes.js.map +1 -1
  30. package/dist/packages.js +1 -1
  31. package/dist/packages.js.map +1 -1
  32. package/dist/rune.d.ts +6 -4
  33. package/dist/rune.d.ts.map +1 -1
  34. package/dist/rune.js +2 -1
  35. package/dist/rune.js.map +1 -1
  36. package/dist/sandbox-sources.d.ts +34 -0
  37. package/dist/sandbox-sources.d.ts.map +1 -0
  38. package/dist/sandbox-sources.js +204 -0
  39. package/dist/sandbox-sources.js.map +1 -0
  40. package/dist/tags/accordion.d.ts.map +1 -1
  41. package/dist/tags/accordion.js +21 -38
  42. package/dist/tags/accordion.js.map +1 -1
  43. package/dist/tags/annotate.d.ts.map +1 -1
  44. package/dist/tags/annotate.js +2 -3
  45. package/dist/tags/annotate.js.map +1 -1
  46. package/dist/tags/blog.d.ts.map +1 -1
  47. package/dist/tags/blog.js +1 -2
  48. package/dist/tags/blog.js.map +1 -1
  49. package/dist/tags/breadcrumb.d.ts.map +1 -1
  50. package/dist/tags/breadcrumb.js +4 -5
  51. package/dist/tags/breadcrumb.js.map +1 -1
  52. package/dist/tags/budget.d.ts.map +1 -1
  53. package/dist/tags/budget.js +77 -90
  54. package/dist/tags/budget.js.map +1 -1
  55. package/dist/tags/chart.d.ts.map +1 -1
  56. package/dist/tags/chart.js +1 -2
  57. package/dist/tags/chart.js.map +1 -1
  58. package/dist/tags/codegroup.d.ts.map +1 -1
  59. package/dist/tags/codegroup.js +1 -2
  60. package/dist/tags/codegroup.js.map +1 -1
  61. package/dist/tags/common.d.ts +46 -15
  62. package/dist/tags/common.d.ts.map +1 -1
  63. package/dist/tags/common.js +115 -65
  64. package/dist/tags/common.js.map +1 -1
  65. package/dist/tags/compare.d.ts.map +1 -1
  66. package/dist/tags/compare.js +1 -2
  67. package/dist/tags/compare.js.map +1 -1
  68. package/dist/tags/conversation.d.ts.map +1 -1
  69. package/dist/tags/conversation.js +20 -34
  70. package/dist/tags/conversation.js.map +1 -1
  71. package/dist/tags/datatable.d.ts.map +1 -1
  72. package/dist/tags/datatable.js +1 -2
  73. package/dist/tags/datatable.js.map +1 -1
  74. package/dist/tags/details.d.ts.map +1 -1
  75. package/dist/tags/details.js +1 -2
  76. package/dist/tags/details.js.map +1 -1
  77. package/dist/tags/diagram.d.ts.map +1 -1
  78. package/dist/tags/diagram.js +1 -2
  79. package/dist/tags/diagram.js.map +1 -1
  80. package/dist/tags/diff.d.ts.map +1 -1
  81. package/dist/tags/diff.js +1 -2
  82. package/dist/tags/diff.js.map +1 -1
  83. package/dist/tags/embed.d.ts.map +1 -1
  84. package/dist/tags/embed.js +1 -2
  85. package/dist/tags/embed.js.map +1 -1
  86. package/dist/tags/error.d.ts.map +1 -1
  87. package/dist/tags/error.js +1 -2
  88. package/dist/tags/error.js.map +1 -1
  89. package/dist/tags/figure.d.ts.map +1 -1
  90. package/dist/tags/figure.js +1 -2
  91. package/dist/tags/figure.js.map +1 -1
  92. package/dist/tags/form.d.ts +2 -1
  93. package/dist/tags/form.d.ts.map +1 -1
  94. package/dist/tags/form.js +49 -72
  95. package/dist/tags/form.js.map +1 -1
  96. package/dist/tags/gallery.d.ts.map +1 -1
  97. package/dist/tags/gallery.js +1 -2
  98. package/dist/tags/gallery.js.map +1 -1
  99. package/dist/tags/grid.d.ts.map +1 -1
  100. package/dist/tags/grid.js +1 -2
  101. package/dist/tags/grid.js.map +1 -1
  102. package/dist/tags/hint.d.ts.map +1 -1
  103. package/dist/tags/hint.js +1 -2
  104. package/dist/tags/hint.js.map +1 -1
  105. package/dist/tags/juxtapose.d.ts.map +1 -1
  106. package/dist/tags/juxtapose.js +4 -4
  107. package/dist/tags/juxtapose.js.map +1 -1
  108. package/dist/tags/mediatext.d.ts.map +1 -1
  109. package/dist/tags/mediatext.js +1 -2
  110. package/dist/tags/mediatext.js.map +1 -1
  111. package/dist/tags/nav.d.ts.map +1 -1
  112. package/dist/tags/nav.js +29 -19
  113. package/dist/tags/nav.js.map +1 -1
  114. package/dist/tags/pullquote.d.ts.map +1 -1
  115. package/dist/tags/pullquote.js +1 -2
  116. package/dist/tags/pullquote.js.map +1 -1
  117. package/dist/tags/reveal.d.ts.map +1 -1
  118. package/dist/tags/reveal.js +18 -24
  119. package/dist/tags/reveal.js.map +1 -1
  120. package/dist/tags/sandbox.d.ts.map +1 -1
  121. package/dist/tags/sandbox.js +82 -60
  122. package/dist/tags/sandbox.js.map +1 -1
  123. package/dist/tags/showcase.d.ts.map +1 -1
  124. package/dist/tags/showcase.js +1 -2
  125. package/dist/tags/showcase.js.map +1 -1
  126. package/dist/tags/sidenote.d.ts.map +1 -1
  127. package/dist/tags/sidenote.js +1 -2
  128. package/dist/tags/sidenote.js.map +1 -1
  129. package/dist/tags/tabs.d.ts.map +1 -1
  130. package/dist/tags/tabs.js +26 -35
  131. package/dist/tags/tabs.js.map +1 -1
  132. package/dist/tags/textblock.d.ts.map +1 -1
  133. package/dist/tags/textblock.js +1 -2
  134. package/dist/tags/textblock.js.map +1 -1
  135. package/dist/tags/toc.d.ts.map +1 -1
  136. package/dist/tags/toc.js +1 -2
  137. package/dist/tags/toc.js.map +1 -1
  138. package/dist/tags/xref.d.ts +18 -0
  139. package/dist/tags/xref.d.ts.map +1 -0
  140. package/dist/tags/xref.js +54 -0
  141. package/dist/tags/xref.js.map +1 -0
  142. package/package.json +3 -3
  143. package/dist/lib/annotations/annotation.d.ts +0 -11
  144. package/dist/lib/annotations/annotation.d.ts.map +0 -1
  145. package/dist/lib/annotations/annotation.js +0 -39
  146. package/dist/lib/annotations/annotation.js.map +0 -1
  147. package/dist/lib/annotations/attribute.d.ts +0 -12
  148. package/dist/lib/annotations/attribute.d.ts.map +0 -1
  149. package/dist/lib/annotations/attribute.js +0 -17
  150. package/dist/lib/annotations/attribute.js.map +0 -1
  151. package/dist/lib/annotations/decoration.d.ts +0 -10
  152. package/dist/lib/annotations/decoration.d.ts.map +0 -1
  153. package/dist/lib/annotations/decoration.js +0 -46
  154. package/dist/lib/annotations/decoration.js.map +0 -1
  155. package/dist/lib/annotations/group.d.ts +0 -24
  156. package/dist/lib/annotations/group.d.ts.map +0 -1
  157. package/dist/lib/annotations/group.js +0 -78
  158. package/dist/lib/annotations/group.js.map +0 -1
  159. package/dist/lib/annotations/id.d.ts +0 -19
  160. package/dist/lib/annotations/id.d.ts.map +0 -1
  161. package/dist/lib/annotations/id.js +0 -32
  162. package/dist/lib/annotations/id.js.map +0 -1
  163. package/dist/lib/annotations/interfaces.d.ts +0 -27
  164. package/dist/lib/annotations/interfaces.d.ts.map +0 -1
  165. package/dist/lib/annotations/interfaces.js +0 -2
  166. package/dist/lib/annotations/interfaces.js.map +0 -1
  167. package/dist/lib/model.d.ts +0 -17
  168. package/dist/lib/model.d.ts.map +0 -1
  169. package/dist/lib/model.js +0 -50
  170. package/dist/lib/model.js.map +0 -1
  171. package/dist/registry.d.ts +0 -94
  172. package/dist/registry.d.ts.map +0 -1
  173. package/dist/registry.js +0 -94
  174. package/dist/registry.js.map +0 -1
  175. package/dist/schema/accordion.d.ts +0 -8
  176. package/dist/schema/accordion.d.ts.map +0 -1
  177. package/dist/schema/accordion.js +0 -13
  178. package/dist/schema/accordion.js.map +0 -1
  179. package/dist/schema/annotate.d.ts +0 -6
  180. package/dist/schema/annotate.d.ts.map +0 -1
  181. package/dist/schema/annotate.js +0 -8
  182. package/dist/schema/annotate.js.map +0 -1
  183. package/dist/schema/bg.d.ts +0 -11
  184. package/dist/schema/bg.d.ts.map +0 -1
  185. package/dist/schema/bg.js +0 -13
  186. package/dist/schema/bg.js.map +0 -1
  187. package/dist/schema/blog.d.ts +0 -16
  188. package/dist/schema/blog.d.ts.map +0 -1
  189. package/dist/schema/blog.js +0 -21
  190. package/dist/schema/blog.js.map +0 -1
  191. package/dist/schema/breadcrumb.d.ts +0 -8
  192. package/dist/schema/breadcrumb.d.ts.map +0 -1
  193. package/dist/schema/breadcrumb.js +0 -12
  194. package/dist/schema/breadcrumb.js.map +0 -1
  195. package/dist/schema/budget.d.ts +0 -21
  196. package/dist/schema/budget.d.ts.map +0 -1
  197. package/dist/schema/budget.js +0 -27
  198. package/dist/schema/budget.js.map +0 -1
  199. package/dist/schema/chart.d.ts +0 -6
  200. package/dist/schema/chart.d.ts.map +0 -1
  201. package/dist/schema/chart.js +0 -8
  202. package/dist/schema/chart.js.map +0 -1
  203. package/dist/schema/codegroup.d.ts +0 -7
  204. package/dist/schema/codegroup.d.ts.map +0 -1
  205. package/dist/schema/codegroup.js +0 -8
  206. package/dist/schema/codegroup.js.map +0 -1
  207. package/dist/schema/compare.d.ts +0 -4
  208. package/dist/schema/compare.d.ts.map +0 -1
  209. package/dist/schema/compare.js +0 -6
  210. package/dist/schema/compare.js.map +0 -1
  211. package/dist/schema/conversation.d.ts +0 -8
  212. package/dist/schema/conversation.d.ts.map +0 -1
  213. package/dist/schema/conversation.js +0 -12
  214. package/dist/schema/conversation.js.map +0 -1
  215. package/dist/schema/datatable.d.ts +0 -7
  216. package/dist/schema/datatable.d.ts.map +0 -1
  217. package/dist/schema/datatable.js +0 -9
  218. package/dist/schema/datatable.js.map +0 -1
  219. package/dist/schema/details.d.ts +0 -4
  220. package/dist/schema/details.d.ts.map +0 -1
  221. package/dist/schema/details.js +0 -6
  222. package/dist/schema/details.js.map +0 -1
  223. package/dist/schema/diagram.d.ts +0 -5
  224. package/dist/schema/diagram.d.ts.map +0 -1
  225. package/dist/schema/diagram.js +0 -7
  226. package/dist/schema/diagram.js.map +0 -1
  227. package/dist/schema/diff.d.ts +0 -5
  228. package/dist/schema/diff.d.ts.map +0 -1
  229. package/dist/schema/diff.js +0 -7
  230. package/dist/schema/diff.js.map +0 -1
  231. package/dist/schema/docpage.d.ts +0 -11
  232. package/dist/schema/docpage.d.ts.map +0 -1
  233. package/dist/schema/docpage.js +0 -15
  234. package/dist/schema/docpage.js.map +0 -1
  235. package/dist/schema/embed.d.ts +0 -9
  236. package/dist/schema/embed.d.ts.map +0 -1
  237. package/dist/schema/embed.js +0 -11
  238. package/dist/schema/embed.js.map +0 -1
  239. package/dist/schema/error.d.ts +0 -10
  240. package/dist/schema/error.d.ts.map +0 -1
  241. package/dist/schema/error.js +0 -14
  242. package/dist/schema/error.js.map +0 -1
  243. package/dist/schema/figure.d.ts +0 -6
  244. package/dist/schema/figure.d.ts.map +0 -1
  245. package/dist/schema/figure.js +0 -8
  246. package/dist/schema/figure.js.map +0 -1
  247. package/dist/schema/form.d.ts +0 -13
  248. package/dist/schema/form.d.ts.map +0 -1
  249. package/dist/schema/form.js +0 -17
  250. package/dist/schema/form.js.map +0 -1
  251. package/dist/schema/gallery.d.ts +0 -8
  252. package/dist/schema/gallery.d.ts.map +0 -1
  253. package/dist/schema/gallery.js +0 -10
  254. package/dist/schema/gallery.js.map +0 -1
  255. package/dist/schema/grid.d.ts +0 -3
  256. package/dist/schema/grid.d.ts.map +0 -1
  257. package/dist/schema/grid.js +0 -3
  258. package/dist/schema/grid.js.map +0 -1
  259. package/dist/schema/hint.d.ts +0 -4
  260. package/dist/schema/hint.d.ts.map +0 -1
  261. package/dist/schema/hint.js +0 -6
  262. package/dist/schema/hint.js.map +0 -1
  263. package/dist/schema/juxtapose.d.ts +0 -7
  264. package/dist/schema/juxtapose.d.ts.map +0 -1
  265. package/dist/schema/juxtapose.js +0 -11
  266. package/dist/schema/juxtapose.js.map +0 -1
  267. package/dist/schema/mediatext.d.ts +0 -6
  268. package/dist/schema/mediatext.d.ts.map +0 -1
  269. package/dist/schema/mediatext.js +0 -8
  270. package/dist/schema/mediatext.js.map +0 -1
  271. package/dist/schema/nav.d.ts +0 -13
  272. package/dist/schema/nav.d.ts.map +0 -1
  273. package/dist/schema/nav.js +0 -19
  274. package/dist/schema/nav.js.map +0 -1
  275. package/dist/schema/pagination.d.ts +0 -5
  276. package/dist/schema/pagination.d.ts.map +0 -1
  277. package/dist/schema/pagination.js +0 -7
  278. package/dist/schema/pagination.js.map +0 -1
  279. package/dist/schema/pullquote.d.ts +0 -5
  280. package/dist/schema/pullquote.d.ts.map +0 -1
  281. package/dist/schema/pullquote.js +0 -7
  282. package/dist/schema/pullquote.js.map +0 -1
  283. package/dist/schema/reveal.d.ts +0 -8
  284. package/dist/schema/reveal.d.ts.map +0 -1
  285. package/dist/schema/reveal.js +0 -13
  286. package/dist/schema/reveal.js.map +0 -1
  287. package/dist/schema/sandbox.d.ts +0 -9
  288. package/dist/schema/sandbox.d.ts.map +0 -1
  289. package/dist/schema/sandbox.js +0 -11
  290. package/dist/schema/sandbox.js.map +0 -1
  291. package/dist/schema/showcase.d.ts +0 -8
  292. package/dist/schema/showcase.d.ts.map +0 -1
  293. package/dist/schema/showcase.js +0 -10
  294. package/dist/schema/showcase.js.map +0 -1
  295. package/dist/schema/sidenote.d.ts +0 -4
  296. package/dist/schema/sidenote.d.ts.map +0 -1
  297. package/dist/schema/sidenote.js +0 -6
  298. package/dist/schema/sidenote.js.map +0 -1
  299. package/dist/schema/tabs.d.ts +0 -12
  300. package/dist/schema/tabs.d.ts.map +0 -1
  301. package/dist/schema/tabs.js +0 -17
  302. package/dist/schema/tabs.js.map +0 -1
  303. package/dist/schema/textblock.d.ts +0 -7
  304. package/dist/schema/textblock.d.ts.map +0 -1
  305. package/dist/schema/textblock.js +0 -9
  306. package/dist/schema/textblock.js.map +0 -1
  307. package/dist/schema/tint.d.ts +0 -5
  308. package/dist/schema/tint.d.ts.map +0 -1
  309. package/dist/schema/tint.js +0 -7
  310. package/dist/schema/tint.js.map +0 -1
  311. package/dist/schema/toc.d.ts +0 -5
  312. package/dist/schema/toc.d.ts.map +0 -1
  313. package/dist/schema/toc.js +0 -7
  314. package/dist/schema/toc.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAA+B,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,oBAAoB,EAAoE,MAAM,mBAAmB,CAAC;AA+EhI;gFACgF;AAChF,eAAO,MAAM,UAAU,EAAE,WAqoBxB,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,UAAU,aAAa,CAAC;AAIrC,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;CACzB;AAgbD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,oBAsH/B,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAA+B,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,oBAAoB,EAAoE,MAAM,mBAAmB,CAAC;AA+EhI;gFACgF;AAChF,eAAO,MAAM,UAAU,EAAE,WAwrBxB,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,UAAU,aAAa,CAAC;AAIrC,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;CACzB;AA4kBD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,oBA8H/B,CAAC"}
package/dist/config.js CHANGED
@@ -2,9 +2,9 @@ import { isTag, makeTag, findByDataName, readMeta, resolveGap, ratioToFr, resolv
2
2
  import Markdoc from '@markdoc/markdoc';
3
3
  const { Tag } = Markdoc;
4
4
  import { createComponentRenderable } from './lib/index.js';
5
- import { schema } from './registry.js';
6
5
  import { BREADCRUMB_AUTO_SENTINEL } from './tags/breadcrumb.js';
7
6
  import { NAV_AUTO_SENTINEL } from './tags/nav.js';
7
+ import { XREF_RUNE_MARKER } from './tags/xref.js';
8
8
  // ─── Budget postTransform helpers ───
9
9
  const BUDGET_CURRENCY_SYMBOLS = {
10
10
  USD: '$', EUR: '€', GBP: '£', JPY: '¥', CNY: '¥',
@@ -68,7 +68,7 @@ function readPropText(node, prop) {
68
68
  }
69
69
  /** autoLabel entries shared by all PageSection-based runes */
70
70
  const pageSectionAutoLabel = {
71
- header: 'header', // <header> wrapper element
71
+ header: 'preamble', // <header> wrapper element → data-name="preamble"
72
72
  eyebrow: 'eyebrow', // property="eyebrow"
73
73
  headline: 'headline', // property="headline"
74
74
  blurb: 'blurb', // property="blurb"
@@ -82,11 +82,13 @@ export const coreConfig = {
82
82
  icons: {},
83
83
  runes: {
84
84
  // ─── Simple runes (block name only, engine adds BEM classes) ───
85
- Accordion: { block: 'accordion', autoLabel: pageSectionAutoLabel, editHints: { headline: 'inline', eyebrow: 'inline', blurb: 'inline' } },
86
- AccordionItem: { block: 'accordion-item', parent: 'Accordion', autoLabel: { name: 'header' }, editHints: { header: 'inline', body: 'none' } },
87
- Details: { block: 'details', autoLabel: { summary: 'summary' }, editHints: { summary: 'inline', body: 'none' } },
85
+ Accordion: { block: 'accordion', defaultDensity: 'full', sections: { preamble: 'preamble', headline: 'title', blurb: 'description' }, autoLabel: pageSectionAutoLabel, editHints: { headline: 'inline', eyebrow: 'inline', blurb: 'inline' } },
86
+ AccordionItem: { block: 'accordion-item', parent: 'Accordion', rootAttributes: { 'data-state': 'closed' }, autoLabel: { name: 'header' }, editHints: { header: 'inline', body: 'none' } },
87
+ Details: { block: 'details', defaultDensity: 'compact', sections: { summary: 'title' }, autoLabel: { summary: 'summary' }, editHints: { summary: 'inline', body: 'none' } },
88
88
  Grid: {
89
89
  block: 'grid',
90
+ defaultDensity: 'full',
91
+ childDensity: 'compact',
90
92
  modifiers: {
91
93
  mode: { source: 'meta', default: 'columns' },
92
94
  collapse: { source: 'meta', noBemClass: true },
@@ -108,6 +110,7 @@ export const coreConfig = {
108
110
  },
109
111
  CodeGroup: {
110
112
  block: 'codegroup',
113
+ defaultDensity: 'compact',
111
114
  modifiers: { title: { source: 'meta' }, overflow: { source: 'meta', default: 'scroll' } },
112
115
  structure: {
113
116
  topbar: {
@@ -120,12 +123,14 @@ export const coreConfig = {
120
123
  ],
121
124
  },
122
125
  },
126
+ sections: { topbar: 'header', title: 'title' },
123
127
  editHints: { panel: 'code', title: 'none' },
124
128
  },
125
129
  PageSection: { block: 'page-section' },
126
130
  TableOfContents: { block: 'toc' },
127
131
  Embed: {
128
132
  block: 'embed',
133
+ defaultDensity: 'compact',
129
134
  editHints: { fallback: 'none' },
130
135
  postTransform(node) {
131
136
  const block = node.attributes.class?.split(' ')[0] || 'rf-embed';
@@ -166,10 +171,12 @@ export const coreConfig = {
166
171
  };
167
172
  },
168
173
  },
169
- Breadcrumb: { block: 'breadcrumb', editHints: { items: 'none' } },
174
+ Breadcrumb: { block: 'breadcrumb', defaultDensity: 'minimal', sections: { items: 'body' }, editHints: { items: 'none' } },
170
175
  BreadcrumbItem: { block: 'breadcrumb-item', parent: 'Breadcrumb' },
171
176
  Blog: {
172
177
  block: 'blog',
178
+ defaultDensity: 'full',
179
+ sections: { preamble: 'preamble', headline: 'title', blurb: 'description', content: 'body' },
173
180
  contentWrapper: { tag: 'div', ref: 'content' },
174
181
  modifiers: {
175
182
  layout: { source: 'meta', default: 'list' },
@@ -183,6 +190,8 @@ export const coreConfig = {
183
190
  },
184
191
  Budget: {
185
192
  block: 'budget',
193
+ defaultDensity: 'full',
194
+ sections: { header: 'header', title: 'title', footer: 'footer' },
186
195
  editHints: { title: 'none', meta: 'none', 'meta-item': 'none' },
187
196
  modifiers: {
188
197
  title: { source: 'meta' },
@@ -202,9 +211,9 @@ export const coreConfig = {
202
211
  {
203
212
  tag: 'div', ref: 'meta',
204
213
  children: [
205
- { tag: 'span', ref: 'meta-item', metaText: 'currency', condition: 'currency' },
206
- { tag: 'span', ref: 'meta-item', metaText: 'travelers', textPrefix: 'Travelers: ', condition: 'travelers' },
207
- { tag: 'span', ref: 'meta-item', metaText: 'duration', textPrefix: 'Duration: ', condition: 'duration' },
214
+ { tag: 'span', ref: 'meta-item', metaText: 'currency', condition: 'currency', metaType: 'category', metaRank: 'primary' },
215
+ { tag: 'span', ref: 'meta-item', metaText: 'travelers', label: 'Travelers:', condition: 'travelers', metaType: 'quantity', metaRank: 'primary' },
216
+ { tag: 'span', ref: 'meta-item', metaText: 'duration', label: 'Duration:', condition: 'duration', metaType: 'temporal', metaRank: 'secondary' },
208
217
  ],
209
218
  },
210
219
  ],
@@ -282,8 +291,10 @@ export const coreConfig = {
282
291
  // ─── Runes with modifier meta tags ───
283
292
  Hint: {
284
293
  block: 'hint',
294
+ defaultDensity: 'compact',
285
295
  modifiers: { hintType: { source: 'meta', default: 'note' } },
286
296
  contextModifiers: { 'hero': 'in-hero', 'feature': 'in-feature' },
297
+ sections: { header: 'header' },
287
298
  editHints: { icon: 'none', title: 'none' },
288
299
  structure: {
289
300
  header: {
@@ -297,14 +308,18 @@ export const coreConfig = {
297
308
  },
298
309
  Figure: {
299
310
  block: 'figure',
311
+ defaultDensity: 'compact',
300
312
  modifiers: {
301
313
  size: { source: 'meta', default: 'default' },
302
314
  align: { source: 'meta', default: 'center' },
303
315
  },
316
+ sections: { caption: 'description' },
304
317
  editHints: { caption: 'inline' },
305
318
  },
306
319
  Gallery: {
307
320
  block: 'gallery',
321
+ defaultDensity: 'full',
322
+ childDensity: 'compact',
308
323
  modifiers: {
309
324
  layout: { source: 'meta', default: 'grid' },
310
325
  lightbox: { source: 'meta', default: 'true', noBemClass: true },
@@ -319,15 +334,18 @@ export const coreConfig = {
319
334
  },
320
335
  Sidenote: {
321
336
  block: 'sidenote',
337
+ defaultDensity: 'minimal',
322
338
  modifiers: { variant: { source: 'meta', default: 'sidenote' } },
339
+ sections: { body: 'body' },
323
340
  editHints: { body: 'inline' },
324
341
  },
325
342
  Compare: {
326
343
  block: 'compare',
344
+ defaultDensity: 'full',
327
345
  modifiers: { layout: { source: 'meta', default: 'side-by-side' } },
328
346
  editHints: { panels: 'none' },
329
347
  },
330
- Conversation: { block: 'conversation', editHints: { messages: 'none' } },
348
+ Conversation: { block: 'conversation', defaultDensity: 'compact', editHints: { messages: 'none' } },
331
349
  ConversationMessage: {
332
350
  block: 'conversation-message',
333
351
  parent: 'Conversation',
@@ -336,12 +354,15 @@ export const coreConfig = {
336
354
  },
337
355
  Annotate: {
338
356
  block: 'annotate',
357
+ defaultDensity: 'full',
339
358
  modifiers: { variant: { source: 'meta', default: 'margin' } },
359
+ sections: { body: 'body' },
340
360
  editHints: { body: 'none', notes: 'none' },
341
361
  },
342
362
  AnnotateNote: { block: 'annotate-note', parent: 'Annotate', editHints: { body: 'inline' } },
343
363
  Nav: {
344
364
  block: 'nav',
365
+ defaultDensity: 'compact',
345
366
  postTransform(node) {
346
367
  return { ...node, name: 'rf-nav' };
347
368
  },
@@ -377,11 +398,13 @@ export const coreConfig = {
377
398
  },
378
399
  Diff: {
379
400
  block: 'diff',
401
+ defaultDensity: 'compact',
380
402
  modifiers: { mode: { source: 'meta', default: 'unified' } },
381
403
  editHints: { line: 'none', 'gutter-num': 'none', 'gutter-prefix': 'none', 'line-content': 'none' },
382
404
  },
383
405
  Chart: {
384
406
  block: 'chart',
407
+ defaultDensity: 'compact',
385
408
  editHints: { data: 'none' },
386
409
  postTransform(node) {
387
410
  const block = node.attributes.class?.split(' ')[0] || 'rf-chart';
@@ -495,33 +518,43 @@ export const coreConfig = {
495
518
  // ─── Text formatting & layout runes ───
496
519
  PullQuote: {
497
520
  block: 'pullquote',
521
+ defaultDensity: 'compact',
498
522
  modifiers: {
499
523
  align: { source: 'meta', default: 'center' },
500
524
  variant: { source: 'meta', default: 'default' },
501
525
  },
526
+ sections: { body: 'body' },
502
527
  editHints: { body: 'inline' },
503
528
  },
504
529
  TextBlock: {
505
530
  block: 'textblock',
531
+ defaultDensity: 'full',
506
532
  modifiers: {
507
533
  dropcap: { source: 'meta' },
508
534
  columns: { source: 'meta' },
509
535
  lead: { source: 'meta' },
510
536
  align: { source: 'meta', default: 'left' },
511
537
  },
538
+ sections: { body: 'body' },
512
539
  editHints: { body: 'none' },
513
540
  },
514
541
  MediaText: {
515
542
  block: 'mediatext',
543
+ defaultDensity: 'full',
516
544
  modifiers: {
517
545
  align: { source: 'meta', default: 'left' },
518
546
  ratio: { source: 'meta', default: '1:1' },
519
547
  wrap: { source: 'meta' },
520
548
  },
549
+ sections: { body: 'body', media: 'media' },
550
+ mediaSlots: { media: 'cover' },
521
551
  editHints: { media: 'image', body: 'none' },
522
552
  },
523
553
  Showcase: {
524
554
  block: 'showcase',
555
+ defaultDensity: 'compact',
556
+ childDensity: 'compact',
557
+ sections: { viewport: 'body' },
525
558
  modifiers: {
526
559
  shadow: { source: 'meta', default: 'none' },
527
560
  bleed: { source: 'meta', default: 'none' },
@@ -547,11 +580,13 @@ export const coreConfig = {
547
580
  },
548
581
  },
549
582
  // ─── Interactive runes (still get BEM classes, components add behavior) ───
550
- TabGroup: { block: 'tabs', autoLabel: pageSectionAutoLabel, editHints: { headline: 'inline', eyebrow: 'inline', blurb: 'inline' } },
551
- Tab: { block: 'tab', parent: 'TabGroup', editHints: { name: 'inline' } },
552
- TabPanel: { block: 'tab-panel', parent: 'TabGroup' },
583
+ TabGroup: { block: 'tabs', defaultDensity: 'full', sections: { preamble: 'preamble', headline: 'title', blurb: 'description' }, autoLabel: pageSectionAutoLabel, editHints: { headline: 'inline', eyebrow: 'inline', blurb: 'inline' } },
584
+ Tab: { block: 'tab', parent: 'TabGroup', rootAttributes: { 'data-state': 'inactive' }, editHints: { name: 'inline' } },
585
+ TabPanel: { block: 'tab-panel', parent: 'TabGroup', rootAttributes: { 'data-state': 'inactive' } },
553
586
  DataTable: {
554
587
  block: 'datatable',
588
+ defaultDensity: 'compact',
589
+ sections: { table: 'body' },
555
590
  modifiers: {
556
591
  searchable: { source: 'meta', default: 'false' },
557
592
  sortable: { source: 'meta' },
@@ -562,6 +597,8 @@ export const coreConfig = {
562
597
  },
563
598
  Form: {
564
599
  block: 'form',
600
+ defaultDensity: 'full',
601
+ sections: { body: 'body' },
565
602
  modifiers: {
566
603
  variant: { source: 'meta', default: 'stacked' },
567
604
  action: { source: 'meta' },
@@ -581,15 +618,18 @@ export const coreConfig = {
581
618
  },
582
619
  Reveal: {
583
620
  block: 'reveal',
621
+ defaultDensity: 'full',
584
622
  modifiers: {
585
623
  mode: { source: 'meta', default: 'click' },
586
624
  },
625
+ sections: { preamble: 'preamble', headline: 'title', blurb: 'description' },
587
626
  autoLabel: pageSectionAutoLabel,
588
627
  editHints: { headline: 'inline', eyebrow: 'inline', blurb: 'inline', steps: 'none' },
589
628
  },
590
- RevealStep: { block: 'reveal-step', parent: 'Reveal', editHints: { body: 'none' } },
629
+ RevealStep: { block: 'reveal-step', parent: 'Reveal', rootAttributes: { 'data-state': 'closed' }, editHints: { body: 'none' } },
591
630
  Juxtapose: {
592
631
  block: 'juxtapose',
632
+ defaultDensity: 'compact',
593
633
  modifiers: {
594
634
  variant: { source: 'meta', default: 'slider' },
595
635
  orientation: { source: 'meta', default: 'vertical', noBemClass: true },
@@ -602,9 +642,10 @@ export const coreConfig = {
602
642
  },
603
643
  editHints: { panels: 'none' },
604
644
  },
605
- JuxtaposePanel: { block: 'juxtapose-panel', parent: 'Juxtapose', editHints: { body: 'none' } },
645
+ JuxtaposePanel: { block: 'juxtapose-panel', parent: 'Juxtapose', rootAttributes: { 'data-state': 'inactive' }, editHints: { body: 'none' } },
606
646
  Diagram: {
607
647
  block: 'diagram',
648
+ defaultDensity: 'compact',
608
649
  editHints: { source: 'code' },
609
650
  postTransform(node) {
610
651
  const block = node.attributes.class?.split(' ')[0] || 'rf-diagram';
@@ -638,6 +679,7 @@ export const coreConfig = {
638
679
  Region: { block: 'region', parent: 'Layout' },
639
680
  Sandbox: {
640
681
  block: 'sandbox',
682
+ defaultDensity: 'compact',
641
683
  editHints: { source: 'code' },
642
684
  postTransform(node) {
643
685
  // Read meta values
@@ -647,14 +689,23 @@ export const coreConfig = {
647
689
  const label = readMeta(node, 'label') || '';
648
690
  const height = readMeta(node, 'height') || 'auto';
649
691
  const designTokens = readMeta(node, 'design-tokens') || '';
650
- // Keep non-meta children (fallback pre, source panels)
651
- const fallbackChildren = node.children.filter(child => {
652
- if (!isTag(child))
653
- return true;
654
- if (child.name === 'meta')
655
- return false;
656
- return true;
657
- });
692
+ // Keep non-meta children (fallback pre) and extract source panels
693
+ const fallbackChildren = [];
694
+ const sourcePanelOrigins = [];
695
+ for (const child of node.children) {
696
+ if (!isTag(child)) {
697
+ fallbackChildren.push(child);
698
+ continue;
699
+ }
700
+ if (child.name === 'meta') {
701
+ // Collect origin data from source panels
702
+ if (child.attributes?.['data-field'] === 'source-panel' && child.attributes?.['data-origin']) {
703
+ sourcePanelOrigins.push(`${child.attributes['data-label'] || ''}\t${child.attributes['data-origin']}`);
704
+ }
705
+ continue;
706
+ }
707
+ fallbackChildren.push(child);
708
+ }
658
709
  // Add hidden content div for web component
659
710
  const children = [
660
711
  ...fallbackChildren,
@@ -671,6 +722,7 @@ export const coreConfig = {
671
722
  ...(label ? { 'data-label': label } : {}),
672
723
  'data-height': height,
673
724
  ...(designTokens ? { 'data-design-tokens': designTokens } : {}),
725
+ ...(sourcePanelOrigins.length > 0 ? { 'data-source-origins': sourcePanelOrigins.join('\n') } : {}),
674
726
  },
675
727
  children,
676
728
  };
@@ -777,7 +829,7 @@ function buildAutoBreadcrumb(originalTag, pageUrl, breadcrumbPaths, pagesByUrl,
777
829
  continue;
778
830
  const nameSpan = new Tag('span', { hidden: true }, [ancestorPage.title]);
779
831
  const urlLink = new Tag('a', { href: ancestorUrl }, [ancestorPage.title]);
780
- listItems.push(createComponentRenderable(schema.BreadcrumbItem, {
832
+ listItems.push(createComponentRenderable({ rune: 'breadcrumb-item', schemaOrgType: 'ListItem',
781
833
  tag: 'li',
782
834
  properties: { name: nameSpan, url: urlLink },
783
835
  children: [nameSpan, urlLink],
@@ -787,14 +839,14 @@ function buildAutoBreadcrumb(originalTag, pageUrl, breadcrumbPaths, pagesByUrl,
787
839
  const currentPage = pagesByUrl.get(pageUrl);
788
840
  const currentTitle = currentPage?.title ?? pageUrl;
789
841
  const currentSpan = new Tag('span', {}, [currentTitle]);
790
- listItems.push(createComponentRenderable(schema.BreadcrumbItem, {
842
+ listItems.push(createComponentRenderable({ rune: 'breadcrumb-item', schemaOrgType: 'ListItem',
791
843
  tag: 'li',
792
844
  properties: { name: currentSpan },
793
845
  children: [currentSpan],
794
846
  }));
795
847
  const newSeparatorMeta = new Tag('meta', { content: separator });
796
848
  const itemsList = new Tag('ol', {}, listItems);
797
- return createComponentRenderable(schema.Breadcrumb, {
849
+ return createComponentRenderable({ rune: 'breadcrumb', schemaOrgType: 'BreadcrumbList',
798
850
  tag: 'nav',
799
851
  properties: { separator: newSeparatorMeta },
800
852
  refs: { items: itemsList },
@@ -836,14 +888,14 @@ function buildAutoNav(pageUrl, pagesByUrl, ctx) {
836
888
  const listItems = children.map(child => {
837
889
  const titleSpan = new Tag('span', { 'data-field': 'slug' }, [child.title]);
838
890
  const link = new Tag('a', { href: child.url }, [titleSpan]);
839
- return createComponentRenderable(schema.NavItem, {
891
+ return createComponentRenderable({ rune: 'nav-item',
840
892
  tag: 'li',
841
893
  properties: { slug: titleSpan },
842
894
  children: [link],
843
895
  });
844
896
  });
845
897
  const itemsList = new Tag('ul', {}, listItems);
846
- return createComponentRenderable(schema.Nav, {
898
+ return createComponentRenderable({ rune: 'nav',
847
899
  tag: 'nav',
848
900
  properties: {
849
901
  group: [],
@@ -1004,6 +1056,125 @@ function resolveBlogPosts(renderable, allPosts, ctx, pageUrl) {
1004
1056
  });
1005
1057
  return modified ? result : renderable;
1006
1058
  }
1059
+ // ─── Xref resolution helpers ───
1060
+ /**
1061
+ * Find an entity by exact ID across all types in the registry.
1062
+ * If typeHint is provided, only search that type.
1063
+ */
1064
+ function findEntityById(registry, id, typeHint) {
1065
+ const types = typeHint ? [typeHint] : registry.getTypes();
1066
+ for (const type of types) {
1067
+ const entity = registry.getById(type, id);
1068
+ if (entity)
1069
+ return { entity, ambiguous: false };
1070
+ }
1071
+ return undefined;
1072
+ }
1073
+ /**
1074
+ * Find entities by name/title match (case-insensitive) across all types.
1075
+ * If typeHint is provided, only search that type.
1076
+ */
1077
+ function findEntitiesByName(registry, name, typeHint) {
1078
+ const nameLower = name.toLowerCase();
1079
+ const types = typeHint ? [typeHint] : registry.getTypes();
1080
+ const matches = [];
1081
+ for (const type of types) {
1082
+ for (const entity of registry.getAll(type)) {
1083
+ const entityName = entity.data.name ?? '';
1084
+ const entityTitle = entity.data.title ?? '';
1085
+ if (entityName.toLowerCase() === nameLower || entityTitle.toLowerCase() === nameLower) {
1086
+ matches.push(entity);
1087
+ }
1088
+ }
1089
+ }
1090
+ return matches;
1091
+ }
1092
+ /** Resolve an entity's URL for use as an href */
1093
+ function resolveEntityHref(entity) {
1094
+ const baseUrl = entity.data.url || entity.sourceUrl;
1095
+ const headingId = entity.data.headingId;
1096
+ if (headingId)
1097
+ return `${baseUrl}#${headingId}`;
1098
+ return baseUrl;
1099
+ }
1100
+ /** Walk a Markdoc renderable tree, resolving any xref placeholders */
1101
+ function resolveXrefs(renderable, pageUrl, registry, ctx) {
1102
+ if (!Tag.isTag(renderable)) {
1103
+ if (Array.isArray(renderable)) {
1104
+ const newChildren = renderable.map(c => resolveXrefs(c, pageUrl, registry, ctx));
1105
+ if (newChildren.every((c, i) => c === renderable[i]))
1106
+ return renderable;
1107
+ return newChildren;
1108
+ }
1109
+ return renderable;
1110
+ }
1111
+ const tag = renderable;
1112
+ // Check if this is an xref placeholder
1113
+ if (tag.attributes?.['data-rune'] === XREF_RUNE_MARKER) {
1114
+ const id = tag.attributes['data-xref-id'];
1115
+ const label = tag.attributes['data-xref-label'];
1116
+ const typeHint = tag.attributes['data-xref-type'];
1117
+ // Try exact ID match first
1118
+ const idMatch = findEntityById(registry, id, typeHint);
1119
+ if (idMatch) {
1120
+ const entity = idMatch.entity;
1121
+ const href = resolveEntityHref(entity);
1122
+ const text = label || entity.data.title || entity.data.name || entity.data.text || id;
1123
+ if (entity.sourceUrl === pageUrl) {
1124
+ ctx.info(`xref "${id}" on ${pageUrl} — references itself`, pageUrl);
1125
+ }
1126
+ return new Tag('a', {
1127
+ class: `rf-xref rf-xref--${entity.type}`,
1128
+ href,
1129
+ 'data-entity-type': entity.type,
1130
+ 'data-entity-id': entity.id,
1131
+ }, [text]);
1132
+ }
1133
+ // Try name/title match
1134
+ const nameMatches = findEntitiesByName(registry, id, typeHint);
1135
+ if (nameMatches.length === 1) {
1136
+ const entity = nameMatches[0];
1137
+ const href = resolveEntityHref(entity);
1138
+ const text = label || entity.data.title || entity.data.name || entity.data.text || id;
1139
+ if (entity.sourceUrl === pageUrl) {
1140
+ ctx.info(`xref "${id}" on ${pageUrl} — references itself`, pageUrl);
1141
+ }
1142
+ return new Tag('a', {
1143
+ class: `rf-xref rf-xref--${entity.type}`,
1144
+ href,
1145
+ 'data-entity-type': entity.type,
1146
+ 'data-entity-id': entity.id,
1147
+ }, [text]);
1148
+ }
1149
+ if (nameMatches.length > 1) {
1150
+ const matchList = nameMatches
1151
+ .map(e => `${e.type} "${e.data.title || e.data.name || e.id}" on ${e.sourceUrl}`)
1152
+ .join(', ');
1153
+ ctx.warn(`xref "${id}" on ${pageUrl} — matches ${nameMatches.length} entities (${matchList}). Add type hint to disambiguate.`, pageUrl);
1154
+ // Use first match
1155
+ const entity = nameMatches[0];
1156
+ const href = resolveEntityHref(entity);
1157
+ const text = label || entity.data.title || entity.data.name || entity.data.text || id;
1158
+ return new Tag('a', {
1159
+ class: `rf-xref rf-xref--${entity.type}`,
1160
+ href,
1161
+ 'data-entity-type': entity.type,
1162
+ 'data-entity-id': entity.id,
1163
+ }, [text]);
1164
+ }
1165
+ // No match — unresolved
1166
+ ctx.warn(`xref "${id}" on ${pageUrl} — entity not found`, pageUrl);
1167
+ return new Tag('span', {
1168
+ class: 'rf-xref rf-xref--unresolved',
1169
+ 'data-entity-id': id,
1170
+ }, [label || id]);
1171
+ }
1172
+ // Recurse into children
1173
+ const newChildren = (tag.children ?? []).map((c) => resolveXrefs(c, pageUrl, registry, ctx));
1174
+ if (newChildren.every((c, i) => c === tag.children[i]))
1175
+ return tag;
1176
+ return { ...tag, children: newChildren };
1177
+ }
1007
1178
  /**
1008
1179
  * Core cross-page pipeline hooks.
1009
1180
  * Run for every site, before any community package hooks.
@@ -1072,7 +1243,7 @@ export const corePipelineHooks = {
1072
1243
  draft: e.data.draft || false,
1073
1244
  frontmatter: e.data,
1074
1245
  }));
1075
- return { pageTree, breadcrumbPaths, pagesByUrl, headingIndex, allPosts };
1246
+ return { pageTree, breadcrumbPaths, pagesByUrl, headingIndex, allPosts, registry };
1076
1247
  },
1077
1248
  postProcess(page, aggregated, ctx) {
1078
1249
  const coreData = aggregated['__core__'];
@@ -1081,6 +1252,7 @@ export const corePipelineHooks = {
1081
1252
  let renderable = resolveAutoBreadcrumbs(page.renderable, page.url, coreData.breadcrumbPaths, coreData.pagesByUrl, ctx);
1082
1253
  renderable = resolveAutoNavs(renderable, page.url, coreData.pagesByUrl, ctx);
1083
1254
  renderable = resolveBlogPosts(renderable, coreData.allPosts, ctx, page.url);
1255
+ renderable = resolveXrefs(renderable, page.url, coreData.registry, ctx);
1084
1256
  if (renderable === page.renderable)
1085
1257
  return page;
1086
1258
  return { ...page, renderable };