@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.
- 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 +186 -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 +20 -0
- package/dist/kit/documentStyle.d.ts.map +1 -0
- package/dist/kit/documentStyle.js +64 -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/kit/typography.css +86 -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 +38 -0
- package/dist/nodes/formatting.d.ts.map +1 -0
- package/dist/nodes/formatting.js +27 -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 +68 -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 +33930 -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 +80 -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 +70 -0
- package/src/nodes/locked.ts +70 -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 +259 -0
- package/src/templates/academic/entries.tsx +176 -0
- package/src/templates/alta/AltaDocument.tsx +269 -0
- package/src/templates/alta/entries.tsx +167 -0
- package/src/templates/classic/ClassicDocument.tsx +252 -0
- package/src/templates/classic/entries.tsx +175 -0
- package/src/templates/cobalt/CobaltDocument.tsx +306 -0
- package/src/templates/cobalt/crest.tsx +31 -0
- package/src/templates/cobalt/entries.tsx +136 -0
- package/src/templates/compact/CompactDocument.tsx +260 -0
- package/src/templates/compact/entries.tsx +167 -0
- package/src/templates/contemporary/ContemporaryDocument.tsx +291 -0
- package/src/templates/contemporary/entries.tsx +167 -0
- package/src/templates/creative/CreativeDocument.tsx +273 -0
- package/src/templates/creative/entries.tsx +167 -0
- package/src/templates/crimson/CrimsonDocument.tsx +287 -0
- package/src/templates/crimson/entries.tsx +169 -0
- package/src/templates/curve/CurveDocument.tsx +263 -0
- package/src/templates/curve/entries.tsx +168 -0
- package/src/templates/double-column/DoubleColumnDocument.tsx +273 -0
- package/src/templates/double-column/entries.tsx +169 -0
- package/src/templates/double-column-logos/DoubleColumnLogosDocument.tsx +266 -0
- package/src/templates/double-column-logos/entries.tsx +172 -0
- package/src/templates/elegant/ElegantDocument.tsx +301 -0
- package/src/templates/elegant/entries.tsx +167 -0
- package/src/templates/elegant-logos/ElegantLogosDocument.tsx +295 -0
- package/src/templates/elegant-logos/entries.tsx +170 -0
- package/src/templates/engineer/EngineerDocument.tsx +252 -0
- package/src/templates/engineer/entries.tsx +170 -0
- package/src/templates/executive/ExecutiveDocument.tsx +316 -0
- package/src/templates/executive/entries.tsx +146 -0
- package/src/templates/harvard/HarvardDocument.tsx +252 -0
- package/src/templates/harvard/entries.tsx +205 -0
- package/src/templates/hipster/HipsterDocument.tsx +293 -0
- package/src/templates/hipster/entries.tsx +175 -0
- package/src/templates/ivy/IvyDocument.tsx +252 -0
- package/src/templates/ivy/entries.tsx +167 -0
- package/src/templates/meridian/MeridianDocument.tsx +308 -0
- package/src/templates/meridian/entries.tsx +140 -0
- package/src/templates/modern/ModernDocument.tsx +269 -0
- package/src/templates/modern/entries.tsx +167 -0
- package/src/templates/polished/PolishedDocument.tsx +266 -0
- package/src/templates/polished/entries.tsx +167 -0
- package/src/templates/portrait/PortraitDocument.tsx +282 -0
- package/src/templates/portrait/entries.tsx +173 -0
- package/src/templates/prism/PrismDocument.tsx +311 -0
- package/src/templates/prism/entries.tsx +175 -0
- package/src/templates/scholar/ScholarDocument.tsx +270 -0
- package/src/templates/scholar/entries.tsx +169 -0
- package/src/templates/skills.ts +21 -0
- package/src/templates/split/SplitDocument.tsx +297 -0
- package/src/templates/split/entries.tsx +164 -0
- package/src/templates/stylish/StylishDocument.tsx +269 -0
- package/src/templates/stylish/entries.tsx +167 -0
- package/src/templates/timeline/TimelineDocument.tsx +255 -0
- package/src/templates/timeline/entries.tsx +173 -0
- package/src/useFitZoom.ts +185 -0
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Suspense,
|
|
3
|
+
isValidElement,
|
|
4
|
+
lazy,
|
|
5
|
+
type HTMLAttributes,
|
|
6
|
+
type ReactElement,
|
|
7
|
+
type ReactNode,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import { isUnfilled } from '@resumekit/schema';
|
|
10
|
+
import { useAuthoring } from './authoring-context.js';
|
|
11
|
+
import { useSpaceSlot } from '../spacing/useSpaceSlot.js';
|
|
12
|
+
import type { ItemOrigin } from './EntryOverlay.js';
|
|
13
|
+
import type { CollectionHandle } from './useCollection.js';
|
|
14
|
+
import './collection.css';
|
|
15
|
+
import { useItemName } from './entry-text.js';
|
|
16
|
+
import { useEditorText } from '../i18n/index.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* What a template's root element must carry for the item to be movable.
|
|
20
|
+
*
|
|
21
|
+
* Opaque on purpose. A template spreads it and reads nothing out of it, so the
|
|
22
|
+
* drag implementation — or its removal — is not a change to any template.
|
|
23
|
+
*/
|
|
24
|
+
export type ItemRootProps = HTMLAttributes<HTMLElement> & {
|
|
25
|
+
/*
|
|
26
|
+
* A CALLBACK ref, not a ref object. An entry's root element differs by
|
|
27
|
+
* template — an `<article>` in Harvard, an `<li>` in a skills list — and a
|
|
28
|
+
* `RefObject<HTMLElement>` is assignable to neither. A callback taking the
|
|
29
|
+
* base type is assignable to both, which is what lets one opaque prop be
|
|
30
|
+
* spread onto any of them.
|
|
31
|
+
*/
|
|
32
|
+
ref?: (node: HTMLElement | null) => void;
|
|
33
|
+
/** Marks the element as one item of a collection. See `collection.css`. */
|
|
34
|
+
'data-entry'?: string;
|
|
35
|
+
/** What to call it in the overlay's label — the collection's own noun. */
|
|
36
|
+
'data-entry-label'?: string;
|
|
37
|
+
/** Present on the one entry the candidate is working on. */
|
|
38
|
+
'data-selected'?: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** What a template's entry component is given. Values and a path; no verbs. */
|
|
42
|
+
export interface EntryRenderProps<T> {
|
|
43
|
+
item: T;
|
|
44
|
+
/** Where this item lives in the résumé — `experience.2`, never `experience.0`. */
|
|
45
|
+
path: string;
|
|
46
|
+
/** Where it is DRAWN. For keys and labels only; never for a field path. */
|
|
47
|
+
index: number;
|
|
48
|
+
/**
|
|
49
|
+
* The item's controls, which the entry component MUST render inside its own
|
|
50
|
+
* root element.
|
|
51
|
+
*
|
|
52
|
+
* Handed over rather than injected, because an entry component is a component
|
|
53
|
+
* and appending a child to one only sets a prop it ignores. The template
|
|
54
|
+
* therefore decides WHERE the controls sit in its markup — which is right,
|
|
55
|
+
* since it owns the layout — and it cannot decide WHAT they are: `chrome` is
|
|
56
|
+
* opaque, and no template can reach the operations behind it.
|
|
57
|
+
*
|
|
58
|
+
* `null` when the document is only being read, so a template renders the same
|
|
59
|
+
* markup either way without asking which mode it is in.
|
|
60
|
+
*/
|
|
61
|
+
chrome: ReactNode;
|
|
62
|
+
/** Spread onto the entry's root element. Opaque; see {@link ItemRootProps}. */
|
|
63
|
+
itemProps: ItemRootProps;
|
|
64
|
+
/**
|
|
65
|
+
* Whether the candidate has just added THIS item, in this session.
|
|
66
|
+
*
|
|
67
|
+
* For a control that opens itself on arrival — a link's popover, which has
|
|
68
|
+
* nowhere else to put the address. Deliberately an ACT and not a property of
|
|
69
|
+
* the item: keyed off "this entry is still empty" instead, every empty entry
|
|
70
|
+
* in the document opened one, every time it was drawn.
|
|
71
|
+
*
|
|
72
|
+
* `false` on a document being read, which adds nothing.
|
|
73
|
+
*/
|
|
74
|
+
justAdded: boolean;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface CollectionItemsProps<T> {
|
|
78
|
+
collection: CollectionHandle<T> & {
|
|
79
|
+
originOf?: (index: number) => ItemOrigin;
|
|
80
|
+
justAdded?: (index: number) => boolean;
|
|
81
|
+
pathOf?: (index: number) => string;
|
|
82
|
+
keyOf?: (index: number) => string;
|
|
83
|
+
};
|
|
84
|
+
/** The path prefix, when the collection does not supply one of its own. */
|
|
85
|
+
basePath?: string;
|
|
86
|
+
noun: string;
|
|
87
|
+
/** The section's own name, for the overlay's label. */
|
|
88
|
+
label: string;
|
|
89
|
+
/**
|
|
90
|
+
* Whether these items may carry structural space above them.
|
|
91
|
+
*
|
|
92
|
+
* The TEMPLATE decides, because only the template knows what it renders an
|
|
93
|
+
* item as. Structural space is held by a wrapper element around the item, and
|
|
94
|
+
* a wrapper is not valid around every item: a skills group is an `<li>` in a
|
|
95
|
+
* `<ul>`, and a `<div>` between them is not a list. It is not wanted there
|
|
96
|
+
* either — nobody needs to push two lines of keywords apart. Defaults to on,
|
|
97
|
+
* so a template that renders entries gets its gaps by saying nothing.
|
|
98
|
+
*/
|
|
99
|
+
gap?: boolean;
|
|
100
|
+
/** Where the empty-state add sits — see `Collection`. Defaults to `block`. */
|
|
101
|
+
emptyAdd?: 'block' | 'inline';
|
|
102
|
+
/** The template's entry component. MUST return a single element. */
|
|
103
|
+
children: (props: EntryRenderProps<T>) => ReactElement | null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** What every item render needs, however it is being drawn. */
|
|
107
|
+
export interface ItemProps<T> {
|
|
108
|
+
collection: CollectionItemsProps<T>['collection'];
|
|
109
|
+
index: number;
|
|
110
|
+
path: string;
|
|
111
|
+
noun: string;
|
|
112
|
+
label: string;
|
|
113
|
+
/** Whether this item may carry structural space above it. See `gap`. */
|
|
114
|
+
gap: boolean;
|
|
115
|
+
children: CollectionItemsProps<T>['children'];
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* An item on a document that is being READ.
|
|
120
|
+
*
|
|
121
|
+
* No controls, no drag hook, and an empty `itemProps` — so the markup a
|
|
122
|
+
* template produces here is exactly the markup it produced before collections
|
|
123
|
+
* existed, and the printed page and the export renderer cannot carry chrome
|
|
124
|
+
* they never asked to be free of.
|
|
125
|
+
*/
|
|
126
|
+
function ReadOnlyItem<T>({
|
|
127
|
+
collection,
|
|
128
|
+
index,
|
|
129
|
+
path,
|
|
130
|
+
noun,
|
|
131
|
+
gap,
|
|
132
|
+
children,
|
|
133
|
+
}: ItemProps<T>) {
|
|
134
|
+
/*
|
|
135
|
+
* The SPACE, but never the handle: `useSpaceSlot` yields no control without
|
|
136
|
+
* an authoring context, so a read item sits below the space its owner
|
|
137
|
+
* recorded and offers nothing to change it with. Which is the point — the
|
|
138
|
+
* space is the document and prints; the control is chrome and does not.
|
|
139
|
+
*/
|
|
140
|
+
const space = useSpaceSlot({ path }, useItemName(noun, index));
|
|
141
|
+
const element = children({
|
|
142
|
+
item: collection.items[index] as T,
|
|
143
|
+
path,
|
|
144
|
+
index,
|
|
145
|
+
chrome: null,
|
|
146
|
+
itemProps: gap ? { ...space.rootProps } : {},
|
|
147
|
+
justAdded: false,
|
|
148
|
+
});
|
|
149
|
+
return isValidElement(element) ? element : null;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The items of a collection, with their controls, from any store.
|
|
154
|
+
*
|
|
155
|
+
* The rendering lives here so that a section backed by the overlay and a custom
|
|
156
|
+
* section backed by its own declaring edit produce identical markup and
|
|
157
|
+
* identical affordances — the two would otherwise be two implementations of the
|
|
158
|
+
* same screen, which is the duplication this whole change exists to remove.
|
|
159
|
+
*/
|
|
160
|
+
/*
|
|
161
|
+
* Loaded on demand, and that is the whole point: this is where `@dnd-kit` and
|
|
162
|
+
* the authoring controls live, so a document that is only being read — the
|
|
163
|
+
* saved-résumé view, and the server-side renderer that produces the PDF — never
|
|
164
|
+
* fetches either. Asserted in `collections.spec.tsx`.
|
|
165
|
+
*/
|
|
166
|
+
const AuthoredItems = lazy(() => import('./AuthoredItems.js')) as <T>(
|
|
167
|
+
props: Pick<
|
|
168
|
+
CollectionItemsProps<T>,
|
|
169
|
+
'collection' | 'basePath' | 'noun' | 'label'
|
|
170
|
+
> & {
|
|
171
|
+
gap: boolean;
|
|
172
|
+
ids: readonly string[];
|
|
173
|
+
sortable: boolean;
|
|
174
|
+
children: CollectionItemsProps<T>['children'];
|
|
175
|
+
},
|
|
176
|
+
) => ReactElement;
|
|
177
|
+
|
|
178
|
+
export function CollectionItems<T>({
|
|
179
|
+
collection,
|
|
180
|
+
basePath,
|
|
181
|
+
noun,
|
|
182
|
+
label,
|
|
183
|
+
gap = true,
|
|
184
|
+
emptyAdd = 'block',
|
|
185
|
+
children,
|
|
186
|
+
}: CollectionItemsProps<T>) {
|
|
187
|
+
const authoring = useAuthoring();
|
|
188
|
+
const { t, format, noun: forms } = useEditorText();
|
|
189
|
+
|
|
190
|
+
/*
|
|
191
|
+
* Unique across the whole DOCUMENT, not just within this collection: the
|
|
192
|
+
* selection is document-wide, so two collections whose items were keyed by
|
|
193
|
+
* position alone would select together.
|
|
194
|
+
*/
|
|
195
|
+
const ids = collection.items.map(
|
|
196
|
+
(_, index) => collection.keyOf?.(index) ?? `${basePath ?? noun}:${index}`,
|
|
197
|
+
);
|
|
198
|
+
const sortable = Boolean(authoring) && collection.canMove;
|
|
199
|
+
|
|
200
|
+
/*
|
|
201
|
+
* An UNFILLED item is not drawn on a document being read.
|
|
202
|
+
*
|
|
203
|
+
* "A placeholder is an absence" is already the domain's rule — `renderText`
|
|
204
|
+
* omits an unfilled entry from the text export and reports it as omitted —
|
|
205
|
+
* and this is the same rule for the rendered document. In the editor an
|
|
206
|
+
* entry the candidate has added and not yet typed into is guidance they are
|
|
207
|
+
* about to fill in; in the preview, the printed page and the exported file it
|
|
208
|
+
* is nothing at all, and it must LOOK like nothing.
|
|
209
|
+
*
|
|
210
|
+
* That last part is why this is a filter and not a style. A blank item still
|
|
211
|
+
* has a separator: Harvard draws one between contact items with
|
|
212
|
+
* `.tpl-harvard__contact-item + .tpl-harvard__contact-item::before`, so a
|
|
213
|
+
* résumé carrying blank links printed a run of bare `|` bars with nothing
|
|
214
|
+
* between them. The separator belongs to the element, so the only way to
|
|
215
|
+
* remove it is not to render the element.
|
|
216
|
+
*/
|
|
217
|
+
const drawn = collection.items
|
|
218
|
+
.map((item, index) => ({ item, index }))
|
|
219
|
+
.filter(({ item }) => Boolean(authoring) || !isUnfilled(item));
|
|
220
|
+
|
|
221
|
+
const rendered = drawn.map(({ index }) => (
|
|
222
|
+
<ReadOnlyItem
|
|
223
|
+
key={ids[index]}
|
|
224
|
+
collection={collection}
|
|
225
|
+
index={index}
|
|
226
|
+
noun={noun}
|
|
227
|
+
label={label}
|
|
228
|
+
gap={gap}
|
|
229
|
+
path={
|
|
230
|
+
collection.pathOf?.(index) ??
|
|
231
|
+
`${basePath ?? ''}.${index}`.replace(/^\./, '')
|
|
232
|
+
}
|
|
233
|
+
>
|
|
234
|
+
{children}
|
|
235
|
+
</ReadOnlyItem>
|
|
236
|
+
));
|
|
237
|
+
|
|
238
|
+
/*
|
|
239
|
+
* An empty collection has no item to hang "add below" on. A BLOCK control
|
|
240
|
+
* here moves nothing, because a template omits a section it has no data for —
|
|
241
|
+
* there is no line below it to push. Inside a line of the document that is
|
|
242
|
+
* false, and `emptyAdd` is how a template says so.
|
|
243
|
+
*/
|
|
244
|
+
const empty = authoring && collection.canAdd && collection.items.length === 0;
|
|
245
|
+
|
|
246
|
+
return (
|
|
247
|
+
<>
|
|
248
|
+
{authoring ? (
|
|
249
|
+
/*
|
|
250
|
+
* The read-only items are the FALLBACK, so the document is on screen
|
|
251
|
+
* before the editing chunk arrives rather than after it — a candidate
|
|
252
|
+
* opening the editor sees their résumé, then its controls.
|
|
253
|
+
*/
|
|
254
|
+
<Suspense fallback={rendered}>
|
|
255
|
+
<AuthoredItems
|
|
256
|
+
collection={collection}
|
|
257
|
+
basePath={basePath}
|
|
258
|
+
noun={noun}
|
|
259
|
+
label={label}
|
|
260
|
+
gap={gap}
|
|
261
|
+
ids={ids}
|
|
262
|
+
sortable={sortable}
|
|
263
|
+
>
|
|
264
|
+
{children}
|
|
265
|
+
</AuthoredItems>
|
|
266
|
+
</Suspense>
|
|
267
|
+
) : (
|
|
268
|
+
rendered
|
|
269
|
+
)}
|
|
270
|
+
|
|
271
|
+
{/*
|
|
272
|
+
* Adding to a collection that is empty.
|
|
273
|
+
*
|
|
274
|
+
* `block` is a control on its own line, and it can be: a template omits a
|
|
275
|
+
* section it has no data for, so there is no line below it to push.
|
|
276
|
+
*
|
|
277
|
+
* `inline` exists because that reasoning stops at a section. A collection
|
|
278
|
+
* rendered INSIDE a line — the links in a contact row — was drawing a
|
|
279
|
+
* dashed button on a second line the preview does not have, so the header
|
|
280
|
+
* was one line taller in the editor than in the file. Marking it chrome
|
|
281
|
+
* was not enough: chrome that sits in the flow still moves the document,
|
|
282
|
+
* which is what `LinkField.spec.tsx` could not see, because it strips
|
|
283
|
+
* chrome before comparing.
|
|
284
|
+
*
|
|
285
|
+
* The inline form is an empty FIELD with a placeholder, sized like the
|
|
286
|
+
* items beside it. Pressing it mints the entry, and the entry's own field
|
|
287
|
+
* takes over — so the line keeps its shape and the control reads as the
|
|
288
|
+
* thing it produces.
|
|
289
|
+
*/}
|
|
290
|
+
{empty &&
|
|
291
|
+
(emptyAdd === 'inline' ? (
|
|
292
|
+
<button
|
|
293
|
+
type="button"
|
|
294
|
+
className="tpl-collection__add-inline"
|
|
295
|
+
data-chrome
|
|
296
|
+
contentEditable={false}
|
|
297
|
+
data-placeholder={format(t.entry.addFirstPlaceholder, forms(noun))}
|
|
298
|
+
aria-label={format(t.entry.addFirstLabel, forms(noun))}
|
|
299
|
+
onClick={() => collection.add()}
|
|
300
|
+
/>
|
|
301
|
+
) : (
|
|
302
|
+
<div
|
|
303
|
+
className="tpl-collection__add"
|
|
304
|
+
data-chrome
|
|
305
|
+
contentEditable={false}
|
|
306
|
+
>
|
|
307
|
+
<button
|
|
308
|
+
type="button"
|
|
309
|
+
className="tpl-collection__add-btn"
|
|
310
|
+
onClick={() => collection.add()}
|
|
311
|
+
>
|
|
312
|
+
{format(t.entry.addFirst, forms(noun))}
|
|
313
|
+
</button>
|
|
314
|
+
</div>
|
|
315
|
+
))}
|
|
316
|
+
</>
|
|
317
|
+
);
|
|
318
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArrowDownIcon,
|
|
3
|
+
ArrowUpIcon,
|
|
4
|
+
GripIcon,
|
|
5
|
+
PlusIcon,
|
|
6
|
+
TrashIcon,
|
|
7
|
+
} from './icons.js';
|
|
8
|
+
import type { CollectionHandle } from './useCollection.js';
|
|
9
|
+
import './collection.css';
|
|
10
|
+
import { useEntryText } from './entry-text.js';
|
|
11
|
+
import { useEditorText } from '../i18n/index.js';
|
|
12
|
+
import { LibraryAction } from './library/LibraryAction.js';
|
|
13
|
+
|
|
14
|
+
/** Where an item came from, which decides what removing it means. */
|
|
15
|
+
export type ItemOrigin = 'added' | 'written';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The overlay for the entry the candidate has selected: what this region is,
|
|
19
|
+
* and everything that can be done to it.
|
|
20
|
+
*
|
|
21
|
+
* Two things it is NOT allowed to be. It is not in the document's flow — it is
|
|
22
|
+
* absolutely positioned above the entry, so appearing cannot move a line and the
|
|
23
|
+
* page break stays where the print stylesheet puts it. And it is not on paper —
|
|
24
|
+
* it is `data-chrome`, hidden by the print rules, and the selection is cleared
|
|
25
|
+
* on `beforeprint` besides.
|
|
26
|
+
*
|
|
27
|
+
* Every action here is also on the keyboard: the buttons are buttons, they are
|
|
28
|
+
* in the tab order, and `move` is the same call the drag handle makes. The
|
|
29
|
+
* overlay is how the operations are DISCOVERED, never the only way to reach
|
|
30
|
+
* them — `editor-usability` (#35) names mouse-only editing as a defect, and an
|
|
31
|
+
* affordance that fixed discoverability by making everything a drag would be
|
|
32
|
+
* trading one for the other.
|
|
33
|
+
*/
|
|
34
|
+
export function EntryOverlay<T>({
|
|
35
|
+
collection,
|
|
36
|
+
index,
|
|
37
|
+
noun,
|
|
38
|
+
label: section,
|
|
39
|
+
handleProps,
|
|
40
|
+
}: {
|
|
41
|
+
collection: CollectionHandle<T> & { originOf?: (i: number) => ItemOrigin };
|
|
42
|
+
index: number;
|
|
43
|
+
noun: string;
|
|
44
|
+
/** Which section this is in, so the bar says where it is acting. */
|
|
45
|
+
label: string;
|
|
46
|
+
/**
|
|
47
|
+
* What makes this item draggable, when dragging is offered at all.
|
|
48
|
+
*
|
|
49
|
+
* A HANDLE rather than the whole entry: the entry is full of live text
|
|
50
|
+
* fields, and a drag that begins anywhere inside one would be competing with
|
|
51
|
+
* selecting a word.
|
|
52
|
+
*/
|
|
53
|
+
handleProps?: Record<string, unknown>;
|
|
54
|
+
}) {
|
|
55
|
+
const origin = collection.originOf?.(index) ?? 'added';
|
|
56
|
+
const refusal = collection.removeReason(index);
|
|
57
|
+
const last = collection.items.length - 1;
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
* "Experience · Role 2" — where, then which.
|
|
61
|
+
*
|
|
62
|
+
* Sentence case, because it is read as a name rather than as a heading; and
|
|
63
|
+
* the section first, because a candidate with six sections and eleven bullets
|
|
64
|
+
* needs to know which document they are in before which item.
|
|
65
|
+
*/
|
|
66
|
+
const text = useEntryText(noun, index, origin);
|
|
67
|
+
const editor = useEditorText();
|
|
68
|
+
const label = editor.format(editor.t.entry.name, {
|
|
69
|
+
...editor.noun(noun),
|
|
70
|
+
section,
|
|
71
|
+
position: index + 1,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<span
|
|
76
|
+
className="tpl-entry-overlay"
|
|
77
|
+
data-chrome
|
|
78
|
+
contentEditable={false}
|
|
79
|
+
role="toolbar"
|
|
80
|
+
aria-label={editor.format(editor.t.entry.toolbar, { name: label })}
|
|
81
|
+
>
|
|
82
|
+
{handleProps ? (
|
|
83
|
+
<span
|
|
84
|
+
className="tpl-entry-overlay__grip"
|
|
85
|
+
title={text.drag}
|
|
86
|
+
{...handleProps}
|
|
87
|
+
>
|
|
88
|
+
<GripIcon />
|
|
89
|
+
<span className="tpl-entry-overlay__label">{label}</span>
|
|
90
|
+
</span>
|
|
91
|
+
) : (
|
|
92
|
+
<span className="tpl-entry-overlay__grip" data-static>
|
|
93
|
+
<span className="tpl-entry-overlay__label">{label}</span>
|
|
94
|
+
</span>
|
|
95
|
+
)}
|
|
96
|
+
|
|
97
|
+
<span className="tpl-entry-overlay__divider" aria-hidden="true" />
|
|
98
|
+
|
|
99
|
+
{collection.canMove && (
|
|
100
|
+
<>
|
|
101
|
+
<button
|
|
102
|
+
type="button"
|
|
103
|
+
className="tpl-entry-overlay__btn"
|
|
104
|
+
title={text.moveUp}
|
|
105
|
+
aria-label={text.moveUpLabel}
|
|
106
|
+
disabled={index === 0}
|
|
107
|
+
onClick={() => collection.move(index, index - 1)}
|
|
108
|
+
>
|
|
109
|
+
<ArrowUpIcon />
|
|
110
|
+
</button>
|
|
111
|
+
<button
|
|
112
|
+
type="button"
|
|
113
|
+
className="tpl-entry-overlay__btn"
|
|
114
|
+
title={text.moveDown}
|
|
115
|
+
aria-label={text.moveDownLabel}
|
|
116
|
+
disabled={index === last}
|
|
117
|
+
onClick={() => collection.move(index, index + 1)}
|
|
118
|
+
>
|
|
119
|
+
<ArrowDownIcon />
|
|
120
|
+
</button>
|
|
121
|
+
</>
|
|
122
|
+
)}
|
|
123
|
+
|
|
124
|
+
{collection.canAdd && (
|
|
125
|
+
<button
|
|
126
|
+
type="button"
|
|
127
|
+
className="tpl-entry-overlay__btn"
|
|
128
|
+
title={text.addBelow}
|
|
129
|
+
aria-label={text.addAfterLabel}
|
|
130
|
+
onClick={() => collection.add(index)}
|
|
131
|
+
>
|
|
132
|
+
<PlusIcon />
|
|
133
|
+
</button>
|
|
134
|
+
)}
|
|
135
|
+
<LibraryAction
|
|
136
|
+
collection={collection}
|
|
137
|
+
index={index}
|
|
138
|
+
noun={noun}
|
|
139
|
+
className="tpl-entry-overlay__btn"
|
|
140
|
+
/>
|
|
141
|
+
|
|
142
|
+
<button
|
|
143
|
+
type="button"
|
|
144
|
+
className="tpl-entry-overlay__btn"
|
|
145
|
+
data-tone="danger"
|
|
146
|
+
disabled={refusal !== undefined}
|
|
147
|
+
/*
|
|
148
|
+
* The word is the honest one for what actually happens. Removing an
|
|
149
|
+
* addition deletes it; "removing" a writer-produced entry HIDES it, and
|
|
150
|
+
* a control that said delete would be describing an operation the
|
|
151
|
+
* product refuses to perform — the score and the requirement audit are
|
|
152
|
+
* derived against that content.
|
|
153
|
+
*/
|
|
154
|
+
title={refusal ?? text.remove}
|
|
155
|
+
aria-label={text.removeLabel}
|
|
156
|
+
onClick={() => collection.remove(index)}
|
|
157
|
+
>
|
|
158
|
+
<TrashIcon />
|
|
159
|
+
</button>
|
|
160
|
+
</span>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
DndContext,
|
|
4
|
+
KeyboardSensor,
|
|
5
|
+
PointerSensor,
|
|
6
|
+
closestCenter,
|
|
7
|
+
useSensor,
|
|
8
|
+
useSensors,
|
|
9
|
+
type DragEndEvent,
|
|
10
|
+
} from '@dnd-kit/core';
|
|
11
|
+
import {
|
|
12
|
+
SortableContext,
|
|
13
|
+
sortableKeyboardCoordinates,
|
|
14
|
+
useSortable,
|
|
15
|
+
verticalListSortingStrategy,
|
|
16
|
+
} from '@dnd-kit/sortable';
|
|
17
|
+
import {
|
|
18
|
+
restrictToParentElement,
|
|
19
|
+
restrictToVerticalAxis,
|
|
20
|
+
} from '@dnd-kit/modifiers';
|
|
21
|
+
import { useRepaginate } from '../PagedSheet.js';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Dragging, as ONE presentation over `move(from, to)`.
|
|
25
|
+
*
|
|
26
|
+
* Everything here is optional by construction: the same operation is on the
|
|
27
|
+
* keyboard and on the ↑/↓ controls, the document is fully authorable without a
|
|
28
|
+
* pointer, and removing this file would cost the product a convenience rather
|
|
29
|
+
* than a capability. That is the test for whether a drag library has been let
|
|
30
|
+
* too far in.
|
|
31
|
+
*
|
|
32
|
+
* `@dnd-kit` and not the lighter `@atlaskit/pragmatic-drag-and-drop`, for two
|
|
33
|
+
* reasons that are properties of THIS document rather than of the libraries:
|
|
34
|
+
* a selected editable field is a live `<textarea>`, and the native HTML5 drag
|
|
35
|
+
* API the lighter library builds on fights text selection inside one; and dnd-kit
|
|
36
|
+
* never re-parents a node — it transforms, and the array is reordered in state —
|
|
37
|
+
* where a DOM-mutating sortable would fight both React and the paginator, which
|
|
38
|
+
* is what `resume-document-formatting` (#30) refused when it chose to paginate by
|
|
39
|
+
* pushing blocks rather than by re-parenting them.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
export interface SortableItemsProps {
|
|
43
|
+
/** The stable key per position, in order. Supplied by the collection. */
|
|
44
|
+
ids: readonly string[];
|
|
45
|
+
onMove: (from: number, to: number) => void;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A handle for one item, for the template's chrome to render.
|
|
52
|
+
*
|
|
53
|
+
* Returned as props rather than as an element so the handle sits wherever the
|
|
54
|
+
* controls sit, in the margin, and inherits their positioning.
|
|
55
|
+
*/
|
|
56
|
+
export function useDragHandle(id: string, disabled?: boolean) {
|
|
57
|
+
const {
|
|
58
|
+
attributes,
|
|
59
|
+
listeners,
|
|
60
|
+
setNodeRef,
|
|
61
|
+
transform,
|
|
62
|
+
transition,
|
|
63
|
+
isDragging,
|
|
64
|
+
} = useSortable({ id, disabled });
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
handleProps: { ...attributes, ...listeners },
|
|
68
|
+
setNodeRef,
|
|
69
|
+
style: {
|
|
70
|
+
/*
|
|
71
|
+
* Written out rather than pulled from `@dnd-kit/utilities`, which is one
|
|
72
|
+
* more package for one string. The axis is restricted to vertical, so `x`
|
|
73
|
+
* is always zero — but it is written anyway, because a modifier is a
|
|
74
|
+
* choice and this should not silently break if the choice changes.
|
|
75
|
+
*/
|
|
76
|
+
transform: transform
|
|
77
|
+
? `translate3d(${transform.x}px, ${transform.y}px, 0)`
|
|
78
|
+
: undefined,
|
|
79
|
+
transition,
|
|
80
|
+
/* Lifted, so the item being moved is legible against the ones it passes. */
|
|
81
|
+
zIndex: isDragging ? 2 : undefined,
|
|
82
|
+
opacity: isDragging ? 0.85 : undefined,
|
|
83
|
+
},
|
|
84
|
+
isDragging,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function SortableItems({
|
|
89
|
+
ids,
|
|
90
|
+
onMove,
|
|
91
|
+
disabled,
|
|
92
|
+
children,
|
|
93
|
+
}: SortableItemsProps) {
|
|
94
|
+
const repaginate = useRepaginate();
|
|
95
|
+
|
|
96
|
+
const sensors = useSensors(
|
|
97
|
+
/*
|
|
98
|
+
* A drag only begins after the pointer has travelled a little. Without the
|
|
99
|
+
* distance constraint a click meant to select a field would start a drag,
|
|
100
|
+
* which in a document whose whole point is in-place editing is the more
|
|
101
|
+
* likely intent by far.
|
|
102
|
+
*/
|
|
103
|
+
useSensor(PointerSensor, { activationConstraint: { distance: 6 } }),
|
|
104
|
+
useSensor(KeyboardSensor, {
|
|
105
|
+
coordinateGetter: sortableKeyboardCoordinates,
|
|
106
|
+
}),
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
function onDragEnd(event: DragEndEvent) {
|
|
110
|
+
const { active, over } = event;
|
|
111
|
+
if (!over || active.id === over.id) return;
|
|
112
|
+
const from = ids.indexOf(String(active.id));
|
|
113
|
+
const to = ids.indexOf(String(over.id));
|
|
114
|
+
if (from === -1 || to === -1) return;
|
|
115
|
+
onMove(from, to);
|
|
116
|
+
/*
|
|
117
|
+
* ONE repagination, on drop. The paginator measures where blocks land and
|
|
118
|
+
* corrects its own prediction against it; a live drag transform moves a
|
|
119
|
+
* block without moving the layout, so measuring mid-drag would feed the
|
|
120
|
+
* correction a position nothing settles at.
|
|
121
|
+
*/
|
|
122
|
+
repaginate();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return (
|
|
126
|
+
<DndContext
|
|
127
|
+
sensors={sensors}
|
|
128
|
+
collisionDetection={closestCenter}
|
|
129
|
+
modifiers={[restrictToVerticalAxis, restrictToParentElement]}
|
|
130
|
+
onDragEnd={onDragEnd}
|
|
131
|
+
/*
|
|
132
|
+
* The library's own screen-reader markup, drawn in the BODY.
|
|
133
|
+
*
|
|
134
|
+
* `DndContext` renders two hidden `<div>`s of its own — the drag
|
|
135
|
+
* instructions and the live region that announces a move — as children,
|
|
136
|
+
* which is fine above a list of roles and invalid inside Harvard's
|
|
137
|
+
* contact `<p>`. A browser closes the paragraph at the first `<div>`, so
|
|
138
|
+
* a contact line with two or more links came apart on screen: the same
|
|
139
|
+
* defect the inline add control was fixed for, arriving from the drag
|
|
140
|
+
* layer. `container` is the library's own answer, and it portals them
|
|
141
|
+
* without touching what they say.
|
|
142
|
+
*/
|
|
143
|
+
accessibility={{
|
|
144
|
+
container: typeof document === 'undefined' ? undefined : document.body,
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
<SortableContext
|
|
148
|
+
items={ids as string[]}
|
|
149
|
+
strategy={verticalListSortingStrategy}
|
|
150
|
+
disabled={disabled}
|
|
151
|
+
>
|
|
152
|
+
{/*
|
|
153
|
+
* No marker element here, and that is a fix rather than a tidy-up.
|
|
154
|
+
*
|
|
155
|
+
* This held a `<div hidden data-dragging>` that nothing read — no
|
|
156
|
+
* stylesheet, no test — and a `<div>` is not valid inside a `<p>`. A
|
|
157
|
+
* browser resolves that by CLOSING the paragraph, so an inline
|
|
158
|
+
* collection with two or more items tore Harvard's contact line in
|
|
159
|
+
* half: the exact defect the inline add control was fixed for, arriving
|
|
160
|
+
* from the drag layer instead. An element that does nothing cannot earn
|
|
161
|
+
* that.
|
|
162
|
+
*/}
|
|
163
|
+
{children}
|
|
164
|
+
</SortableContext>
|
|
165
|
+
</DndContext>
|
|
166
|
+
);
|
|
167
|
+
}
|