@resumekit/react 0.0.0-stage → 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 (667) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -2
  3. package/dist/PagedSheet.d.ts +63 -0
  4. package/dist/PagedSheet.d.ts.map +1 -0
  5. package/dist/PagedSheet.js +584 -0
  6. package/dist/TemplateDocument.d.ts +33 -0
  7. package/dist/TemplateDocument.d.ts.map +1 -0
  8. package/dist/TemplateDocument.js +33 -0
  9. package/dist/autosave-context.d.ts +37 -0
  10. package/dist/autosave-context.d.ts.map +1 -0
  11. package/dist/autosave-context.js +24 -0
  12. package/dist/collections/AuthoredItems.d.ts +9 -0
  13. package/dist/collections/AuthoredItems.d.ts.map +1 -0
  14. package/dist/collections/AuthoredItems.js +116 -0
  15. package/dist/collections/Collection.d.ts +48 -0
  16. package/dist/collections/Collection.d.ts.map +1 -0
  17. package/dist/collections/Collection.js +24 -0
  18. package/dist/collections/CollectionItems.d.ts +94 -0
  19. package/dist/collections/CollectionItems.d.ts.map +1 -0
  20. package/dist/collections/CollectionItems.js +91 -0
  21. package/dist/collections/EntryOverlay.d.ts +38 -0
  22. package/dist/collections/EntryOverlay.d.ts.map +1 -0
  23. package/dist/collections/EntryOverlay.js +51 -0
  24. package/dist/collections/SortableItems.d.ts +52 -0
  25. package/dist/collections/SortableItems.d.ts.map +1 -0
  26. package/dist/collections/SortableItems.js +80 -0
  27. package/dist/collections/authoring-context.d.ts +69 -0
  28. package/dist/collections/authoring-context.d.ts.map +1 -0
  29. package/dist/collections/authoring-context.js +36 -0
  30. package/dist/collections/collection.css +462 -0
  31. package/dist/collections/entry-text.d.ts +23 -0
  32. package/dist/collections/entry-text.d.ts.map +1 -0
  33. package/dist/collections/entry-text.js +35 -0
  34. package/dist/collections/icons.d.ts +53 -0
  35. package/dist/collections/icons.d.ts.map +1 -0
  36. package/dist/collections/icons.js +56 -0
  37. package/dist/collections/library/LibraryAction.d.ts +24 -0
  38. package/dist/collections/library/LibraryAction.d.ts.map +1 -0
  39. package/dist/collections/library/LibraryAction.js +122 -0
  40. package/dist/collections/library/LibraryPicker.d.ts +42 -0
  41. package/dist/collections/library/LibraryPicker.d.ts.map +1 -0
  42. package/dist/collections/library/LibraryPicker.js +94 -0
  43. package/dist/collections/library/library.css +435 -0
  44. package/dist/collections/overlay-context.d.ts +34 -0
  45. package/dist/collections/overlay-context.d.ts.map +1 -0
  46. package/dist/collections/overlay-context.js +13 -0
  47. package/dist/collections/preload.d.ts +19 -0
  48. package/dist/collections/preload.d.ts.map +1 -0
  49. package/dist/collections/preload.js +23 -0
  50. package/dist/collections/selection-context.d.ts +25 -0
  51. package/dist/collections/selection-context.d.ts.map +1 -0
  52. package/dist/collections/selection-context.js +49 -0
  53. package/dist/collections/useCollection.d.ts +58 -0
  54. package/dist/collections/useCollection.d.ts.map +1 -0
  55. package/dist/collections/useCollection.js +90 -0
  56. package/dist/collections/useCustomEntries.d.ts +18 -0
  57. package/dist/collections/useCustomEntries.d.ts.map +1 -0
  58. package/dist/collections/useCustomEntries.js +56 -0
  59. package/dist/collections/useSectionCollection.d.ts +48 -0
  60. package/dist/collections/useSectionCollection.d.ts.map +1 -0
  61. package/dist/collections/useSectionCollection.js +169 -0
  62. package/dist/document.css +186 -0
  63. package/dist/export-bundle/bundle.css +2 -0
  64. package/dist/export-bundle/bundle.js +67 -0
  65. package/dist/fields/date-issues-context.d.ts +20 -0
  66. package/dist/fields/date-issues-context.d.ts.map +1 -0
  67. package/dist/fields/date-issues-context.js +68 -0
  68. package/dist/fields/field-registry.d.ts +163 -0
  69. package/dist/fields/field-registry.d.ts.map +1 -0
  70. package/dist/fields/field-registry.js +175 -0
  71. package/dist/fonts/README.md +207 -0
  72. package/dist/fonts/arimo-400.woff2 +0 -0
  73. package/dist/fonts/arimo-400i.woff2 +0 -0
  74. package/dist/fonts/arimo-700.woff2 +0 -0
  75. package/dist/fonts/arimo-700i.woff2 +0 -0
  76. package/dist/fonts/bitter-400.woff2 +0 -0
  77. package/dist/fonts/bitter-400i.woff2 +0 -0
  78. package/dist/fonts/bitter-700.woff2 +0 -0
  79. package/dist/fonts/bitter-700i.woff2 +0 -0
  80. package/dist/fonts/cabin-700.woff2 +0 -0
  81. package/dist/fonts/carlito-400.woff2 +0 -0
  82. package/dist/fonts/carlito-400i.woff2 +0 -0
  83. package/dist/fonts/carlito-700.woff2 +0 -0
  84. package/dist/fonts/carlito-700i.woff2 +0 -0
  85. package/dist/fonts/clearsans-400.woff2 +0 -0
  86. package/dist/fonts/clearsans-400i.woff2 +0 -0
  87. package/dist/fonts/cochineal-400.woff2 +0 -0
  88. package/dist/fonts/cochineal-400i.woff2 +0 -0
  89. package/dist/fonts/cochineal-700.woff2 +0 -0
  90. package/dist/fonts/ebgaramond-400.woff2 +0 -0
  91. package/dist/fonts/ebgaramond-400i.woff2 +0 -0
  92. package/dist/fonts/ebgaramond-700.woff2 +0 -0
  93. package/dist/fonts/ebgaramond-700i.woff2 +0 -0
  94. package/dist/fonts/fonts.css +622 -0
  95. package/dist/fonts/gelasio-400.woff2 +0 -0
  96. package/dist/fonts/gelasio-400i.woff2 +0 -0
  97. package/dist/fonts/gelasio-700.woff2 +0 -0
  98. package/dist/fonts/gelasio-700i.woff2 +0 -0
  99. package/dist/fonts/heros-400.woff2 +0 -0
  100. package/dist/fonts/heros-400i.woff2 +0 -0
  101. package/dist/fonts/heros-700.woff2 +0 -0
  102. package/dist/fonts/heros-700i.woff2 +0 -0
  103. package/dist/fonts/inconsolata-400.woff2 +0 -0
  104. package/dist/fonts/lato-100.woff2 +0 -0
  105. package/dist/fonts/lato-300.woff2 +0 -0
  106. package/dist/fonts/lato-300i.woff2 +0 -0
  107. package/dist/fonts/lato-400.woff2 +0 -0
  108. package/dist/fonts/lato-400i.woff2 +0 -0
  109. package/dist/fonts/lato-700.woff2 +0 -0
  110. package/dist/fonts/lato-700i.woff2 +0 -0
  111. package/dist/fonts/licenses/arimo-OFL.txt +93 -0
  112. package/dist/fonts/licenses/bitter-OFL.txt +94 -0
  113. package/dist/fonts/licenses/cabin-OFL.txt +93 -0
  114. package/dist/fonts/licenses/carlito-OFL.txt +94 -0
  115. package/dist/fonts/licenses/clearsans-APACHE-2.0.txt +205 -0
  116. package/dist/fonts/licenses/cochineal-OFL.txt +96 -0
  117. package/dist/fonts/licenses/ebgaramond-OFL.txt +93 -0
  118. package/dist/fonts/licenses/gelasio-OFL.txt +93 -0
  119. package/dist/fonts/licenses/heros-GUST-FONT-LICENSE.txt +30 -0
  120. package/dist/fonts/licenses/inconsolata-OFL.txt +93 -0
  121. package/dist/fonts/licenses/latinmodern-GUST-FONT-LICENSE.txt +35 -0
  122. package/dist/fonts/licenses/lato-OFL.txt +93 -0
  123. package/dist/fonts/licenses/ptserif-OFL.txt +93 -0
  124. package/dist/fonts/licenses/raleway-OFL.txt +93 -0
  125. package/dist/fonts/licenses/roboto-OFL.txt +93 -0
  126. package/dist/fonts/licenses/robotocondensed-OFL.txt +93 -0
  127. package/dist/fonts/licenses/robotoslab-APACHE-2.0.txt +205 -0
  128. package/dist/fonts/licenses/sourcesans3-OFL.txt +93 -0
  129. package/dist/fonts/licenses/tinos-OFL.txt +93 -0
  130. package/dist/fonts/lmmono-400.woff2 +0 -0
  131. package/dist/fonts/lmroman-400.woff2 +0 -0
  132. package/dist/fonts/lmroman-400i.woff2 +0 -0
  133. package/dist/fonts/lmroman-700.woff2 +0 -0
  134. package/dist/fonts/lmroman-700i.woff2 +0 -0
  135. package/dist/fonts/lmromancaps-400.woff2 +0 -0
  136. package/dist/fonts/ptserif-400.woff2 +0 -0
  137. package/dist/fonts/ptserif-400i.woff2 +0 -0
  138. package/dist/fonts/ptserif-700.woff2 +0 -0
  139. package/dist/fonts/ptserif-700i.woff2 +0 -0
  140. package/dist/fonts/raleway-300.woff2 +0 -0
  141. package/dist/fonts/raleway-400.woff2 +0 -0
  142. package/dist/fonts/raleway-400i.woff2 +0 -0
  143. package/dist/fonts/raleway-500.woff2 +0 -0
  144. package/dist/fonts/raleway-700.woff2 +0 -0
  145. package/dist/fonts/roboto-100.woff2 +0 -0
  146. package/dist/fonts/roboto-300.woff2 +0 -0
  147. package/dist/fonts/roboto-300i.woff2 +0 -0
  148. package/dist/fonts/roboto-400.woff2 +0 -0
  149. package/dist/fonts/roboto-400i.woff2 +0 -0
  150. package/dist/fonts/roboto-700.woff2 +0 -0
  151. package/dist/fonts/robotocondensed-400.woff2 +0 -0
  152. package/dist/fonts/robotocondensed-400i.woff2 +0 -0
  153. package/dist/fonts/robotocondensed-700.woff2 +0 -0
  154. package/dist/fonts/robotocondensed-700i.woff2 +0 -0
  155. package/dist/fonts/robotoslab-700.woff2 +0 -0
  156. package/dist/fonts/sourcesans3-300.woff2 +0 -0
  157. package/dist/fonts/sourcesans3-300i.woff2 +0 -0
  158. package/dist/fonts/sourcesans3-400.woff2 +0 -0
  159. package/dist/fonts/sourcesans3-400i.woff2 +0 -0
  160. package/dist/fonts/sourcesans3-700.woff2 +0 -0
  161. package/dist/fonts/tinos-400.woff2 +0 -0
  162. package/dist/fonts/tinos-400i.woff2 +0 -0
  163. package/dist/fonts/tinos-700.woff2 +0 -0
  164. package/dist/fonts/tinos-700i.woff2 +0 -0
  165. package/dist/i18n/README.md +52 -0
  166. package/dist/i18n/catalog.d.ts +39 -0
  167. package/dist/i18n/catalog.d.ts.map +1 -0
  168. package/dist/i18n/catalog.js +43 -0
  169. package/dist/i18n/format.d.ts +14 -0
  170. package/dist/i18n/format.d.ts.map +1 -0
  171. package/dist/i18n/format.js +38 -0
  172. package/dist/i18n/index.d.ts +4 -0
  173. package/dist/i18n/index.d.ts.map +1 -0
  174. package/dist/i18n/index.js +3 -0
  175. package/dist/i18n/locale-context.d.ts +43 -0
  176. package/dist/i18n/locale-context.d.ts.map +1 -0
  177. package/dist/i18n/locale-context.js +74 -0
  178. package/dist/i18n/locales/en.json +337 -0
  179. package/dist/i18n/locales/es.json +337 -0
  180. package/dist/index.d.ts +101 -0
  181. package/dist/index.d.ts.map +1 -0
  182. package/dist/index.js +99 -0
  183. package/dist/kit/BulletSkillGroup.d.ts +20 -0
  184. package/dist/kit/BulletSkillGroup.d.ts.map +1 -0
  185. package/dist/kit/BulletSkillGroup.js +25 -0
  186. package/dist/kit/DescribedEntries.d.ts +41 -0
  187. package/dist/kit/DescribedEntries.d.ts.map +1 -0
  188. package/dist/kit/DescribedEntries.js +57 -0
  189. package/dist/kit/DocumentSection.d.ts +58 -0
  190. package/dist/kit/DocumentSection.d.ts.map +1 -0
  191. package/dist/kit/DocumentSection.js +38 -0
  192. package/dist/kit/GridSkillGroup.d.ts +12 -0
  193. package/dist/kit/GridSkillGroup.d.ts.map +1 -0
  194. package/dist/kit/GridSkillGroup.js +14 -0
  195. package/dist/kit/Heading.d.ts +11 -0
  196. package/dist/kit/Heading.d.ts.map +1 -0
  197. package/dist/kit/Heading.js +10 -0
  198. package/dist/kit/InitialsAvatar.d.ts +17 -0
  199. package/dist/kit/InitialsAvatar.d.ts.map +1 -0
  200. package/dist/kit/InitialsAvatar.js +18 -0
  201. package/dist/kit/InitialsChip.d.ts +16 -0
  202. package/dist/kit/InitialsChip.d.ts.map +1 -0
  203. package/dist/kit/InitialsChip.js +16 -0
  204. package/dist/kit/InlineSkillGroup.d.ts +22 -0
  205. package/dist/kit/InlineSkillGroup.d.ts.map +1 -0
  206. package/dist/kit/InlineSkillGroup.js +16 -0
  207. package/dist/kit/LabelledSkillGroup.d.ts +24 -0
  208. package/dist/kit/LabelledSkillGroup.d.ts.map +1 -0
  209. package/dist/kit/LabelledSkillGroup.js +20 -0
  210. package/dist/kit/LanguageList.d.ts +28 -0
  211. package/dist/kit/LanguageList.d.ts.map +1 -0
  212. package/dist/kit/LanguageList.js +56 -0
  213. package/dist/kit/Separator.d.ts +20 -0
  214. package/dist/kit/Separator.d.ts.map +1 -0
  215. package/dist/kit/Separator.js +21 -0
  216. package/dist/kit/TagSkillGroup.d.ts +8 -0
  217. package/dist/kit/TagSkillGroup.d.ts.map +1 -0
  218. package/dist/kit/TagSkillGroup.js +10 -0
  219. package/dist/kit/avatar.css +42 -0
  220. package/dist/kit/contact-icons.css +70 -0
  221. package/dist/kit/contact.d.ts +16 -0
  222. package/dist/kit/contact.d.ts.map +1 -0
  223. package/dist/kit/contact.js +18 -0
  224. package/dist/kit/described.css +114 -0
  225. package/dist/kit/documentStyle.d.ts +20 -0
  226. package/dist/kit/documentStyle.d.ts.map +1 -0
  227. package/dist/kit/documentStyle.js +64 -0
  228. package/dist/kit/heading.css +17 -0
  229. package/dist/kit/keywords.css +127 -0
  230. package/dist/kit/language.css +104 -0
  231. package/dist/kit/layout.css +16 -0
  232. package/dist/kit/monogram.d.ts +6 -0
  233. package/dist/kit/monogram.d.ts.map +1 -0
  234. package/dist/kit/monogram.js +12 -0
  235. package/dist/kit/panel.css +26 -0
  236. package/dist/kit/skill-grid.css +93 -0
  237. package/dist/kit/skill-tags.css +36 -0
  238. package/dist/kit/textShapes.d.ts +24 -0
  239. package/dist/kit/textShapes.d.ts.map +1 -0
  240. package/dist/kit/textShapes.js +32 -0
  241. package/dist/kit/typography.css +86 -0
  242. package/dist/letter/LetterDocument.d.ts +13 -0
  243. package/dist/letter/LetterDocument.d.ts.map +1 -0
  244. package/dist/letter/LetterDocument.js +12 -0
  245. package/dist/letter/letter.css +75 -0
  246. package/dist/nodes/AuthoredBullets.d.ts +22 -0
  247. package/dist/nodes/AuthoredBullets.d.ts.map +1 -0
  248. package/dist/nodes/AuthoredBullets.js +101 -0
  249. package/dist/nodes/CustomSections.d.ts +42 -0
  250. package/dist/nodes/CustomSections.d.ts.map +1 -0
  251. package/dist/nodes/CustomSections.js +27 -0
  252. package/dist/nodes/EditableBulletList.d.ts +15 -0
  253. package/dist/nodes/EditableBulletList.d.ts.map +1 -0
  254. package/dist/nodes/EditableBulletList.js +98 -0
  255. package/dist/nodes/EditableInlineList.d.ts +27 -0
  256. package/dist/nodes/EditableInlineList.d.ts.map +1 -0
  257. package/dist/nodes/EditableInlineList.js +50 -0
  258. package/dist/nodes/EditableText.d.ts +79 -0
  259. package/dist/nodes/EditableText.d.ts.map +1 -0
  260. package/dist/nodes/EditableText.js +113 -0
  261. package/dist/nodes/LinkField.d.ts +103 -0
  262. package/dist/nodes/LinkField.d.ts.map +1 -0
  263. package/dist/nodes/LinkField.js +277 -0
  264. package/dist/nodes/PlainTextField.d.ts +38 -0
  265. package/dist/nodes/PlainTextField.d.ts.map +1 -0
  266. package/dist/nodes/PlainTextField.js +72 -0
  267. package/dist/nodes/formatting.d.ts +38 -0
  268. package/dist/nodes/formatting.d.ts.map +1 -0
  269. package/dist/nodes/formatting.js +27 -0
  270. package/dist/nodes/link-field.css +200 -0
  271. package/dist/nodes/locked.d.ts +38 -0
  272. package/dist/nodes/locked.d.ts.map +1 -0
  273. package/dist/nodes/locked.js +68 -0
  274. package/dist/nodes/template-node.css +720 -0
  275. package/dist/paged.css +265 -0
  276. package/dist/pagination.d.ts +93 -0
  277. package/dist/pagination.d.ts.map +1 -0
  278. package/dist/pagination.js +167 -0
  279. package/dist/picture-context.d.ts +6 -0
  280. package/dist/picture-context.d.ts.map +1 -0
  281. package/dist/picture-context.js +14 -0
  282. package/dist/presentation-context.d.ts +45 -0
  283. package/dist/presentation-context.d.ts.map +1 -0
  284. package/dist/presentation-context.js +44 -0
  285. package/dist/presented.d.ts +16 -0
  286. package/dist/presented.d.ts.map +1 -0
  287. package/dist/presented.js +22 -0
  288. package/dist/rail/ContainerRail.d.ts +29 -0
  289. package/dist/rail/ContainerRail.d.ts.map +1 -0
  290. package/dist/rail/ContainerRail.js +50 -0
  291. package/dist/rail/EntryActions.d.ts +19 -0
  292. package/dist/rail/EntryActions.d.ts.map +1 -0
  293. package/dist/rail/EntryActions.js +17 -0
  294. package/dist/rail/rail-store.d.ts +42 -0
  295. package/dist/rail/rail-store.d.ts.map +1 -0
  296. package/dist/rail/rail-store.js +107 -0
  297. package/dist/rail/rail.css +188 -0
  298. package/dist/rail/useSpaceDrag.d.ts +30 -0
  299. package/dist/rail/useSpaceDrag.d.ts.map +1 -0
  300. package/dist/rail/useSpaceDrag.js +154 -0
  301. package/dist/registry.d.ts +35 -0
  302. package/dist/registry.d.ts.map +1 -0
  303. package/dist/registry.js +74 -0
  304. package/dist/spacing/spacing-context.d.ts +53 -0
  305. package/dist/spacing/spacing-context.d.ts.map +1 -0
  306. package/dist/spacing/spacing-context.js +36 -0
  307. package/dist/spacing/spacing.css +159 -0
  308. package/dist/spacing/useSpaceSlot.d.ts +52 -0
  309. package/dist/spacing/useSpaceSlot.d.ts.map +1 -0
  310. package/dist/spacing/useSpaceSlot.js +38 -0
  311. package/dist/static/api.d.ts +13 -0
  312. package/dist/static/api.d.ts.map +1 -0
  313. package/dist/static/api.js +1 -0
  314. package/dist/static/static.mjs +33930 -0
  315. package/dist/static/templates/academic.css +1 -0
  316. package/dist/static/templates/alta.css +1 -0
  317. package/dist/static/templates/classic.css +1 -0
  318. package/dist/static/templates/cobalt.css +1 -0
  319. package/dist/static/templates/compact.css +1 -0
  320. package/dist/static/templates/contemporary.css +1 -0
  321. package/dist/static/templates/creative.css +1 -0
  322. package/dist/static/templates/crimson.css +1 -0
  323. package/dist/static/templates/curve.css +1 -0
  324. package/dist/static/templates/double-column-logos.css +1 -0
  325. package/dist/static/templates/double-column.css +1 -0
  326. package/dist/static/templates/elegant-logos.css +1 -0
  327. package/dist/static/templates/elegant.css +1 -0
  328. package/dist/static/templates/engineer.css +1 -0
  329. package/dist/static/templates/executive.css +1 -0
  330. package/dist/static/templates/harvard.css +1 -0
  331. package/dist/static/templates/hipster.css +1 -0
  332. package/dist/static/templates/ivy.css +1 -0
  333. package/dist/static/templates/meridian.css +1 -0
  334. package/dist/static/templates/modern.css +1 -0
  335. package/dist/static/templates/polished.css +1 -0
  336. package/dist/static/templates/portrait.css +1 -0
  337. package/dist/static/templates/prism.css +1 -0
  338. package/dist/static/templates/scholar.css +1 -0
  339. package/dist/static/templates/split.css +1 -0
  340. package/dist/static/templates/stylish.css +1 -0
  341. package/dist/static/templates/timeline.css +1 -0
  342. package/dist/static/templates.css +1 -0
  343. package/dist/templates/academic/AcademicDocument.d.ts +6 -0
  344. package/dist/templates/academic/AcademicDocument.d.ts.map +1 -0
  345. package/dist/templates/academic/AcademicDocument.js +29 -0
  346. package/dist/templates/academic/academic.css +284 -0
  347. package/dist/templates/academic/entries.d.ts +22 -0
  348. package/dist/templates/academic/entries.d.ts.map +1 -0
  349. package/dist/templates/academic/entries.js +17 -0
  350. package/dist/templates/alta/AltaDocument.d.ts +6 -0
  351. package/dist/templates/alta/AltaDocument.d.ts.map +1 -0
  352. package/dist/templates/alta/AltaDocument.js +29 -0
  353. package/dist/templates/alta/alta.css +413 -0
  354. package/dist/templates/alta/entries.d.ts +22 -0
  355. package/dist/templates/alta/entries.d.ts.map +1 -0
  356. package/dist/templates/alta/entries.js +17 -0
  357. package/dist/templates/classic/ClassicDocument.d.ts +6 -0
  358. package/dist/templates/classic/ClassicDocument.d.ts.map +1 -0
  359. package/dist/templates/classic/ClassicDocument.js +26 -0
  360. package/dist/templates/classic/classic.css +251 -0
  361. package/dist/templates/classic/entries.d.ts +22 -0
  362. package/dist/templates/classic/entries.d.ts.map +1 -0
  363. package/dist/templates/classic/entries.js +17 -0
  364. package/dist/templates/cobalt/CobaltDocument.d.ts +6 -0
  365. package/dist/templates/cobalt/CobaltDocument.d.ts.map +1 -0
  366. package/dist/templates/cobalt/CobaltDocument.js +28 -0
  367. package/dist/templates/cobalt/cobalt.css +478 -0
  368. package/dist/templates/cobalt/crest.d.ts +6 -0
  369. package/dist/templates/cobalt/crest.d.ts.map +1 -0
  370. package/dist/templates/cobalt/crest.js +8 -0
  371. package/dist/templates/cobalt/entries.d.ts +22 -0
  372. package/dist/templates/cobalt/entries.d.ts.map +1 -0
  373. package/dist/templates/cobalt/entries.js +17 -0
  374. package/dist/templates/compact/CompactDocument.d.ts +6 -0
  375. package/dist/templates/compact/CompactDocument.d.ts.map +1 -0
  376. package/dist/templates/compact/CompactDocument.js +28 -0
  377. package/dist/templates/compact/compact.css +240 -0
  378. package/dist/templates/compact/entries.d.ts +22 -0
  379. package/dist/templates/compact/entries.d.ts.map +1 -0
  380. package/dist/templates/compact/entries.js +17 -0
  381. package/dist/templates/contemporary/ContemporaryDocument.d.ts +6 -0
  382. package/dist/templates/contemporary/ContemporaryDocument.d.ts.map +1 -0
  383. package/dist/templates/contemporary/ContemporaryDocument.js +29 -0
  384. package/dist/templates/contemporary/contemporary.css +411 -0
  385. package/dist/templates/contemporary/entries.d.ts +22 -0
  386. package/dist/templates/contemporary/entries.d.ts.map +1 -0
  387. package/dist/templates/contemporary/entries.js +17 -0
  388. package/dist/templates/creative/CreativeDocument.d.ts +6 -0
  389. package/dist/templates/creative/CreativeDocument.d.ts.map +1 -0
  390. package/dist/templates/creative/CreativeDocument.js +29 -0
  391. package/dist/templates/creative/creative.css +326 -0
  392. package/dist/templates/creative/entries.d.ts +22 -0
  393. package/dist/templates/creative/entries.d.ts.map +1 -0
  394. package/dist/templates/creative/entries.js +17 -0
  395. package/dist/templates/crimson/CrimsonDocument.d.ts +6 -0
  396. package/dist/templates/crimson/CrimsonDocument.d.ts.map +1 -0
  397. package/dist/templates/crimson/CrimsonDocument.js +30 -0
  398. package/dist/templates/crimson/crimson.css +301 -0
  399. package/dist/templates/crimson/entries.d.ts +22 -0
  400. package/dist/templates/crimson/entries.d.ts.map +1 -0
  401. package/dist/templates/crimson/entries.js +17 -0
  402. package/dist/templates/curve/CurveDocument.d.ts +6 -0
  403. package/dist/templates/curve/CurveDocument.d.ts.map +1 -0
  404. package/dist/templates/curve/CurveDocument.js +29 -0
  405. package/dist/templates/curve/curve.css +330 -0
  406. package/dist/templates/curve/entries.d.ts +22 -0
  407. package/dist/templates/curve/entries.d.ts.map +1 -0
  408. package/dist/templates/curve/entries.js +17 -0
  409. package/dist/templates/double-column/DoubleColumnDocument.d.ts +6 -0
  410. package/dist/templates/double-column/DoubleColumnDocument.d.ts.map +1 -0
  411. package/dist/templates/double-column/DoubleColumnDocument.js +29 -0
  412. package/dist/templates/double-column/double-column.css +331 -0
  413. package/dist/templates/double-column/entries.d.ts +22 -0
  414. package/dist/templates/double-column/entries.d.ts.map +1 -0
  415. package/dist/templates/double-column/entries.js +17 -0
  416. package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts +6 -0
  417. package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts.map +1 -0
  418. package/dist/templates/double-column-logos/DoubleColumnLogosDocument.js +28 -0
  419. package/dist/templates/double-column-logos/double-column-logos.css +333 -0
  420. package/dist/templates/double-column-logos/entries.d.ts +22 -0
  421. package/dist/templates/double-column-logos/entries.d.ts.map +1 -0
  422. package/dist/templates/double-column-logos/entries.js +18 -0
  423. package/dist/templates/elegant/ElegantDocument.d.ts +6 -0
  424. package/dist/templates/elegant/ElegantDocument.d.ts.map +1 -0
  425. package/dist/templates/elegant/ElegantDocument.js +31 -0
  426. package/dist/templates/elegant/elegant.css +358 -0
  427. package/dist/templates/elegant/entries.d.ts +22 -0
  428. package/dist/templates/elegant/entries.d.ts.map +1 -0
  429. package/dist/templates/elegant/entries.js +17 -0
  430. package/dist/templates/elegant-logos/ElegantLogosDocument.d.ts +6 -0
  431. package/dist/templates/elegant-logos/ElegantLogosDocument.d.ts.map +1 -0
  432. package/dist/templates/elegant-logos/ElegantLogosDocument.js +30 -0
  433. package/dist/templates/elegant-logos/elegant-logos.css +370 -0
  434. package/dist/templates/elegant-logos/entries.d.ts +22 -0
  435. package/dist/templates/elegant-logos/entries.d.ts.map +1 -0
  436. package/dist/templates/elegant-logos/entries.js +18 -0
  437. package/dist/templates/engineer/EngineerDocument.d.ts +6 -0
  438. package/dist/templates/engineer/EngineerDocument.d.ts.map +1 -0
  439. package/dist/templates/engineer/EngineerDocument.js +26 -0
  440. package/dist/templates/engineer/engineer.css +261 -0
  441. package/dist/templates/engineer/entries.d.ts +22 -0
  442. package/dist/templates/engineer/entries.d.ts.map +1 -0
  443. package/dist/templates/engineer/entries.js +17 -0
  444. package/dist/templates/executive/ExecutiveDocument.d.ts +6 -0
  445. package/dist/templates/executive/ExecutiveDocument.d.ts.map +1 -0
  446. package/dist/templates/executive/ExecutiveDocument.js +29 -0
  447. package/dist/templates/executive/entries.d.ts +22 -0
  448. package/dist/templates/executive/entries.d.ts.map +1 -0
  449. package/dist/templates/executive/entries.js +17 -0
  450. package/dist/templates/executive/executive.css +394 -0
  451. package/dist/templates/harvard/HarvardDocument.d.ts +6 -0
  452. package/dist/templates/harvard/HarvardDocument.d.ts.map +1 -0
  453. package/dist/templates/harvard/HarvardDocument.js +25 -0
  454. package/dist/templates/harvard/entries.d.ts +28 -0
  455. package/dist/templates/harvard/entries.d.ts.map +1 -0
  456. package/dist/templates/harvard/entries.js +22 -0
  457. package/dist/templates/harvard/harvard.css +436 -0
  458. package/dist/templates/hipster/HipsterDocument.d.ts +6 -0
  459. package/dist/templates/hipster/HipsterDocument.d.ts.map +1 -0
  460. package/dist/templates/hipster/HipsterDocument.js +30 -0
  461. package/dist/templates/hipster/entries.d.ts +22 -0
  462. package/dist/templates/hipster/entries.d.ts.map +1 -0
  463. package/dist/templates/hipster/entries.js +17 -0
  464. package/dist/templates/hipster/hipster.css +442 -0
  465. package/dist/templates/ivy/IvyDocument.d.ts +6 -0
  466. package/dist/templates/ivy/IvyDocument.d.ts.map +1 -0
  467. package/dist/templates/ivy/IvyDocument.js +26 -0
  468. package/dist/templates/ivy/entries.d.ts +22 -0
  469. package/dist/templates/ivy/entries.d.ts.map +1 -0
  470. package/dist/templates/ivy/entries.js +17 -0
  471. package/dist/templates/ivy/ivy.css +292 -0
  472. package/dist/templates/meridian/MeridianDocument.d.ts +6 -0
  473. package/dist/templates/meridian/MeridianDocument.d.ts.map +1 -0
  474. package/dist/templates/meridian/MeridianDocument.js +28 -0
  475. package/dist/templates/meridian/entries.d.ts +22 -0
  476. package/dist/templates/meridian/entries.d.ts.map +1 -0
  477. package/dist/templates/meridian/entries.js +17 -0
  478. package/dist/templates/meridian/meridian.css +431 -0
  479. package/dist/templates/modern/ModernDocument.d.ts +6 -0
  480. package/dist/templates/modern/ModernDocument.d.ts.map +1 -0
  481. package/dist/templates/modern/ModernDocument.js +29 -0
  482. package/dist/templates/modern/entries.d.ts +22 -0
  483. package/dist/templates/modern/entries.d.ts.map +1 -0
  484. package/dist/templates/modern/entries.js +17 -0
  485. package/dist/templates/modern/modern.css +309 -0
  486. package/dist/templates/polished/PolishedDocument.d.ts +6 -0
  487. package/dist/templates/polished/PolishedDocument.d.ts.map +1 -0
  488. package/dist/templates/polished/PolishedDocument.js +28 -0
  489. package/dist/templates/polished/entries.d.ts +22 -0
  490. package/dist/templates/polished/entries.d.ts.map +1 -0
  491. package/dist/templates/polished/entries.js +17 -0
  492. package/dist/templates/polished/polished.css +327 -0
  493. package/dist/templates/portrait/PortraitDocument.d.ts +6 -0
  494. package/dist/templates/portrait/PortraitDocument.d.ts.map +1 -0
  495. package/dist/templates/portrait/PortraitDocument.js +30 -0
  496. package/dist/templates/portrait/entries.d.ts +22 -0
  497. package/dist/templates/portrait/entries.d.ts.map +1 -0
  498. package/dist/templates/portrait/entries.js +17 -0
  499. package/dist/templates/portrait/portrait.css +427 -0
  500. package/dist/templates/prism/PrismDocument.d.ts +6 -0
  501. package/dist/templates/prism/PrismDocument.d.ts.map +1 -0
  502. package/dist/templates/prism/PrismDocument.js +35 -0
  503. package/dist/templates/prism/entries.d.ts +22 -0
  504. package/dist/templates/prism/entries.d.ts.map +1 -0
  505. package/dist/templates/prism/entries.js +17 -0
  506. package/dist/templates/prism/prism.css +314 -0
  507. package/dist/templates/scholar/ScholarDocument.d.ts +6 -0
  508. package/dist/templates/scholar/ScholarDocument.d.ts.map +1 -0
  509. package/dist/templates/scholar/ScholarDocument.js +27 -0
  510. package/dist/templates/scholar/entries.d.ts +22 -0
  511. package/dist/templates/scholar/entries.d.ts.map +1 -0
  512. package/dist/templates/scholar/entries.js +17 -0
  513. package/dist/templates/scholar/scholar.css +279 -0
  514. package/dist/templates/skills.d.ts +19 -0
  515. package/dist/templates/skills.d.ts.map +1 -0
  516. package/dist/templates/skills.js +19 -0
  517. package/dist/templates/split/SplitDocument.d.ts +6 -0
  518. package/dist/templates/split/SplitDocument.d.ts.map +1 -0
  519. package/dist/templates/split/SplitDocument.js +29 -0
  520. package/dist/templates/split/entries.d.ts +22 -0
  521. package/dist/templates/split/entries.d.ts.map +1 -0
  522. package/dist/templates/split/entries.js +17 -0
  523. package/dist/templates/split/split.css +337 -0
  524. package/dist/templates/stylish/StylishDocument.d.ts +6 -0
  525. package/dist/templates/stylish/StylishDocument.d.ts.map +1 -0
  526. package/dist/templates/stylish/StylishDocument.js +29 -0
  527. package/dist/templates/stylish/entries.d.ts +22 -0
  528. package/dist/templates/stylish/entries.d.ts.map +1 -0
  529. package/dist/templates/stylish/entries.js +17 -0
  530. package/dist/templates/stylish/stylish.css +340 -0
  531. package/dist/templates/timeline/TimelineDocument.d.ts +6 -0
  532. package/dist/templates/timeline/TimelineDocument.d.ts.map +1 -0
  533. package/dist/templates/timeline/TimelineDocument.js +27 -0
  534. package/dist/templates/timeline/entries.d.ts +22 -0
  535. package/dist/templates/timeline/entries.d.ts.map +1 -0
  536. package/dist/templates/timeline/entries.js +17 -0
  537. package/dist/templates/timeline/timeline.css +295 -0
  538. package/dist/useFitZoom.d.ts +99 -0
  539. package/dist/useFitZoom.d.ts.map +1 -0
  540. package/dist/useFitZoom.js +171 -0
  541. package/package.json +81 -3
  542. package/src/PagedSheet.tsx +792 -0
  543. package/src/TemplateDocument.tsx +112 -0
  544. package/src/autosave-context.tsx +67 -0
  545. package/src/collections/AuthoredItems.tsx +199 -0
  546. package/src/collections/Collection.tsx +73 -0
  547. package/src/collections/CollectionItems.tsx +318 -0
  548. package/src/collections/EntryOverlay.tsx +162 -0
  549. package/src/collections/SortableItems.tsx +167 -0
  550. package/src/collections/authoring-context.tsx +140 -0
  551. package/src/collections/entry-text.ts +41 -0
  552. package/src/collections/icons.tsx +83 -0
  553. package/src/collections/library/LibraryAction.tsx +200 -0
  554. package/src/collections/library/LibraryPicker.tsx +325 -0
  555. package/src/collections/overlay-context.tsx +49 -0
  556. package/src/collections/preload.ts +23 -0
  557. package/src/collections/selection-context.tsx +88 -0
  558. package/src/collections/useCollection.ts +133 -0
  559. package/src/collections/useCustomEntries.ts +84 -0
  560. package/src/collections/useSectionCollection.ts +268 -0
  561. package/src/compiler/emit.ts +736 -0
  562. package/src/compiler/schema.ts +689 -0
  563. package/src/export/entry.tsx +177 -0
  564. package/src/fields/date-issues-context.tsx +105 -0
  565. package/src/fields/field-registry.tsx +358 -0
  566. package/src/i18n/catalog.ts +81 -0
  567. package/src/i18n/format.ts +50 -0
  568. package/src/i18n/index.ts +21 -0
  569. package/src/i18n/locale-context.tsx +135 -0
  570. package/src/index.ts +156 -0
  571. package/src/kit/BulletSkillGroup.tsx +37 -0
  572. package/src/kit/DescribedEntries.tsx +132 -0
  573. package/src/kit/DocumentSection.tsx +97 -0
  574. package/src/kit/GridSkillGroup.tsx +17 -0
  575. package/src/kit/Heading.tsx +17 -0
  576. package/src/kit/InitialsAvatar.tsx +31 -0
  577. package/src/kit/InitialsChip.tsx +29 -0
  578. package/src/kit/InlineSkillGroup.tsx +41 -0
  579. package/src/kit/LabelledSkillGroup.tsx +68 -0
  580. package/src/kit/LanguageList.tsx +148 -0
  581. package/src/kit/Separator.tsx +30 -0
  582. package/src/kit/TagSkillGroup.tsx +19 -0
  583. package/src/kit/contact.ts +34 -0
  584. package/src/kit/documentStyle.ts +80 -0
  585. package/src/kit/monogram.ts +11 -0
  586. package/src/kit/textShapes.tsx +61 -0
  587. package/src/letter/LetterDocument.tsx +33 -0
  588. package/src/nodes/AuthoredBullets.tsx +253 -0
  589. package/src/nodes/CustomSections.tsx +138 -0
  590. package/src/nodes/EditableBulletList.tsx +186 -0
  591. package/src/nodes/EditableInlineList.tsx +109 -0
  592. package/src/nodes/EditableText.tsx +261 -0
  593. package/src/nodes/LinkField.tsx +438 -0
  594. package/src/nodes/PlainTextField.tsx +132 -0
  595. package/src/nodes/formatting.ts +70 -0
  596. package/src/nodes/locked.ts +70 -0
  597. package/src/pagination.ts +238 -0
  598. package/src/picture-context.tsx +18 -0
  599. package/src/presentation-context.tsx +87 -0
  600. package/src/presented.ts +29 -0
  601. package/src/rail/ContainerRail.tsx +145 -0
  602. package/src/rail/EntryActions.tsx +104 -0
  603. package/src/rail/rail-store.tsx +126 -0
  604. package/src/rail/useSpaceDrag.ts +177 -0
  605. package/src/registry.ts +101 -0
  606. package/src/spacing/spacing-context.tsx +100 -0
  607. package/src/spacing/useSpaceSlot.tsx +97 -0
  608. package/src/static/api.ts +19 -0
  609. package/src/static/fixtures.ts +80 -0
  610. package/src/static/render.tsx +24 -0
  611. package/src/templates/academic/AcademicDocument.tsx +259 -0
  612. package/src/templates/academic/entries.tsx +176 -0
  613. package/src/templates/alta/AltaDocument.tsx +269 -0
  614. package/src/templates/alta/entries.tsx +167 -0
  615. package/src/templates/classic/ClassicDocument.tsx +252 -0
  616. package/src/templates/classic/entries.tsx +175 -0
  617. package/src/templates/cobalt/CobaltDocument.tsx +306 -0
  618. package/src/templates/cobalt/crest.tsx +31 -0
  619. package/src/templates/cobalt/entries.tsx +136 -0
  620. package/src/templates/compact/CompactDocument.tsx +260 -0
  621. package/src/templates/compact/entries.tsx +167 -0
  622. package/src/templates/contemporary/ContemporaryDocument.tsx +291 -0
  623. package/src/templates/contemporary/entries.tsx +167 -0
  624. package/src/templates/creative/CreativeDocument.tsx +273 -0
  625. package/src/templates/creative/entries.tsx +167 -0
  626. package/src/templates/crimson/CrimsonDocument.tsx +287 -0
  627. package/src/templates/crimson/entries.tsx +169 -0
  628. package/src/templates/curve/CurveDocument.tsx +263 -0
  629. package/src/templates/curve/entries.tsx +168 -0
  630. package/src/templates/double-column/DoubleColumnDocument.tsx +273 -0
  631. package/src/templates/double-column/entries.tsx +169 -0
  632. package/src/templates/double-column-logos/DoubleColumnLogosDocument.tsx +266 -0
  633. package/src/templates/double-column-logos/entries.tsx +172 -0
  634. package/src/templates/elegant/ElegantDocument.tsx +301 -0
  635. package/src/templates/elegant/entries.tsx +167 -0
  636. package/src/templates/elegant-logos/ElegantLogosDocument.tsx +295 -0
  637. package/src/templates/elegant-logos/entries.tsx +170 -0
  638. package/src/templates/engineer/EngineerDocument.tsx +252 -0
  639. package/src/templates/engineer/entries.tsx +170 -0
  640. package/src/templates/executive/ExecutiveDocument.tsx +316 -0
  641. package/src/templates/executive/entries.tsx +146 -0
  642. package/src/templates/harvard/HarvardDocument.tsx +252 -0
  643. package/src/templates/harvard/entries.tsx +205 -0
  644. package/src/templates/hipster/HipsterDocument.tsx +293 -0
  645. package/src/templates/hipster/entries.tsx +175 -0
  646. package/src/templates/ivy/IvyDocument.tsx +252 -0
  647. package/src/templates/ivy/entries.tsx +167 -0
  648. package/src/templates/meridian/MeridianDocument.tsx +308 -0
  649. package/src/templates/meridian/entries.tsx +140 -0
  650. package/src/templates/modern/ModernDocument.tsx +269 -0
  651. package/src/templates/modern/entries.tsx +167 -0
  652. package/src/templates/polished/PolishedDocument.tsx +266 -0
  653. package/src/templates/polished/entries.tsx +167 -0
  654. package/src/templates/portrait/PortraitDocument.tsx +282 -0
  655. package/src/templates/portrait/entries.tsx +173 -0
  656. package/src/templates/prism/PrismDocument.tsx +311 -0
  657. package/src/templates/prism/entries.tsx +175 -0
  658. package/src/templates/scholar/ScholarDocument.tsx +270 -0
  659. package/src/templates/scholar/entries.tsx +169 -0
  660. package/src/templates/skills.ts +21 -0
  661. package/src/templates/split/SplitDocument.tsx +297 -0
  662. package/src/templates/split/entries.tsx +164 -0
  663. package/src/templates/stylish/StylishDocument.tsx +269 -0
  664. package/src/templates/stylish/entries.tsx +167 -0
  665. package/src/templates/timeline/TimelineDocument.tsx +255 -0
  666. package/src/templates/timeline/entries.tsx +173 -0
  667. package/src/useFitZoom.ts +185 -0
