@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
@@ -0,0 +1,154 @@
1
+ import { useRef, useState } from 'react';
2
+ import { SECTION_SPACES, SPACE_MAX_STEPS, SPACE_QUANTUM, spaceAtStep, } from '@resumekit/schema';
3
+ import { useAutosave } from '../autosave-context.js';
4
+ import { useSpace } from '../spacing/spacing-context.js';
5
+ import { useRailPin } from './rail-store.js';
6
+ import { useEditorText } from '../i18n/index.js';
7
+ /** One step on screen when nothing can be measured — a test renderer only. */
8
+ const FALLBACK_UNIT = 8;
9
+ /** How many units the probe is tall, so a sub-pixel unit measures precisely. */
10
+ const PROBE_UNITS = 10;
11
+ /** How far the pointer must travel, in steps, before the value moves at all. */
12
+ const DEAD_ZONE = SPACE_QUANTUM;
13
+ /**
14
+ * One step of this template's rhythm, in SCREEN pixels — measured by a probe
15
+ * laid out inside the zoomed sheet, so the zoom needs no separate correction.
16
+ * A custom property cannot simply be read: it comes back as the literal
17
+ * `calc(...)` text. Once per press, not per frame: it forces a layout.
18
+ */
19
+ function unitOf(element) {
20
+ if (!element?.ownerDocument)
21
+ return FALLBACK_UNIT;
22
+ const probe = element.ownerDocument.createElement('span');
23
+ probe.style.cssText = `position:absolute;visibility:hidden;pointer-events:none;width:0;height:calc(var(--tpl-space-unit, 8px) * ${PROBE_UNITS})`;
24
+ element.append(probe);
25
+ const measured = probe.getBoundingClientRect().height / PROBE_UNITS;
26
+ probe.remove();
27
+ return measured > 0 ? measured : FALLBACK_UNIT;
28
+ }
29
+ /**
30
+ * The gap above a container, as a drag and as a keyboard slider.
31
+ *
32
+ * Every position it can reach is a step of the catalog's scale, which is what
33
+ * keeps the ATS guarantee enumerable. A drag lasts exactly as long as the
34
+ * press — it ends wherever the pointer is released, in or out of the window —
35
+ * and it pins the container's rail, so leaving the container mid-drag does
36
+ * not take the control away from under the pointer.
37
+ */
38
+ export function useSpaceDrag(target, label, railKey) {
39
+ const { steps, adjustable, setSteps } = useSpace(target);
40
+ const { t, format, locale } = useEditorText();
41
+ const { saveNow } = useAutosave();
42
+ const { pin, unpin } = useRailPin(railKey);
43
+ const [dragging, setDragging] = useState(null);
44
+ const shown = dragging ?? steps;
45
+ /*
46
+ * What has been ASKED for, as against what has come back. A repeated key
47
+ * arrives before the previous value has made the round trip through the
48
+ * screen's state, so the handler must add to the pending figure, not to
49
+ * `steps`. A render carrying a value not seen from upstream adopts it.
50
+ */
51
+ const latest = useRef(steps);
52
+ const seen = useRef(steps);
53
+ if (steps !== seen.current) {
54
+ seen.current = steps;
55
+ latest.current = steps;
56
+ }
57
+ const commit = (next) => {
58
+ const wanted = Math.round(next / SPACE_QUANTUM) * SPACE_QUANTUM;
59
+ const clamped = Number(Math.max(0, Math.min(SPACE_MAX_STEPS, wanted)).toFixed(1));
60
+ latest.current = clamped;
61
+ if (clamped !== steps)
62
+ setSteps(clamped);
63
+ return clamped;
64
+ };
65
+ const onPointerDown = (event) => {
66
+ if (event.button !== 0)
67
+ return;
68
+ event.preventDefault();
69
+ event.stopPropagation();
70
+ const startY = event.clientY;
71
+ const startSteps = latest.current;
72
+ const perStep = unitOf(event.currentTarget);
73
+ const element = event.currentTarget;
74
+ const view = element.ownerDocument.defaultView ?? window;
75
+ element.setPointerCapture?.(event.pointerId);
76
+ setDragging(startSteps);
77
+ pin();
78
+ /* A drag passes over text; it must not select it on the way. */
79
+ const root = element.ownerDocument.documentElement;
80
+ const selecting = root.style.userSelect;
81
+ root.style.userSelect = 'none';
82
+ /* On the WINDOW, torn down as one, so a release anywhere ends the drag. */
83
+ const drag = new AbortController();
84
+ const { signal } = drag;
85
+ const move = (e) => {
86
+ if (e.pointerId !== event.pointerId)
87
+ return;
88
+ // A move with no button held is a release nobody reported.
89
+ if (e.buttons === 0) {
90
+ end();
91
+ return;
92
+ }
93
+ const travelled = (e.clientY - startY) / perStep;
94
+ if (Math.abs(travelled) < DEAD_ZONE && latest.current === startSteps) {
95
+ return;
96
+ }
97
+ setDragging(commit(startSteps + travelled));
98
+ };
99
+ const end = () => {
100
+ if (signal.aborted)
101
+ return;
102
+ drag.abort();
103
+ element.releasePointerCapture?.(event.pointerId);
104
+ setDragging(null);
105
+ unpin();
106
+ root.style.userSelect = selecting;
107
+ saveNow();
108
+ };
109
+ view.addEventListener('pointermove', move, { signal });
110
+ view.addEventListener('pointerup', end, { signal });
111
+ view.addEventListener('pointercancel', end, { signal });
112
+ view.addEventListener('blur', end, { signal });
113
+ };
114
+ /* The same, from the keyboard: a quantum per arrow, a unit per page. */
115
+ const onKeyDown = (event) => {
116
+ const by = {
117
+ ArrowUp: -SPACE_QUANTUM,
118
+ ArrowDown: SPACE_QUANTUM,
119
+ PageUp: -1,
120
+ PageDown: 1,
121
+ }[event.key];
122
+ const to = event.key === 'Home'
123
+ ? 0
124
+ : event.key === 'End'
125
+ ? SPACE_MAX_STEPS
126
+ : undefined;
127
+ if (by === undefined && to === undefined)
128
+ return;
129
+ event.preventDefault();
130
+ commit(to ?? latest.current + by);
131
+ saveNow();
132
+ };
133
+ return {
134
+ adjustable,
135
+ shown,
136
+ dragging: dragging !== null,
137
+ sliderProps: {
138
+ role: 'slider',
139
+ tabIndex: 0,
140
+ 'aria-label': format(t.space.handle, { name: label }),
141
+ 'aria-orientation': 'vertical',
142
+ 'aria-valuemin': 0,
143
+ 'aria-valuemax': SPACE_MAX_STEPS,
144
+ 'aria-valuenow': shown,
145
+ // The scale is fifths, so the announced value has to be too.
146
+ 'aria-valuetext': spaceAtStep(shown) === 'none'
147
+ ? t.space.none
148
+ : (SECTION_SPACES[spaceAtStep(shown)]?.steps ?? 0).toLocaleString(locale),
149
+ title: format(t.space.handleTitle, { name: label }),
150
+ onPointerDown,
151
+ onKeyDown,
152
+ },
153
+ };
154
+ }
@@ -0,0 +1,35 @@
1
+ import type { ComponentType } from 'react';
2
+ import type { ResumeObject, TemplateId } from '@resumekit/schema';
3
+ /**
4
+ * A template's renderer: the document component, plus the Craft.js resolver that
5
+ * can reconstruct its node tree.
6
+ *
7
+ * Adding a template is one entry here and one document file — everything else
8
+ * (the editor, the overlay, the save path, the print rules) is template-agnostic
9
+ * by construction. `registry.spec.ts` asserts this map and `TEMPLATES` in
10
+ * `@resumekit/schema` name exactly the same templates, so a catalog entry with no
11
+ * renderer, or a renderer no catalog knows about, fails the suite.
12
+ */
13
+ /**
14
+ * What every template's document component accepts: the resume, and nothing
15
+ * else. Presentation arrives by context, because Craft node props are frozen at
16
+ * mount — see `presentation-context.tsx`.
17
+ */
18
+ export interface TemplateDocumentProps {
19
+ resume: ResumeObject;
20
+ }
21
+ export interface TemplateRenderer {
22
+ Document: ComponentType<TemplateDocumentProps>;
23
+ }
24
+ export declare const TEMPLATE_RENDERERS: Record<TemplateId, TemplateRenderer>;
25
+ /**
26
+ * The editable field components, for the test that no field accepts a
27
+ * presentational prop.
28
+ *
29
+ * A list rather than a resolver: there is no library to resolve a name for any
30
+ * more (`retire-craftjs`), but the RULE those nodes are held to survives the
31
+ * mechanism — a field may carry `bold`, `align`, `ink` and `href` from the
32
+ * catalog, and never a style, a class or a dimension.
33
+ */
34
+ export declare const REGISTERED_NODES: [string, unknown][];
35
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA+BlE,OAAO,2BAA2B,CAAC;AAEnC;;;;;;;;;GASG;AACH;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CAChD;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,gBAAgB,CA4BnE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAI/C,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { EditableText } from './nodes/EditableText.js';
2
+ import { EditableBulletList } from './nodes/EditableBulletList.js';
3
+ import { EditableInlineList } from './nodes/EditableInlineList.js';
4
+ import { HarvardDocument } from './templates/harvard/HarvardDocument.js';
5
+ import { IvyDocument } from './templates/ivy/IvyDocument.js';
6
+ import { ClassicDocument } from './templates/classic/ClassicDocument.js';
7
+ import { CompactDocument } from './templates/compact/CompactDocument.js';
8
+ import { TimelineDocument } from './templates/timeline/TimelineDocument.js';
9
+ import { ModernDocument } from './templates/modern/ModernDocument.js';
10
+ import { StylishDocument } from './templates/stylish/StylishDocument.js';
11
+ import { CreativeDocument } from './templates/creative/CreativeDocument.js';
12
+ import { ContemporaryDocument } from './templates/contemporary/ContemporaryDocument.js';
13
+ import { DoubleColumnDocument } from './templates/double-column/DoubleColumnDocument.js';
14
+ import { DoubleColumnLogosDocument } from './templates/double-column-logos/DoubleColumnLogosDocument.js';
15
+ import { ElegantDocument } from './templates/elegant/ElegantDocument.js';
16
+ import { ElegantLogosDocument } from './templates/elegant-logos/ElegantLogosDocument.js';
17
+ import { PolishedDocument } from './templates/polished/PolishedDocument.js';
18
+ import { ExecutiveDocument } from './templates/executive/ExecutiveDocument.js';
19
+ import { MeridianDocument } from './templates/meridian/MeridianDocument.js';
20
+ import { CobaltDocument } from './templates/cobalt/CobaltDocument.js';
21
+ import { CrimsonDocument } from './templates/crimson/CrimsonDocument.js';
22
+ import { EngineerDocument } from './templates/engineer/EngineerDocument.js';
23
+ import { SplitDocument } from './templates/split/SplitDocument.js';
24
+ import { AcademicDocument } from './templates/academic/AcademicDocument.js';
25
+ import { AltaDocument } from './templates/alta/AltaDocument.js';
26
+ import { PrismDocument } from './templates/prism/PrismDocument.js';
27
+ import { HipsterDocument } from './templates/hipster/HipsterDocument.js';
28
+ import { ScholarDocument } from './templates/scholar/ScholarDocument.js';
29
+ import { PortraitDocument } from './templates/portrait/PortraitDocument.js';
30
+ import { CurveDocument } from './templates/curve/CurveDocument.js';
31
+ import './nodes/template-node.css';
32
+ export const TEMPLATE_RENDERERS = {
33
+ harvard: { Document: HarvardDocument },
34
+ ivy: { Document: IvyDocument },
35
+ classic: { Document: ClassicDocument },
36
+ compact: { Document: CompactDocument },
37
+ timeline: { Document: TimelineDocument },
38
+ modern: { Document: ModernDocument },
39
+ stylish: { Document: StylishDocument },
40
+ creative: { Document: CreativeDocument },
41
+ contemporary: { Document: ContemporaryDocument },
42
+ 'double-column': { Document: DoubleColumnDocument },
43
+ 'double-column-logos': { Document: DoubleColumnLogosDocument },
44
+ elegant: { Document: ElegantDocument },
45
+ 'elegant-logos': { Document: ElegantLogosDocument },
46
+ polished: { Document: PolishedDocument },
47
+ executive: { Document: ExecutiveDocument },
48
+ meridian: { Document: MeridianDocument },
49
+ cobalt: { Document: CobaltDocument },
50
+ crimson: { Document: CrimsonDocument },
51
+ engineer: { Document: EngineerDocument },
52
+ split: { Document: SplitDocument },
53
+ academic: { Document: AcademicDocument },
54
+ alta: { Document: AltaDocument },
55
+ prism: { Document: PrismDocument },
56
+ hipster: { Document: HipsterDocument },
57
+ scholar: { Document: ScholarDocument },
58
+ portrait: { Document: PortraitDocument },
59
+ curve: { Document: CurveDocument },
60
+ };
61
+ /**
62
+ * The editable field components, for the test that no field accepts a
63
+ * presentational prop.
64
+ *
65
+ * A list rather than a resolver: there is no library to resolve a name for any
66
+ * more (`retire-craftjs`), but the RULE those nodes are held to survives the
67
+ * mechanism — a field may carry `bold`, `align`, `ink` and `href` from the
68
+ * catalog, and never a style, a class or a dimension.
69
+ */
70
+ export const REGISTERED_NODES = [
71
+ ['EditableText', EditableText],
72
+ ['EditableBulletList', EditableBulletList],
73
+ ['EditableInlineList', EditableInlineList],
74
+ ];
@@ -0,0 +1,53 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ResumeSectionId, type ResumeSectionSpacing, type SectionSpaceId } from '@resumekit/schema';
3
+ /**
4
+ * Which gap is being talked about.
5
+ *
6
+ * Two arms because the document stores them in two places, and it stores them
7
+ * in two places because they answer different questions. A SECTION is a fixed
8
+ * part of every résumé — "the space above Experience" is true of a document
9
+ * whose experience the writer has rewritten twice — so it is keyed by name. An
10
+ * ENTRY is one of many and moves when the candidate reorders it, so it is keyed
11
+ * by its own path, on the same per-field record its bolding travels on. Naming
12
+ * an entry by position would leave the space behind when the job moved.
13
+ */
14
+ export type SpaceTarget = {
15
+ readonly section: ResumeSectionId;
16
+ } | {
17
+ readonly path: string;
18
+ };
19
+ export interface DocumentSpacingValue {
20
+ /** Space above each named section, as stored. */
21
+ sections?: ResumeSectionSpacing;
22
+ /**
23
+ * Record a new space above `target`.
24
+ *
25
+ * Absent means the document is being READ — the saved-résumé view, the export
26
+ * renderer, the printed page — and no handle is drawn at all. Same rule as
27
+ * the authoring context: a surface that only displays a résumé gets a
28
+ * document with no controls in it without asking for one.
29
+ */
30
+ onChange?: (target: SpaceTarget, space: SectionSpaceId) => void;
31
+ }
32
+ export declare function DocumentSpacingProvider({ value, children, }: {
33
+ value: DocumentSpacingValue;
34
+ children: ReactNode;
35
+ }): import("react").JSX.Element;
36
+ export interface SpaceHandleState {
37
+ /** How many steps of the template's own unit sit above this target. */
38
+ steps: number;
39
+ /** Whether this document offers the control at all. */
40
+ adjustable: boolean;
41
+ /** Record a number of steps. Clamped to the catalog on the way in. */
42
+ setSteps: (steps: number) => void;
43
+ }
44
+ /**
45
+ * The space above one target, and the means of changing it.
46
+ *
47
+ * Reads the two stores through the one hook so a caller never has to know which
48
+ * of them holds its answer — a section handle and an entry handle are the same
49
+ * control, and the difference between them is a detail of where the value is
50
+ * written down.
51
+ */
52
+ export declare function useSpace(target: SpaceTarget): SpaceHandleState;
53
+ //# sourceMappingURL=spacing-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spacing-context.d.ts","sourceRoot":"","sources":["../../src/spacing/spacing-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAI3B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GACrB;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACjE;AAID,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAeA;AAED,MAAM,WAAW,gBAAgB;IAC/B,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,UAAU,EAAE,OAAO,CAAC;IACpB,sEAAsE;IACtE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CAgB9D"}
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createContext, useContext, useMemo } from 'react';
3
+ import { formatFor, spaceAtStep, spaceSteps, spacingFor, } from '@resumekit/schema';
4
+ import { useDocumentFormats } from '../presentation-context.js';
5
+ import { RailProvider } from '../rail/rail-store.js';
6
+ const SpacingContext = createContext({});
7
+ export function DocumentSpacingProvider({ value, children, }) {
8
+ const { sections, onChange } = value;
9
+ // Keyed on the values themselves: this is read by every gap in the document,
10
+ // and a fresh object per render of the screen above would re-render all of
11
+ // them for a change none of them can see.
12
+ const published = useMemo(() => ({ sections, onChange }), [sections, onChange]);
13
+ return (_jsx(SpacingContext.Provider, { value: published, children: onChange ? _jsx(RailProvider, { children: children }) : children }));
14
+ }
15
+ /**
16
+ * The space above one target, and the means of changing it.
17
+ *
18
+ * Reads the two stores through the one hook so a caller never has to know which
19
+ * of them holds its answer — a section handle and an entry handle are the same
20
+ * control, and the difference between them is a detail of where the value is
21
+ * written down.
22
+ */
23
+ export function useSpace(target) {
24
+ const { sections, onChange } = useContext(SpacingContext);
25
+ const formats = useDocumentFormats();
26
+ const stored = 'section' in target
27
+ ? spacingFor(sections, target.section)?.space
28
+ : formatFor(formats, target.path)?.space;
29
+ return {
30
+ steps: spaceSteps(stored),
31
+ adjustable: onChange !== undefined,
32
+ // `spaceAtStep` is what stops a drag — arithmetic on a pointer — from
33
+ // expressing anything the catalog does not hold.
34
+ setSteps: (steps) => onChange?.(target, spaceAtStep(steps)),
35
+ };
36
+ }
@@ -0,0 +1,159 @@
1
+ /*
2
+ * Structural spacing: the gap between two parts of the document, as a control.
3
+ *
4
+ * Three rules govern everything here.
5
+ *
6
+ * The space is the element's own MARGIN, and nothing is rendered to hold it.
7
+ * Padding would have been the same distance and a different thing — a role's
8
+ * box would grow and its selection outline with it — and a wrapper element
9
+ * would have been worse still: present in the editor, absent from the preview,
10
+ * and an only-child parent that broke the `:first-of-type` and `+` rules the
11
+ * templates space their entries with.
12
+ *
13
+ * The control lives OUTSIDE the paper, in the container's rail (`rail.css`),
14
+ * which appears when the container is pointed at, focused or selected. A
15
+ * résumé with furniture drawn between its parts reads as a form; the rail sits
16
+ * on the canvas, and the gap itself is shown only while the control is used.
17
+ *
18
+ * It is CHROME, and the space it records is document: the rail never prints,
19
+ * the margin always does.
20
+ */
21
+
22
+ /*
23
+ * How far past the paper's edge a container's rail reaches, and therefore how
24
+ * much room the flow reserves beside itself (see `rail.css`). Declared only in
25
+ * the editor: a document being read draws no rail, and `paged.css` defaults
26
+ * this to zero so that surface is laid out exactly as it was.
27
+ */
28
+ .tpl-editor:not(.tpl-editor--static) {
29
+ --tpl-space-bleed: 56px;
30
+ }
31
+
32
+ /* ── The space: the element's own margin, and no element of its own ──────── */
33
+
34
+ /*
35
+ * A gap is a MARGIN on the résumé's own element, contributed through a custom
36
+ * property that the template's existing `margin-top` rule adds in. Nothing is
37
+ * rendered to hold it.
38
+ *
39
+ * A wrapper was the obvious way to hold a gap and its control together, and it
40
+ * was wrong twice. It is a real element, present in the editor and absent from
41
+ * the preview, so the same document measured differently in the two. And it
42
+ * made every entry an only child, which silently broke `:first-of-type` in
43
+ * Harvard and the `+` rule in Cobalt: the editor drew 4pt above every role
44
+ * where the preview drew 7. A control must not change what the document is.
45
+ *
46
+ * Margin and not padding, for the reason padding was rejected before it: margin
47
+ * sits outside the border box, so an entry's selection outline is the same box
48
+ * whether or not there is space above it, and the space reads as document
49
+ * between two entries rather than as part of the one below.
50
+ */
51
+ /*
52
+ * Hosting a CONTROL. Editor only, and the reason the handle can be positioned
53
+ * at all: `position: relative` with no offsets moves nothing, so an element
54
+ * that merely offers a gap is drawn exactly as the preview draws it.
55
+ */
56
+ [data-gap] {
57
+ position: relative;
58
+ }
59
+
60
+ /*
61
+ * The gap belongs to the element that recorded it, and to NOTHING inside it.
62
+ *
63
+ * This is the whole reason the property is registered. A custom property
64
+ * inherits by default, and both `.tpl-harvard__section` and
65
+ * `.tpl-harvard__entry` add `var(--tpl-space-height)` into their own
66
+ * `margin-top` — so a section carrying a recorded gap handed the same figure
67
+ * down to every entry inside it, and each one added it again. Spacing Experience
68
+ * away from the section above it also pushed its roles apart from each other,
69
+ * by the same amount, for free.
70
+ *
71
+ * `inherits: false` makes an element that has not declared it compute the
72
+ * initial value instead of its parent's. Every consumer then reads only the gap
73
+ * it was given.
74
+ *
75
+ * Registered rather than reset on a marker attribute, because the marker is not
76
+ * always there: `useSpaceSlot` emits `data-gap` only where the document is
77
+ * adjustable, so in the preview and the export an unspaced entry carries no
78
+ * attribute at all and a reset keyed on one would have missed exactly the two
79
+ * surfaces where the extra space became a printed PDF.
80
+ *
81
+ * `<length>` is what the calc below resolves to at computed-value time — steps
82
+ * (a unitless number) times the template's unit (a length). A browser without
83
+ * `@property` ignores this block and inherits as before, which is the old
84
+ * behaviour rather than a broken one.
85
+ */
86
+ @property --tpl-space-height {
87
+ syntax: '<length>';
88
+ inherits: false;
89
+ initial-value: 0px;
90
+ }
91
+
92
+ /*
93
+ * CARRYING space. True of the document, so identically true in the editor, the
94
+ * preview and the export — which is what stops the three from laying the same
95
+ * résumé out differently.
96
+ */
97
+ [data-spaced] {
98
+ /*
99
+ * The recorded space as one length. The template's own margin rule adds this
100
+ * in — `calc(7pt * … + var(--tpl-space-height, 0px))` — so a gap is the
101
+ * template's own rhythm plus what the candidate asked for, and the rule that
102
+ * decides the natural spacing stays the only rule that decides it.
103
+ */
104
+ --tpl-space-height: calc(
105
+ var(--tpl-space-steps, 0) * var(--tpl-space-unit, 8px)
106
+ );
107
+
108
+ /*
109
+ * And the gap must not be able to swallow a page break.
110
+ *
111
+ * The paginator pushes a block onto the next sheet by giving it a top margin,
112
+ * and the block it pushes is very often the first child of a section — a
113
+ * heading. A first child's top margin COLLAPSES with its parent's, and
114
+ * collapsing takes the larger of the two, so a section carrying a recorded
115
+ * gap simply absorbed the push: dragging the gap wider did nothing at all
116
+ * until it exceeded the push, and then everything moved at once. That is what
117
+ * a candidate saw as the space refusing to grow once Education crossed onto
118
+ * the second page.
119
+ *
120
+ * `flow-root` makes this element a formatting context of its own, which is
121
+ * the one thing that stops a child's margin escaping into it. It changes
122
+ * nothing else here: these sections carry no floats, and their own margins
123
+ * still collapse with their siblings' exactly as before.
124
+ */
125
+ display: flow-root;
126
+ /*
127
+ * The gap EASES rather than jumps.
128
+ *
129
+ * A step is a fifth of the template's own rhythm, which is a few pixels — and
130
+ * a few pixels arriving instantly reads as the page flinching rather than as
131
+ * the document opening up.
132
+ *
133
+ * Only the margin, and only here: the paginator coalesces every measurement
134
+ * into one per task, so the frames this animates through cost one measuring
135
+ * pass between them rather than one each.
136
+ */
137
+ transition: margin-top 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
138
+ }
139
+
140
+ /* A drag follows the hand: the margin must not ease behind it. */
141
+ [data-spaced]:has(> .tpl-rail .tpl-rail__space[data-dragging]) {
142
+ transition: none;
143
+ }
144
+
145
+ @media (prefers-reduced-motion: reduce) {
146
+ [data-spaced] {
147
+ transition: none;
148
+ }
149
+ }
150
+
151
+ /*
152
+ * On paper the space is there and the control is not.
153
+ *
154
+ * That split is the whole reason the value is stored on the element and the
155
+ * handle is a separate, absolutely-positioned child: `[data-spaced]`'s padding
156
+ * is document, and prints; everything above is chrome, and does not. Printing
157
+ * happens from the EDITOR too — the PDF export is `window.print()` — so hiding
158
+ * this on the read-only document would be only half the rule.
159
+ */
@@ -0,0 +1,52 @@
1
+ import { type CSSProperties, type ReactNode } from 'react';
2
+ import { type SpaceTarget } from './spacing-context.js';
3
+ /**
4
+ * What an element needs in order to have a gap ABOVE it, and the control for it.
5
+ *
6
+ * Two halves, and neither of them is an element of its own. `rootProps` goes on
7
+ * the résumé's own element — a marker and a step count, no box — and the space
8
+ * itself is drawn by that element's own `margin-top`, which its template already
9
+ * declares and which this only adds to. `handle` is absolutely positioned, so it
10
+ * hangs in the margin above the element and occupies no layout at all.
11
+ *
12
+ * That is the whole point of the shape. A WRAPPER was the obvious way to hold a
13
+ * gap and its control together, and it was wrong twice over: it is a real
14
+ * element, present in the editor and absent from the preview, so the same
15
+ * document measured differently in the two; and it made every entry an only
16
+ * child, which quietly broke `:first-of-type` in Harvard and the `+` rule in
17
+ * Cobalt — the editor drew 4pt above every role where the preview drew 7. A
18
+ * control has no business changing what the document is.
19
+ *
20
+ * MARGIN and not padding: margin sits outside the border box, so the entry's
21
+ * own selection outline is the same box whether or not there is space above it,
22
+ * and the space reads as document between two entries rather than as part of the
23
+ * one below.
24
+ */
25
+ export interface SpaceSlot {
26
+ /**
27
+ * Spread onto the résumé element the space sits above.
28
+ *
29
+ * Two markers, because they answer two questions and are true at different
30
+ * times. `data-gap` says this element HOSTS a control — it is what gives the
31
+ * rail a positioning context, and it exists only where the document can be
32
+ * edited. `data-spaced` says this element CARRIES space, which is a fact
33
+ * about the document and so is identically true in the editor, the preview
34
+ * and the export. Rolling them into one meant the editor styled every gap as
35
+ * though it were open.
36
+ */
37
+ rootProps: {
38
+ 'data-gap'?: string;
39
+ 'data-spaced'?: string;
40
+ 'data-rail-key'?: string;
41
+ style?: CSSProperties;
42
+ };
43
+ /**
44
+ * Rendered INSIDE that element, as chrome: a section's rail, which appears
45
+ * only while the section is pointed at or focused. `null` on a read-only
46
+ * document, and for an entry — whose rail its authoring layer draws, with
47
+ * the entry's own actions beside the space control.
48
+ */
49
+ handle: ReactNode;
50
+ }
51
+ export declare function useSpaceSlot(target: SpaceTarget, label: string): SpaceSlot;
52
+ //# sourceMappingURL=useSpaceSlot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSpaceSlot.d.ts","sourceRoot":"","sources":["../../src/spacing/useSpaceSlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGpE,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,SAAS;IACxB;;;;;;;;;;OAUG;IACH,SAAS,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,aAAa,CAAC;KACvB,CAAC;IACF;;;;;OAKG;IACH,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,CAyC1E"}
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { ContainerRail } from '../rail/ContainerRail.js';
4
+ import { RAIL_KEY } from '../rail/rail-store.js';
5
+ import { useSpace } from './spacing-context.js';
6
+ import './spacing.css';
7
+ export function useSpaceSlot(target, label) {
8
+ const { steps, adjustable } = useSpace(target);
9
+ /*
10
+ * `target` is written inline at nearly every call site — `{ section: 'skills' }`
11
+ * — so it is a new object on every render. Keying the memo on what it SAYS
12
+ * rather than on which object it is keeps the props stable for a document
13
+ * being typed into.
14
+ */
15
+ const key = 'section' in target ? `s:${target.section}` : `p:${target.path}`;
16
+ return useMemo(() => ({
17
+ /*
18
+ * A document being READ with no space gets neither marker, no property
19
+ * and no handle — so the export renderer and the saved-résumé view
20
+ * produce exactly the DOM they always did.
21
+ */
22
+ rootProps: {
23
+ ...(adjustable ? { 'data-gap': '' } : {}),
24
+ ...(adjustable && 'section' in target
25
+ ? { [RAIL_KEY]: `s:${target.section}` }
26
+ : {}),
27
+ ...(steps > 0
28
+ ? {
29
+ 'data-spaced': '',
30
+ style: { '--tpl-space-steps': steps },
31
+ }
32
+ : {}),
33
+ },
34
+ handle: adjustable && 'section' in target ? (_jsx(ContainerRail, { railKey: `s:${target.section}`, toolbarLabel: `${label} — section actions`, space: { target, label } })) : null,
35
+ }),
36
+ // eslint-disable-next-line react-hooks/exhaustive-deps
37
+ [steps, adjustable, key, label]);
38
+ }
@@ -0,0 +1,13 @@
1
+ import type { ResumeObject, TemplateId } from '@resumekit/schema';
2
+ export interface StaticOptions {
3
+ /** The document's language, e.g. `es`; the template's default otherwise. */
4
+ language?: string;
5
+ /**
6
+ * Draw the page as a picture of itself, for embedding in another page: links
7
+ * are text, headings stay out of the host's outline, no editor attributes.
8
+ */
9
+ picture?: boolean;
10
+ }
11
+ export type RenderStatic = (template: TemplateId, resume: ResumeObject, options?: StaticOptions) => string;
12
+ export declare const renderStatic: RenderStatic;
13
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/static/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAElE,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,CACzB,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa,KACpB,MAAM,CAAC;AAEZ,MAAM,CAAC,OAAO,CAAC,MAAM,YAAY,EAAE,YAAY,CAAC"}
@@ -0,0 +1 @@
1
+ export {};