@resumekit/react 0.0.0-stage → 0.1.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.
- package/LICENSE +21 -0
- package/README.md +74 -2
- package/dist/PagedSheet.d.ts +63 -0
- package/dist/PagedSheet.d.ts.map +1 -0
- package/dist/PagedSheet.js +584 -0
- package/dist/TemplateDocument.d.ts +33 -0
- package/dist/TemplateDocument.d.ts.map +1 -0
- package/dist/TemplateDocument.js +33 -0
- package/dist/autosave-context.d.ts +37 -0
- package/dist/autosave-context.d.ts.map +1 -0
- package/dist/autosave-context.js +24 -0
- package/dist/collections/AuthoredItems.d.ts +9 -0
- package/dist/collections/AuthoredItems.d.ts.map +1 -0
- package/dist/collections/AuthoredItems.js +116 -0
- package/dist/collections/Collection.d.ts +48 -0
- package/dist/collections/Collection.d.ts.map +1 -0
- package/dist/collections/Collection.js +24 -0
- package/dist/collections/CollectionItems.d.ts +94 -0
- package/dist/collections/CollectionItems.d.ts.map +1 -0
- package/dist/collections/CollectionItems.js +91 -0
- package/dist/collections/EntryOverlay.d.ts +38 -0
- package/dist/collections/EntryOverlay.d.ts.map +1 -0
- package/dist/collections/EntryOverlay.js +51 -0
- package/dist/collections/SortableItems.d.ts +52 -0
- package/dist/collections/SortableItems.d.ts.map +1 -0
- package/dist/collections/SortableItems.js +80 -0
- package/dist/collections/authoring-context.d.ts +69 -0
- package/dist/collections/authoring-context.d.ts.map +1 -0
- package/dist/collections/authoring-context.js +36 -0
- package/dist/collections/collection.css +462 -0
- package/dist/collections/entry-text.d.ts +23 -0
- package/dist/collections/entry-text.d.ts.map +1 -0
- package/dist/collections/entry-text.js +35 -0
- package/dist/collections/icons.d.ts +53 -0
- package/dist/collections/icons.d.ts.map +1 -0
- package/dist/collections/icons.js +56 -0
- package/dist/collections/library/LibraryAction.d.ts +24 -0
- package/dist/collections/library/LibraryAction.d.ts.map +1 -0
- package/dist/collections/library/LibraryAction.js +122 -0
- package/dist/collections/library/LibraryPicker.d.ts +42 -0
- package/dist/collections/library/LibraryPicker.d.ts.map +1 -0
- package/dist/collections/library/LibraryPicker.js +94 -0
- package/dist/collections/library/library.css +435 -0
- package/dist/collections/overlay-context.d.ts +34 -0
- package/dist/collections/overlay-context.d.ts.map +1 -0
- package/dist/collections/overlay-context.js +13 -0
- package/dist/collections/preload.d.ts +19 -0
- package/dist/collections/preload.d.ts.map +1 -0
- package/dist/collections/preload.js +23 -0
- package/dist/collections/selection-context.d.ts +25 -0
- package/dist/collections/selection-context.d.ts.map +1 -0
- package/dist/collections/selection-context.js +49 -0
- package/dist/collections/useCollection.d.ts +58 -0
- package/dist/collections/useCollection.d.ts.map +1 -0
- package/dist/collections/useCollection.js +90 -0
- package/dist/collections/useCustomEntries.d.ts +18 -0
- package/dist/collections/useCustomEntries.d.ts.map +1 -0
- package/dist/collections/useCustomEntries.js +56 -0
- package/dist/collections/useSectionCollection.d.ts +48 -0
- package/dist/collections/useSectionCollection.d.ts.map +1 -0
- package/dist/collections/useSectionCollection.js +169 -0
- package/dist/document.css +185 -0
- package/dist/export-bundle/bundle.css +2 -0
- package/dist/export-bundle/bundle.js +67 -0
- package/dist/fields/date-issues-context.d.ts +20 -0
- package/dist/fields/date-issues-context.d.ts.map +1 -0
- package/dist/fields/date-issues-context.js +68 -0
- package/dist/fields/field-registry.d.ts +163 -0
- package/dist/fields/field-registry.d.ts.map +1 -0
- package/dist/fields/field-registry.js +175 -0
- package/dist/fonts/README.md +207 -0
- package/dist/fonts/arimo-400.woff2 +0 -0
- package/dist/fonts/arimo-400i.woff2 +0 -0
- package/dist/fonts/arimo-700.woff2 +0 -0
- package/dist/fonts/arimo-700i.woff2 +0 -0
- package/dist/fonts/bitter-400.woff2 +0 -0
- package/dist/fonts/bitter-400i.woff2 +0 -0
- package/dist/fonts/bitter-700.woff2 +0 -0
- package/dist/fonts/bitter-700i.woff2 +0 -0
- package/dist/fonts/cabin-700.woff2 +0 -0
- package/dist/fonts/carlito-400.woff2 +0 -0
- package/dist/fonts/carlito-400i.woff2 +0 -0
- package/dist/fonts/carlito-700.woff2 +0 -0
- package/dist/fonts/carlito-700i.woff2 +0 -0
- package/dist/fonts/clearsans-400.woff2 +0 -0
- package/dist/fonts/clearsans-400i.woff2 +0 -0
- package/dist/fonts/cochineal-400.woff2 +0 -0
- package/dist/fonts/cochineal-400i.woff2 +0 -0
- package/dist/fonts/cochineal-700.woff2 +0 -0
- package/dist/fonts/ebgaramond-400.woff2 +0 -0
- package/dist/fonts/ebgaramond-400i.woff2 +0 -0
- package/dist/fonts/ebgaramond-700.woff2 +0 -0
- package/dist/fonts/ebgaramond-700i.woff2 +0 -0
- package/dist/fonts/fonts.css +622 -0
- package/dist/fonts/gelasio-400.woff2 +0 -0
- package/dist/fonts/gelasio-400i.woff2 +0 -0
- package/dist/fonts/gelasio-700.woff2 +0 -0
- package/dist/fonts/gelasio-700i.woff2 +0 -0
- package/dist/fonts/heros-400.woff2 +0 -0
- package/dist/fonts/heros-400i.woff2 +0 -0
- package/dist/fonts/heros-700.woff2 +0 -0
- package/dist/fonts/heros-700i.woff2 +0 -0
- package/dist/fonts/inconsolata-400.woff2 +0 -0
- package/dist/fonts/lato-100.woff2 +0 -0
- package/dist/fonts/lato-300.woff2 +0 -0
- package/dist/fonts/lato-300i.woff2 +0 -0
- package/dist/fonts/lato-400.woff2 +0 -0
- package/dist/fonts/lato-400i.woff2 +0 -0
- package/dist/fonts/lato-700.woff2 +0 -0
- package/dist/fonts/lato-700i.woff2 +0 -0
- package/dist/fonts/licenses/arimo-OFL.txt +93 -0
- package/dist/fonts/licenses/bitter-OFL.txt +94 -0
- package/dist/fonts/licenses/cabin-OFL.txt +93 -0
- package/dist/fonts/licenses/carlito-OFL.txt +94 -0
- package/dist/fonts/licenses/clearsans-APACHE-2.0.txt +205 -0
- package/dist/fonts/licenses/cochineal-OFL.txt +96 -0
- package/dist/fonts/licenses/ebgaramond-OFL.txt +93 -0
- package/dist/fonts/licenses/gelasio-OFL.txt +93 -0
- package/dist/fonts/licenses/heros-GUST-FONT-LICENSE.txt +30 -0
- package/dist/fonts/licenses/inconsolata-OFL.txt +93 -0
- package/dist/fonts/licenses/latinmodern-GUST-FONT-LICENSE.txt +35 -0
- package/dist/fonts/licenses/lato-OFL.txt +93 -0
- package/dist/fonts/licenses/ptserif-OFL.txt +93 -0
- package/dist/fonts/licenses/raleway-OFL.txt +93 -0
- package/dist/fonts/licenses/roboto-OFL.txt +93 -0
- package/dist/fonts/licenses/robotocondensed-OFL.txt +93 -0
- package/dist/fonts/licenses/robotoslab-APACHE-2.0.txt +205 -0
- package/dist/fonts/licenses/sourcesans3-OFL.txt +93 -0
- package/dist/fonts/licenses/tinos-OFL.txt +93 -0
- package/dist/fonts/lmmono-400.woff2 +0 -0
- package/dist/fonts/lmroman-400.woff2 +0 -0
- package/dist/fonts/lmroman-400i.woff2 +0 -0
- package/dist/fonts/lmroman-700.woff2 +0 -0
- package/dist/fonts/lmroman-700i.woff2 +0 -0
- package/dist/fonts/lmromancaps-400.woff2 +0 -0
- package/dist/fonts/ptserif-400.woff2 +0 -0
- package/dist/fonts/ptserif-400i.woff2 +0 -0
- package/dist/fonts/ptserif-700.woff2 +0 -0
- package/dist/fonts/ptserif-700i.woff2 +0 -0
- package/dist/fonts/raleway-300.woff2 +0 -0
- package/dist/fonts/raleway-400.woff2 +0 -0
- package/dist/fonts/raleway-400i.woff2 +0 -0
- package/dist/fonts/raleway-500.woff2 +0 -0
- package/dist/fonts/raleway-700.woff2 +0 -0
- package/dist/fonts/roboto-100.woff2 +0 -0
- package/dist/fonts/roboto-300.woff2 +0 -0
- package/dist/fonts/roboto-300i.woff2 +0 -0
- package/dist/fonts/roboto-400.woff2 +0 -0
- package/dist/fonts/roboto-400i.woff2 +0 -0
- package/dist/fonts/roboto-700.woff2 +0 -0
- package/dist/fonts/robotocondensed-400.woff2 +0 -0
- package/dist/fonts/robotocondensed-400i.woff2 +0 -0
- package/dist/fonts/robotocondensed-700.woff2 +0 -0
- package/dist/fonts/robotocondensed-700i.woff2 +0 -0
- package/dist/fonts/robotoslab-700.woff2 +0 -0
- package/dist/fonts/sourcesans3-300.woff2 +0 -0
- package/dist/fonts/sourcesans3-300i.woff2 +0 -0
- package/dist/fonts/sourcesans3-400.woff2 +0 -0
- package/dist/fonts/sourcesans3-400i.woff2 +0 -0
- package/dist/fonts/sourcesans3-700.woff2 +0 -0
- package/dist/fonts/tinos-400.woff2 +0 -0
- package/dist/fonts/tinos-400i.woff2 +0 -0
- package/dist/fonts/tinos-700.woff2 +0 -0
- package/dist/fonts/tinos-700i.woff2 +0 -0
- package/dist/i18n/README.md +52 -0
- package/dist/i18n/catalog.d.ts +39 -0
- package/dist/i18n/catalog.d.ts.map +1 -0
- package/dist/i18n/catalog.js +43 -0
- package/dist/i18n/format.d.ts +14 -0
- package/dist/i18n/format.d.ts.map +1 -0
- package/dist/i18n/format.js +38 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/locale-context.d.ts +43 -0
- package/dist/i18n/locale-context.d.ts.map +1 -0
- package/dist/i18n/locale-context.js +74 -0
- package/dist/i18n/locales/en.json +337 -0
- package/dist/i18n/locales/es.json +337 -0
- package/dist/index.d.ts +101 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +99 -0
- package/dist/kit/BulletSkillGroup.d.ts +20 -0
- package/dist/kit/BulletSkillGroup.d.ts.map +1 -0
- package/dist/kit/BulletSkillGroup.js +25 -0
- package/dist/kit/DescribedEntries.d.ts +41 -0
- package/dist/kit/DescribedEntries.d.ts.map +1 -0
- package/dist/kit/DescribedEntries.js +57 -0
- package/dist/kit/DocumentSection.d.ts +58 -0
- package/dist/kit/DocumentSection.d.ts.map +1 -0
- package/dist/kit/DocumentSection.js +38 -0
- package/dist/kit/GridSkillGroup.d.ts +12 -0
- package/dist/kit/GridSkillGroup.d.ts.map +1 -0
- package/dist/kit/GridSkillGroup.js +14 -0
- package/dist/kit/Heading.d.ts +11 -0
- package/dist/kit/Heading.d.ts.map +1 -0
- package/dist/kit/Heading.js +10 -0
- package/dist/kit/InitialsAvatar.d.ts +17 -0
- package/dist/kit/InitialsAvatar.d.ts.map +1 -0
- package/dist/kit/InitialsAvatar.js +18 -0
- package/dist/kit/InitialsChip.d.ts +16 -0
- package/dist/kit/InitialsChip.d.ts.map +1 -0
- package/dist/kit/InitialsChip.js +16 -0
- package/dist/kit/InlineSkillGroup.d.ts +22 -0
- package/dist/kit/InlineSkillGroup.d.ts.map +1 -0
- package/dist/kit/InlineSkillGroup.js +16 -0
- package/dist/kit/LabelledSkillGroup.d.ts +24 -0
- package/dist/kit/LabelledSkillGroup.d.ts.map +1 -0
- package/dist/kit/LabelledSkillGroup.js +20 -0
- package/dist/kit/LanguageList.d.ts +28 -0
- package/dist/kit/LanguageList.d.ts.map +1 -0
- package/dist/kit/LanguageList.js +56 -0
- package/dist/kit/Separator.d.ts +20 -0
- package/dist/kit/Separator.d.ts.map +1 -0
- package/dist/kit/Separator.js +21 -0
- package/dist/kit/TagSkillGroup.d.ts +8 -0
- package/dist/kit/TagSkillGroup.d.ts.map +1 -0
- package/dist/kit/TagSkillGroup.js +10 -0
- package/dist/kit/avatar.css +42 -0
- package/dist/kit/contact-icons.css +70 -0
- package/dist/kit/contact.d.ts +16 -0
- package/dist/kit/contact.d.ts.map +1 -0
- package/dist/kit/contact.js +18 -0
- package/dist/kit/described.css +114 -0
- package/dist/kit/documentStyle.d.ts +12 -0
- package/dist/kit/documentStyle.d.ts.map +1 -0
- package/dist/kit/documentStyle.js +24 -0
- package/dist/kit/heading.css +17 -0
- package/dist/kit/keywords.css +127 -0
- package/dist/kit/language.css +104 -0
- package/dist/kit/layout.css +16 -0
- package/dist/kit/monogram.d.ts +6 -0
- package/dist/kit/monogram.d.ts.map +1 -0
- package/dist/kit/monogram.js +12 -0
- package/dist/kit/panel.css +26 -0
- package/dist/kit/skill-grid.css +93 -0
- package/dist/kit/skill-tags.css +36 -0
- package/dist/kit/textShapes.d.ts +24 -0
- package/dist/kit/textShapes.d.ts.map +1 -0
- package/dist/kit/textShapes.js +32 -0
- package/dist/letter/LetterDocument.d.ts +13 -0
- package/dist/letter/LetterDocument.d.ts.map +1 -0
- package/dist/letter/LetterDocument.js +12 -0
- package/dist/letter/letter.css +75 -0
- package/dist/nodes/AuthoredBullets.d.ts +22 -0
- package/dist/nodes/AuthoredBullets.d.ts.map +1 -0
- package/dist/nodes/AuthoredBullets.js +101 -0
- package/dist/nodes/CustomSections.d.ts +42 -0
- package/dist/nodes/CustomSections.d.ts.map +1 -0
- package/dist/nodes/CustomSections.js +27 -0
- package/dist/nodes/EditableBulletList.d.ts +15 -0
- package/dist/nodes/EditableBulletList.d.ts.map +1 -0
- package/dist/nodes/EditableBulletList.js +98 -0
- package/dist/nodes/EditableInlineList.d.ts +27 -0
- package/dist/nodes/EditableInlineList.d.ts.map +1 -0
- package/dist/nodes/EditableInlineList.js +50 -0
- package/dist/nodes/EditableText.d.ts +79 -0
- package/dist/nodes/EditableText.d.ts.map +1 -0
- package/dist/nodes/EditableText.js +113 -0
- package/dist/nodes/LinkField.d.ts +103 -0
- package/dist/nodes/LinkField.d.ts.map +1 -0
- package/dist/nodes/LinkField.js +277 -0
- package/dist/nodes/PlainTextField.d.ts +38 -0
- package/dist/nodes/PlainTextField.d.ts.map +1 -0
- package/dist/nodes/PlainTextField.js +72 -0
- package/dist/nodes/formatting.d.ts +34 -0
- package/dist/nodes/formatting.d.ts.map +1 -0
- package/dist/nodes/formatting.js +24 -0
- package/dist/nodes/link-field.css +200 -0
- package/dist/nodes/locked.d.ts +38 -0
- package/dist/nodes/locked.d.ts.map +1 -0
- package/dist/nodes/locked.js +65 -0
- package/dist/nodes/template-node.css +720 -0
- package/dist/paged.css +265 -0
- package/dist/pagination.d.ts +93 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +167 -0
- package/dist/picture-context.d.ts +6 -0
- package/dist/picture-context.d.ts.map +1 -0
- package/dist/picture-context.js +14 -0
- package/dist/presentation-context.d.ts +45 -0
- package/dist/presentation-context.d.ts.map +1 -0
- package/dist/presentation-context.js +44 -0
- package/dist/presented.d.ts +16 -0
- package/dist/presented.d.ts.map +1 -0
- package/dist/presented.js +22 -0
- package/dist/rail/ContainerRail.d.ts +29 -0
- package/dist/rail/ContainerRail.d.ts.map +1 -0
- package/dist/rail/ContainerRail.js +50 -0
- package/dist/rail/EntryActions.d.ts +19 -0
- package/dist/rail/EntryActions.d.ts.map +1 -0
- package/dist/rail/EntryActions.js +17 -0
- package/dist/rail/rail-store.d.ts +42 -0
- package/dist/rail/rail-store.d.ts.map +1 -0
- package/dist/rail/rail-store.js +107 -0
- package/dist/rail/rail.css +188 -0
- package/dist/rail/useSpaceDrag.d.ts +30 -0
- package/dist/rail/useSpaceDrag.d.ts.map +1 -0
- package/dist/rail/useSpaceDrag.js +154 -0
- package/dist/registry.d.ts +35 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +74 -0
- package/dist/spacing/spacing-context.d.ts +53 -0
- package/dist/spacing/spacing-context.d.ts.map +1 -0
- package/dist/spacing/spacing-context.js +36 -0
- package/dist/spacing/spacing.css +159 -0
- package/dist/spacing/useSpaceSlot.d.ts +52 -0
- package/dist/spacing/useSpaceSlot.d.ts.map +1 -0
- package/dist/spacing/useSpaceSlot.js +38 -0
- package/dist/static/api.d.ts +13 -0
- package/dist/static/api.d.ts.map +1 -0
- package/dist/static/api.js +1 -0
- package/dist/static/static.mjs +33779 -0
- package/dist/static/templates/academic.css +1 -0
- package/dist/static/templates/alta.css +1 -0
- package/dist/static/templates/classic.css +1 -0
- package/dist/static/templates/cobalt.css +1 -0
- package/dist/static/templates/compact.css +1 -0
- package/dist/static/templates/contemporary.css +1 -0
- package/dist/static/templates/creative.css +1 -0
- package/dist/static/templates/crimson.css +1 -0
- package/dist/static/templates/curve.css +1 -0
- package/dist/static/templates/double-column-logos.css +1 -0
- package/dist/static/templates/double-column.css +1 -0
- package/dist/static/templates/elegant-logos.css +1 -0
- package/dist/static/templates/elegant.css +1 -0
- package/dist/static/templates/engineer.css +1 -0
- package/dist/static/templates/executive.css +1 -0
- package/dist/static/templates/harvard.css +1 -0
- package/dist/static/templates/hipster.css +1 -0
- package/dist/static/templates/ivy.css +1 -0
- package/dist/static/templates/meridian.css +1 -0
- package/dist/static/templates/modern.css +1 -0
- package/dist/static/templates/polished.css +1 -0
- package/dist/static/templates/portrait.css +1 -0
- package/dist/static/templates/prism.css +1 -0
- package/dist/static/templates/scholar.css +1 -0
- package/dist/static/templates/split.css +1 -0
- package/dist/static/templates/stylish.css +1 -0
- package/dist/static/templates/timeline.css +1 -0
- package/dist/static/templates.css +1 -0
- package/dist/templates/academic/AcademicDocument.d.ts +6 -0
- package/dist/templates/academic/AcademicDocument.d.ts.map +1 -0
- package/dist/templates/academic/AcademicDocument.js +29 -0
- package/dist/templates/academic/academic.css +284 -0
- package/dist/templates/academic/entries.d.ts +22 -0
- package/dist/templates/academic/entries.d.ts.map +1 -0
- package/dist/templates/academic/entries.js +17 -0
- package/dist/templates/alta/AltaDocument.d.ts +6 -0
- package/dist/templates/alta/AltaDocument.d.ts.map +1 -0
- package/dist/templates/alta/AltaDocument.js +29 -0
- package/dist/templates/alta/alta.css +413 -0
- package/dist/templates/alta/entries.d.ts +22 -0
- package/dist/templates/alta/entries.d.ts.map +1 -0
- package/dist/templates/alta/entries.js +17 -0
- package/dist/templates/classic/ClassicDocument.d.ts +6 -0
- package/dist/templates/classic/ClassicDocument.d.ts.map +1 -0
- package/dist/templates/classic/ClassicDocument.js +26 -0
- package/dist/templates/classic/classic.css +251 -0
- package/dist/templates/classic/entries.d.ts +22 -0
- package/dist/templates/classic/entries.d.ts.map +1 -0
- package/dist/templates/classic/entries.js +17 -0
- package/dist/templates/cobalt/CobaltDocument.d.ts +6 -0
- package/dist/templates/cobalt/CobaltDocument.d.ts.map +1 -0
- package/dist/templates/cobalt/CobaltDocument.js +28 -0
- package/dist/templates/cobalt/cobalt.css +478 -0
- package/dist/templates/cobalt/crest.d.ts +6 -0
- package/dist/templates/cobalt/crest.d.ts.map +1 -0
- package/dist/templates/cobalt/crest.js +8 -0
- package/dist/templates/cobalt/entries.d.ts +22 -0
- package/dist/templates/cobalt/entries.d.ts.map +1 -0
- package/dist/templates/cobalt/entries.js +17 -0
- package/dist/templates/compact/CompactDocument.d.ts +6 -0
- package/dist/templates/compact/CompactDocument.d.ts.map +1 -0
- package/dist/templates/compact/CompactDocument.js +28 -0
- package/dist/templates/compact/compact.css +240 -0
- package/dist/templates/compact/entries.d.ts +22 -0
- package/dist/templates/compact/entries.d.ts.map +1 -0
- package/dist/templates/compact/entries.js +17 -0
- package/dist/templates/contemporary/ContemporaryDocument.d.ts +6 -0
- package/dist/templates/contemporary/ContemporaryDocument.d.ts.map +1 -0
- package/dist/templates/contemporary/ContemporaryDocument.js +29 -0
- package/dist/templates/contemporary/contemporary.css +411 -0
- package/dist/templates/contemporary/entries.d.ts +22 -0
- package/dist/templates/contemporary/entries.d.ts.map +1 -0
- package/dist/templates/contemporary/entries.js +17 -0
- package/dist/templates/creative/CreativeDocument.d.ts +6 -0
- package/dist/templates/creative/CreativeDocument.d.ts.map +1 -0
- package/dist/templates/creative/CreativeDocument.js +29 -0
- package/dist/templates/creative/creative.css +326 -0
- package/dist/templates/creative/entries.d.ts +22 -0
- package/dist/templates/creative/entries.d.ts.map +1 -0
- package/dist/templates/creative/entries.js +17 -0
- package/dist/templates/crimson/CrimsonDocument.d.ts +6 -0
- package/dist/templates/crimson/CrimsonDocument.d.ts.map +1 -0
- package/dist/templates/crimson/CrimsonDocument.js +30 -0
- package/dist/templates/crimson/crimson.css +301 -0
- package/dist/templates/crimson/entries.d.ts +22 -0
- package/dist/templates/crimson/entries.d.ts.map +1 -0
- package/dist/templates/crimson/entries.js +17 -0
- package/dist/templates/curve/CurveDocument.d.ts +6 -0
- package/dist/templates/curve/CurveDocument.d.ts.map +1 -0
- package/dist/templates/curve/CurveDocument.js +29 -0
- package/dist/templates/curve/curve.css +330 -0
- package/dist/templates/curve/entries.d.ts +22 -0
- package/dist/templates/curve/entries.d.ts.map +1 -0
- package/dist/templates/curve/entries.js +17 -0
- package/dist/templates/double-column/DoubleColumnDocument.d.ts +6 -0
- package/dist/templates/double-column/DoubleColumnDocument.d.ts.map +1 -0
- package/dist/templates/double-column/DoubleColumnDocument.js +29 -0
- package/dist/templates/double-column/double-column.css +331 -0
- package/dist/templates/double-column/entries.d.ts +22 -0
- package/dist/templates/double-column/entries.d.ts.map +1 -0
- package/dist/templates/double-column/entries.js +17 -0
- package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts +6 -0
- package/dist/templates/double-column-logos/DoubleColumnLogosDocument.d.ts.map +1 -0
- package/dist/templates/double-column-logos/DoubleColumnLogosDocument.js +28 -0
- package/dist/templates/double-column-logos/double-column-logos.css +333 -0
- package/dist/templates/double-column-logos/entries.d.ts +22 -0
- package/dist/templates/double-column-logos/entries.d.ts.map +1 -0
- package/dist/templates/double-column-logos/entries.js +18 -0
- package/dist/templates/elegant/ElegantDocument.d.ts +6 -0
- package/dist/templates/elegant/ElegantDocument.d.ts.map +1 -0
- package/dist/templates/elegant/ElegantDocument.js +31 -0
- package/dist/templates/elegant/elegant.css +358 -0
- package/dist/templates/elegant/entries.d.ts +22 -0
- package/dist/templates/elegant/entries.d.ts.map +1 -0
- package/dist/templates/elegant/entries.js +17 -0
- package/dist/templates/elegant-logos/ElegantLogosDocument.d.ts +6 -0
- package/dist/templates/elegant-logos/ElegantLogosDocument.d.ts.map +1 -0
- package/dist/templates/elegant-logos/ElegantLogosDocument.js +30 -0
- package/dist/templates/elegant-logos/elegant-logos.css +370 -0
- package/dist/templates/elegant-logos/entries.d.ts +22 -0
- package/dist/templates/elegant-logos/entries.d.ts.map +1 -0
- package/dist/templates/elegant-logos/entries.js +18 -0
- package/dist/templates/engineer/EngineerDocument.d.ts +6 -0
- package/dist/templates/engineer/EngineerDocument.d.ts.map +1 -0
- package/dist/templates/engineer/EngineerDocument.js +26 -0
- package/dist/templates/engineer/engineer.css +261 -0
- package/dist/templates/engineer/entries.d.ts +22 -0
- package/dist/templates/engineer/entries.d.ts.map +1 -0
- package/dist/templates/engineer/entries.js +17 -0
- package/dist/templates/executive/ExecutiveDocument.d.ts +6 -0
- package/dist/templates/executive/ExecutiveDocument.d.ts.map +1 -0
- package/dist/templates/executive/ExecutiveDocument.js +29 -0
- package/dist/templates/executive/entries.d.ts +22 -0
- package/dist/templates/executive/entries.d.ts.map +1 -0
- package/dist/templates/executive/entries.js +17 -0
- package/dist/templates/executive/executive.css +394 -0
- package/dist/templates/harvard/HarvardDocument.d.ts +6 -0
- package/dist/templates/harvard/HarvardDocument.d.ts.map +1 -0
- package/dist/templates/harvard/HarvardDocument.js +25 -0
- package/dist/templates/harvard/entries.d.ts +28 -0
- package/dist/templates/harvard/entries.d.ts.map +1 -0
- package/dist/templates/harvard/entries.js +22 -0
- package/dist/templates/harvard/harvard.css +436 -0
- package/dist/templates/hipster/HipsterDocument.d.ts +6 -0
- package/dist/templates/hipster/HipsterDocument.d.ts.map +1 -0
- package/dist/templates/hipster/HipsterDocument.js +30 -0
- package/dist/templates/hipster/entries.d.ts +22 -0
- package/dist/templates/hipster/entries.d.ts.map +1 -0
- package/dist/templates/hipster/entries.js +17 -0
- package/dist/templates/hipster/hipster.css +442 -0
- package/dist/templates/ivy/IvyDocument.d.ts +6 -0
- package/dist/templates/ivy/IvyDocument.d.ts.map +1 -0
- package/dist/templates/ivy/IvyDocument.js +26 -0
- package/dist/templates/ivy/entries.d.ts +22 -0
- package/dist/templates/ivy/entries.d.ts.map +1 -0
- package/dist/templates/ivy/entries.js +17 -0
- package/dist/templates/ivy/ivy.css +292 -0
- package/dist/templates/meridian/MeridianDocument.d.ts +6 -0
- package/dist/templates/meridian/MeridianDocument.d.ts.map +1 -0
- package/dist/templates/meridian/MeridianDocument.js +28 -0
- package/dist/templates/meridian/entries.d.ts +22 -0
- package/dist/templates/meridian/entries.d.ts.map +1 -0
- package/dist/templates/meridian/entries.js +17 -0
- package/dist/templates/meridian/meridian.css +431 -0
- package/dist/templates/modern/ModernDocument.d.ts +6 -0
- package/dist/templates/modern/ModernDocument.d.ts.map +1 -0
- package/dist/templates/modern/ModernDocument.js +29 -0
- package/dist/templates/modern/entries.d.ts +22 -0
- package/dist/templates/modern/entries.d.ts.map +1 -0
- package/dist/templates/modern/entries.js +17 -0
- package/dist/templates/modern/modern.css +309 -0
- package/dist/templates/polished/PolishedDocument.d.ts +6 -0
- package/dist/templates/polished/PolishedDocument.d.ts.map +1 -0
- package/dist/templates/polished/PolishedDocument.js +28 -0
- package/dist/templates/polished/entries.d.ts +22 -0
- package/dist/templates/polished/entries.d.ts.map +1 -0
- package/dist/templates/polished/entries.js +17 -0
- package/dist/templates/polished/polished.css +327 -0
- package/dist/templates/portrait/PortraitDocument.d.ts +6 -0
- package/dist/templates/portrait/PortraitDocument.d.ts.map +1 -0
- package/dist/templates/portrait/PortraitDocument.js +30 -0
- package/dist/templates/portrait/entries.d.ts +22 -0
- package/dist/templates/portrait/entries.d.ts.map +1 -0
- package/dist/templates/portrait/entries.js +17 -0
- package/dist/templates/portrait/portrait.css +427 -0
- package/dist/templates/prism/PrismDocument.d.ts +6 -0
- package/dist/templates/prism/PrismDocument.d.ts.map +1 -0
- package/dist/templates/prism/PrismDocument.js +35 -0
- package/dist/templates/prism/entries.d.ts +22 -0
- package/dist/templates/prism/entries.d.ts.map +1 -0
- package/dist/templates/prism/entries.js +17 -0
- package/dist/templates/prism/prism.css +314 -0
- package/dist/templates/scholar/ScholarDocument.d.ts +6 -0
- package/dist/templates/scholar/ScholarDocument.d.ts.map +1 -0
- package/dist/templates/scholar/ScholarDocument.js +27 -0
- package/dist/templates/scholar/entries.d.ts +22 -0
- package/dist/templates/scholar/entries.d.ts.map +1 -0
- package/dist/templates/scholar/entries.js +17 -0
- package/dist/templates/scholar/scholar.css +279 -0
- package/dist/templates/skills.d.ts +19 -0
- package/dist/templates/skills.d.ts.map +1 -0
- package/dist/templates/skills.js +19 -0
- package/dist/templates/split/SplitDocument.d.ts +6 -0
- package/dist/templates/split/SplitDocument.d.ts.map +1 -0
- package/dist/templates/split/SplitDocument.js +29 -0
- package/dist/templates/split/entries.d.ts +22 -0
- package/dist/templates/split/entries.d.ts.map +1 -0
- package/dist/templates/split/entries.js +17 -0
- package/dist/templates/split/split.css +337 -0
- package/dist/templates/stylish/StylishDocument.d.ts +6 -0
- package/dist/templates/stylish/StylishDocument.d.ts.map +1 -0
- package/dist/templates/stylish/StylishDocument.js +29 -0
- package/dist/templates/stylish/entries.d.ts +22 -0
- package/dist/templates/stylish/entries.d.ts.map +1 -0
- package/dist/templates/stylish/entries.js +17 -0
- package/dist/templates/stylish/stylish.css +340 -0
- package/dist/templates/timeline/TimelineDocument.d.ts +6 -0
- package/dist/templates/timeline/TimelineDocument.d.ts.map +1 -0
- package/dist/templates/timeline/TimelineDocument.js +27 -0
- package/dist/templates/timeline/entries.d.ts +22 -0
- package/dist/templates/timeline/entries.d.ts.map +1 -0
- package/dist/templates/timeline/entries.js +17 -0
- package/dist/templates/timeline/timeline.css +295 -0
- package/dist/useFitZoom.d.ts +99 -0
- package/dist/useFitZoom.d.ts.map +1 -0
- package/dist/useFitZoom.js +171 -0
- package/package.json +81 -3
- package/src/PagedSheet.tsx +792 -0
- package/src/TemplateDocument.tsx +112 -0
- package/src/autosave-context.tsx +67 -0
- package/src/collections/AuthoredItems.tsx +199 -0
- package/src/collections/Collection.tsx +73 -0
- package/src/collections/CollectionItems.tsx +318 -0
- package/src/collections/EntryOverlay.tsx +162 -0
- package/src/collections/SortableItems.tsx +167 -0
- package/src/collections/authoring-context.tsx +140 -0
- package/src/collections/entry-text.ts +41 -0
- package/src/collections/icons.tsx +83 -0
- package/src/collections/library/LibraryAction.tsx +200 -0
- package/src/collections/library/LibraryPicker.tsx +325 -0
- package/src/collections/overlay-context.tsx +49 -0
- package/src/collections/preload.ts +23 -0
- package/src/collections/selection-context.tsx +88 -0
- package/src/collections/useCollection.ts +133 -0
- package/src/collections/useCustomEntries.ts +84 -0
- package/src/collections/useSectionCollection.ts +268 -0
- package/src/compiler/emit.ts +736 -0
- package/src/compiler/schema.ts +689 -0
- package/src/export/entry.tsx +177 -0
- package/src/fields/date-issues-context.tsx +105 -0
- package/src/fields/field-registry.tsx +358 -0
- package/src/i18n/catalog.ts +81 -0
- package/src/i18n/format.ts +50 -0
- package/src/i18n/index.ts +21 -0
- package/src/i18n/locale-context.tsx +135 -0
- package/src/index.ts +156 -0
- package/src/kit/BulletSkillGroup.tsx +37 -0
- package/src/kit/DescribedEntries.tsx +132 -0
- package/src/kit/DocumentSection.tsx +97 -0
- package/src/kit/GridSkillGroup.tsx +17 -0
- package/src/kit/Heading.tsx +17 -0
- package/src/kit/InitialsAvatar.tsx +31 -0
- package/src/kit/InitialsChip.tsx +29 -0
- package/src/kit/InlineSkillGroup.tsx +41 -0
- package/src/kit/LabelledSkillGroup.tsx +68 -0
- package/src/kit/LanguageList.tsx +148 -0
- package/src/kit/Separator.tsx +30 -0
- package/src/kit/TagSkillGroup.tsx +19 -0
- package/src/kit/contact.ts +34 -0
- package/src/kit/documentStyle.ts +33 -0
- package/src/kit/monogram.ts +11 -0
- package/src/kit/textShapes.tsx +61 -0
- package/src/letter/LetterDocument.tsx +33 -0
- package/src/nodes/AuthoredBullets.tsx +253 -0
- package/src/nodes/CustomSections.tsx +138 -0
- package/src/nodes/EditableBulletList.tsx +186 -0
- package/src/nodes/EditableInlineList.tsx +109 -0
- package/src/nodes/EditableText.tsx +261 -0
- package/src/nodes/LinkField.tsx +438 -0
- package/src/nodes/PlainTextField.tsx +132 -0
- package/src/nodes/formatting.ts +58 -0
- package/src/nodes/locked.ts +67 -0
- package/src/pagination.ts +238 -0
- package/src/picture-context.tsx +18 -0
- package/src/presentation-context.tsx +87 -0
- package/src/presented.ts +29 -0
- package/src/rail/ContainerRail.tsx +145 -0
- package/src/rail/EntryActions.tsx +104 -0
- package/src/rail/rail-store.tsx +126 -0
- package/src/rail/useSpaceDrag.ts +177 -0
- package/src/registry.ts +101 -0
- package/src/spacing/spacing-context.tsx +100 -0
- package/src/spacing/useSpaceSlot.tsx +97 -0
- package/src/static/api.ts +19 -0
- package/src/static/fixtures.ts +80 -0
- package/src/static/render.tsx +24 -0
- package/src/templates/academic/AcademicDocument.tsx +255 -0
- package/src/templates/academic/entries.tsx +176 -0
- package/src/templates/alta/AltaDocument.tsx +265 -0
- package/src/templates/alta/entries.tsx +167 -0
- package/src/templates/classic/ClassicDocument.tsx +248 -0
- package/src/templates/classic/entries.tsx +175 -0
- package/src/templates/cobalt/CobaltDocument.tsx +302 -0
- package/src/templates/cobalt/crest.tsx +31 -0
- package/src/templates/cobalt/entries.tsx +136 -0
- package/src/templates/compact/CompactDocument.tsx +256 -0
- package/src/templates/compact/entries.tsx +167 -0
- package/src/templates/contemporary/ContemporaryDocument.tsx +287 -0
- package/src/templates/contemporary/entries.tsx +167 -0
- package/src/templates/creative/CreativeDocument.tsx +269 -0
- package/src/templates/creative/entries.tsx +167 -0
- package/src/templates/crimson/CrimsonDocument.tsx +283 -0
- package/src/templates/crimson/entries.tsx +169 -0
- package/src/templates/curve/CurveDocument.tsx +259 -0
- package/src/templates/curve/entries.tsx +168 -0
- package/src/templates/double-column/DoubleColumnDocument.tsx +269 -0
- package/src/templates/double-column/entries.tsx +169 -0
- package/src/templates/double-column-logos/DoubleColumnLogosDocument.tsx +262 -0
- package/src/templates/double-column-logos/entries.tsx +172 -0
- package/src/templates/elegant/ElegantDocument.tsx +297 -0
- package/src/templates/elegant/entries.tsx +167 -0
- package/src/templates/elegant-logos/ElegantLogosDocument.tsx +291 -0
- package/src/templates/elegant-logos/entries.tsx +170 -0
- package/src/templates/engineer/EngineerDocument.tsx +248 -0
- package/src/templates/engineer/entries.tsx +170 -0
- package/src/templates/executive/ExecutiveDocument.tsx +312 -0
- package/src/templates/executive/entries.tsx +146 -0
- package/src/templates/harvard/HarvardDocument.tsx +248 -0
- package/src/templates/harvard/entries.tsx +205 -0
- package/src/templates/hipster/HipsterDocument.tsx +289 -0
- package/src/templates/hipster/entries.tsx +175 -0
- package/src/templates/ivy/IvyDocument.tsx +248 -0
- package/src/templates/ivy/entries.tsx +167 -0
- package/src/templates/meridian/MeridianDocument.tsx +304 -0
- package/src/templates/meridian/entries.tsx +140 -0
- package/src/templates/modern/ModernDocument.tsx +265 -0
- package/src/templates/modern/entries.tsx +167 -0
- package/src/templates/polished/PolishedDocument.tsx +262 -0
- package/src/templates/polished/entries.tsx +167 -0
- package/src/templates/portrait/PortraitDocument.tsx +278 -0
- package/src/templates/portrait/entries.tsx +173 -0
- package/src/templates/prism/PrismDocument.tsx +307 -0
- package/src/templates/prism/entries.tsx +175 -0
- package/src/templates/scholar/ScholarDocument.tsx +266 -0
- package/src/templates/scholar/entries.tsx +169 -0
- package/src/templates/skills.ts +21 -0
- package/src/templates/split/SplitDocument.tsx +293 -0
- package/src/templates/split/entries.tsx +164 -0
- package/src/templates/stylish/StylishDocument.tsx +265 -0
- package/src/templates/stylish/entries.tsx +167 -0
- package/src/templates/timeline/TimelineDocument.tsx +251 -0
- package/src/templates/timeline/entries.tsx +173 -0
- package/src/useFitZoom.ts +185 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { COLLECTIONS } from '@resumekit/schema';
|
|
3
|
+
import { useAutosave } from '../autosave-context.js';
|
|
4
|
+
import { useEditorText } from '../i18n/index.js';
|
|
5
|
+
/** Move `from` to `to`, returning a new array. The one definition of the move. */
|
|
6
|
+
export function movedTo(items, from, to) {
|
|
7
|
+
const next = [...items];
|
|
8
|
+
const [moved] = next.splice(from, 1);
|
|
9
|
+
if (moved === undefined)
|
|
10
|
+
return [...items];
|
|
11
|
+
next.splice(Math.max(0, Math.min(to, next.length)), 0, moved);
|
|
12
|
+
return next;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The policy half of a collection: what may be done, and what may not.
|
|
16
|
+
*
|
|
17
|
+
* Storage-agnostic on purpose. A bullet list is held in the editor's own node
|
|
18
|
+
* props because its text is text like any other; an experience entry is held in
|
|
19
|
+
* the presentation overlay because adding one is a decision, not a difference
|
|
20
|
+
* between two strings. Both are the same collection to a candidate, so both get
|
|
21
|
+
* the same rules from here and differ only in the `store` they are given.
|
|
22
|
+
*
|
|
23
|
+
* It is also where every collection **stores itself**. Adding a bullet, removing
|
|
24
|
+
* a role and reordering a qualification all arrive here, and all three are the
|
|
25
|
+
* same kind of event: a discrete act with nothing still coming after it. So the
|
|
26
|
+
* save request is made once, in the one place all three pass through, rather
|
|
27
|
+
* than at each of the several call sites that could have forgotten it — and it
|
|
28
|
+
* is made AFTER the guards, so a removal the rules refused writes nothing.
|
|
29
|
+
*/
|
|
30
|
+
export function useCollection(id, store) {
|
|
31
|
+
const def = COLLECTIONS[id];
|
|
32
|
+
const text = useEditorText();
|
|
33
|
+
const { items } = store;
|
|
34
|
+
const { saveNow } = useAutosave();
|
|
35
|
+
return useMemo(() => ({
|
|
36
|
+
id,
|
|
37
|
+
items,
|
|
38
|
+
canAdd: def.arity === 'many',
|
|
39
|
+
canMove: def.reorderable && items.length > 1,
|
|
40
|
+
removeReason: (index) => {
|
|
41
|
+
const { t, format } = text;
|
|
42
|
+
if (def.arity !== 'many')
|
|
43
|
+
return t.refusal.single;
|
|
44
|
+
if (items.length <= def.min) {
|
|
45
|
+
/*
|
|
46
|
+
* Explained rather than hidden — the rule #29 set for the last
|
|
47
|
+
* bullet, now stated for every collection that has a minimum. A rule
|
|
48
|
+
* the candidate cannot see is a rule they run into.
|
|
49
|
+
*/
|
|
50
|
+
return def.min === 1
|
|
51
|
+
? format(t.refusal.minimumOne, text.noun(def.noun))
|
|
52
|
+
: format(t.refusal.minimum, { count: def.min });
|
|
53
|
+
}
|
|
54
|
+
return store.removeReason?.(index);
|
|
55
|
+
},
|
|
56
|
+
add: (afterIndex) => {
|
|
57
|
+
if (def.arity !== 'many')
|
|
58
|
+
return;
|
|
59
|
+
const at = afterIndex === undefined ? items.length : afterIndex + 1;
|
|
60
|
+
store.insert(at, def.mint());
|
|
61
|
+
saveNow();
|
|
62
|
+
},
|
|
63
|
+
addMany: (afterIndex, added) => {
|
|
64
|
+
if (def.arity !== 'many' || added.length === 0)
|
|
65
|
+
return;
|
|
66
|
+
const at = afterIndex + 1;
|
|
67
|
+
if (store.insertMany)
|
|
68
|
+
store.insertMany(at, added);
|
|
69
|
+
else
|
|
70
|
+
added.forEach((item, i) => store.insert(at + i, item));
|
|
71
|
+
saveNow();
|
|
72
|
+
},
|
|
73
|
+
remove: (index) => {
|
|
74
|
+
if (def.arity !== 'many' || items.length <= def.min)
|
|
75
|
+
return;
|
|
76
|
+
if (store.removeReason?.(index) !== undefined)
|
|
77
|
+
return;
|
|
78
|
+
store.removeAt(index);
|
|
79
|
+
saveNow();
|
|
80
|
+
},
|
|
81
|
+
move: (from, to) => {
|
|
82
|
+
if (!def.reorderable)
|
|
83
|
+
return;
|
|
84
|
+
if (from === to || from < 0 || from >= items.length)
|
|
85
|
+
return;
|
|
86
|
+
store.reorder(from, Math.max(0, Math.min(to, items.length - 1)));
|
|
87
|
+
saveNow();
|
|
88
|
+
},
|
|
89
|
+
}), [id, def, items, store, saveNow, text]);
|
|
90
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CustomEntry } from '@resumekit/schema';
|
|
2
|
+
import { type CollectionHandle } from './useCollection.js';
|
|
3
|
+
/**
|
|
4
|
+
* The entries inside a section the candidate declared.
|
|
5
|
+
*
|
|
6
|
+
* Backed by the declaring `section` edit rather than by an `append`, because the
|
|
7
|
+
* whole section — its heading and its entries — is one operation in the overlay.
|
|
8
|
+
* There is no writer-produced content in here to protect, so removal is deletion
|
|
9
|
+
* and the asymmetry the top-level sections need does not arise.
|
|
10
|
+
*
|
|
11
|
+
* Which makes this the smallest complete collection in the product, and a
|
|
12
|
+
* useful check on the layer: it shares every rule (`min`, the refusal message,
|
|
13
|
+
* the move semantics) with `experience` and differs only in its store.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useCustomEntries(sectionRef: string, entries: readonly CustomEntry[]): CollectionHandle<CustomEntry>;
|
|
16
|
+
/** A blank entry for a custom section, from the same table everything else uses. */
|
|
17
|
+
export declare const mintCustomEntry: () => CustomEntry;
|
|
18
|
+
//# sourceMappingURL=useCustomEntries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCustomEntries.d.ts","sourceRoot":"","sources":["../../src/collections/useCustomEntries.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,SAAS,WAAW,EAAE,GAC9B,gBAAgB,CAAC,WAAW,CAAC,CAkD/B;AAED,oFAAoF;AACpF,eAAO,MAAM,eAAe,QACW,WAAW,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { COLLECTIONS, isSectionEdit, } from '@resumekit/schema';
|
|
3
|
+
import { useAuthoring } from './authoring-context.js';
|
|
4
|
+
import { movedTo, useCollection, } from './useCollection.js';
|
|
5
|
+
/**
|
|
6
|
+
* The entries inside a section the candidate declared.
|
|
7
|
+
*
|
|
8
|
+
* Backed by the declaring `section` edit rather than by an `append`, because the
|
|
9
|
+
* whole section — its heading and its entries — is one operation in the overlay.
|
|
10
|
+
* There is no writer-produced content in here to protect, so removal is deletion
|
|
11
|
+
* and the asymmetry the top-level sections need does not arise.
|
|
12
|
+
*
|
|
13
|
+
* Which makes this the smallest complete collection in the product, and a
|
|
14
|
+
* useful check on the layer: it shares every rule (`min`, the refusal message,
|
|
15
|
+
* the move semantics) with `experience` and differs only in its store.
|
|
16
|
+
*/
|
|
17
|
+
export function useCustomEntries(sectionRef, entries) {
|
|
18
|
+
const authoring = useAuthoring();
|
|
19
|
+
const store = useMemo(() => {
|
|
20
|
+
if (!authoring) {
|
|
21
|
+
return {
|
|
22
|
+
items: entries,
|
|
23
|
+
insert: () => undefined,
|
|
24
|
+
removeAt: () => undefined,
|
|
25
|
+
reorder: () => undefined,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const { liveEdits, onEditsChange } = authoring;
|
|
29
|
+
/*
|
|
30
|
+
* Rewritten from the OVERLAY's own entries, not from the ones on screen.
|
|
31
|
+
*
|
|
32
|
+
* The rendered list is a projection frozen when the document tree was
|
|
33
|
+
* built, and the candidate's typing since then lives in the editor's nodes
|
|
34
|
+
* — it reaches the overlay through the reporter, and only the overlay. So
|
|
35
|
+
* an insert or a move rebuilt from what is drawn would write back the text
|
|
36
|
+
* the section was declared with and quietly undo the sentence somebody had
|
|
37
|
+
* just finished. The overlay is what the overlay is written from.
|
|
38
|
+
*/
|
|
39
|
+
const write = (transform) => onEditsChange(liveEdits().map((edit) => isSectionEdit(edit) && edit.ref === sectionRef
|
|
40
|
+
? { ...edit, entries: [...transform([...edit.entries])] }
|
|
41
|
+
: edit));
|
|
42
|
+
return {
|
|
43
|
+
items: entries,
|
|
44
|
+
insert: (index, item) => write((current) => {
|
|
45
|
+
const next = [...current];
|
|
46
|
+
next.splice(Math.min(index, next.length), 0, item);
|
|
47
|
+
return next;
|
|
48
|
+
}),
|
|
49
|
+
removeAt: (index) => write((current) => current.filter((_, i) => i !== index)),
|
|
50
|
+
reorder: (from, to) => write((current) => movedTo(current, from, to)),
|
|
51
|
+
};
|
|
52
|
+
}, [authoring, entries, sectionRef]);
|
|
53
|
+
return useCollection('custom_entries', store);
|
|
54
|
+
}
|
|
55
|
+
/** A blank entry for a custom section, from the same table everything else uses. */
|
|
56
|
+
export const mintCustomEntry = () => COLLECTIONS.custom_entries.mint();
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type AppendableSection, type ResumeEdits, type Slot } from '@resumekit/schema';
|
|
2
|
+
import { type CollectionHandle } from './useCollection.js';
|
|
3
|
+
/** Where an item on the page came from, which decides what removing it means. */
|
|
4
|
+
export type ItemOrigin = 'added' | 'written';
|
|
5
|
+
export interface SectionCollectionHandle<T> extends CollectionHandle<T> {
|
|
6
|
+
/** The slot behind each rendered position, for building field paths. */
|
|
7
|
+
slots: readonly Slot[];
|
|
8
|
+
originOf: (index: number) => ItemOrigin;
|
|
9
|
+
/** A key that follows the ITEM, so a reorder moves elements, not remounts. */
|
|
10
|
+
keyOf: (index: number) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the item at a rendered position is the one the candidate has just
|
|
13
|
+
* ADDED — an act, in this session, rather than a property of its contents.
|
|
14
|
+
*
|
|
15
|
+
* The distinction is the whole point. `originOf` says an entry came from the
|
|
16
|
+
* overlay rather than from the writer, which stays true forever; this says
|
|
17
|
+
* the candidate pressed add a moment ago and is waiting for somewhere to
|
|
18
|
+
* type. A control that wants to open itself on arrival — a link's popover —
|
|
19
|
+
* needs the second question, and answering it with the first, or with "is
|
|
20
|
+
* this entry still empty", opens EVERY empty entry in the document every time
|
|
21
|
+
* it is drawn.
|
|
22
|
+
*/
|
|
23
|
+
justAdded: (index: number) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* The path prefix that addresses the item at a rendered position.
|
|
26
|
+
*
|
|
27
|
+
* Built from the slot's BASE index, never from where it is drawn. A reordered
|
|
28
|
+
* document renders the entry from `experience.2` in first place, and the
|
|
29
|
+
* fields inside it must keep saying `experience.2.*` — otherwise a stored
|
|
30
|
+
* edit would follow the position rather than the job.
|
|
31
|
+
*/
|
|
32
|
+
pathOf: (index: number) => string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A top-level section of the résumé, as a collection backed by the overlay.
|
|
36
|
+
*
|
|
37
|
+
* Adding, removing and moving are all overlay operations rather than array
|
|
38
|
+
* writes, because the array is the writer's and must stay the writer's: what
|
|
39
|
+
* persists is the record of what the candidate decided, applied over output
|
|
40
|
+
* that never changes. That is the same rule the text overlay has followed since
|
|
41
|
+
* #29, extended to the operations #56 introduced.
|
|
42
|
+
*/
|
|
43
|
+
export declare function useSectionCollection<T>(section: AppendableSection, items: readonly T[]): SectionCollectionHandle<T>;
|
|
44
|
+
/** Whether an overlay hides the writer entry at `base` in `section`. */
|
|
45
|
+
export declare function isHidden(edits: ResumeEdits, section: AppendableSection, base: number): boolean;
|
|
46
|
+
/** Compare two slots. Exported so a caller never re-derives the key format. */
|
|
47
|
+
export declare const sameSlot: (a: Slot, b: Slot) => boolean;
|
|
48
|
+
//# sourceMappingURL=useSectionCollection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSectionCollection.d.ts","sourceRoot":"","sources":["../../src/collections/useSectionCollection.ts"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,IAAI,EACV,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,oBAAoB,CAAC;AAE5B,iFAAiF;AACjF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAE7C,MAAM,WAAW,uBAAuB,CAAC,CAAC,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IACrE,wEAAwE;IACxE,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACvB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,UAAU,CAAC;IACxC,8EAA8E;IAC9E,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC;;;;;;;;;;;OAWG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC;;;;;;;OAOG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACnC;AAMD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,OAAO,EAAE,iBAAiB,EAC1B,KAAK,EAAE,SAAS,CAAC,EAAE,GAClB,uBAAuB,CAAC,CAAC,CAAC,CAqL5B;AAED,wEAAwE;AACxE,wBAAgB,QAAQ,CACtB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAKT;AAED,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,GAAI,GAAG,IAAI,EAAE,GAAG,IAAI,YAA8B,CAAC"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { useMemo, useState } from 'react';
|
|
2
|
+
import { additionPaths, collectionOrder, isAppendEdit, isDropEdit, isHideEdit, isReorderEdit, slotKey, } from '@resumekit/schema';
|
|
3
|
+
import { useAuthoring } from './authoring-context.js';
|
|
4
|
+
import { useDocumentOverlay } from './overlay-context.js';
|
|
5
|
+
import { movedTo, useCollection, } from './useCollection.js';
|
|
6
|
+
/** A ref for a new addition. Minted here so it survives a new writer run. */
|
|
7
|
+
const mintRef = () => `add-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
8
|
+
/**
|
|
9
|
+
* A top-level section of the résumé, as a collection backed by the overlay.
|
|
10
|
+
*
|
|
11
|
+
* Adding, removing and moving are all overlay operations rather than array
|
|
12
|
+
* writes, because the array is the writer's and must stay the writer's: what
|
|
13
|
+
* persists is the record of what the candidate decided, applied over output
|
|
14
|
+
* that never changes. That is the same rule the text overlay has followed since
|
|
15
|
+
* #29, extended to the operations #56 introduced.
|
|
16
|
+
*/
|
|
17
|
+
export function useSectionCollection(section, items) {
|
|
18
|
+
const authoring = useAuthoring();
|
|
19
|
+
/*
|
|
20
|
+
* The ref minted by the most recent `insert`, and nothing else. Held here
|
|
21
|
+
* because `insert` is where the act happens; a component downstream can only
|
|
22
|
+
* see the result of it.
|
|
23
|
+
*/
|
|
24
|
+
const [addedRef, setAddedRef] = useState(null);
|
|
25
|
+
/*
|
|
26
|
+
* Where each entry SITS, taken from the projection rather than from the
|
|
27
|
+
* authoring capability — because a document that cannot be edited still has
|
|
28
|
+
* to know. Reading it from `useAuthoring` meant the saved-résumé view and the
|
|
29
|
+
* export renderer numbered entries by where they were drawn, so every stored
|
|
30
|
+
* value on a reordered entry was read at the wrong address there.
|
|
31
|
+
*/
|
|
32
|
+
const { base, edits } = useDocumentOverlay();
|
|
33
|
+
const slots = useMemo(() => (base ? collectionOrder(base, edits ?? [], section) : []), [base, edits, section]);
|
|
34
|
+
/*
|
|
35
|
+
* Where an addition's fields are addressed, taken from the domain rather
|
|
36
|
+
* than re-derived here. This module used to answer it with the render index,
|
|
37
|
+
* which is a different answer from the one `presentationEdits` reads back —
|
|
38
|
+
* and two answers to "where does this entry live" is how a candidate's new
|
|
39
|
+
* role came to share its fields with the writer's second one.
|
|
40
|
+
*/
|
|
41
|
+
const additions = useMemo(() => (base ? additionPaths(base, edits ?? []) : null), [base, edits]);
|
|
42
|
+
const store = useMemo(() => {
|
|
43
|
+
if (!authoring) {
|
|
44
|
+
// Read-only: the list is what it is, and nothing can act on it.
|
|
45
|
+
return {
|
|
46
|
+
items,
|
|
47
|
+
insert: () => undefined,
|
|
48
|
+
removeAt: () => undefined,
|
|
49
|
+
reorder: () => undefined,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
const { liveEdits, onEditsChange } = authoring;
|
|
53
|
+
/*
|
|
54
|
+
* Every write below starts from the LIVE overlay, never from the snapshot
|
|
55
|
+
* the slots were derived from: what a candidate has typed into an addition
|
|
56
|
+
* since the last shape change lives inside that addition's own edit, and
|
|
57
|
+
* rebuilding from a snapshot would write the placeholder back over it.
|
|
58
|
+
*/
|
|
59
|
+
/** Store an ordering of the given slots, replacing any earlier one. */
|
|
60
|
+
const writeOrder = (next, rest = liveEdits()) => onEditsChange([
|
|
61
|
+
...rest.filter((edit) => !(isReorderEdit(edit) && edit.section === section)),
|
|
62
|
+
{ kind: 'reorder', section, order: next },
|
|
63
|
+
]);
|
|
64
|
+
return {
|
|
65
|
+
items,
|
|
66
|
+
insert: (index, item) => {
|
|
67
|
+
const ref = mintRef();
|
|
68
|
+
setAddedRef(ref);
|
|
69
|
+
const next = [
|
|
70
|
+
...liveEdits(),
|
|
71
|
+
{
|
|
72
|
+
kind: 'append',
|
|
73
|
+
ref,
|
|
74
|
+
section,
|
|
75
|
+
author: 'candidate',
|
|
76
|
+
entry: item,
|
|
77
|
+
},
|
|
78
|
+
];
|
|
79
|
+
// An addition lands where the candidate asked for it, not at the end,
|
|
80
|
+
// which needs the ordering written in the same step.
|
|
81
|
+
const placed = [...slots];
|
|
82
|
+
placed.splice(Math.min(index, placed.length), 0, { ref });
|
|
83
|
+
writeOrder(placed, next);
|
|
84
|
+
},
|
|
85
|
+
insertMany: (index, added) => {
|
|
86
|
+
const refs = added.map(() => mintRef());
|
|
87
|
+
const next = [
|
|
88
|
+
...liveEdits(),
|
|
89
|
+
...added.map((entry, i) => ({
|
|
90
|
+
kind: 'append',
|
|
91
|
+
ref: refs[i],
|
|
92
|
+
section,
|
|
93
|
+
author: 'candidate',
|
|
94
|
+
entry,
|
|
95
|
+
})),
|
|
96
|
+
];
|
|
97
|
+
const placed = [...slots];
|
|
98
|
+
placed.splice(Math.min(index, placed.length), 0, ...refs.map((ref) => ({ ref })));
|
|
99
|
+
writeOrder(placed, next);
|
|
100
|
+
},
|
|
101
|
+
removeAt: (index) => {
|
|
102
|
+
const slot = slots[index];
|
|
103
|
+
if (!slot)
|
|
104
|
+
return;
|
|
105
|
+
const remaining = slots.filter((_, i) => i !== index);
|
|
106
|
+
if ('ref' in slot) {
|
|
107
|
+
/*
|
|
108
|
+
* Removed by deleting the addition itself: the entry was never
|
|
109
|
+
* anywhere but this overlay, so there is nothing left to reconcile.
|
|
110
|
+
*/
|
|
111
|
+
writeOrder(remaining, liveEdits().filter((edit) => !((isAppendEdit(edit) || isDropEdit(edit)) &&
|
|
112
|
+
edit.ref === slot.ref)));
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
/*
|
|
116
|
+
* A writer-produced entry is HIDDEN. The score, the requirement audit
|
|
117
|
+
* and `still_missing[]` are derived against what the writer produced;
|
|
118
|
+
* deleting one would leave those figures describing a document that no
|
|
119
|
+
* longer exists.
|
|
120
|
+
*/
|
|
121
|
+
writeOrder(remaining, [
|
|
122
|
+
...liveEdits(),
|
|
123
|
+
{ kind: 'hide', section, base: slot.base },
|
|
124
|
+
]);
|
|
125
|
+
},
|
|
126
|
+
reorder: (from, to) => writeOrder(movedTo(slots, from, to)),
|
|
127
|
+
};
|
|
128
|
+
}, [authoring, items, section, slots]);
|
|
129
|
+
const handle = useCollection(section, store);
|
|
130
|
+
return useMemo(() => ({
|
|
131
|
+
...handle,
|
|
132
|
+
slots,
|
|
133
|
+
originOf: (index) => slots[index] && 'ref' in slots[index] ? 'added' : 'written',
|
|
134
|
+
justAdded: (index) => {
|
|
135
|
+
const slot = slots[index];
|
|
136
|
+
return Boolean(slot && 'ref' in slot && slot.ref === addedRef);
|
|
137
|
+
},
|
|
138
|
+
/*
|
|
139
|
+
* Scoped by SECTION, because a slot key is only unique within its own
|
|
140
|
+
* collection — `b0` is the writer's first entry in experience and in
|
|
141
|
+
* education alike. The selection is document-wide, so an unscoped key
|
|
142
|
+
* selected two entries at once.
|
|
143
|
+
*/
|
|
144
|
+
keyOf: (index) => {
|
|
145
|
+
const slot = slots[index];
|
|
146
|
+
return `${section}:${slot ? slotKey(slot) : index}`;
|
|
147
|
+
},
|
|
148
|
+
pathOf: (index) => {
|
|
149
|
+
const slot = slots[index];
|
|
150
|
+
if (slot && 'base' in slot)
|
|
151
|
+
return `${section}.${slot.base}`;
|
|
152
|
+
/*
|
|
153
|
+
* An addition is addressed PAST the end of the writer's array, which
|
|
154
|
+
* is where applying the overlay actually puts it — never by the
|
|
155
|
+
* position it is drawn in. Drawing position belongs to the `reorder`
|
|
156
|
+
* edit; an address that moved with it would collide with the writer's
|
|
157
|
+
* own entry at that index and blank it off the page.
|
|
158
|
+
*/
|
|
159
|
+
const path = slot ? additions?.get(slot.ref) : undefined;
|
|
160
|
+
return path ?? `${section}.${index}`;
|
|
161
|
+
},
|
|
162
|
+
}), [handle, slots, section, additions, addedRef]);
|
|
163
|
+
}
|
|
164
|
+
/** Whether an overlay hides the writer entry at `base` in `section`. */
|
|
165
|
+
export function isHidden(edits, section, base) {
|
|
166
|
+
return edits.some((edit) => isHideEdit(edit) && edit.section === section && edit.base === base);
|
|
167
|
+
}
|
|
168
|
+
/** Compare two slots. Exported so a caller never re-derives the key format. */
|
|
169
|
+
export const sameSlot = (a, b) => slotKey(a) === slotKey(b);
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The document's frame: how big the page is, and what survives printing.
|
|
3
|
+
*
|
|
4
|
+
* Ships with `TemplateDocument`, so every surface that mounts a résumé — the
|
|
5
|
+
* editor, the preview, the server-side renderer — gets the page geometry
|
|
6
|
+
* without having to know which stylesheets to import. The editor's own chrome
|
|
7
|
+
* is deliberately not here: this is the document, not the workbench.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* The stylesheets this document is made of.
|
|
12
|
+
*
|
|
13
|
+
* MUST stay at the top of the file. `@import` is only valid before any other
|
|
14
|
+
* rule, so an import placed after the `.tpl-editor` block below is silently
|
|
15
|
+
* dropped by every CSS parser — which is exactly what happened: the shipped
|
|
16
|
+
* typefaces reach a browser through this line and nothing else, so while these
|
|
17
|
+
* sat at the foot of the file the product's own fonts never loaded and every
|
|
18
|
+
* résumé was drawn in whatever the reader's machine substituted. The other six
|
|
19
|
+
* are also imported by the components that use them, so only the fonts failed
|
|
20
|
+
* silently; that is why it went unnoticed.
|
|
21
|
+
*/
|
|
22
|
+
@import './fonts/fonts.css';
|
|
23
|
+
@import './kit/avatar.css';
|
|
24
|
+
@import './kit/panel.css';
|
|
25
|
+
@import './kit/keywords.css';
|
|
26
|
+
@import './kit/skill-grid.css';
|
|
27
|
+
@import './kit/skill-tags.css';
|
|
28
|
+
@import './kit/described.css';
|
|
29
|
+
@import './kit/language.css';
|
|
30
|
+
@import './kit/contact-icons.css';
|
|
31
|
+
@import './paged.css';
|
|
32
|
+
@import './nodes/template-node.css';
|
|
33
|
+
@import './templates/harvard/harvard.css';
|
|
34
|
+
@import './templates/ivy/ivy.css';
|
|
35
|
+
@import './templates/classic/classic.css';
|
|
36
|
+
@import './templates/compact/compact.css';
|
|
37
|
+
@import './templates/timeline/timeline.css';
|
|
38
|
+
@import './templates/modern/modern.css';
|
|
39
|
+
@import './templates/stylish/stylish.css';
|
|
40
|
+
@import './templates/creative/creative.css';
|
|
41
|
+
@import './templates/contemporary/contemporary.css';
|
|
42
|
+
@import './templates/double-column/double-column.css';
|
|
43
|
+
@import './templates/double-column-logos/double-column-logos.css';
|
|
44
|
+
@import './templates/elegant/elegant.css';
|
|
45
|
+
@import './templates/elegant-logos/elegant-logos.css';
|
|
46
|
+
@import './templates/polished/polished.css';
|
|
47
|
+
@import './templates/executive/executive.css';
|
|
48
|
+
@import './templates/meridian/meridian.css';
|
|
49
|
+
@import './templates/cobalt/cobalt.css';
|
|
50
|
+
@import './templates/crimson/crimson.css';
|
|
51
|
+
@import './templates/engineer/engineer.css';
|
|
52
|
+
@import './templates/split/split.css';
|
|
53
|
+
@import './templates/academic/academic.css';
|
|
54
|
+
@import './templates/alta/alta.css';
|
|
55
|
+
@import './templates/prism/prism.css';
|
|
56
|
+
@import './templates/hipster/hipster.css';
|
|
57
|
+
@import './templates/scholar/scholar.css';
|
|
58
|
+
@import './templates/portrait/portrait.css';
|
|
59
|
+
@import './templates/curve/curve.css';
|
|
60
|
+
.tpl-editor {
|
|
61
|
+
/*
|
|
62
|
+
* The editing palette, taken from the APP's primary rather than stated here.
|
|
63
|
+
*
|
|
64
|
+
* `--color-accent` is where the host application defines its brand, so a rebrand moves the editor's affordances with everything else and no
|
|
65
|
+
* value in this library has to be found and changed to match. The literals are
|
|
66
|
+
* fallbacks, not defaults: this stylesheet is also loaded by surfaces that
|
|
67
|
+
* carry no token layer — the export renderer among them — and a `var()` that
|
|
68
|
+
* resolves to nothing does not fall back, it drops the whole declaration and
|
|
69
|
+
* the affordance simply does not draw.
|
|
70
|
+
*
|
|
71
|
+
* An earlier version hardcoded a green on the argument that the résumé renders
|
|
72
|
+
* in paper colours in both themes, so an affordance on it must hold against
|
|
73
|
+
* white in both. That argument was weaker than it read: the dark override is
|
|
74
|
+
* `--blue-400`, which is a mid-tone azure and perfectly legible on white.
|
|
75
|
+
* What it correctly rules out is following a token that goes near-white in
|
|
76
|
+
* dark mode, which this one does not.
|
|
77
|
+
*/
|
|
78
|
+
--tpl-accent: var(--color-accent, oklch(0.545 0.195 258));
|
|
79
|
+
--tpl-accent-ink: var(--color-accent-hover, oklch(0.47 0.175 258));
|
|
80
|
+
/* What is legible ON the accent, for the rare control that FILLS with it. */
|
|
81
|
+
--tpl-on-accent: var(--color-on-accent, #ffffff);
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
* The alphas, mixed once.
|
|
85
|
+
*
|
|
86
|
+
* `--color-accent` is an `oklch()` colour, not the channel triplet that
|
|
87
|
+
* `rgb(… / a)` needs, so every translucent step is a `color-mix`. Naming them
|
|
88
|
+
* for the JOB rather than the percentage is what stops the next person
|
|
89
|
+
* inventing a sixth nearly-identical alpha: there is a line, a wash and a
|
|
90
|
+
* tint, and everything is one of them.
|
|
91
|
+
*/
|
|
92
|
+
--tpl-line: color-mix(in oklab, var(--tpl-accent) 32%, transparent);
|
|
93
|
+
--tpl-line-hover: color-mix(in oklab, var(--tpl-accent) 58%, transparent);
|
|
94
|
+
--tpl-line-strong: color-mix(in oklab, var(--tpl-accent) 72%, transparent);
|
|
95
|
+
--tpl-wash: color-mix(in oklab, var(--tpl-accent) 5%, transparent);
|
|
96
|
+
--tpl-tint: color-mix(in oklab, var(--tpl-accent) 12%, transparent);
|
|
97
|
+
--tpl-tint-hover: color-mix(in oklab, var(--tpl-accent) 18%, transparent);
|
|
98
|
+
--tpl-lift: color-mix(in oklab, var(--tpl-accent-ink) 10%, transparent);
|
|
99
|
+
--tpl-lift-soft: color-mix(in oklab, var(--tpl-accent-ink) 6%, transparent);
|
|
100
|
+
|
|
101
|
+
/* Neutral chrome: the bars and pills the controls themselves live in. */
|
|
102
|
+
--tpl-chrome: var(--color-surface, #ffffff);
|
|
103
|
+
--tpl-chrome-ink: var(--color-text, #373742);
|
|
104
|
+
--tpl-chrome-line: 0 0 0;
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* Placeholder ink, and the one colour here that deliberately does NOT follow
|
|
108
|
+
* the theme.
|
|
109
|
+
*
|
|
110
|
+
* Guidance is drawn on the PAPER, which is white in both themes (#29). The
|
|
111
|
+
* app's muted-text token goes light in dark mode — correct on a dark surface,
|
|
112
|
+
* invisible on this one — so this stays fixed. Stated as a token anyway, so
|
|
113
|
+
* the exception is written down rather than left as a literal somebody later
|
|
114
|
+
* assumes was an oversight.
|
|
115
|
+
*/
|
|
116
|
+
--tpl-paper-muted: #9a9a9a;
|
|
117
|
+
|
|
118
|
+
/*
|
|
119
|
+
* Selection on the paper, and the second colour here that deliberately does
|
|
120
|
+
* NOT follow the theme — for the same reason as the one above it.
|
|
121
|
+
*
|
|
122
|
+
* The app's `::selection` pairs its wash with `--color-text`, which is
|
|
123
|
+
* near-white in dark mode. Correct on a dark surface; on this one it painted
|
|
124
|
+
* selected résumé text white on a pale wash, so dragging across a paragraph
|
|
125
|
+
* in dark mode made the words disappear as they were selected. Both halves
|
|
126
|
+
* are fixed here, because the surface under them is fixed.
|
|
127
|
+
*
|
|
128
|
+
* The INK is a literal near-black rather than `inherit`. `inherit` would keep
|
|
129
|
+
* each run's own colour, which sounds better and is not: `meridian` and
|
|
130
|
+
* `executive` both draw white text on a dark band, and white on this wash is
|
|
131
|
+
* the bug this rule exists to fix. A dark ink is legible on the wash whatever
|
|
132
|
+
* the run was coloured before it.
|
|
133
|
+
*
|
|
134
|
+
* The wash is the accent's hue at a fixed lightness — 1.58:1 on white, the
|
|
135
|
+
* register a native selection sits in, with the ink at 11.0:1 on it. A
|
|
136
|
+
* rebrand changes the hue here, in the same place `--tpl-paper-muted` is
|
|
137
|
+
* changed, rather than following a token that is allowed to go light.
|
|
138
|
+
*/
|
|
139
|
+
--tpl-paper-selection: oklch(0.85 0.08 256);
|
|
140
|
+
--tpl-paper-selection-ink: #1a1a1a;
|
|
141
|
+
|
|
142
|
+
/*
|
|
143
|
+
* "Worth a look", as distinct from "wrong".
|
|
144
|
+
*
|
|
145
|
+
* The mark on a date that disagrees with the résumé's chronological order.
|
|
146
|
+
* Fixed rather than following `--color-warning`, for the reason
|
|
147
|
+
* `--tpl-paper-muted` above is fixed: this is drawn on the PAPER, which is
|
|
148
|
+
* white in both themes, and the app's warning token is a FILL that measures
|
|
149
|
+
* about 2.2:1 as small text. This is the marketing site's `--m-gap`, 5.56:1
|
|
150
|
+
* on white — the page's only warm colour, which is why it still reads as the
|
|
151
|
+
* thing wanting attention without reading as an error.
|
|
152
|
+
*/
|
|
153
|
+
--tpl-warn: #9a5b09;
|
|
154
|
+
--tpl-danger: var(--color-danger, #b3261e);
|
|
155
|
+
--tpl-danger-tint: color-mix(in oklab, var(--tpl-danger) 12%, transparent);
|
|
156
|
+
|
|
157
|
+
/*
|
|
158
|
+
* How long an editing affordance takes to appear under the pointer.
|
|
159
|
+
*
|
|
160
|
+
* One number, because every control that appears on hover is answering the
|
|
161
|
+
* same question — "what can I do to this line?" — and they sit inches apart:
|
|
162
|
+
* a handle that arrived faster than the buttons at the other end of its own
|
|
163
|
+
* row would read as two separate things reacting rather than one row waking
|
|
164
|
+
* up.
|
|
165
|
+
*
|
|
166
|
+
* Short on purpose. This fires on every crossing of every bullet, so it has
|
|
167
|
+
* to be quick enough that a pointer sweeping down the page is not trailed by
|
|
168
|
+
* a dozen fades, and slow enough that the controls are seen arriving rather
|
|
169
|
+
* than found already there.
|
|
170
|
+
*/
|
|
171
|
+
--tpl-reveal-ms: 140ms;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/*
|
|
175
|
+
* Both forms: the descendant one covers every run inside the document, and the
|
|
176
|
+
* bare one covers a selection that starts on the root itself. `.tpl-editor`
|
|
177
|
+
* wraps the résumé on EVERY surface that draws one — `TemplateDocument` for the
|
|
178
|
+
* preview and the static renderer, `TemplateEditor` for the workbench — so this
|
|
179
|
+
* is one rule rather than one per screen.
|
|
180
|
+
*/
|
|
181
|
+
.tpl-editor ::selection,
|
|
182
|
+
.tpl-editor::selection {
|
|
183
|
+
background: var(--tpl-paper-selection);
|
|
184
|
+
color: var(--tpl-paper-selection-ink);
|
|
185
|
+
}
|