package/dist/paged.css ADDED
@@ -0,0 +1,265 @@
1
+ /*
2
+ * The paged canvas: inert sheets behind a single continuous flow.
3
+ *
4
+ * Lives beside `PagedSheet` and is imported by it, so the component is
5
+ * self-sufficient — a surface that renders a paged document cannot forget to
6
+ * bring its own page styling.
7
+ */
8
+
9
+ /* ── Paged canvas ───────────────────────────────────────────────────────── */
10
+
11
+ .tpl-pages {
12
+ position: relative;
13
+ width: 8.5in;
14
+ margin: 0 auto;
15
+
16
+ /*
17
+ * The browser must NOT try to hold this document still. The paginator does.
18
+ *
19
+ * Scroll anchoring exists for content that grows above the reader — an image
20
+ * loading, a banner unfolding — and it compensates by moving the scroll
21
+ * position under them. Every measuring pass here clears each block's
22
+ * `margin-top` and writes it back (see `PagedSheet.measure`, which must read
23
+ * a natural layout before it can plan the page breaks), and the browser reads
24
+ * that as the whole document collapsing and re-expanding. It then
25
+ * "compensated" for both halves, and they did not cancel: typing one letter
26
+ * into a skill dragged the canvas six hundred pixels, and the line being
27
+ * typed left the screen.
28
+ *
29
+ * Nothing is lost by switching it off. Anchoring keeps a reader's place while
30
+ * something else changes size; here the only thing changing size is the
31
+ * sentence under their own caret, which the browser keeps in view by itself.
32
+ */
33
+ overflow-anchor: none;
34
+
35
+ /*
36
+ * The zoom eases rather than jumps.
37
+ *
38
+ * `zoom` takes part in layout, so this is animating a reflow — which is
39
+ * exactly why `PagedSheet` suspends pagination for the duration and measures
40
+ * once at the end: mid-transition the page is at neither size, and a plan made
41
+ * from those frames would be true for none of them.
42
+ *
43
+ * Duration from `--zoom-ms`, written by the component from the same constant
44
+ * that decides how long it waits. Where a browser will not interpolate `zoom`,
45
+ * this degrades to the jump it does today and nothing else changes.
46
+ */
47
+ transition: zoom var(--zoom-ms, 200ms) cubic-bezier(0.22, 1, 0.36, 1);
48
+ /* Hold the paper open to every sheet the paginator drew. Absolutely
49
+ positioned sheets contribute no height, so without this a one-line record
50
+ is a clipped strip rather than a page. */
51
+ min-height: calc(
52
+ var(--pages, 1) * (var(--page-h) + var(--page-gap)) - var(--page-gap)
53
+ );
54
+ }
55
+
56
+ @media (prefers-reduced-motion: reduce) {
57
+ .tpl-pages {
58
+ transition: none;
59
+ }
60
+ }
61
+
62
+ /* Inert decoration behind the flow. No content lives here, so no content can be
63
+ lost to a repagination. */
64
+ .tpl-pages__sheets {
65
+ position: absolute;
66
+ inset: 0;
67
+ pointer-events: none;
68
+ }
69
+
70
+ .tpl-sheet {
71
+ position: absolute;
72
+ left: 0;
73
+ width: 100%;
74
+ height: var(--page-h);
75
+ background: #ffffff;
76
+ box-shadow: var(--elevation-2, 0 2px 12px rgb(0 0 0 / 18%));
77
+ }
78
+
79
+ .tpl-sheet__number {
80
+ position: absolute;
81
+ right: 0;
82
+ bottom: calc(var(--page-gap) * -1);
83
+ padding-top: 4px;
84
+ font-size: 0.6875rem;
85
+ font-variant-numeric: tabular-nums;
86
+ color: var(--color-text-subtle);
87
+ }
88
+
89
+ .tpl-pages__flow {
90
+ position: relative;
91
+ z-index: 1;
92
+ /*
93
+ * Room beside the paper for the rails, which stand OUTSIDE it — on either
94
+ * side, for a template whose right-hand column has its own.
95
+ *
96
+ * The padding and the equal negative margin cancel: the content sits exactly
97
+ * where it did, and the flow's own BOX grows sideways. That is what this
98
+ * is for — the mask below clips to the box, so a rail out on the canvas would
99
+ * simply vanish on any résumé long enough to have a page break, which is the
100
+ * one case nobody would think to check.
101
+ *
102
+ * Zero unless something sets it, so the saved-résumé view and the export
103
+ * renderer — which draw no knobs — are laid out exactly as before.
104
+ */
105
+ padding-inline: var(--tpl-space-bleed, 0px);
106
+ margin-inline: calc(-1 * var(--tpl-space-bleed, 0px));
107
+ }
108
+
109
+ /*
110
+ * Nothing is drawn in the gutter, because the gutter is not part of any page.
111
+ *
112
+ * The flow is continuous over the gaps between sheets, so anything spanning a
113
+ * boundary paints across one: a two-column template's dividing rule stitches
114
+ * the sheets together, and a list too long to move whole spills its items into
115
+ * the space between them. Neither is a pagination error — the content is on
116
+ * the sheets the printer will put it on — but both show the reader a page edge
117
+ * that is not there.
118
+ *
119
+ * A mask rather than a strip painted over the top, because the canvas behind
120
+ * this is a different colour in the editor and in the saved-résumé view, and a
121
+ * cover that has to match a background is a cover that is wrong somewhere. The
122
+ * gradient repeats on the same two custom properties the sheets are positioned
123
+ * with, so the holes cannot drift from the gaps.
124
+ *
125
+ * Only on a document that HAS a gap. A mask promotes the whole flow to its own
126
+ * composited layer, and the flow is what the candidate types into — so a
127
+ * one-page résumé, which is most of them and the one the product tells people to
128
+ * aim for, pays nothing for a boundary it does not have.
129
+ */
130
+ .tpl-pages[data-multipage] .tpl-pages__flow {
131
+ mask-image: repeating-linear-gradient(
132
+ to bottom,
133
+ #000 0 var(--page-h),
134
+ transparent var(--page-h) calc(var(--page-h) + var(--page-gap))
135
+ );
136
+ }
137
+
138
+ /*
139
+ * The document stops painting its own paper.
140
+ *
141
+ * The flow is continuous, so a white background on the template root would run
142
+ * straight through the gaps and hide the very page boundaries this component
143
+ * exists to show. The sheets behind it ARE the paper; the document only needs to
144
+ * keep its margins, which is what positions text inside them.
145
+ */
146
+ .tpl-pages__flow .tpl-harvard {
147
+ background: transparent;
148
+ box-shadow: none;
149
+ }
150
+
151
+ /* On paper the sheets and their numbers are the browser's job, not ours. */
152
+ @media print {
153
+ .fmt {
154
+ display: none !important;
155
+ }
156
+
157
+ .tpl-pages__sheets {
158
+ display: none !important;
159
+ }
160
+
161
+ .tpl-pages {
162
+ width: auto;
163
+ margin: 0;
164
+ }
165
+
166
+ /* On paper there is no gap to hide, and a mask here would cut the document. */
167
+ .tpl-pages[data-multipage] .tpl-pages__flow {
168
+ mask-image: none;
169
+ }
170
+ }
171
+
172
+ /* ── The zoom control ───────────────────────────────────────────────────── */
173
+
174
+ /*
175
+ * Canvas chrome, not document chrome.
176
+ *
177
+ * It sits OUTSIDE `.tpl-pages`, so it does not scale with the page it scales —
178
+ * and it is taken out of the flow by a negative bottom margin, so appearing
179
+ * costs the canvas no height and the paper does not shift down under it. The
180
+ * paginator measures only inside `.tpl-pages__flow`, so nothing here can reach
181
+ * where a page breaks.
182
+ *
183
+ * Drawn in the app's own neutral tokens rather than the document's green, since
184
+ * it acts on the view: it is not one of the affordances that says a part of the
185
+ * résumé can be edited.
186
+ */
187
+ .tpl-zoom {
188
+ position: sticky;
189
+ top: 8px;
190
+ z-index: 5;
191
+
192
+ display: flex;
193
+ gap: 2px;
194
+ align-items: center;
195
+ width: fit-content;
196
+ margin: 0 0 -32px auto;
197
+ padding: 3px;
198
+
199
+ background: var(--color-surface, #fff);
200
+ border: 1px solid var(--color-border, #e2e2e6);
201
+ border-radius: 8px;
202
+ box-shadow: var(--shadow-sm, 0 1px 3px rgb(0 0 0 / 12%));
203
+ }
204
+
205
+ .tpl-zoom__btn {
206
+ display: inline-flex;
207
+ align-items: center;
208
+ justify-content: center;
209
+ width: 24px;
210
+ height: 24px;
211
+ padding: 0;
212
+ font:
213
+ 600 14px/1 system-ui,
214
+ sans-serif;
215
+ color: var(--color-text, #1a1a1a);
216
+ cursor: pointer;
217
+ background: none;
218
+ border: 0;
219
+ border-radius: 5px;
220
+ }
221
+
222
+ .tpl-zoom__btn:hover:not(:disabled) {
223
+ background: var(--color-surface-subtle, #f2f2f4);
224
+ }
225
+
226
+ .tpl-zoom__btn:disabled {
227
+ cursor: not-allowed;
228
+ opacity: 0.35;
229
+ }
230
+
231
+ .tpl-zoom__value {
232
+ min-width: 44px;
233
+ padding: 0 4px;
234
+ font:
235
+ 500 11px/1 system-ui,
236
+ sans-serif;
237
+ font-variant-numeric: tabular-nums;
238
+ color: var(--color-text-subtle, #6a6a70);
239
+ text-align: center;
240
+ cursor: pointer;
241
+ background: none;
242
+ border: 0;
243
+ }
244
+
245
+ .tpl-zoom__value:hover {
246
+ color: var(--color-text, #1a1a1a);
247
+ }
248
+
249
+ /*
250
+ * A view zoom is for looking at the document, never for producing it.
251
+ *
252
+ * `PagedSheet` writes `zoom` inline when the editor's canvas has room for it, so
253
+ * this is the reset that keeps the printed page — and the PDF rendered from the
254
+ * same stylesheet — at true Letter size regardless of what the reader was
255
+ * viewing it at.
256
+ */
257
+ @media print {
258
+ .tpl-pages {
259
+ zoom: 1 !important;
260
+ }
261
+
262
+ .tpl-zoom {
263
+ display: none !important;
264
+ }
265
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * Where the pages break — as arithmetic, with no DOM in it.
3
+ *
4
+ * Separated from `PagedSheet` because the two halves fail for different reasons
5
+ * and are checked by different means. Reading the layout is a browser question
6
+ * that jsdom cannot answer (every measurement there is zero). Deciding where a
7
+ * sheet ends is a model, and a model can be handed measurements and held to its
8
+ * answer — which is what `pagination.spec.ts` does, and what no test could do
9
+ * while this lived inside a `useCallback` closed over a ref.
10
+ */
11
+ /** Letter at 96dpi, and the document's own vertical margin, both in CSS pixels. */
12
+ export declare const PAGE_HEIGHT: number;
13
+ /** Letter's other dimension, which is what a view zoom has to fit into. */
14
+ export declare const PAGE_WIDTH: number;
15
+ export declare const PAGE_MARGIN: number;
16
+ /**
17
+ * The gap drawn between sheets on screen. Presentation only — never printed.
18
+ *
19
+ * It is the DEFAULT rather than the law, because the export renders the same
20
+ * document onto real paper, where sheets are contiguous. That is the single
21
+ * parameter separating the two renderings: pass `0` and the pitch becomes the
22
+ * page height, so sheet `k` starts exactly where printed page `k` starts.
23
+ */
24
+ export declare const SHEET_GAP = 28;
25
+ /**
26
+ * One block as the browser reported it, tagged with the column it flows down.
27
+ *
28
+ * `flow` is opaque here on purpose: the model only ever compares flows for
29
+ * identity, so it does not need to know they are elements, and a test can label
30
+ * them `'main'` and `'aside'`.
31
+ */
32
+ export interface MeasuredBlock<TFlow> {
33
+ flow: TFlow;
34
+ /** Natural position in flow coordinates, before any push. */
35
+ top: number;
36
+ height: number;
37
+ /** A heading, which must not be the last thing on a sheet. */
38
+ keepWithNext: boolean;
39
+ /**
40
+ * Space the candidate recorded above this block. Absent means none.
41
+ *
42
+ * When the block is moved to a new sheet it keeps only the part of this
43
+ * space that was NOT needed to move it there. The space that fitted on the
44
+ * sheet it came from is spent. So a block starts its new sheet on the first
45
+ * line, and each further step moves it down from there.
46
+ *
47
+ * Without it a moved block was placed with its top edge on the sheet's first
48
+ * line, whatever gap it carried: the push is measured from the block's
49
+ * natural position, which already includes that gap, so every extra step of
50
+ * space shortened the push by exactly as much. The spacer's number rose and
51
+ * nothing on the page moved.
52
+ *
53
+ * Only the RECORDED space. The template's own rhythm above a block is space
54
+ * between two things, and at the top of a sheet there is nothing above it.
55
+ */
56
+ lead?: number;
57
+ }
58
+ export interface PaginationPlan {
59
+ /** Block index → how far down it must be pushed. Absent means "not pushed". */
60
+ pushes: Map<number, number>;
61
+ /** Block index → where a pushed block is SUPPOSED to start. */
62
+ targets: Map<number, number>;
63
+ /**
64
+ * Block index → the recorded space a pushed block keeps above it on its new
65
+ * sheet, after capping. Absent means none. Printing needs it on its own,
66
+ * because it places the block with a page break rather than by position.
67
+ */
68
+ leads: Map<number, number>;
69
+ /** How many sheets the document occupies. Never below one. */
70
+ pages: number;
71
+ }
72
+ /**
73
+ * Plan the breaks: which blocks move down, how far, and how many sheets result.
74
+ *
75
+ * Every push is derived arithmetically from ONE reading of the natural layout,
76
+ * rather than by measuring, pushing, and measuring again — that costs a reflow
77
+ * per block on every keystroke. Pushing a block down by `p` shifts everything
78
+ * after it **in the same flow** by exactly `p`, so a running offset per flow is
79
+ * all the later blocks need.
80
+ *
81
+ * **Per flow**, and that is the load-bearing word. A template that sets regions
82
+ * side by side has more than one column, and a push in one of them does not move
83
+ * the other. Carrying a single running offset across both — which is what this
84
+ * did while every template was one column — would measure every block of the
85
+ * second column against a position it never occupied, and the sidebar would walk
86
+ * off the sheet on the first break.
87
+ *
88
+ * A document with no declared flow puts every block in the same one, so the maps
89
+ * below hold a single entry and the arithmetic is the single running offset it
90
+ * replaced. Single-column templates are not paginated by a new code path.
91
+ */
92
+ export declare function planPagination<TFlow>(blocks: readonly MeasuredBlock<TFlow>[], sheetGap?: number): PaginationPlan;
93
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,mFAAmF;AACnF,eAAO,MAAM,WAAW,QAAU,CAAC;AACnC,2EAA2E;AAC3E,eAAO,MAAM,UAAU,QAAW,CAAC;AACnC,eAAO,MAAM,WAAW,QAAW,CAAC;AACpC;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK;IAClC,IAAI,EAAE,KAAK,CAAC;IACZ,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,YAAY,EAAE,OAAO,CAAC;IACtB;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,+DAA+D;IAC/D,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B;;;;OAIG;IACH,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAsBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAClC,MAAM,EAAE,SAAS,aAAa,CAAC,KAAK,CAAC,EAAE,EACvC,QAAQ,GAAE,MAAkB,GAC3B,cAAc,CAuHhB"}
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Where the pages break — as arithmetic, with no DOM in it.
3
+ *
4
+ * Separated from `PagedSheet` because the two halves fail for different reasons
5
+ * and are checked by different means. Reading the layout is a browser question
6
+ * that jsdom cannot answer (every measurement there is zero). Deciding where a
7
+ * sheet ends is a model, and a model can be handed measurements and held to its
8
+ * answer — which is what `pagination.spec.ts` does, and what no test could do
9
+ * while this lived inside a `useCallback` closed over a ref.
10
+ */
11
+ /** Letter at 96dpi, and the document's own vertical margin, both in CSS pixels. */
12
+ export const PAGE_HEIGHT = 11 * 96;
13
+ /** Letter's other dimension, which is what a view zoom has to fit into. */
14
+ export const PAGE_WIDTH = 8.5 * 96;
15
+ export const PAGE_MARGIN = 0.5 * 96;
16
+ /**
17
+ * The gap drawn between sheets on screen. Presentation only — never printed.
18
+ *
19
+ * It is the DEFAULT rather than the law, because the export renders the same
20
+ * document onto real paper, where sheets are contiguous. That is the single
21
+ * parameter separating the two renderings: pass `0` and the pitch becomes the
22
+ * page height, so sheet `k` starts exactly where printed page `k` starts.
23
+ */
24
+ export const SHEET_GAP = 28;
25
+ /**
26
+ * Sheet `k` occupies `[pitch*k, pitch*k + PAGE_HEIGHT)`, where the pitch is the
27
+ * page plus whatever gap is drawn between sheets.
28
+ *
29
+ * Derived per call rather than fixed at module scope: the editor draws a gap and
30
+ * the printed document does not, and those are the same document paginated with
31
+ * one number changed. Holding the screen's gap in a constant here is what would
32
+ * make the file and the screen break in different places.
33
+ */
34
+ function geometry(gap) {
35
+ const pitch = PAGE_HEIGHT + gap;
36
+ return {
37
+ pitch,
38
+ textTop: (k) => pitch * k + PAGE_MARGIN,
39
+ textBottom: (k) => pitch * k + PAGE_HEIGHT - PAGE_MARGIN,
40
+ /** Independent of the gap: a sheet holds what a sheet holds. */
41
+ usable: PAGE_HEIGHT - PAGE_MARGIN * 2,
42
+ };
43
+ }
44
+ /**
45
+ * Plan the breaks: which blocks move down, how far, and how many sheets result.
46
+ *
47
+ * Every push is derived arithmetically from ONE reading of the natural layout,
48
+ * rather than by measuring, pushing, and measuring again — that costs a reflow
49
+ * per block on every keystroke. Pushing a block down by `p` shifts everything
50
+ * after it **in the same flow** by exactly `p`, so a running offset per flow is
51
+ * all the later blocks need.
52
+ *
53
+ * **Per flow**, and that is the load-bearing word. A template that sets regions
54
+ * side by side has more than one column, and a push in one of them does not move
55
+ * the other. Carrying a single running offset across both — which is what this
56
+ * did while every template was one column — would measure every block of the
57
+ * second column against a position it never occupied, and the sidebar would walk
58
+ * off the sheet on the first break.
59
+ *
60
+ * A document with no declared flow puts every block in the same one, so the maps
61
+ * below hold a single entry and the arithmetic is the single running offset it
62
+ * replaced. Single-column templates are not paginated by a new code path.
63
+ */
64
+ export function planPagination(blocks, sheetGap = SHEET_GAP) {
65
+ const { pitch, textTop, textBottom, usable } = geometry(sheetGap);
66
+ const pushes = new Map();
67
+ const targets = new Map();
68
+ const leads = new Map();
69
+ if (blocks.length === 0)
70
+ return { pushes, targets, leads, pages: 1 };
71
+ /*
72
+ * The next block in the SAME flow, for `keepWithNext`.
73
+ *
74
+ * Resolved in one backward pass rather than by searching forward per block: a
75
+ * heading is kept with what follows it *in its own column*, and the block that
76
+ * happens to come next in the document can be the top of the other one.
77
+ */
78
+ const nextInFlow = new Array(blocks.length).fill(-1);
79
+ const lastSeen = new Map();
80
+ for (let i = blocks.length - 1; i >= 0; i--) {
81
+ nextInFlow[i] = lastSeen.get(blocks[i].flow) ?? -1;
82
+ lastSeen.set(blocks[i].flow, i);
83
+ }
84
+ /** Per flow: how far its content has been pushed, and the sheet it is on. */
85
+ const shifts = new Map();
86
+ const sheets = new Map();
87
+ /** How far down the document reaches once every push is applied. */
88
+ let bottom = 0;
89
+ for (const [index, block] of blocks.entries()) {
90
+ const shift = shifts.get(block.flow) ?? 0;
91
+ let sheet = sheets.get(block.flow) ?? 0;
92
+ let top = block.top + shift;
93
+ // A block taller than a whole sheet cannot be rescued by pushing it; let it
94
+ // run, and count the sheets it spans.
95
+ if (block.height > usable) {
96
+ sheets.set(block.flow, Math.max(sheet, Math.floor((top + block.height) / pitch)));
97
+ bottom = Math.max(bottom, top + block.height);
98
+ continue;
99
+ }
100
+ /*
101
+ * A section heading must not be the last thing on a sheet. It is measured
102
+ * together with whatever follows it — the same intent as the stylesheet's
103
+ * `break-after: avoid`, which the printer applies to this very document.
104
+ *
105
+ * UNLESS what follows cannot fit on a sheet by itself. Holding a heading
106
+ * against a block that overflows wherever it starts buys nothing and costs a
107
+ * page: the heading is pushed to a fresh sheet, the block still overruns,
108
+ * and the sheet the heading came from is left empty. That is exactly how a
109
+ * 56-item keyword rail emptied its own first page — the list is one block,
110
+ * taller than the paper, so its heading was moved every single time.
111
+ */
112
+ const next = nextInFlow[index];
113
+ const nextHeight = next === -1 ? 0 : blocks[next].height;
114
+ const withNext = block.keepWithNext && nextHeight <= usable ? nextHeight : 0;
115
+ if (top + block.height + withNext > textBottom(sheet)) {
116
+ sheet += 1;
117
+ /*
118
+ * How much of the recorded space carries over to the new sheet.
119
+ *
120
+ * `room` is the space the block could have had and still stayed on the
121
+ * sheet it came from. That much is spent there, so only the remainder
122
+ * goes above the block on its new sheet. A block that crosses because of
123
+ * its space therefore lands on the first line and moves down one step at
124
+ * a time from there, rather than arriving with the whole gap again.
125
+ *
126
+ * A block that would not have fitted even with no space spent none of
127
+ * it, so it keeps all of it.
128
+ *
129
+ * Capped so the block, and whatever it is kept with, still fits on its
130
+ * new sheet. A gap taller than that would only push it off again.
131
+ */
132
+ const recorded = Math.max(0, block.lead ?? 0);
133
+ const room = Math.max(0, textBottom(sheet - 1) - (top - recorded) - block.height - withNext);
134
+ const lead = Math.min(Math.max(0, recorded - room), Math.max(0, usable - block.height - withNext));
135
+ const target = textTop(sheet) + lead;
136
+ const push = target - top;
137
+ pushes.set(index, push);
138
+ targets.set(index, target);
139
+ if (lead > 0)
140
+ leads.set(index, lead);
141
+ shifts.set(block.flow, shift + push);
142
+ sheets.set(block.flow, sheet);
143
+ top = target;
144
+ }
145
+ // Accumulated as the loop goes, with the offset that was in force for THIS
146
+ // block — a flow's final offset belongs to its last block, not to every
147
+ // block that preceded the pushes making it up.
148
+ bottom = Math.max(bottom, top + block.height);
149
+ }
150
+ /*
151
+ * The deepest sheet ANY flow reaches decides the count.
152
+ *
153
+ * Per flow rather than "the last block in the document", because the last
154
+ * block of a two-column page is the foot of the sidebar, which is routinely
155
+ * the shorter column — trusting it would drop the sheet the main column is
156
+ * still running onto.
157
+ */
158
+ let deepest = 0;
159
+ for (const sheet of sheets.values())
160
+ deepest = Math.max(deepest, sheet);
161
+ return {
162
+ pushes,
163
+ targets,
164
+ leads,
165
+ pages: Math.max(deepest + 1, Math.ceil(bottom / pitch) || 1),
166
+ };
167
+ }
@@ -0,0 +1,6 @@
1
+ import { type ReactNode } from 'react';
2
+ export declare function PictureProvider({ children }: {
3
+ children: ReactNode;
4
+ }): import("react").JSX.Element;
5
+ export declare function usePicture(): boolean;
6
+ //# sourceMappingURL=picture-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picture-context.d.ts","sourceRoot":"","sources":["../src/picture-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AASlE,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAIpE;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext } from 'react';
3
+ /**
4
+ * A document drawn as a picture of itself: links are text, headings are not
5
+ * part of the host page's outline, and nothing an editor reads is emitted.
6
+ * For previews embedded in another page, never for the document itself.
7
+ */
8
+ const PictureContext = createContext(false);
9
+ export function PictureProvider({ children }) {
10
+ return (_jsx(PictureContext.Provider, { value: true, children: children }));
11
+ }
12
+ export function usePicture() {
13
+ return useContext(PictureContext);
14
+ }
@@ -0,0 +1,45 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type DocumentStyle, type FieldFormat, type ResumeFormats } from '@resumekit/schema';
3
+ /**
4
+ * How the document is presented, delivered by context rather than by props.
5
+ *
6
+ * This is not a style preference — it is the only thing that works. `<Frame>`
7
+ * children are Craft.js's INITIAL node tree: props are read off that JSX once,
8
+ * when the nodes are created, and thereafter live in Craft's own store. Passing
9
+ * `style` and `formats` down through `<Element>` therefore froze them at mount,
10
+ * and every formatting change stayed invisible until something forced a remount.
11
+ *
12
+ * Context sidesteps the node store entirely: a change re-renders the components
13
+ * that read it, immediately, without touching Craft's state at all. Which is
14
+ * also the correct model — formatting is presentation OVER the document, not
15
+ * part of it. The document is the text, and only the text is Craft's to hold.
16
+ */
17
+ export interface DocumentPresentation {
18
+ style?: DocumentStyle;
19
+ formats?: ResumeFormats;
20
+ /** The document's language, which its printed words follow. Absent is English. */
21
+ language?: string;
22
+ }
23
+ export declare function DocumentPresentationProvider({ style, formats, language, children, }: DocumentPresentation & {
24
+ children: ReactNode;
25
+ }): import("react").JSX.Element;
26
+ /** The document's style, or undefined for the template's own typography. */
27
+ export declare function useDocumentStyle(): DocumentStyle | undefined;
28
+ /**
29
+ * Every field's formatting, for the one reader that needs the whole list.
30
+ *
31
+ * `useFieldFormat` answers for a path and is what a node should ask; this is
32
+ * for `useSpace`, which reaches the same record for a different question and
33
+ * would otherwise need a second copy of the formats threaded to it.
34
+ */
35
+ export declare function useDocumentLanguage(): string | undefined;
36
+ export declare function useDocumentFormats(): ResumeFormats | undefined;
37
+ /**
38
+ * The formatting for one field, as bounded values a node may accept.
39
+ *
40
+ * Returns the format WITHOUT its path: a node already knows which field it is,
41
+ * and passing the path back in would invite a node to read a different field's
42
+ * formatting than its own.
43
+ */
44
+ export declare function useFieldFormat(path: string): Omit<FieldFormat, 'path'>;
45
+ //# sourceMappingURL=presentation-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation-context.d.ts","sourceRoot":"","sources":["../src/presentation-context.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EACnB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAID,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,EAAE,oBAAoB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAYhD;AAED,4EAA4E;AAC5E,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,SAAS,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAExD;AAED,wBAAgB,kBAAkB,IAAI,aAAa,GAAG,SAAS,CAE9D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAQtE"}
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext, useMemo } from 'react';
3
+ import { formatFor, } from '@resumekit/schema';
4
+ const PresentationContext = createContext({});
5
+ export function DocumentPresentationProvider({ style, formats, language, children, }) {
6
+ // Keyed on the values themselves, so a parent re-render that changed neither
7
+ // does not cascade a new context object through the whole document.
8
+ const value = useMemo(() => ({ style, formats, language }), [style, formats, language]);
9
+ return (_jsx(PresentationContext.Provider, { value: value, children: children }));
10
+ }
11
+ /** The document's style, or undefined for the template's own typography. */
12
+ export function useDocumentStyle() {
13
+ return useContext(PresentationContext).style;
14
+ }
15
+ /**
16
+ * Every field's formatting, for the one reader that needs the whole list.
17
+ *
18
+ * `useFieldFormat` answers for a path and is what a node should ask; this is
19
+ * for `useSpace`, which reaches the same record for a different question and
20
+ * would otherwise need a second copy of the formats threaded to it.
21
+ */
22
+ export function useDocumentLanguage() {
23
+ return useContext(PresentationContext).language;
24
+ }
25
+ export function useDocumentFormats() {
26
+ return useContext(PresentationContext).formats;
27
+ }
28
+ /**
29
+ * The formatting for one field, as bounded values a node may accept.
30
+ *
31
+ * Returns the format WITHOUT its path: a node already knows which field it is,
32
+ * and passing the path back in would invite a node to read a different field's
33
+ * formatting than its own.
34
+ */
35
+ export function useFieldFormat(path) {
36
+ const { formats } = useContext(PresentationContext);
37
+ return useMemo(() => {
38
+ const found = formatFor(formats, path);
39
+ if (!found)
40
+ return {};
41
+ const { path: _unused, ...rest } = found;
42
+ return rest;
43
+ }, [formats, path]);
44
+ }
@@ -0,0 +1,16 @@
1
+ import { type ResumeEdits, type ResumeObject } from '@resumekit/schema';
2
+ /**
3
+ * The resume as it should be drawn: the writer's output with the candidate's
4
+ * corrections applied.
5
+ *
6
+ * Lives with the DOCUMENT rather than with the editor, because it answers "what
7
+ * is on the page" — the question every surface that draws a résumé has to
8
+ * answer, including the server-side renderer that never loads an editor.
9
+ *
10
+ * Falls back to the writer's own resume if the overlay cannot be applied. An
11
+ * overlay is data at rest that can outlive the schema it was written against,
12
+ * and a resume that will not open is a worse failure than an edit that does not
13
+ * show — so the document always renders.
14
+ */
15
+ export declare function presentedResume(base: ResumeObject, edits: ResumeEdits): ResumeObject;
16
+ //# sourceMappingURL=presented.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presented.d.ts","sourceRoot":"","sources":["../src/presented.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,WAAW,GACjB,YAAY,CAMd"}