@rebasepro/admin 0.5.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dist/CollectionEditorDialog-HNXGxXdO.js +3549 -0
- package/dist/CollectionEditorDialog-HNXGxXdO.js.map +1 -0
- package/dist/CollectionsStudioView-B1mN33GB.js +170 -0
- package/dist/CollectionsStudioView-B1mN33GB.js.map +1 -0
- package/dist/PropertyEditView-C2wp8kQ9.js +3660 -0
- package/dist/PropertyEditView-C2wp8kQ9.js.map +1 -0
- package/dist/collection_editor/ConfigControllerProvider.d.ts +2 -2
- package/dist/collection_editor/ui/AddKanbanColumnAction.d.ts +2 -1
- package/dist/collection_editor/ui/CollectionViewHeaderAction.d.ts +2 -1
- package/dist/collection_editor/ui/EditorCollectionAction.d.ts +1 -1
- package/dist/collection_editor/ui/EditorCollectionActionStart.d.ts +1 -1
- package/dist/collection_editor/ui/EditorEntityAction.d.ts +1 -1
- package/dist/collection_editor/ui/HomePageEditorCollectionAction.d.ts +1 -1
- package/dist/collection_editor/ui/KanbanSetupAction.d.ts +2 -1
- package/dist/collection_editor/ui/MissingReferenceWidget.d.ts +1 -1
- package/dist/collection_editor/ui/NewCollectionButton.d.ts +1 -1
- package/dist/collection_editor/ui/NewCollectionCard.d.ts +1 -1
- package/dist/collection_editor/ui/PropertyAddColumnComponent.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/AICollectionGeneratorPopover.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/AIModifiedPathsContext.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionDetailsForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionEditorDialog.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionEditorWelcomeView.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/CollectionJsonImportDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/CollectionRLSTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionRelationsTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionStudioView.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/CollectionYupValidation.d.ts +1 -9
- package/dist/collection_editor/ui/collection_editor/CollectionsStudioView.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/DisplaySettingsForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EntityActionsEditTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EntityActionsSelectDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EntityCustomViewsSelectDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/EnumForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/GeneralSettingsForm.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/GetCodeDialog.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/KanbanConfigSection.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/LayoutModeSwitch.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/PropertyEditView.d.ts +4 -4
- package/dist/collection_editor/ui/collection_editor/PropertyFieldPreview.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/PropertyTree.d.ts +2 -2
- package/dist/collection_editor/ui/collection_editor/SubcollectionsEditTab.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/SwitchControl.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/ViewModeSwitch.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportDataPreview.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/import/CollectionEditorImportMapping.d.ts +3 -2
- package/dist/collection_editor/ui/collection_editor/properties/BlockPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/BooleanPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/DateTimePropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/EnumPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/KeyValuePropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/MapPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/MarkdownPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/NumberPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/ReferencePropertyField.d.ts +3 -2
- package/dist/collection_editor/ui/collection_editor/properties/RelationPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/RepeatPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/StoragePropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/StringPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/UrlPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/VectorPropertyField.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/advanced/AdvancedPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsEditor.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/ConditionsPanel.d.ts +1 -1
- package/dist/collection_editor/ui/collection_editor/properties/conditions/EnumConditionsEditor.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/ArrayPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/GeneralPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/NumberPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/StringPropertyValidation.d.ts +2 -1
- package/dist/collection_editor/ui/collection_editor/properties/validation/ValidationPanel.d.ts +1 -1
- package/dist/collection_editor_ui.js +4 -11
- package/dist/components/ArrayContainer.d.ts +3 -3
- package/dist/components/ClearFilterSortButton.d.ts +1 -1
- package/dist/components/CollectionEditorDialogs.d.ts +2 -1
- package/dist/components/CollectionPanel.d.ts +2 -27
- package/dist/components/DefaultAppBar.d.ts +1 -1
- package/dist/components/DefaultDrawer.d.ts +4 -4
- package/dist/components/DeleteEntityDialog.d.ts +2 -1
- package/dist/components/DrawerNavigationGroup.d.ts +1 -1
- package/dist/components/DrawerNavigationItem.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/TableMultipleRelationField.d.ts +3 -3
- package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +3 -3
- package/dist/components/EntityCollectionTable/fields/TableRelationField.d.ts +3 -3
- package/dist/components/EntityCollectionTable/fields/TableRelationSelectorField.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
- package/dist/components/EntityCollectionTable/fields/VirtualTableDateField.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableInput.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableNumberInput.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableSelect.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableSwitch.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/VirtualTableUserSelect.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +4 -3
- package/dist/components/EntityCollectionView/Board.d.ts +2 -1
- package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +1 -1
- package/dist/components/EntityCollectionView/BoardSortableList.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCard.d.ts +2 -1
- package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionCardView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionListView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionView.d.ts +0 -24
- package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +2 -1
- package/dist/components/EntityCollectionView/FilterPresetsButton.d.ts +2 -1
- package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
- package/dist/components/EntityCollectionView/SplitListView.d.ts +1 -1
- package/dist/components/EntityCollectionView/ViewModeToggle.d.ts +2 -1
- package/dist/components/EntityDetailView.d.ts +1 -1
- package/dist/components/EntityEditView.d.ts +2 -2
- package/dist/components/EntityEditViewFormActions.d.ts +2 -1
- package/dist/components/EntityJsonPreview.d.ts +2 -1
- package/dist/components/EntityPreview.d.ts +3 -3
- package/dist/components/EntitySidePanel.d.ts +2 -1
- package/dist/components/EntityView.d.ts +2 -1
- package/dist/components/FieldCaption.d.ts +1 -1
- package/dist/components/HomePage/ContentHomePage.d.ts +1 -1
- package/dist/components/HomePage/FavouritesView.d.ts +1 -1
- package/dist/components/HomePage/HomePageDnD.d.ts +4 -4
- package/dist/components/HomePage/NavigationCard.d.ts +1 -1
- package/dist/components/HomePage/NavigationCardBinding.d.ts +2 -1
- package/dist/components/HomePage/NavigationGroup.d.ts +2 -2
- package/dist/components/HomePage/RenameGroupDialog.d.ts +2 -1
- package/dist/components/HomePage/SmallNavigationCard.d.ts +1 -1
- package/dist/components/PropertyCollectionView.d.ts +2 -1
- package/dist/components/PropertyIdCopyTooltip.d.ts +2 -2
- package/dist/components/RebaseAuthGate.d.ts +1 -1
- package/dist/components/RebaseLayout.d.ts +1 -1
- package/dist/components/RebaseNavigation.d.ts +1 -1
- package/dist/components/RebaseRouteDefs.d.ts +1 -1
- package/dist/components/RebaseShell.d.ts +1 -1
- package/dist/components/ReferenceTable/EntitySelectionTable.d.ts +1 -1
- package/dist/components/ReferenceWidget.d.ts +2 -1
- package/dist/components/SearchIconsView.d.ts +2 -1
- package/dist/components/SelectableTable/SelectableTable.d.ts +2 -2
- package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/RelationFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -1
- package/dist/components/SideDialogs.d.ts +1 -1
- package/dist/components/SideEntityProvider.d.ts +1 -1
- package/dist/components/admin/CreationResultDialog.d.ts +2 -1
- package/dist/components/app/AppBar.d.ts +1 -1
- package/dist/components/app/Drawer.d.ts +1 -1
- package/dist/components/common/default_entity_actions.d.ts +2 -1
- package/dist/components/history/EntityHistoryEntry.d.ts +1 -1
- package/dist/components/history/EntityHistoryView.d.ts +1 -1
- package/dist/components/history/LastEditedByFormAction.d.ts +2 -1
- package/dist/components/history/LastEditedByIndicator.d.ts +2 -1
- package/dist/components/history/UserChip.d.ts +1 -1
- package/dist/data_export/export/BasicExportAction.d.ts +2 -1
- package/dist/data_export/export/ExportCollectionAction.d.ts +1 -1
- package/dist/data_import/components/DataNewPropertiesMapping.d.ts +1 -1
- package/dist/data_import/components/ImportFileUpload.d.ts +1 -1
- package/dist/data_import/components/ImportNewPropertyFieldPreview.d.ts +2 -1
- package/dist/data_import/components/ImportSaveInProgress.d.ts +1 -1
- package/dist/data_import/import/ImportCollectionAction.d.ts +4 -3
- package/dist/editor/components/SlashCommandMenu.d.ts +2 -1
- package/dist/editor/editor.d.ts +10 -4
- package/dist/editor/selectors/color-selector.d.ts +1 -1
- package/dist/editor/selectors/link-selector.d.ts +1 -1
- package/dist/editor/selectors/node-selector.d.ts +1 -1
- package/dist/editor/selectors/text-buttons.d.ts +1 -1
- package/dist/editor.js +2623 -3574
- package/dist/editor.js.map +1 -1
- package/dist/form/EntityForm.d.ts +2 -1
- package/dist/form/EntityFormActions.d.ts +2 -1
- package/dist/form/components/FieldHelperText.d.ts +1 -1
- package/dist/form/components/FormEntry.d.ts +1 -1
- package/dist/form/components/FormLayout.d.ts +1 -1
- package/dist/form/components/LabelWithIconAndTooltip.d.ts +1 -1
- package/dist/form/components/LocalChangesMenu.d.ts +2 -1
- package/dist/form/components/StorageItemPreview.d.ts +2 -1
- package/dist/form/components/StorageUploadProgress.d.ts +2 -1
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/BlockFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MapFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +4 -3
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MultipleRelationFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/RelationFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/RepeatFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/SelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -2
- package/dist/form/field_bindings/SwitchFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/VectorFieldBinding.d.ts +2 -1
- package/dist/history-BO6VT85a.js +311 -0
- package/dist/history-BO6VT85a.js.map +1 -0
- package/dist/hooks/navigation/useBuildNavigationStateController.d.ts +0 -2
- package/dist/hooks/navigation/useNavigationResolution.d.ts +5 -6
- package/dist/hooks/navigation/useResolvedCollections.d.ts +0 -2
- package/dist/hooks/useBreadcrumbsController.d.ts +2 -32
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3393
- package/dist/markdown-CklalUUk.js +526 -0
- package/dist/markdown-CklalUUk.js.map +1 -0
- package/dist/preview/components/ArrayEnumPreview.d.ts +2 -1
- package/dist/preview/components/EmptyValue.d.ts +2 -1
- package/dist/preview/components/EnumValuesChip.d.ts +1 -1
- package/dist/preview/components/ImagePreview.d.ts +2 -1
- package/dist/preview/components/ReferencePreview.d.ts +2 -1
- package/dist/preview/components/RelationPreview.d.ts +2 -1
- package/dist/preview/components/StorageThumbnail.d.ts +1 -1
- package/dist/preview/components/UserPreview.d.ts +6 -3
- package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfRelationsPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +2 -1
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +3 -2
- package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +5 -4
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/routes/RebaseRoute.d.ts +1 -1
- package/dist/src-BYniefVu.js +24011 -0
- package/dist/src-BYniefVu.js.map +1 -0
- package/dist/types/components/PropertyPreviewProps.d.ts +4 -0
- package/dist/types/components/formex.d.ts +1 -40
- package/dist/types/fields.d.ts +9 -1
- package/dist/util/navigation_utils.d.ts +2 -1
- package/dist/util/previews.d.ts +5 -0
- package/dist/util/property_utils.d.ts +1 -1
- package/package.json +29 -26
- package/src/collection_editor/ConfigControllerProvider.tsx +10 -7
- package/src/collection_editor/ui/AddKanbanColumnAction.tsx +2 -0
- package/src/collection_editor/ui/CollectionViewHeaderAction.tsx +2 -1
- package/src/collection_editor/ui/EditorCollectionAction.tsx +2 -1
- package/src/collection_editor/ui/EditorCollectionActionStart.tsx +2 -1
- package/src/collection_editor/ui/EditorEntityAction.tsx +2 -1
- package/src/collection_editor/ui/KanbanSetupAction.tsx +2 -1
- package/src/collection_editor/ui/MissingReferenceWidget.tsx +2 -1
- package/src/collection_editor/ui/PropertyAddColumnComponent.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/CollectionDetailsForm.tsx +2 -3
- package/src/collection_editor/ui/collection_editor/CollectionEditorDialog.tsx +0 -1
- package/src/collection_editor/ui/collection_editor/CollectionPropertiesEditorForm.tsx +8 -4
- package/src/collection_editor/ui/collection_editor/DisplaySettingsForm.tsx +2 -1
- package/src/collection_editor/ui/collection_editor/PropertyEditView.tsx +1 -1
- package/src/collection_editor/ui/collection_editor/properties/RelationPropertyField.tsx +5 -2
- package/src/collection_editor/useLocalCollectionsConfigController.tsx +7 -2
- package/src/collection_editor/validateCollectionJson.ts +2 -2
- package/src/components/ArrayContainer.tsx +5 -5
- package/src/components/CollectionPanel.tsx +51 -25
- package/src/components/DefaultAppBar.tsx +1 -2
- package/src/components/DefaultDrawer.tsx +3 -2
- package/src/components/DrawerNavigationGroup.tsx +3 -2
- package/src/components/DrawerNavigationItem.tsx +4 -4
- package/src/components/EntityCollectionTable/fields/TableReferenceField.tsx +30 -9
- package/src/components/EntityCollectionTable/internal/EntityTableCell.tsx +1 -1
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +1 -0
- package/src/components/EntityCollectionView/Board.tsx +10 -8
- package/src/components/EntityCollectionView/BoardSortableList.tsx +2 -2
- package/src/components/EntityCollectionView/EntityCollectionBoardView.tsx +6 -2
- package/src/components/EntityCollectionView/EntityCollectionCardView.tsx +14 -4
- package/src/components/EntityCollectionView/EntityCollectionListView.tsx +48 -26
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +146 -73
- package/src/components/EntityCollectionView/EntityCollectionViewActions.tsx +2 -1
- package/src/components/EntityCollectionView/EntityCollectionViewStartActions.tsx +3 -2
- package/src/components/EntityCollectionView/FilterPresetsButton.tsx +4 -2
- package/src/components/EntityCollectionView/ViewModeToggle.tsx +0 -1
- package/src/components/EntityCollectionView/useBoardDataController.tsx +17 -15
- package/src/components/EntityCollectionView/useEntityPreviewSlots.ts +29 -19
- package/src/components/EntityDetailView.tsx +66 -30
- package/src/components/EntityEditView.tsx +70 -32
- package/src/components/EntitySidePanel.tsx +6 -3
- package/src/components/HomePage/ContentHomePage.tsx +3 -3
- package/src/components/HomePage/NavigationCard.tsx +9 -15
- package/src/components/HomePage/NavigationCardBinding.tsx +1 -1
- package/src/components/HomePage/NavigationGroup.tsx +1 -1
- package/src/components/HomePage/SmallNavigationCard.tsx +1 -5
- package/src/components/RebaseLayout.tsx +5 -2
- package/src/components/RebaseNavigation.tsx +1 -4
- package/src/components/RebaseRouteDefs.tsx +5 -3
- package/src/components/SearchIconsView.tsx +1 -1
- package/src/components/SelectableTable/SelectableTable.tsx +2 -3
- package/src/components/SelectableTable/SelectionStore.ts +9 -3
- package/src/components/SelectableTable/filters/StringNumberFilterField.tsx +28 -21
- package/src/components/UserSelector.tsx +92 -2
- package/src/components/common/default_entity_actions.tsx +33 -8
- package/src/components/field_configs.tsx +6 -3
- package/src/editor/editor.tsx +15 -9
- package/src/editor/extensions/Image/index.ts +2 -2
- package/src/editor/extensions/Image.ts +2 -2
- package/src/editor/extensions/clipboard.ts +2 -2
- package/src/editor/markdown-it-plugins.d.ts +24 -0
- package/src/editor/markdown.ts +2 -3
- package/src/form/EntityForm.tsx +21 -15
- package/src/form/field_bindings/MapFieldBinding.tsx +3 -3
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +4 -4
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +1 -1
- package/src/form/field_bindings/VectorFieldBinding.tsx +3 -3
- package/src/form/validation.ts +17 -15
- package/src/hooks/navigation/useBuildNavigationStateController.tsx +3 -6
- package/src/hooks/navigation/useNavigationResolution.ts +143 -19
- package/src/hooks/navigation/useResolvedCollections.ts +4 -6
- package/src/hooks/useBreadcrumbsController.tsx +2 -34
- package/src/hooks/useBuildSideEntityController.tsx +25 -3
- package/src/index.ts +2 -2
- package/src/preview/PropertyPreview.tsx +6 -2
- package/src/preview/components/ReferencePreview.tsx +64 -13
- package/src/preview/components/RelationPreview.tsx +101 -13
- package/src/preview/components/UserPreview.tsx +5 -14
- package/src/preview/property_previews/ArrayOfMapsPreview.tsx +1 -1
- package/src/routes/RebaseRoute.tsx +5 -4
- package/src/types/components/PropertyPreviewProps.tsx +5 -0
- package/src/types/components/formex.tsx +1 -45
- package/src/types/fields.tsx +10 -1
- package/src/util/navigation_utils.ts +14 -4
- package/src/util/previews.ts +101 -4
- package/dist/CollectionEditorDialog-C8E440oK.js +0 -4574
- package/dist/CollectionEditorDialog-C8E440oK.js.map +0 -1
- package/dist/CollectionsStudioView-Brr_b06v.js +0 -217
- package/dist/CollectionsStudioView-Brr_b06v.js.map +0 -1
- package/dist/ExportCollectionAction-D3TTYXrq.js +0 -446
- package/dist/ExportCollectionAction-D3TTYXrq.js.map +0 -1
- package/dist/ImportCollectionAction-Dn7lya6E.js +0 -685
- package/dist/ImportCollectionAction-Dn7lya6E.js.map +0 -1
- package/dist/PropertyEditView-ChBleIbN.js +0 -8197
- package/dist/PropertyEditView-ChBleIbN.js.map +0 -1
- package/dist/collection_editor_ui.js.map +0 -1
- package/dist/index-D3S9x_RP.js +0 -462
- package/dist/index-D3S9x_RP.js.map +0 -1
- package/dist/index-D9RNzm01.js +0 -12
- package/dist/index-D9RNzm01.js.map +0 -1
- package/dist/index-DrrT332R.js +0 -8
- package/dist/index-DrrT332R.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/markdown-DD2JDU1X.js +0 -618
- package/dist/markdown-DD2JDU1X.js.map +0 -1
- package/dist/useEntityHistory-UVsSclfZ.js +0 -123
- package/dist/useEntityHistory-UVsSclfZ.js.map +0 -1
- package/dist/util-COYYD8zr.js +0 -30474
- package/dist/util-COYYD8zr.js.map +0 -1
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { Schema } from "prosemirror-model";
|
|
3
|
+
import { tableNodes } from "prosemirror-tables";
|
|
4
|
+
import { MarkdownParser, MarkdownSerializer, defaultMarkdownParser, defaultMarkdownSerializer } from "prosemirror-markdown";
|
|
5
|
+
import markdownIt from "markdown-it";
|
|
6
|
+
import markdownItTaskLists from "markdown-it-task-lists";
|
|
7
|
+
import markdownItMark from "markdown-it-mark";
|
|
8
|
+
import markdownItIns from "markdown-it-ins";
|
|
9
|
+
//#region src/editor/schema.ts
|
|
10
|
+
var marks = {
|
|
11
|
+
link: {
|
|
12
|
+
attrs: {
|
|
13
|
+
href: {},
|
|
14
|
+
title: { default: null },
|
|
15
|
+
target: { default: "_blank" }
|
|
16
|
+
},
|
|
17
|
+
inclusive: false,
|
|
18
|
+
parseDOM: [{
|
|
19
|
+
tag: "a[href]",
|
|
20
|
+
getAttrs(dom) {
|
|
21
|
+
if (typeof dom === "string") return false;
|
|
22
|
+
return {
|
|
23
|
+
href: dom.getAttribute("href"),
|
|
24
|
+
title: dom.getAttribute("title"),
|
|
25
|
+
target: dom.getAttribute("target") || "_blank"
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}],
|
|
29
|
+
toDOM(node) {
|
|
30
|
+
const { href, title, target } = node.attrs;
|
|
31
|
+
return [
|
|
32
|
+
"a",
|
|
33
|
+
{
|
|
34
|
+
href,
|
|
35
|
+
title,
|
|
36
|
+
target,
|
|
37
|
+
class: "text-surface-700 dark:text-surface-accent-200 underline underline-offset-[3px] hover:text-primary transition-colors cursor-pointer"
|
|
38
|
+
},
|
|
39
|
+
0
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
bold: {
|
|
44
|
+
parseDOM: [
|
|
45
|
+
{ tag: "strong" },
|
|
46
|
+
{
|
|
47
|
+
tag: "b",
|
|
48
|
+
getAttrs: (node) => typeof node !== "string" && node.style.fontWeight !== "normal" && null
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
style: "font-weight=400",
|
|
52
|
+
clearMark: (m) => m.type.name === "bold"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
style: "font-weight",
|
|
56
|
+
getAttrs: (value) => typeof value === "string" && /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
toDOM() {
|
|
60
|
+
return ["strong", 0];
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
italic: {
|
|
64
|
+
parseDOM: [
|
|
65
|
+
{ tag: "i" },
|
|
66
|
+
{ tag: "em" },
|
|
67
|
+
{ style: "font-style=italic" }
|
|
68
|
+
],
|
|
69
|
+
toDOM() {
|
|
70
|
+
return ["em", 0];
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
strike: {
|
|
74
|
+
parseDOM: [
|
|
75
|
+
{ tag: "s" },
|
|
76
|
+
{ tag: "del" },
|
|
77
|
+
{ tag: "strike" },
|
|
78
|
+
{ style: "text-decoration=line-through" }
|
|
79
|
+
],
|
|
80
|
+
toDOM() {
|
|
81
|
+
return ["s", 0];
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
underline: {
|
|
85
|
+
parseDOM: [{ tag: "u" }, { style: "text-decoration=underline" }],
|
|
86
|
+
toDOM() {
|
|
87
|
+
return ["u", 0];
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
code: {
|
|
91
|
+
parseDOM: [{ tag: "code" }],
|
|
92
|
+
toDOM() {
|
|
93
|
+
return [
|
|
94
|
+
"code",
|
|
95
|
+
{
|
|
96
|
+
class: "rounded-md bg-surface-accent-50 dark:bg-surface-700 px-1.5 py-1 font-mono font-medium",
|
|
97
|
+
spellcheck: "false"
|
|
98
|
+
},
|
|
99
|
+
0
|
|
100
|
+
];
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
textStyle: {
|
|
104
|
+
attrs: { color: { default: null } },
|
|
105
|
+
parseDOM: [{
|
|
106
|
+
style: "color",
|
|
107
|
+
getAttrs: (value) => {
|
|
108
|
+
if (typeof value === "string") return { color: value };
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}],
|
|
112
|
+
toDOM(mark) {
|
|
113
|
+
let style = "";
|
|
114
|
+
if (mark.attrs.color) style += `color: ${mark.attrs.color};`;
|
|
115
|
+
return [
|
|
116
|
+
"span",
|
|
117
|
+
{ style },
|
|
118
|
+
0
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
highlight: {
|
|
123
|
+
attrs: { color: { default: null } },
|
|
124
|
+
parseDOM: [{
|
|
125
|
+
tag: "mark",
|
|
126
|
+
getAttrs: (dom) => {
|
|
127
|
+
if (typeof dom === "string") return false;
|
|
128
|
+
return { color: dom.style.backgroundColor || dom.getAttribute("data-color") };
|
|
129
|
+
}
|
|
130
|
+
}],
|
|
131
|
+
toDOM(mark) {
|
|
132
|
+
return [
|
|
133
|
+
"mark",
|
|
134
|
+
mark.attrs.color ? {
|
|
135
|
+
style: `background-color: ${mark.attrs.color}; color: inherit;`,
|
|
136
|
+
"data-color": mark.attrs.color
|
|
137
|
+
} : {},
|
|
138
|
+
0
|
|
139
|
+
];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
var schema = new Schema({
|
|
144
|
+
nodes: {
|
|
145
|
+
doc: { content: "block+" },
|
|
146
|
+
paragraph: {
|
|
147
|
+
content: "inline*",
|
|
148
|
+
group: "block",
|
|
149
|
+
parseDOM: [{ tag: "p" }],
|
|
150
|
+
toDOM() {
|
|
151
|
+
return ["p", 0];
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
text: { group: "inline" },
|
|
155
|
+
blockquote: {
|
|
156
|
+
content: "block+",
|
|
157
|
+
group: "block",
|
|
158
|
+
defining: true,
|
|
159
|
+
parseDOM: [{ tag: "blockquote" }],
|
|
160
|
+
toDOM() {
|
|
161
|
+
return [
|
|
162
|
+
"blockquote",
|
|
163
|
+
{ class: "border-l-4 border-primary" },
|
|
164
|
+
0
|
|
165
|
+
];
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
heading: {
|
|
169
|
+
attrs: { level: { default: 1 } },
|
|
170
|
+
content: "inline*",
|
|
171
|
+
group: "block",
|
|
172
|
+
defining: true,
|
|
173
|
+
parseDOM: [
|
|
174
|
+
{
|
|
175
|
+
tag: "h1",
|
|
176
|
+
attrs: { level: 1 }
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
tag: "h2",
|
|
180
|
+
attrs: { level: 2 }
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
tag: "h3",
|
|
184
|
+
attrs: { level: 3 }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
tag: "h4",
|
|
188
|
+
attrs: { level: 4 }
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
tag: "h5",
|
|
192
|
+
attrs: { level: 5 }
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
tag: "h6",
|
|
196
|
+
attrs: { level: 6 }
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
toDOM(node) {
|
|
200
|
+
return ["h" + node.attrs.level, 0];
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
horizontal_rule: {
|
|
204
|
+
group: "block",
|
|
205
|
+
parseDOM: [{ tag: "hr" }],
|
|
206
|
+
toDOM() {
|
|
207
|
+
return ["hr", { class: "mt-4 mb-6 border-t border-solid border-gray-200 dark:border-gray-800" }];
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
code_block: {
|
|
211
|
+
content: "text*",
|
|
212
|
+
marks: "",
|
|
213
|
+
group: "block",
|
|
214
|
+
code: true,
|
|
215
|
+
defining: true,
|
|
216
|
+
attrs: { language: { default: null } },
|
|
217
|
+
parseDOM: [{
|
|
218
|
+
tag: "pre",
|
|
219
|
+
preserveWhitespace: "full"
|
|
220
|
+
}],
|
|
221
|
+
toDOM(node) {
|
|
222
|
+
return [
|
|
223
|
+
"pre",
|
|
224
|
+
{ class: "rounded bg-blue-50 dark:bg-surface-700 border border-solid border-gray-200 dark:border-gray-800 p-5 font-mono font-medium text-gray-800 dark:text-gray-200" },
|
|
225
|
+
["code", 0]
|
|
226
|
+
];
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
image: {
|
|
230
|
+
inline: false,
|
|
231
|
+
group: "block",
|
|
232
|
+
attrs: {
|
|
233
|
+
src: {},
|
|
234
|
+
alt: { default: null },
|
|
235
|
+
title: { default: null }
|
|
236
|
+
},
|
|
237
|
+
draggable: true,
|
|
238
|
+
parseDOM: [{
|
|
239
|
+
tag: "img[src]",
|
|
240
|
+
getAttrs(dom) {
|
|
241
|
+
if (typeof dom === "string") return false;
|
|
242
|
+
return {
|
|
243
|
+
src: dom.getAttribute("src"),
|
|
244
|
+
title: dom.getAttribute("title"),
|
|
245
|
+
alt: dom.getAttribute("alt")
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}],
|
|
249
|
+
toDOM(node) {
|
|
250
|
+
const { src, alt, title } = node.attrs;
|
|
251
|
+
return ["img", {
|
|
252
|
+
src,
|
|
253
|
+
alt,
|
|
254
|
+
title,
|
|
255
|
+
class: "rounded-lg max-w-full !m-0"
|
|
256
|
+
}];
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
bullet_list: {
|
|
260
|
+
content: "list_item+",
|
|
261
|
+
group: "block",
|
|
262
|
+
parseDOM: [{ tag: "ul" }],
|
|
263
|
+
toDOM() {
|
|
264
|
+
return [
|
|
265
|
+
"ul",
|
|
266
|
+
{ class: "list-disc list-outside leading-3 -mt-2" },
|
|
267
|
+
0
|
|
268
|
+
];
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
ordered_list: {
|
|
272
|
+
content: "list_item+",
|
|
273
|
+
group: "block",
|
|
274
|
+
attrs: { order: { default: 1 } },
|
|
275
|
+
parseDOM: [{
|
|
276
|
+
tag: "ol",
|
|
277
|
+
getAttrs(dom) {
|
|
278
|
+
if (typeof dom === "string") return false;
|
|
279
|
+
return { order: dom.hasAttribute("start") ? +dom.getAttribute("start") : 1 };
|
|
280
|
+
}
|
|
281
|
+
}],
|
|
282
|
+
toDOM(node) {
|
|
283
|
+
return node.attrs.order === 1 ? [
|
|
284
|
+
"ol",
|
|
285
|
+
{ class: "list-decimal list-outside leading-3 -mt-2" },
|
|
286
|
+
0
|
|
287
|
+
] : [
|
|
288
|
+
"ol",
|
|
289
|
+
{
|
|
290
|
+
start: node.attrs.order,
|
|
291
|
+
class: "list-decimal list-outside leading-3 -mt-2"
|
|
292
|
+
},
|
|
293
|
+
0
|
|
294
|
+
];
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
list_item: {
|
|
298
|
+
content: "paragraph block*",
|
|
299
|
+
parseDOM: [{ tag: "li" }],
|
|
300
|
+
toDOM() {
|
|
301
|
+
return [
|
|
302
|
+
"li",
|
|
303
|
+
{ class: "leading-normal -mb-2" },
|
|
304
|
+
0
|
|
305
|
+
];
|
|
306
|
+
},
|
|
307
|
+
defining: true
|
|
308
|
+
},
|
|
309
|
+
task_list: {
|
|
310
|
+
group: "block",
|
|
311
|
+
content: "task_item+",
|
|
312
|
+
parseDOM: [{ tag: "ul[data-type=\"taskList\"]" }],
|
|
313
|
+
toDOM() {
|
|
314
|
+
return [
|
|
315
|
+
"ul",
|
|
316
|
+
{
|
|
317
|
+
"data-type": "taskList",
|
|
318
|
+
class: "not-prose"
|
|
319
|
+
},
|
|
320
|
+
0
|
|
321
|
+
];
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
task_item: {
|
|
325
|
+
content: "paragraph block*",
|
|
326
|
+
defining: true,
|
|
327
|
+
attrs: { checked: { default: false } },
|
|
328
|
+
parseDOM: [{
|
|
329
|
+
tag: "li[data-type=\"taskItem\"]",
|
|
330
|
+
getAttrs(dom) {
|
|
331
|
+
if (typeof dom === "string") return false;
|
|
332
|
+
return { checked: dom.getAttribute("data-checked") === "true" };
|
|
333
|
+
}
|
|
334
|
+
}],
|
|
335
|
+
toDOM(node) {
|
|
336
|
+
return [
|
|
337
|
+
"li",
|
|
338
|
+
{
|
|
339
|
+
"data-type": "taskItem",
|
|
340
|
+
"data-checked": node.attrs.checked ? "true" : "false",
|
|
341
|
+
class: "flex items-start my-4"
|
|
342
|
+
},
|
|
343
|
+
0
|
|
344
|
+
];
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
hard_break: {
|
|
348
|
+
inline: true,
|
|
349
|
+
group: "inline",
|
|
350
|
+
selectable: false,
|
|
351
|
+
parseDOM: [{ tag: "br" }],
|
|
352
|
+
toDOM() {
|
|
353
|
+
return ["br"];
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
...tableNodes({
|
|
357
|
+
tableGroup: "block",
|
|
358
|
+
cellContent: "block+",
|
|
359
|
+
cellAttributes: { background: {
|
|
360
|
+
default: null,
|
|
361
|
+
getFromDOM(dom) {
|
|
362
|
+
return dom.style.backgroundColor || null;
|
|
363
|
+
},
|
|
364
|
+
setDOMAttr(value, attrs) {
|
|
365
|
+
if (value && typeof value === "string") attrs.style = (attrs.style || "") + `background-color: ${value};`;
|
|
366
|
+
}
|
|
367
|
+
} }
|
|
368
|
+
})
|
|
369
|
+
},
|
|
370
|
+
marks
|
|
371
|
+
});
|
|
372
|
+
//#endregion
|
|
373
|
+
//#region src/editor/markdown.ts
|
|
374
|
+
var markdown_exports = /* @__PURE__ */ __exportAll({
|
|
375
|
+
markdownParser: () => markdownParser,
|
|
376
|
+
markdownSerializer: () => markdownSerializer,
|
|
377
|
+
parser: () => parser,
|
|
378
|
+
serializer: () => serializer
|
|
379
|
+
});
|
|
380
|
+
var parserTokens = {
|
|
381
|
+
...defaultMarkdownParser.tokens,
|
|
382
|
+
em: { mark: "italic" },
|
|
383
|
+
strong: { mark: "bold" },
|
|
384
|
+
html_inline: {
|
|
385
|
+
ignore: true,
|
|
386
|
+
noCloseToken: true
|
|
387
|
+
},
|
|
388
|
+
html_block: {
|
|
389
|
+
ignore: true,
|
|
390
|
+
noCloseToken: true
|
|
391
|
+
},
|
|
392
|
+
s: { mark: "strike" },
|
|
393
|
+
task_list: { block: "task_list" },
|
|
394
|
+
task_item: {
|
|
395
|
+
block: "task_item",
|
|
396
|
+
getAttrs: (tok) => ({ checked: tok.attrGet("checked") === "true" })
|
|
397
|
+
},
|
|
398
|
+
mark: { mark: "highlight" },
|
|
399
|
+
ins: { mark: "underline" },
|
|
400
|
+
table: { block: "table" },
|
|
401
|
+
thead: { ignore: true },
|
|
402
|
+
tbody: { ignore: true },
|
|
403
|
+
tr: { block: "table_row" },
|
|
404
|
+
th: { block: "table_header" },
|
|
405
|
+
td: { block: "table_cell" }
|
|
406
|
+
};
|
|
407
|
+
var md = markdownIt({ html: false }).use(markdownItTaskLists).use(markdownItMark).use(markdownItIns);
|
|
408
|
+
md.core.ruler.after("inline", "image-to-block", (state) => {
|
|
409
|
+
const tokens = state.tokens;
|
|
410
|
+
for (let i = tokens.length - 2; i >= 1; i--) if (tokens[i - 1] && tokens[i - 1].type === "paragraph_open" && tokens[i] && tokens[i].type === "inline" && tokens[i + 1] && tokens[i + 1].type === "paragraph_close") {
|
|
411
|
+
const inlineTokens = tokens[i].children || [];
|
|
412
|
+
if (inlineTokens.length === 1 && inlineTokens[0].type === "image") state.tokens.splice(i - 1, 3, inlineTokens[0]);
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
md.core.ruler.after("inline", "tables-wrap-paragraphs", (state) => {
|
|
416
|
+
const tokens = state.tokens;
|
|
417
|
+
for (let i = tokens.length - 1; i >= 0; i--) if (tokens[i].type === "td_open" || tokens[i].type === "th_open") {
|
|
418
|
+
let closeIndex = i + 1;
|
|
419
|
+
while (closeIndex < tokens.length && tokens[closeIndex].type !== "td_close" && tokens[closeIndex].type !== "th_close") closeIndex++;
|
|
420
|
+
if (closeIndex < tokens.length) {
|
|
421
|
+
const pOpen = new state.Token("paragraph_open", "p", 1);
|
|
422
|
+
pOpen.block = true;
|
|
423
|
+
const pClose = new state.Token("paragraph_close", "p", -1);
|
|
424
|
+
pClose.block = true;
|
|
425
|
+
state.tokens.splice(closeIndex, 0, pClose);
|
|
426
|
+
state.tokens.splice(i + 1, 0, pOpen);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
var markdownParser = new MarkdownParser(schema, md, parserTokens);
|
|
431
|
+
var markdownSerializer = new MarkdownSerializer({
|
|
432
|
+
...defaultMarkdownSerializer.nodes,
|
|
433
|
+
bullet_list(state, node) {
|
|
434
|
+
state.renderList(node, " ", () => "- ");
|
|
435
|
+
},
|
|
436
|
+
task_list(state, node) {
|
|
437
|
+
state.renderList(node, " ", () => "- ");
|
|
438
|
+
},
|
|
439
|
+
task_item(state, node) {
|
|
440
|
+
state.write(`[${node.attrs.checked ? "x" : " "}] `);
|
|
441
|
+
state.renderContent(node);
|
|
442
|
+
},
|
|
443
|
+
horizontal_rule(state, node) {
|
|
444
|
+
state.write(node.attrs.markup || "---");
|
|
445
|
+
state.closeBlock(node);
|
|
446
|
+
},
|
|
447
|
+
image(state, node) {
|
|
448
|
+
const src = (node.attrs.src || "").replace(/ /g, "%20");
|
|
449
|
+
state.write("]/g, "\\$&") + (node.attrs.title ? " \"" + node.attrs.title.replace(/"/g, "\\\"") + "\"" : "") + ")");
|
|
450
|
+
state.closeBlock(node);
|
|
451
|
+
},
|
|
452
|
+
table(state, node) {
|
|
453
|
+
const stateInternal = state;
|
|
454
|
+
node.forEach((row, _, i) => {
|
|
455
|
+
row.forEach((cell, _, j) => {
|
|
456
|
+
if (j === 0) state.write("| ");
|
|
457
|
+
else state.write(" ");
|
|
458
|
+
const startLen = stateInternal.out.length;
|
|
459
|
+
let first = true;
|
|
460
|
+
cell.forEach((block) => {
|
|
461
|
+
if (!first) stateInternal.out += "<br>";
|
|
462
|
+
state.renderInline(block);
|
|
463
|
+
first = false;
|
|
464
|
+
});
|
|
465
|
+
const cellContent = stateInternal.out.slice(startLen);
|
|
466
|
+
stateInternal.out = stateInternal.out.slice(0, startLen);
|
|
467
|
+
state.write(cellContent.replace(/\|/g, "\\|").replace(/\n/g, " "));
|
|
468
|
+
state.write(" |");
|
|
469
|
+
});
|
|
470
|
+
state.write("\n");
|
|
471
|
+
if (i === 0) {
|
|
472
|
+
row.forEach((cell, _, j) => {
|
|
473
|
+
state.write(j === 0 ? "|---|" : "---|");
|
|
474
|
+
});
|
|
475
|
+
state.write("\n");
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
state.closeBlock(node);
|
|
479
|
+
},
|
|
480
|
+
table_row() {},
|
|
481
|
+
table_cell() {},
|
|
482
|
+
table_header() {}
|
|
483
|
+
}, {
|
|
484
|
+
...defaultMarkdownSerializer.marks,
|
|
485
|
+
bold: defaultMarkdownSerializer.marks.strong,
|
|
486
|
+
italic: defaultMarkdownSerializer.marks.em,
|
|
487
|
+
strike: {
|
|
488
|
+
open: "~~",
|
|
489
|
+
close: "~~",
|
|
490
|
+
mixable: true,
|
|
491
|
+
expelEnclosingWhitespace: true
|
|
492
|
+
},
|
|
493
|
+
highlight: {
|
|
494
|
+
open: "==",
|
|
495
|
+
close: "==",
|
|
496
|
+
mixable: true,
|
|
497
|
+
expelEnclosingWhitespace: true
|
|
498
|
+
},
|
|
499
|
+
underline: {
|
|
500
|
+
open: "++",
|
|
501
|
+
close: "++",
|
|
502
|
+
mixable: true,
|
|
503
|
+
expelEnclosingWhitespace: true
|
|
504
|
+
},
|
|
505
|
+
link: {
|
|
506
|
+
...defaultMarkdownSerializer.marks.link,
|
|
507
|
+
close(state, mark, parent, index) {
|
|
508
|
+
const inAutolink = state.inAutolink;
|
|
509
|
+
state.inAutolink = void 0;
|
|
510
|
+
const href = mark.attrs.href.replace(/ /g, "%20");
|
|
511
|
+
return inAutolink ? ">" : "](" + href.replace(/[\(\)"]/g, "\\$&") + (mark.attrs.title ? ` "${mark.attrs.title.replace(/"/g, "\\\"")}"` : "") + ")";
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
textStyle: {
|
|
515
|
+
open: "",
|
|
516
|
+
close: "",
|
|
517
|
+
mixable: true,
|
|
518
|
+
expelEnclosingWhitespace: true
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
var parser = markdownParser;
|
|
522
|
+
var serializer = markdownSerializer;
|
|
523
|
+
//#endregion
|
|
524
|
+
export { schema as i, parser as n, serializer as r, markdown_exports as t };
|
|
525
|
+
|
|
526
|
+
//# sourceMappingURL=markdown-CklalUUk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-CklalUUk.js","names":[],"sources":["../src/editor/schema.ts","../src/editor/markdown.ts"],"sourcesContent":["import { Schema, NodeSpec, MarkSpec } from \"prosemirror-model\";\nimport { tableNodes } from \"prosemirror-tables\";\n\nconst marks: { [key: string]: MarkSpec } = {\n link: {\n attrs: {\n href: {},\n title: { default: null },\n target: { default: \"_blank\" }\n },\n inclusive: false,\n parseDOM: [\n {\n tag: \"a[href]\",\n getAttrs(dom: HTMLElement | string) {\n if (typeof dom === \"string\") return false;\n return {\n href: dom.getAttribute(\"href\"),\n title: dom.getAttribute(\"title\"),\n target: dom.getAttribute(\"target\") || \"_blank\"\n };\n }\n }\n ],\n toDOM(node) {\n const {\n href,\n title,\n target\n } = node.attrs;\n return [\"a\", {\n href,\n title,\n target,\n class: \"text-surface-700 dark:text-surface-accent-200 underline underline-offset-[3px] hover:text-primary transition-colors cursor-pointer\"\n }, 0];\n }\n },\n bold: {\n parseDOM: [\n { tag: \"strong\" },\n {\n tag: \"b\",\n getAttrs: (node: HTMLElement | string) => typeof node !== \"string\" && node.style.fontWeight !== \"normal\" && null\n },\n {\n style: \"font-weight=400\",\n clearMark: m => m.type.name === \"bold\"\n },\n {\n style: \"font-weight\",\n getAttrs: (value: string | HTMLElement) => typeof value === \"string\" && /^(bold(er)?|[5-9]\\d{2,})$/.test(value) && null\n }\n ],\n toDOM() {\n return [\"strong\", 0];\n }\n },\n italic: {\n parseDOM: [{ tag: \"i\" }, { tag: \"em\" }, { style: \"font-style=italic\" }],\n toDOM() {\n return [\"em\", 0];\n }\n },\n strike: {\n parseDOM: [{ tag: \"s\" }, { tag: \"del\" }, { tag: \"strike\" }, { style: \"text-decoration=line-through\" }],\n toDOM() {\n return [\"s\", 0];\n }\n },\n underline: {\n parseDOM: [{ tag: \"u\" }, { style: \"text-decoration=underline\" }],\n toDOM() {\n return [\"u\", 0];\n }\n },\n code: {\n parseDOM: [{ tag: \"code\" }],\n toDOM() {\n return [\"code\", {\n class: \"rounded-md bg-surface-accent-50 dark:bg-surface-700 px-1.5 py-1 font-mono font-medium\",\n spellcheck: \"false\"\n }, 0];\n }\n },\n textStyle: {\n attrs: { color: { default: null } },\n parseDOM: [\n {\n style: \"color\",\n getAttrs: (value: string | HTMLElement) => {\n if (typeof value === \"string\") return { color: value };\n return false;\n }\n }\n ],\n toDOM(mark) {\n let style = \"\";\n if (mark.attrs.color) style += `color: ${mark.attrs.color};`;\n return [\"span\", { style }, 0];\n }\n },\n highlight: {\n attrs: { color: { default: null } },\n parseDOM: [\n {\n tag: \"mark\",\n getAttrs: (dom: HTMLElement | string) => {\n if (typeof dom === \"string\") return false;\n return { color: dom.style.backgroundColor || dom.getAttribute(\"data-color\") };\n }\n }\n ],\n toDOM(mark) {\n return [\"mark\", mark.attrs.color ? {\n style: `background-color: ${mark.attrs.color}; color: inherit;`,\n \"data-color\": mark.attrs.color\n } : {}, 0];\n }\n }\n};\n\nconst nodes: { [key: string]: NodeSpec } = {\n doc: {\n content: \"block+\"\n },\n paragraph: {\n content: \"inline*\",\n group: \"block\",\n parseDOM: [{ tag: \"p\" }],\n toDOM() {\n return [\"p\", 0];\n }\n },\n text: {\n group: \"inline\"\n },\n blockquote: {\n content: \"block+\",\n group: \"block\",\n defining: true,\n parseDOM: [{ tag: \"blockquote\" }],\n toDOM() {\n return [\"blockquote\", { class: \"border-l-4 border-primary\" }, 0];\n }\n },\n heading: {\n attrs: { level: { default: 1 } },\n content: \"inline*\",\n group: \"block\",\n defining: true,\n parseDOM: [\n {\n tag: \"h1\",\n attrs: { level: 1 }\n },\n {\n tag: \"h2\",\n attrs: { level: 2 }\n },\n {\n tag: \"h3\",\n attrs: { level: 3 }\n },\n {\n tag: \"h4\",\n attrs: { level: 4 }\n },\n {\n tag: \"h5\",\n attrs: { level: 5 }\n },\n {\n tag: \"h6\",\n attrs: { level: 6 }\n }\n ],\n toDOM(node) {\n return [\"h\" + node.attrs.level, 0];\n }\n },\n horizontal_rule: {\n group: \"block\",\n parseDOM: [{ tag: \"hr\" }],\n toDOM() {\n return [\"hr\", { class: \"mt-4 mb-6 border-t border-solid border-gray-200 dark:border-gray-800\" }];\n }\n },\n code_block: {\n content: \"text*\",\n marks: \"\",\n group: \"block\",\n code: true,\n defining: true,\n attrs: { language: { default: null } },\n parseDOM: [\n {\n tag: \"pre\",\n preserveWhitespace: \"full\"\n }\n ],\n toDOM(node) {\n return [\"pre\", { class: \"rounded bg-blue-50 dark:bg-surface-700 border border-solid border-gray-200 dark:border-gray-800 p-5 font-mono font-medium text-gray-800 dark:text-gray-200\" }, [\"code\", 0]];\n }\n },\n image: {\n inline: false,\n group: \"block\",\n attrs: {\n src: {},\n alt: { default: null },\n title: { default: null }\n },\n draggable: true,\n parseDOM: [\n {\n tag: \"img[src]\",\n getAttrs(dom: HTMLElement | string) {\n if (typeof dom === \"string\") return false;\n return {\n src: dom.getAttribute(\"src\"),\n title: dom.getAttribute(\"title\"),\n alt: dom.getAttribute(\"alt\")\n };\n }\n }\n ],\n toDOM(node) {\n const {\n src,\n alt,\n title\n } = node.attrs;\n return [\"img\", {\n src,\n alt,\n title,\n class: \"rounded-lg max-w-full !m-0\"\n }];\n }\n },\n bullet_list: {\n content: \"list_item+\",\n group: \"block\",\n parseDOM: [{ tag: \"ul\" }],\n toDOM() {\n return [\"ul\", { class: \"list-disc list-outside leading-3 -mt-2\" }, 0];\n }\n },\n ordered_list: {\n content: \"list_item+\",\n group: \"block\",\n attrs: { order: { default: 1 } },\n parseDOM: [\n {\n tag: \"ol\",\n getAttrs(dom: HTMLElement | string) {\n if (typeof dom === \"string\") return false;\n return { order: dom.hasAttribute(\"start\") ? +dom.getAttribute(\"start\")! : 1 };\n }\n }\n ],\n toDOM(node) {\n return node.attrs.order === 1 ? [\"ol\", { class: \"list-decimal list-outside leading-3 -mt-2\" }, 0] : [\"ol\", {\n start: node.attrs.order,\n class: \"list-decimal list-outside leading-3 -mt-2\"\n }, 0];\n }\n },\n list_item: {\n content: \"paragraph block*\",\n parseDOM: [{ tag: \"li\" }],\n toDOM() {\n return [\"li\", { class: \"leading-normal -mb-2\" }, 0];\n },\n defining: true\n },\n task_list: {\n group: \"block\",\n content: \"task_item+\",\n parseDOM: [{ tag: \"ul[data-type=\\\"taskList\\\"]\" }],\n toDOM() {\n return [\"ul\", {\n \"data-type\": \"taskList\",\n class: \"not-prose\"\n }, 0];\n }\n },\n task_item: {\n content: \"paragraph block*\",\n defining: true,\n attrs: { checked: { default: false } },\n parseDOM: [\n {\n tag: \"li[data-type=\\\"taskItem\\\"]\",\n getAttrs(dom: HTMLElement | string) {\n if (typeof dom === \"string\") return false;\n return { checked: dom.getAttribute(\"data-checked\") === \"true\" };\n }\n }\n ],\n toDOM(node) {\n return [\"li\", {\n \"data-type\": \"taskItem\",\n \"data-checked\": node.attrs.checked ? \"true\" : \"false\",\n class: \"flex items-start my-4\"\n }, 0];\n }\n },\n hard_break: {\n inline: true,\n group: \"inline\",\n selectable: false,\n parseDOM: [{ tag: \"br\" }],\n toDOM() {\n return [\"br\"];\n }\n },\n ...tableNodes({\n tableGroup: \"block\",\n cellContent: \"block+\",\n cellAttributes: {\n background: {\n default: null,\n getFromDOM(dom: HTMLElement) {\n return dom.style.backgroundColor || null\n },\n setDOMAttr(value: unknown, attrs: any) {\n if (value && typeof value === \"string\") attrs.style = (attrs.style || \"\") + `background-color: ${value};`\n }\n }\n }\n })\n};\n\nexport const schema = new Schema({\n nodes,\n marks\n});\n","/* eslint-disable @typescript-eslint/triple-slash-reference */\n/// <reference path=\"./markdown-it-plugins.d.ts\" />\nimport {\n MarkdownParser,\n MarkdownSerializer,\n defaultMarkdownParser,\n defaultMarkdownSerializer\n} from \"prosemirror-markdown\";\nimport markdownIt from \"markdown-it\";\nimport markdownItTaskLists from \"markdown-it-task-lists\";\nimport markdownItMark from \"markdown-it-mark\";\nimport markdownItIns from \"markdown-it-ins\";\n\nimport { schema } from \"./schema\";\n\n/**\n * ProseMirror's MarkdownSerializerState exposes an `out` string property\n * that accumulates the serialised output. The published typings do not\n * include it, so we extend the type locally to avoid `as any` casts.\n */\ninterface MarkdownSerializerStateWithOutput {\n out: string;\n}\n\nconst parserTokens: any = {\n ...defaultMarkdownParser.tokens,\n em: { mark: \"italic\" },\n strong: { mark: \"bold\" },\n html_inline: { ignore: true,\nnoCloseToken: true },\n html_block: { ignore: true,\nnoCloseToken: true },\n s: {\n mark: \"strike\"\n },\n task_list: {\n block: \"task_list\"\n },\n task_item: {\n block: \"task_item\",\n getAttrs: (tok: any) => ({ checked: tok.attrGet(\"checked\") === \"true\" })\n },\n mark: {\n mark: \"highlight\"\n },\n ins: {\n mark: \"underline\"\n },\n table: { block: \"table\" },\n thead: { ignore: true },\n tbody: { ignore: true },\n tr: { block: \"table_row\" },\n th: { block: \"table_header\" },\n td: { block: \"table_cell\" }\n};\n\nconst md = markdownIt({ html: false })\n .use(markdownItTaskLists)\n .use(markdownItMark)\n .use(markdownItIns);\n\n// Unwrap images from paragraphs so they can be parsed as block nodes by ProseMirror\nmd.core.ruler.after(\"inline\", \"image-to-block\", (state: any) => {\n const tokens = state.tokens;\n for (let i = tokens.length - 2; i >= 1; i--) {\n if (\n tokens[i - 1] && tokens[i - 1].type === \"paragraph_open\" &&\n tokens[i] && tokens[i].type === \"inline\" &&\n tokens[i + 1] && tokens[i + 1].type === \"paragraph_close\"\n ) {\n const inlineTokens = tokens[i].children || [];\n if (inlineTokens.length === 1 && inlineTokens[0].type === \"image\") {\n state.tokens.splice(i - 1, 3, inlineTokens[0]);\n // No need to adjust index when looping backward!\n }\n }\n }\n});\n\n// Wrap inline tokens inside table cells into paragraphs to satisfy ProseMirror table cell schema (block+)\nmd.core.ruler.after(\"inline\", \"tables-wrap-paragraphs\", (state: any) => {\n const tokens = state.tokens;\n for (let i = tokens.length - 1; i >= 0; i--) {\n if (tokens[i].type === \"td_open\" || tokens[i].type === \"th_open\") {\n let closeIndex = i + 1;\n while (closeIndex < tokens.length && tokens[closeIndex].type !== \"td_close\" && tokens[closeIndex].type !== \"th_close\") {\n closeIndex++;\n }\n if (closeIndex < tokens.length) {\n const pOpen = new state.Token(\"paragraph_open\", \"p\", 1);\n pOpen.block = true;\n const pClose = new state.Token(\"paragraph_close\", \"p\", -1);\n pClose.block = true;\n\n state.tokens.splice(closeIndex, 0, pClose);\n state.tokens.splice(i + 1, 0, pOpen);\n }\n }\n }\n});\n\nexport const markdownParser = new MarkdownParser(schema, md, parserTokens);\n\n\nexport const markdownSerializer = new MarkdownSerializer(\n {\n ...defaultMarkdownSerializer.nodes,\n // Use \"-\" as bullet character to match markdown-it output and prevent\n // serialization round-trip from changing \"- \" to \"* \" and dirtying the form.\n bullet_list(state, node) {\n state.renderList(node, \" \", () => \"- \");\n },\n // Add custom serialization for task lists\n task_list(state, node) {\n state.renderList(node, \" \", () => \"- \");\n },\n task_item(state, node) {\n state.write(`[${node.attrs.checked ? \"x\" : \" \"}] `);\n state.renderContent(node);\n },\n horizontal_rule(state, node) {\n state.write(node.attrs.markup || \"---\");\n state.closeBlock(node);\n },\n image(state, node) {\n const rawSrc = node.attrs.src || \"\";\n const src = rawSrc.replace(/ /g, \"%20\");\n state.write(\"]/g, \"\\\\$&\") +\n (node.attrs.title ? ' \"' + node.attrs.title.replace(/\"/g, '\\\\\"') + '\"' : \"\") + \")\");\n state.closeBlock(node);\n },\n table(state, node) {\n // Access the internal `.out` accumulator with a typed cast (see MarkdownSerializerStateWithOutput).\n const stateInternal = state as unknown as MarkdownSerializerStateWithOutput;\n node.forEach((row, _, i) => {\n row.forEach((cell, _, j) => {\n if (j === 0) state.write(\"| \");\n else state.write(\" \");\n\n // Capture cell content by tracking state.out length.\n // This avoids monkey-patching state.write which loses\n // flushClose/delim handling and can produce \"undefined\" text.\n const startLen = stateInternal.out.length;\n let first = true;\n cell.forEach((block) => {\n if (!first) stateInternal.out += \"<br>\";\n state.renderInline(block);\n first = false;\n });\n const cellContent = stateInternal.out.slice(startLen);\n // Remove the rendered content from state.out; we'll re-add it escaped\n stateInternal.out = stateInternal.out.slice(0, startLen);\n state.write(cellContent.replace(/\\|/g, \"\\\\|\").replace(/\\n/g, \" \"));\n state.write(\" |\");\n });\n state.write(\"\\n\");\n if (i === 0) {\n row.forEach((cell, _, j) => {\n state.write(j === 0 ? \"|---|\" : \"---|\");\n });\n state.write(\"\\n\");\n }\n });\n state.closeBlock(node);\n },\n table_row() {},\n table_cell() {},\n table_header() {}\n },\n {\n ...defaultMarkdownSerializer.marks,\n bold: defaultMarkdownSerializer.marks.strong,\n italic: defaultMarkdownSerializer.marks.em,\n strike: { open: \"~~\",\nclose: \"~~\",\nmixable: true,\nexpelEnclosingWhitespace: true },\n highlight: { open: \"==\",\nclose: \"==\",\nmixable: true,\nexpelEnclosingWhitespace: true },\n underline: { open: \"++\",\nclose: \"++\",\nmixable: true,\nexpelEnclosingWhitespace: true },\n link: {\n ...defaultMarkdownSerializer.marks.link,\n close(state: any, mark, parent, index) {\n const inAutolink = state.inAutolink;\n state.inAutolink = undefined;\n const href = mark.attrs.href.replace(/ /g, \"%20\");\n return inAutolink ? \">\"\n : \"](\" + href.replace(/[\\(\\)\"]/g, \"\\\\$&\") + (mark.attrs.title ? ` \"${mark.attrs.title.replace(/\"/g, '\\\\\"')}\"` : \"\") + \")\";\n }\n },\n // textStyle (colored text from HTML) has no markdown equivalent — emit content as-is\n textStyle: { open: \"\",\nclose: \"\",\nmixable: true,\nexpelEnclosingWhitespace: true }\n }\n);\nexport const parser = markdownParser;\nexport const serializer = markdownSerializer;\n"],"mappings":";;;;;;;;;AAGA,IAAM,QAAqC;CACvC,MAAM;EACF,OAAO;GACH,MAAM,CAAC;GACP,OAAO,EAAE,SAAS,KAAK;GACvB,QAAQ,EAAE,SAAS,SAAS;EAChC;EACA,WAAW;EACX,UAAU,CACN;GACI,KAAK;GACL,SAAS,KAA2B;IAChC,IAAI,OAAO,QAAQ,UAAU,OAAO;IACpC,OAAO;KACH,MAAM,IAAI,aAAa,MAAM;KAC7B,OAAO,IAAI,aAAa,OAAO;KAC/B,QAAQ,IAAI,aAAa,QAAQ,KAAK;IAC1C;GACJ;EACJ,CACJ;EACA,MAAM,MAAM;GACR,MAAM,EACF,MACA,OACA,WACA,KAAK;GACT,OAAO;IAAC;IAAK;KACT;KACA;KACA;KACA,OAAO;IACX;IAAG;GAAC;EACR;CACJ;CACA,MAAM;EACF,UAAU;GACN,EAAE,KAAK,SAAS;GAChB;IACI,KAAK;IACL,WAAW,SAA+B,OAAO,SAAS,YAAY,KAAK,MAAM,eAAe,YAAY;GAChH;GACA;IACI,OAAO;IACP,YAAW,MAAK,EAAE,KAAK,SAAS;GACpC;GACA;IACI,OAAO;IACP,WAAW,UAAgC,OAAO,UAAU,YAAY,4BAA4B,KAAK,KAAK,KAAK;GACvH;EACJ;EACA,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ChD,OAAO,aAAa,MACd,OAAO,KAAK,QAAQ,YAAY,MAAM,KAAK,KAAK,MAAM,QAAQ,KAAK,KAAK,MAAM,MAAM,QAAQ,MAAM,MAAK,EAAE,KAAK,MAAM;EAC9H;CACJ;CAEA,WAAW;EAAE,MAAM;EAC3B,OAAO;EACP,SAAS;EACT,0BAA0B;CAAK;AAC3B,CACJ;AACA,IAAa,SAAS;AACtB,IAAa,aAAa"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { EnumValueConfig } from "@rebasepro/types";
|
|
2
3
|
import type { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
3
4
|
/**
|
|
@@ -8,4 +9,4 @@ export declare function ArrayEnumPreview({ name, value, enumValues, size }: {
|
|
|
8
9
|
name: string | undefined;
|
|
9
10
|
enumValues: EnumValueConfig[];
|
|
10
11
|
size: PreviewSize;
|
|
11
|
-
}):
|
|
12
|
+
}): React.JSX.Element;
|
|
@@ -10,4 +10,4 @@ export interface EnumValuesChipProps {
|
|
|
10
10
|
/**
|
|
11
11
|
* @group Preview components
|
|
12
12
|
*/
|
|
13
|
-
export declare function EnumValuesChip({ enumValues, enumKey, size, className, children }: EnumValuesChipProps):
|
|
13
|
+
export declare function EnumValuesChip({ enumValues, enumKey, size, className, children }: EnumValuesChipProps): React.JSX.Element | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { PreviewSize } from "../../types/components/PropertyPreviewProps";
|
|
2
3
|
/**
|
|
3
4
|
* @group Preview components
|
|
@@ -13,4 +14,4 @@ export interface ImagePreviewProps {
|
|
|
13
14
|
/**
|
|
14
15
|
* @group Preview components
|
|
15
16
|
*/
|
|
16
|
-
export declare function ImagePreview({ size, url, fill }: ImagePreviewProps):
|
|
17
|
+
export declare function ImagePreview({ size, url, fill }: ImagePreviewProps): React.JSX.Element;
|
|
@@ -10,8 +10,9 @@ export type ReferencePreviewProps = {
|
|
|
10
10
|
hover?: boolean;
|
|
11
11
|
includeEntityLink?: boolean;
|
|
12
12
|
includeId?: boolean;
|
|
13
|
+
textOnly?: boolean;
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
16
|
* @group Preview components
|
|
16
17
|
*/
|
|
17
|
-
export declare const ReferencePreview: (props: ReferencePreviewProps) =>
|
|
18
|
+
export declare const ReferencePreview: (props: ReferencePreviewProps) => React.JSX.Element;
|
|
@@ -10,8 +10,9 @@ export type RelationPreviewProps = {
|
|
|
10
10
|
hover?: boolean;
|
|
11
11
|
includeEntityLink?: boolean;
|
|
12
12
|
includeId?: boolean;
|
|
13
|
+
textOnly?: boolean;
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
16
|
* @group Preview components
|
|
16
17
|
*/
|
|
17
|
-
export declare const RelationPreview: (props: RelationPreviewProps) =>
|
|
18
|
+
export declare const RelationPreview: (props: RelationPreviewProps) => React.JSX.Element;
|
|
@@ -11,5 +11,5 @@ type StorageThumbnailProps = {
|
|
|
11
11
|
* @group Preview components
|
|
12
12
|
*/
|
|
13
13
|
export declare const StorageThumbnail: React.FunctionComponent<StorageThumbnailProps>;
|
|
14
|
-
export declare function StorageThumbnailInternal({ storeUrl, interactive, storagePathOrDownloadUrl, size, fill }: StorageThumbnailProps):
|
|
14
|
+
export declare function StorageThumbnailInternal({ storeUrl, interactive, storagePathOrDownloadUrl, size, fill }: StorageThumbnailProps): React.JSX.Element | null;
|
|
15
15
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
2
2
|
import type { StringProperty } from "@rebasepro/types";
|
|
3
|
+
import React from "react";
|
|
3
4
|
/**
|
|
4
|
-
* Preview component for displaying user
|
|
5
|
-
*
|
|
5
|
+
* Preview component for displaying a user reference value.
|
|
6
|
+
*
|
|
7
|
+
* Shows the raw user ID. Collection-based user management means
|
|
8
|
+
* user records are fetched through the standard data layer.
|
|
6
9
|
*
|
|
7
10
|
* @group Preview components
|
|
8
11
|
*/
|
|
9
|
-
export declare function UserPreview({ value }: PropertyPreviewProps<StringProperty>):
|
|
12
|
+
export declare function UserPreview({ value }: PropertyPreviewProps<StringProperty>): React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ArrayProperty } from "@rebasepro/types";
|
|
2
|
+
import React from "react";
|
|
2
3
|
import type { PropertyPreviewProps } from "../../types/components/PropertyPreviewProps";
|
|
3
4
|
/**
|
|
4
5
|
* @group Preview components
|
|
5
6
|
*/
|
|
6
|
-
export declare function ArrayOfMapsPreview({ propertyKey, value, property, size }: PropertyPreviewProps<ArrayProperty>):
|
|
7
|
+
export declare function ArrayOfMapsPreview({ propertyKey, value, property, size }: PropertyPreviewProps<ArrayProperty>): React.JSX.Element | null;
|