@riboseinc/paneron-registry-kit 2.0.0-dev9 → 2.0.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/LICENSE +21 -0
- package/README.adoc +35 -0
- package/compiled/common.d.ts +1 -0
- package/compiled/common.js +2 -0
- package/{common.js.map → compiled/common.js.map} +1 -1
- package/{index.d.ts → compiled/index.d.ts} +3 -3
- package/compiled/index.js +21 -0
- package/compiled/index.js.map +1 -0
- package/compiled/migrations/initial.js +8 -0
- package/compiled/types/cr.d.ts +216 -0
- package/compiled/types/cr.js +131 -0
- package/compiled/types/cr.js.map +1 -0
- package/{types → compiled/types}/index.d.ts +1 -0
- package/compiled/types/index.js +8 -0
- package/compiled/types/index.js.map +1 -0
- package/{types → compiled/types}/item.d.ts +13 -3
- package/compiled/types/item.js +22 -0
- package/compiled/types/item.js.map +1 -0
- package/compiled/types/proposal.d.ts +64 -0
- package/compiled/types/proposal.js +21 -0
- package/compiled/types/proposal.js.map +1 -0
- package/{types → compiled/types}/register.d.ts +6 -5
- package/compiled/types/register.js +25 -0
- package/compiled/types/register.js.map +1 -0
- package/compiled/types/registry.d.ts +15 -0
- package/compiled/types/registry.js +10 -0
- package/compiled/types/registry.js.map +1 -0
- package/compiled/types/stakeholder.d.ts +58 -0
- package/compiled/types/stakeholder.js +34 -0
- package/compiled/types/stakeholder.js.map +1 -0
- package/compiled/types/util.js +3 -0
- package/compiled/types/views.d.ts +157 -0
- package/compiled/types/views.js +2 -0
- package/compiled/types/views.js.map +1 -0
- package/compiled/views/AnnotatedChange.d.ts +7 -0
- package/compiled/views/AnnotatedChange.js +57 -0
- package/compiled/views/AnnotatedChange.js.map +1 -0
- package/compiled/views/BrowserCtx.d.ts +73 -0
- package/compiled/views/BrowserCtx.js +19 -0
- package/compiled/views/BrowserCtx.js.map +1 -0
- package/compiled/views/FilterCriteria/CRITERIA_CONFIGURATION.d.ts +17 -0
- package/compiled/views/FilterCriteria/CRITERIA_CONFIGURATION.js +110 -0
- package/compiled/views/FilterCriteria/CRITERIA_CONFIGURATION.js.map +1 -0
- package/{views → compiled/views}/FilterCriteria/criteriaGroupToQueryExpression.d.ts +4 -0
- package/compiled/views/FilterCriteria/criteriaGroupToQueryExpression.js +40 -0
- package/compiled/views/FilterCriteria/criteriaGroupToQueryExpression.js.map +1 -0
- package/compiled/views/FilterCriteria/criteriaGroupToSummary.js +47 -0
- package/compiled/views/FilterCriteria/criteriaGroupToSummary.js.map +1 -0
- package/{views → compiled/views}/FilterCriteria/criteriaToNodes.d.ts +9 -0
- package/compiled/views/FilterCriteria/criteriaToNodes.js +89 -0
- package/compiled/views/FilterCriteria/criteriaToNodes.js.map +1 -0
- package/{views → compiled/views}/FilterCriteria/index.d.ts +1 -0
- package/compiled/views/FilterCriteria/index.js +75 -0
- package/compiled/views/FilterCriteria/index.js.map +1 -0
- package/{views → compiled/views}/FilterCriteria/models.d.ts +29 -2
- package/compiled/views/FilterCriteria/models.js +28 -0
- package/compiled/views/FilterCriteria/models.js.map +1 -0
- package/{views → compiled/views}/FilterCriteria/mutateGroup.d.ts +4 -1
- package/compiled/views/FilterCriteria/mutateGroup.js +53 -0
- package/compiled/views/FilterCriteria/mutateGroup.js.map +1 -0
- package/{views → compiled/views}/GenericRelatedItemView.d.ts +1 -1
- package/compiled/views/GenericRelatedItemView.js +147 -0
- package/compiled/views/GenericRelatedItemView.js.map +1 -0
- package/compiled/views/RegisterStakeholder.d.ts +9 -0
- package/compiled/views/RegisterStakeholder.js +19 -0
- package/compiled/views/RegisterStakeholder.js.map +1 -0
- package/compiled/views/RegisterVersion.d.ts +9 -0
- package/compiled/views/RegisterVersion.js +20 -0
- package/compiled/views/RegisterVersion.js.map +1 -0
- package/compiled/views/SearchQuery.d.ts +13 -0
- package/compiled/views/SearchQuery.js +58 -0
- package/compiled/views/SearchQuery.js.map +1 -0
- package/compiled/views/change-request/ChangeRequestContext.d.ts +20 -0
- package/compiled/views/change-request/ChangeRequestContext.js +30 -0
- package/compiled/views/change-request/ChangeRequestContext.js.map +1 -0
- package/compiled/views/change-request/Proposals.d.ts +21 -0
- package/compiled/views/change-request/Proposals.js +185 -0
- package/compiled/views/change-request/Proposals.js.map +1 -0
- package/compiled/views/change-request/objectChangeset.d.ts +31 -0
- package/compiled/views/change-request/objectChangeset.js +189 -0
- package/compiled/views/change-request/objectChangeset.js.map +1 -0
- package/compiled/views/detail/ChangeRequest/Proposal.d.ts +0 -0
- package/compiled/views/detail/ChangeRequest/Proposal.js +144 -0
- package/compiled/views/detail/ChangeRequest/Proposal.js.map +1 -0
- package/compiled/views/detail/ChangeRequest/index.d.ts +13 -0
- package/compiled/views/detail/ChangeRequest/index.js +140 -0
- package/compiled/views/detail/ChangeRequest/index.js.map +1 -0
- package/compiled/views/detail/ChangeRequest/transitions.d.ts +28 -0
- package/compiled/views/detail/ChangeRequest/transitions.js +418 -0
- package/compiled/views/detail/ChangeRequest/transitions.js.map +1 -0
- package/compiled/views/detail/CustomView/index.d.ts +13 -0
- package/compiled/views/detail/CustomView/index.js +32 -0
- package/compiled/views/detail/CustomView/index.js.map +1 -0
- package/compiled/views/detail/RegisterHome/index.d.ts +5 -0
- package/compiled/views/detail/RegisterHome/index.js +70 -0
- package/compiled/views/detail/RegisterHome/index.js.map +1 -0
- package/compiled/views/detail/RegisterItem/RelatedItems.d.ts +14 -0
- package/compiled/views/detail/RegisterItem/RelatedItems.js +28 -0
- package/compiled/views/detail/RegisterItem/RelatedItems.js.map +1 -0
- package/compiled/views/detail/RegisterItem/SupersedingItemMenu.d.ts +13 -0
- package/compiled/views/detail/RegisterItem/SupersedingItemMenu.js +27 -0
- package/compiled/views/detail/RegisterItem/SupersedingItemMenu.js.map +1 -0
- package/compiled/views/detail/RegisterItem/index.d.ts +13 -0
- package/compiled/views/detail/RegisterItem/index.js +277 -0
- package/compiled/views/detail/RegisterItem/index.js.map +1 -0
- package/compiled/views/detail/RegisterMeta/RegisterMetaForm.d.ts +10 -0
- package/compiled/views/detail/RegisterMeta/RegisterMetaForm.js +135 -0
- package/compiled/views/detail/RegisterMeta/RegisterMetaForm.js.map +1 -0
- package/compiled/views/detail/RegisterMeta/index.d.ts +10 -0
- package/compiled/views/detail/RegisterMeta/index.js +61 -0
- package/compiled/views/detail/RegisterMeta/index.js.map +1 -0
- package/compiled/views/detail/index.d.ts +1 -0
- package/compiled/views/detail/index.js +11 -0
- package/compiled/views/detail/index.js.map +1 -0
- package/compiled/views/diffing/InlineDiff.d.ts +12 -0
- package/compiled/views/diffing/InlineDiff.js +20 -0
- package/compiled/views/diffing/InlineDiff.js.map +1 -0
- package/compiled/views/diffing/StructuredDiff.d.ts +11 -0
- package/compiled/views/diffing/StructuredDiff.js +38 -0
- package/compiled/views/diffing/StructuredDiff.js.map +1 -0
- package/compiled/views/hooks/useCustomView.d.ts +3 -0
- package/compiled/views/hooks/useCustomView.js +14 -0
- package/compiled/views/hooks/useCustomView.js.map +1 -0
- package/compiled/views/hooks/useItemClassConfig.d.ts +3 -0
- package/compiled/views/hooks/useItemClassConfig.js +14 -0
- package/compiled/views/hooks/useItemClassConfig.js.map +1 -0
- package/compiled/views/hooks/useItemRef.d.ts +3 -0
- package/compiled/views/hooks/useItemRef.js +26 -0
- package/compiled/views/hooks/useItemRef.js.map +1 -0
- package/compiled/views/hooks/useSingleRegisterItemData.d.ts +3 -0
- package/compiled/views/hooks/useSingleRegisterItemData.js +21 -0
- package/compiled/views/hooks/useSingleRegisterItemData.js.map +1 -0
- package/{views → compiled/views}/index.d.ts +2 -2
- package/compiled/views/index.js +142 -0
- package/compiled/views/index.js.map +1 -0
- package/compiled/views/itemPathUtils.d.ts +52 -0
- package/compiled/views/itemPathUtils.js +115 -0
- package/compiled/views/itemPathUtils.js.map +1 -0
- package/compiled/views/itemQueryUtils.d.ts +11 -0
- package/compiled/views/itemQueryUtils.js +42 -0
- package/compiled/views/itemQueryUtils.js.map +1 -0
- package/compiled/views/protocolRegistry.d.ts +12 -0
- package/compiled/views/protocolRegistry.js +24 -0
- package/compiled/views/protocolRegistry.js.map +1 -0
- package/compiled/views/sidebar/Browse/index.d.ts +11 -0
- package/compiled/views/sidebar/Browse/index.js +278 -0
- package/compiled/views/sidebar/Browse/index.js.map +1 -0
- package/compiled/views/sidebar/Export/index.d.ts +5 -0
- package/compiled/views/sidebar/Export/index.js +47 -0
- package/compiled/views/sidebar/Export/index.js.map +1 -0
- package/compiled/views/sidebar/ListItem.d.ts +10 -0
- package/compiled/views/sidebar/ListItem.js +23 -0
- package/compiled/views/sidebar/ListItem.js.map +1 -0
- package/compiled/views/sidebar/Registration/index.d.ts +5 -0
- package/compiled/views/sidebar/Registration/index.js +114 -0
- package/compiled/views/sidebar/Registration/index.js.map +1 -0
- package/compiled/views/sidebar/Search/index.d.ts +18 -0
- package/compiled/views/sidebar/Search/index.js +100 -0
- package/compiled/views/sidebar/Search/index.js.map +1 -0
- package/compiled/views/sidebar/index.d.ts +6 -0
- package/compiled/views/sidebar/index.js +73 -0
- package/compiled/views/sidebar/index.js.map +1 -0
- package/compiled/views/util.d.ts +36 -0
- package/compiled/views/util.js +63 -0
- package/compiled/views/util.js.map +1 -0
- package/dependencies-local/extension-kit/SettingsContext.d.ts +8 -0
- package/dependencies-local/extension-kit/SettingsContext.js +19 -0
- package/dependencies-local/extension-kit/SettingsContext.js.map +1 -0
- package/dependencies-local/extension-kit/context.d.ts +11 -0
- package/dependencies-local/extension-kit/context.js +133 -0
- package/dependencies-local/extension-kit/context.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/ContextProvider.d.ts +9 -0
- package/dependencies-local/extension-kit/i18n/ContextProvider.js +33 -0
- package/dependencies-local/extension-kit/i18n/ContextProvider.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/context.d.ts +9 -0
- package/dependencies-local/extension-kit/i18n/context.js +23 -0
- package/dependencies-local/extension-kit/i18n/context.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/types.d.ts +10 -0
- package/dependencies-local/extension-kit/i18n/types.js.map +1 -0
- package/dependencies-local/extension-kit/i18n/widgets.d.ts +16 -0
- package/dependencies-local/extension-kit/i18n/widgets.js +56 -0
- package/dependencies-local/extension-kit/i18n/widgets.js.map +1 -0
- package/dependencies-local/extension-kit/index.d.ts +3 -0
- package/dependencies-local/extension-kit/index.js +78 -0
- package/dependencies-local/extension-kit/index.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/index.d.ts +2 -0
- package/dependencies-local/extension-kit/object-specs/index.js +22 -0
- package/dependencies-local/extension-kit/object-specs/index.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/paneron-object.d.ts +6 -0
- package/dependencies-local/extension-kit/object-specs/paneron-object.js +161 -0
- package/dependencies-local/extension-kit/object-specs/paneron-object.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/ser-des.d.ts +31 -0
- package/dependencies-local/extension-kit/object-specs/ser-des.js +187 -0
- package/dependencies-local/extension-kit/object-specs/ser-des.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.d.ts +2 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.js +42 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-bool.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.d.ts +3 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.js +110 -0
- package/dependencies-local/extension-kit/object-specs/yaml/custom-timestamp.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/index.d.ts +9 -0
- package/dependencies-local/extension-kit/object-specs/yaml/index.js +36 -0
- package/dependencies-local/extension-kit/object-specs/yaml/index.js.map +1 -0
- package/dependencies-local/extension-kit/object-specs/yaml/schema.d.ts +3 -0
- package/{index.js → dependencies-local/extension-kit/object-specs/yaml/schema.js} +11 -30
- package/dependencies-local/extension-kit/object-specs/yaml/schema.js.map +1 -0
- package/dependencies-local/extension-kit/package.json +53 -0
- package/dependencies-local/extension-kit/settings.d.ts +6 -0
- package/dependencies-local/extension-kit/settings.js +11 -0
- package/dependencies-local/extension-kit/settings.js.map +1 -0
- package/dependencies-local/extension-kit/types/binary-invocation.d.ts +31 -0
- package/dependencies-local/extension-kit/types/binary-invocation.js.map +1 -0
- package/dependencies-local/extension-kit/types/buffers.d.ts +17 -0
- package/dependencies-local/extension-kit/types/buffers.js.map +1 -0
- package/dependencies-local/extension-kit/types/changes.d.ts +37 -0
- package/dependencies-local/extension-kit/types/changes.js +5 -0
- package/dependencies-local/extension-kit/types/changes.js.map +1 -0
- package/dependencies-local/extension-kit/types/data.d.ts +54 -0
- package/dependencies-local/extension-kit/types/data.js +5 -0
- package/dependencies-local/extension-kit/types/data.js.map +1 -0
- package/dependencies-local/extension-kit/types/dialogs.d.ts +15 -0
- package/dependencies-local/extension-kit/types/dialogs.js +5 -0
- package/dependencies-local/extension-kit/types/dialogs.js.map +1 -0
- package/dependencies-local/extension-kit/types/extension-maker.d.ts +17 -0
- package/dependencies-local/extension-kit/types/extension-maker.js +5 -0
- package/dependencies-local/extension-kit/types/extension-maker.js.map +1 -0
- package/dependencies-local/extension-kit/types/extension.d.ts +27 -0
- package/dependencies-local/extension-kit/types/extension.js +5 -0
- package/dependencies-local/extension-kit/types/extension.js.map +1 -0
- package/dependencies-local/extension-kit/types/index.d.ts +3 -0
- package/dependencies-local/extension-kit/types/index.js +41 -0
- package/dependencies-local/extension-kit/types/index.js.map +1 -0
- package/dependencies-local/extension-kit/types/indexes.d.ts +6 -0
- package/dependencies-local/extension-kit/types/indexes.js +15 -0
- package/dependencies-local/extension-kit/types/indexes.js.map +1 -0
- package/dependencies-local/extension-kit/types/migrations.d.ts +15 -0
- package/dependencies-local/extension-kit/types/migrations.js +5 -0
- package/dependencies-local/extension-kit/types/migrations.js.map +1 -0
- package/dependencies-local/extension-kit/types/object-spec.d.ts +108 -0
- package/dependencies-local/extension-kit/types/object-spec.js +23 -0
- package/dependencies-local/extension-kit/types/object-spec.js.map +1 -0
- package/dependencies-local/extension-kit/types/objects.d.ts +18 -0
- package/dependencies-local/extension-kit/types/objects.js +5 -0
- package/dependencies-local/extension-kit/types/objects.js.map +1 -0
- package/dependencies-local/extension-kit/types/progress.d.ts +5 -0
- package/dependencies-local/extension-kit/types/progress.js +5 -0
- package/dependencies-local/extension-kit/types/progress.js.map +1 -0
- package/dependencies-local/extension-kit/types/renderer.d.ts +495 -0
- package/dependencies-local/extension-kit/types/renderer.js +5 -0
- package/dependencies-local/extension-kit/types/renderer.js.map +1 -0
- package/dependencies-local/extension-kit/useDebounce.d.ts +2 -0
- package/dependencies-local/extension-kit/useDebounce.js +27 -0
- package/dependencies-local/extension-kit/useDebounce.js.map +1 -0
- package/dependencies-local/extension-kit/usePersistentStateReducer.d.ts +35 -0
- package/dependencies-local/extension-kit/usePersistentStateReducer.js +91 -0
- package/dependencies-local/extension-kit/usePersistentStateReducer.js.map +1 -0
- package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.d.ts +48 -0
- package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.js +116 -0
- package/dependencies-local/extension-kit/useTimeTravelingPersistentStateReducer.js.map +1 -0
- package/dependencies-local/extension-kit/util.d.ts +8 -0
- package/dependencies-local/extension-kit/util.js +21 -0
- package/dependencies-local/extension-kit/util.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/ErrorState.d.ts +8 -0
- package/dependencies-local/extension-kit/widgets/ErrorState.js +44 -0
- package/dependencies-local/extension-kit/widgets/ErrorState.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Grid.d.ts +41 -0
- package/dependencies-local/extension-kit/widgets/Grid.js +213 -0
- package/dependencies-local/extension-kit/widgets/Grid.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/HelpTooltip.d.ts +18 -0
- package/dependencies-local/extension-kit/widgets/HelpTooltip.js +84 -0
- package/dependencies-local/extension-kit/widgets/HelpTooltip.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/ItemCount.d.ts +19 -0
- package/dependencies-local/extension-kit/widgets/ItemCount.js +78 -0
- package/dependencies-local/extension-kit/widgets/ItemCount.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/List.d.ts +40 -0
- package/dependencies-local/extension-kit/widgets/List.js +191 -0
- package/dependencies-local/extension-kit/widgets/List.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Navbar.d.ts +20 -0
- package/dependencies-local/extension-kit/widgets/Navbar.js +75 -0
- package/dependencies-local/extension-kit/widgets/Navbar.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/SearchResultList.d.ts +24 -0
- package/dependencies-local/extension-kit/widgets/SearchResultList.js +201 -0
- package/dependencies-local/extension-kit/widgets/SearchResultList.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/Block.d.ts +21 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/Block.js +94 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/Block.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.d.ts +6 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.js +22 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/BlockStateButtonGroup.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.d.ts +28 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.js +148 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/PropertyView.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/index.d.ts +27 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/index.js +178 -0
- package/dependencies-local/extension-kit/widgets/Sidebar/index.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.d.ts +13 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.js +82 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/SuperSidebar.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.d.ts +10 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.js +168 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/context.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.d.ts +9 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.js +66 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/detail.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.d.ts +33 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.js +204 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/index.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.d.ts +74 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.js +5 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/types.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.d.ts +1 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.js +14 -0
- package/dependencies-local/extension-kit/widgets/TabbedWorkspace/util.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/Workspace.d.ts +38 -0
- package/dependencies-local/extension-kit/widgets/Workspace.js +99 -0
- package/dependencies-local/extension-kit/widgets/Workspace.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.d.ts +12 -0
- package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.js +57 -0
- package/dependencies-local/extension-kit/widgets/panels/PanelSeparator.js.map +1 -0
- package/dependencies-local/extension-kit/widgets/panels/index.d.ts +28 -0
- package/dependencies-local/extension-kit/widgets/panels/index.js +169 -0
- package/dependencies-local/extension-kit/widgets/panels/index.js.map +1 -0
- package/dist/common.d.ts +1 -0
- package/{common.js → dist/common.js} +1 -1
- package/dist/common.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/initial.d.ts +3 -0
- package/dist/migrations/initial.js.map +1 -0
- package/dist/package.json +56 -0
- package/dist/types/cr.d.ts +216 -0
- package/dist/types/cr.js +175 -0
- package/dist/types/cr.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/{types → dist/types}/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/item.d.ts +59 -0
- package/dist/types/item.js +16 -0
- package/dist/types/item.js.map +1 -0
- package/dist/types/proposal.d.ts +64 -0
- package/{types → dist/types}/proposal.js +1 -1
- package/dist/types/proposal.js.map +1 -0
- package/dist/types/register.d.ts +18 -0
- package/dist/types/register.js +23 -0
- package/dist/types/register.js.map +1 -0
- package/dist/types/registry.d.ts +15 -0
- package/dist/types/registry.js +14 -0
- package/dist/types/registry.js.map +1 -0
- package/dist/types/stakeholder.d.ts +58 -0
- package/dist/types/stakeholder.js +53 -0
- package/dist/types/stakeholder.js.map +1 -0
- package/dist/types/util.d.ts +21 -0
- package/dist/types/util.js +5 -0
- package/dist/types/util.js.map +1 -0
- package/dist/types/views.d.ts +157 -0
- package/dist/types/views.js +5 -0
- package/dist/types/views.js.map +1 -0
- package/dist/views/AnnotatedChange.d.ts +7 -0
- package/dist/views/AnnotatedChange.js +91 -0
- package/dist/views/AnnotatedChange.js.map +1 -0
- package/dist/views/BrowserCtx.d.ts +73 -0
- package/dist/views/BrowserCtx.js +31 -0
- package/dist/views/BrowserCtx.js.map +1 -0
- package/dist/views/FilterCriteria/CRITERIA_CONFIGURATION.d.ts +17 -0
- package/dist/views/FilterCriteria/CRITERIA_CONFIGURATION.js +202 -0
- package/dist/views/FilterCriteria/CRITERIA_CONFIGURATION.js.map +1 -0
- package/dist/views/FilterCriteria/criteriaGroupToQueryExpression.d.ts +6 -0
- package/{views → dist/views}/FilterCriteria/criteriaGroupToQueryExpression.js +10 -3
- package/dist/views/FilterCriteria/criteriaGroupToQueryExpression.js.map +1 -0
- package/dist/views/FilterCriteria/criteriaGroupToSummary.d.ts +5 -0
- package/{views → dist/views}/FilterCriteria/criteriaGroupToSummary.js +7 -7
- package/dist/views/FilterCriteria/criteriaGroupToSummary.js.map +1 -0
- package/dist/views/FilterCriteria/criteriaToNodes.d.ts +24 -0
- package/{views → dist/views}/FilterCriteria/criteriaToNodes.js +42 -28
- package/dist/views/FilterCriteria/criteriaToNodes.js.map +1 -0
- package/dist/views/FilterCriteria/index.d.ts +23 -0
- package/{views → dist/views}/FilterCriteria/index.js +29 -21
- package/dist/views/FilterCriteria/index.js.map +1 -0
- package/dist/views/FilterCriteria/models.d.ts +68 -0
- package/dist/views/FilterCriteria/models.js +34 -0
- package/dist/views/FilterCriteria/models.js.map +1 -0
- package/dist/views/FilterCriteria/mutateGroup.d.ts +17 -0
- package/{views → dist/views}/FilterCriteria/mutateGroup.js +4 -3
- package/dist/views/FilterCriteria/mutateGroup.js.map +1 -0
- package/dist/views/GenericRelatedItemView.d.ts +6 -0
- package/dist/views/GenericRelatedItemView.js +242 -0
- package/dist/views/GenericRelatedItemView.js.map +1 -0
- package/dist/views/RegisterStakeholder.d.ts +9 -0
- package/dist/views/RegisterStakeholder.js +40 -0
- package/dist/views/RegisterStakeholder.js.map +1 -0
- package/dist/views/RegisterVersion.d.ts +9 -0
- package/dist/views/RegisterVersion.js +41 -0
- package/dist/views/RegisterVersion.js.map +1 -0
- package/dist/views/SearchQuery.d.ts +13 -0
- package/dist/views/SearchQuery.js +137 -0
- package/dist/views/SearchQuery.js.map +1 -0
- package/dist/views/change-request/ChangeRequestContext.d.ts +20 -0
- package/dist/views/change-request/ChangeRequestContext.js +56 -0
- package/dist/views/change-request/ChangeRequestContext.js.map +1 -0
- package/dist/views/change-request/Proposals.d.ts +21 -0
- package/dist/views/change-request/Proposals.js +331 -0
- package/dist/views/change-request/Proposals.js.map +1 -0
- package/dist/views/change-request/objectChangeset.d.ts +31 -0
- package/dist/views/change-request/objectChangeset.js +229 -0
- package/dist/views/change-request/objectChangeset.js.map +1 -0
- package/dist/views/detail/ChangeRequest/Proposal.d.ts +0 -0
- package/dist/views/detail/ChangeRequest/Proposal.js +142 -0
- package/dist/views/detail/ChangeRequest/Proposal.js.map +1 -0
- package/dist/views/detail/ChangeRequest/index.d.ts +13 -0
- package/dist/views/detail/ChangeRequest/index.js +207 -0
- package/dist/views/detail/ChangeRequest/index.js.map +1 -0
- package/dist/views/detail/ChangeRequest/transitions.d.ts +28 -0
- package/dist/views/detail/ChangeRequest/transitions.js +530 -0
- package/dist/views/detail/ChangeRequest/transitions.js.map +1 -0
- package/dist/views/detail/CustomView/index.d.ts +13 -0
- package/dist/views/detail/CustomView/index.js +68 -0
- package/dist/views/detail/CustomView/index.js.map +1 -0
- package/dist/views/detail/RegisterHome/index.d.ts +5 -0
- package/dist/views/detail/RegisterHome/index.js +128 -0
- package/dist/views/detail/RegisterHome/index.js.map +1 -0
- package/dist/views/detail/RegisterItem/RelatedItems.d.ts +14 -0
- package/dist/views/detail/RegisterItem/RelatedItems.js +61 -0
- package/dist/views/detail/RegisterItem/RelatedItems.js.map +1 -0
- package/dist/views/detail/RegisterItem/SupersedingItemMenu.d.ts +13 -0
- package/dist/views/detail/RegisterItem/SupersedingItemMenu.js +56 -0
- package/dist/views/detail/RegisterItem/SupersedingItemMenu.js.map +1 -0
- package/dist/views/detail/RegisterItem/index.d.ts +13 -0
- package/dist/views/detail/RegisterItem/index.js +357 -0
- package/dist/views/detail/RegisterItem/index.js.map +1 -0
- package/dist/views/detail/RegisterMeta/RegisterMetaForm.d.ts +10 -0
- package/dist/views/detail/RegisterMeta/RegisterMetaForm.js +331 -0
- package/dist/views/detail/RegisterMeta/RegisterMetaForm.js.map +1 -0
- package/dist/views/detail/RegisterMeta/index.d.ts +10 -0
- package/dist/views/detail/RegisterMeta/index.js +111 -0
- package/dist/views/detail/RegisterMeta/index.js.map +1 -0
- package/dist/views/detail/index.d.ts +1 -0
- package/dist/views/detail/index.js +24 -0
- package/dist/views/detail/index.js.map +1 -0
- package/dist/views/diffing/InlineDiff.d.ts +12 -0
- package/dist/views/diffing/InlineDiff.js +58 -0
- package/dist/views/diffing/InlineDiff.js.map +1 -0
- package/dist/views/diffing/StructuredDiff.d.ts +11 -0
- package/dist/views/diffing/StructuredDiff.js +65 -0
- package/dist/views/diffing/StructuredDiff.js.map +1 -0
- package/dist/views/hooks/useCustomView.d.ts +3 -0
- package/dist/views/hooks/useCustomView.js +24 -0
- package/dist/views/hooks/useCustomView.js.map +1 -0
- package/dist/views/hooks/useItemClassConfig.d.ts +3 -0
- package/dist/views/hooks/useItemClassConfig.js +24 -0
- package/dist/views/hooks/useItemClassConfig.js.map +1 -0
- package/dist/views/hooks/useItemRef.d.ts +3 -0
- package/dist/views/hooks/useItemRef.js +39 -0
- package/dist/views/hooks/useItemRef.js.map +1 -0
- package/dist/views/hooks/useSingleRegisterItemData.d.ts +3 -0
- package/dist/views/hooks/useSingleRegisterItemData.js +32 -0
- package/dist/views/hooks/useSingleRegisterItemData.js.map +1 -0
- package/dist/views/index.d.ts +7 -0
- package/dist/views/index.js +197 -0
- package/dist/views/index.js.map +1 -0
- package/dist/views/itemPathUtils.d.ts +52 -0
- package/dist/views/itemPathUtils.js +144 -0
- package/dist/views/itemPathUtils.js.map +1 -0
- package/dist/views/itemQueryUtils.d.ts +11 -0
- package/dist/views/itemQueryUtils.js +48 -0
- package/dist/views/itemQueryUtils.js.map +1 -0
- package/dist/views/protocolRegistry.d.ts +12 -0
- package/dist/views/protocolRegistry.js +42 -0
- package/dist/views/protocolRegistry.js.map +1 -0
- package/dist/views/sidebar/Browse/index.d.ts +11 -0
- package/dist/views/sidebar/Browse/index.js +453 -0
- package/dist/views/sidebar/Browse/index.js.map +1 -0
- package/dist/views/sidebar/Export/index.d.ts +5 -0
- package/dist/views/sidebar/Export/index.js +94 -0
- package/dist/views/sidebar/Export/index.js.map +1 -0
- package/dist/views/sidebar/ListItem.d.ts +10 -0
- package/dist/views/sidebar/ListItem.js +43 -0
- package/dist/views/sidebar/ListItem.js.map +1 -0
- package/dist/views/sidebar/Registration/index.d.ts +5 -0
- package/dist/views/sidebar/Registration/index.js +163 -0
- package/dist/views/sidebar/Registration/index.js.map +1 -0
- package/dist/views/sidebar/Search/index.d.ts +18 -0
- package/dist/views/sidebar/Search/index.js +177 -0
- package/dist/views/sidebar/Search/index.js.map +1 -0
- package/dist/views/sidebar/index.d.ts +6 -0
- package/dist/views/sidebar/index.js +104 -0
- package/dist/views/sidebar/index.js.map +1 -0
- package/dist/views/util.d.ts +36 -0
- package/dist/views/util.js +135 -0
- package/dist/views/util.js.map +1 -0
- package/package.json +27 -19
- package/react-visual-diff.d.ts +9 -0
- package/common.d.ts +0 -1
- package/index.js.map +0 -1
- package/types/index.js.map +0 -1
- package/types/item.js +0 -6
- package/types/item.js.map +0 -1
- package/types/proposal.d.ts +0 -47
- package/types/proposal.js.map +0 -1
- package/types/register.js.map +0 -1
- package/types/registry.d.ts +0 -10
- package/types/registry.js +0 -7
- package/types/registry.js.map +0 -1
- package/types/stakeholder.d.ts +0 -34
- package/types/stakeholder.js +0 -9
- package/types/stakeholder.js.map +0 -1
- package/types/views.d.ts +0 -83
- package/types/views.js.map +0 -1
- package/views/BrowserCtx.d.ts +0 -9
- package/views/BrowserCtx.js +0 -20
- package/views/BrowserCtx.js.map +0 -1
- package/views/ChangeRequest.d.ts +0 -12
- package/views/ChangeRequest.js +0 -689
- package/views/ChangeRequest.js.map +0 -1
- package/views/FilterCriteria/CRITERIA_CONFIGURATION.d.ts +0 -5
- package/views/FilterCriteria/CRITERIA_CONFIGURATION.js +0 -109
- package/views/FilterCriteria/CRITERIA_CONFIGURATION.js.map +0 -1
- package/views/FilterCriteria/criteriaGroupToQueryExpression.js.map +0 -1
- package/views/FilterCriteria/criteriaGroupToSummary.js.map +0 -1
- package/views/FilterCriteria/criteriaToNodes.js.map +0 -1
- package/views/FilterCriteria/index.js.map +0 -1
- package/views/FilterCriteria/models.js +0 -27
- package/views/FilterCriteria/models.js.map +0 -1
- package/views/FilterCriteria/mutateGroup.js.map +0 -1
- package/views/GenericRelatedItemView.js +0 -202
- package/views/GenericRelatedItemView.js.map +0 -1
- package/views/ItemBrowser.d.ts +0 -12
- package/views/ItemBrowser.js +0 -258
- package/views/ItemBrowser.js.map +0 -1
- package/views/ItemDetails.d.ts +0 -14
- package/views/ItemDetails.js +0 -128
- package/views/ItemDetails.js.map +0 -1
- package/views/MainView.d.ts +0 -8
- package/views/MainView.js +0 -34
- package/views/MainView.js.map +0 -1
- package/views/RegisterInformation.d.ts +0 -7
- package/views/RegisterInformation.js +0 -264
- package/views/RegisterInformation.js.map +0 -1
- package/views/RegisterItemGrid.d.ts +0 -25
- package/views/RegisterItemGrid.js +0 -276
- package/views/RegisterItemGrid.js.map +0 -1
- package/views/index.js +0 -166
- package/views/index.js.map +0 -1
- package/views/itemPathUtils.d.ts +0 -9
- package/views/itemPathUtils.js +0 -57
- package/views/itemPathUtils.js.map +0 -1
- package/views/util.d.ts +0 -12
- package/views/util.js +0 -49
- package/views/util.js.map +0 -1
- /package/{migrations → compiled/migrations}/initial.d.ts +0 -0
- /package/{migrations → compiled/migrations}/initial.js.map +0 -0
- /package/{types → compiled/types}/util.d.ts +0 -0
- /package/{types → compiled/types}/util.js.map +0 -0
- /package/{views → compiled/views}/FilterCriteria/criteriaGroupToSummary.d.ts +0 -0
- /package/{types/register.js → dependencies-local/extension-kit/i18n/types.js} +0 -0
- /package/{types/util.js → dependencies-local/extension-kit/types/binary-invocation.js} +0 -0
- /package/{types/views.js → dependencies-local/extension-kit/types/buffers.js} +0 -0
- /package/{migrations → dist/migrations}/initial.js +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.INITIAL_GLOBAL_SETTINGS = void 0;
|
|
7
|
+
const INITIAL_GLOBAL_SETTINGS = {
|
|
8
|
+
sidebarPosition: 'right',
|
|
9
|
+
mainNavbarPosition: 'top'
|
|
10
|
+
};
|
|
11
|
+
exports.INITIAL_GLOBAL_SETTINGS = INITIAL_GLOBAL_SETTINGS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,uBAAuB,GAAmB;IACrD,eAAe,EAAE,OAAO;IACxB,kBAAkB,EAAE,KAAK;CAC1B,CAAC","sourcesContent":["export type Settings = Record<string, any>\n\nexport interface GlobalSettings extends Settings {\n sidebarPosition: 'left' | 'right'\n mainNavbarPosition: 'top' | 'bottom'\n}\n\nexport const INITIAL_GLOBAL_SETTINGS: GlobalSettings = {\n sidebarPosition: 'right',\n mainNavbarPosition: 'top',\n};\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface BinaryInvocationRequest {
|
|
2
|
+
/** Path relative to Paneron’s bin directory. No extension, .exe will be auto-appended on Windows. */
|
|
3
|
+
binaryName: string;
|
|
4
|
+
/** Arguments will be concatenated. */
|
|
5
|
+
cliArgs: string[];
|
|
6
|
+
/**
|
|
7
|
+
* If true, command is executed inside a shell.
|
|
8
|
+
* In this case, no untrusted input should be passed to the command.
|
|
9
|
+
*/
|
|
10
|
+
useShell?: true;
|
|
11
|
+
}
|
|
12
|
+
export interface SubprocessDescription {
|
|
13
|
+
/** Platform-specific process ID. */
|
|
14
|
+
pid: number;
|
|
15
|
+
/** The original options subprocess had been invoked with. */
|
|
16
|
+
opts: BinaryInvocationRequest;
|
|
17
|
+
/** What the called subprocess output. */
|
|
18
|
+
stdout: string;
|
|
19
|
+
/** What the called subprocess emitted to error output. */
|
|
20
|
+
stderr: string;
|
|
21
|
+
/** Termination result. */
|
|
22
|
+
termination?: ProcessTerminationMetadata;
|
|
23
|
+
}
|
|
24
|
+
export interface ProcessTerminationMetadata {
|
|
25
|
+
/** Termination code, if any. */
|
|
26
|
+
code: number | null;
|
|
27
|
+
/** The signal subprocess was terminated with, if any. */
|
|
28
|
+
signal: string | null;
|
|
29
|
+
/** Error description, if any. */
|
|
30
|
+
error: string | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary-invocation.js","sourceRoot":"","sources":["../../src/types/binary-invocation.ts"],"names":[],"mappings":"","sourcesContent":["export interface BinaryInvocationRequest {\n /** Path relative to Paneron’s bin directory. No extension, .exe will be auto-appended on Windows. */\n binaryName: string;\n\n /** Arguments will be concatenated. */\n cliArgs: string[];\n\n /**\n * If true, command is executed inside a shell.\n * In this case, no untrusted input should be passed to the command.\n */\n useShell?: true;\n}\n\nexport interface SubprocessDescription {\n /** Platform-specific process ID. */\n pid: number\n\n /** The original options subprocess had been invoked with. */\n opts: BinaryInvocationRequest\n\n /** What the called subprocess output. */\n stdout: string\n\n /** What the called subprocess emitted to error output. */\n stderr: string\n\n /** Termination result. */\n termination?: ProcessTerminationMetadata\n}\n\nexport interface ProcessTerminationMetadata {\n /** Termination code, if any. */\n code: number | null;\n\n /** The signal subprocess was terminated with, if any. */\n signal: string | null;\n\n /** Error description, if any. */\n error: string | null;\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buffers describe physical data atoms.
|
|
3
|
+
* A buffer is a raw binary blob
|
|
4
|
+
* and in current implementation maps to a file on disk
|
|
5
|
+
* (or an object in Git repo).
|
|
6
|
+
*
|
|
7
|
+
* A buffer is associated with a path (in POSIX format)
|
|
8
|
+
* that describes its place in data repository tree.
|
|
9
|
+
*
|
|
10
|
+
* Multiple buffers may comprise a single logical **object**.
|
|
11
|
+
*/
|
|
12
|
+
import { Change, Changeset } from './changes';
|
|
13
|
+
export declare type BufferDataset = {
|
|
14
|
+
[bufferPath: string]: Uint8Array | null;
|
|
15
|
+
};
|
|
16
|
+
export declare type BufferChange = Change<Uint8Array>;
|
|
17
|
+
export declare type BufferChangeset = Changeset<BufferChange>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffers.js","sourceRoot":"","sources":["../../src/types/buffers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG","sourcesContent":["/**\n * Buffers describe physical data atoms.\n * A buffer is a raw binary blob\n * and in current implementation maps to a file on disk\n * (or an object in Git repo).\n * \n * A buffer is associated with a path (in POSIX format)\n * that describes its place in data repository tree.\n * \n * Multiple buffers may comprise a single logical **object**.\n */\n\nimport { Change, Changeset } from './changes';\n\n\nexport type BufferDataset = { [bufferPath: string]: Uint8Array | null };\n\nexport type BufferChange = Change<Uint8Array>;\n\nexport type BufferChangeset = Changeset<BufferChange>;\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare type ChangeStatus = 'modified' | 'added' | 'removed';
|
|
2
|
+
export declare type DiffStatus = ChangeStatus | 'unchanged';
|
|
3
|
+
export interface PathDiff {
|
|
4
|
+
[path: string]: DiffStatus;
|
|
5
|
+
}
|
|
6
|
+
export interface PathChanges {
|
|
7
|
+
[path: string]: ChangeStatus;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Describes a change of an object.
|
|
11
|
+
*
|
|
12
|
+
* A null value below means nonexistend object at this path.
|
|
13
|
+
*
|
|
14
|
+
* - newValue: null means delete object, if it exists.
|
|
15
|
+
* - oldValue: null means the object previously did not exist.
|
|
16
|
+
* - Undefined (unspecified) oldValue means no consistency check.
|
|
17
|
+
*/
|
|
18
|
+
export declare type Change<T extends Uint8Array | Record<string, any>> = {
|
|
19
|
+
newValue: T | null;
|
|
20
|
+
oldValue?: T | null;
|
|
21
|
+
};
|
|
22
|
+
export declare type Changeset<C extends Change<any>> = {
|
|
23
|
+
[path: string]: C;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The result of applying a changeset.
|
|
27
|
+
*
|
|
28
|
+
* `conflicts` shows how paths don’t match reference data (`oldValue`s)
|
|
29
|
+
* provided by the changeset. Ideally conflicts would be an empty object,
|
|
30
|
+
*
|
|
31
|
+
* Paths in conflicts can be object or buffer paths,
|
|
32
|
+
* depending on use case.
|
|
33
|
+
*/
|
|
34
|
+
export interface CommitOutcome {
|
|
35
|
+
newCommitHash?: string;
|
|
36
|
+
conflicts?: PathChanges;
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.js","sourceRoot":"","sources":["../../src/types/changes.ts"],"names":[],"mappings":"","sourcesContent":["export type ChangeStatus = 'modified' | 'added' | 'removed';\n\nexport type DiffStatus = ChangeStatus | 'unchanged';\n\nexport interface PathDiff {\n [path: string]: DiffStatus\n}\n\nexport interface PathChanges {\n [path: string]: ChangeStatus\n}\n\n/**\n * Describes a change of an object.\n *\n * A null value below means nonexistend object at this path.\n *\n * - newValue: null means delete object, if it exists.\n * - oldValue: null means the object previously did not exist.\n * - Undefined (unspecified) oldValue means no consistency check.\n */\nexport type Change<T extends Uint8Array | Record<string, any>> =\n { newValue: T | null, oldValue?: T | null };\n\nexport type Changeset<C extends Change<any>> = {\n [path: string]: C\n}\n\n/**\n * The result of applying a changeset.\n *\n * `conflicts` shows how paths don’t match reference data (`oldValue`s)\n * provided by the changeset. Ideally conflicts would be an empty object,\n *\n * Paths in conflicts can be object or buffer paths,\n * depending on use case.\n */\nexport interface CommitOutcome {\n // TODO: “Commit hash” ties this to Git; potentially this could be made generic.\n newCommitHash?: string\n conflicts?: PathChanges\n}\n"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare type FileChangeType = 'modified' | 'added' | 'removed' | 'unchanged';
|
|
2
|
+
/** Describes single object’s data, can be text with specified encoding or binary data. */
|
|
3
|
+
export declare type ObjectData = null | {
|
|
4
|
+
value: string;
|
|
5
|
+
encoding: string;
|
|
6
|
+
} | {
|
|
7
|
+
value: Uint8Array;
|
|
8
|
+
encoding: undefined;
|
|
9
|
+
};
|
|
10
|
+
/** Maps a set of object paths to respective data. */
|
|
11
|
+
export interface ObjectDataset {
|
|
12
|
+
[objectPath: string]: ObjectData;
|
|
13
|
+
}
|
|
14
|
+
/** Maps a set of object paths to object’s change status. */
|
|
15
|
+
export interface ObjectChangeStatusSet {
|
|
16
|
+
[objectPath: string]: FileChangeType;
|
|
17
|
+
}
|
|
18
|
+
/** Describes a query to retrieve which objects exist without knowing their paths. */
|
|
19
|
+
export interface ObjectQuery {
|
|
20
|
+
pathPrefix: string;
|
|
21
|
+
contentSubstring?: string;
|
|
22
|
+
}
|
|
23
|
+
/** Describes a query to get object data for specified object paths. */
|
|
24
|
+
export declare type ObjectDataRequest = Record<string, 'utf-8' | 'binary'>;
|
|
25
|
+
/**
|
|
26
|
+
* Describes a change made to a single object.
|
|
27
|
+
*
|
|
28
|
+
* For data consistency, users must provide `oldValue` to indicate which value should be replaced;
|
|
29
|
+
* if preexisting value is different from `oldValue` then there was likely a race condition
|
|
30
|
+
* (object data changed e.g. by another user), the new value should not be written
|
|
31
|
+
* and user should be informed about a conflict.
|
|
32
|
+
*
|
|
33
|
+
* `encoding` is not expected to change through the lifetime of an object.
|
|
34
|
+
*/
|
|
35
|
+
export declare type ObjectChange = {
|
|
36
|
+
newValue: string | null;
|
|
37
|
+
encoding: string;
|
|
38
|
+
oldValue?: string | null;
|
|
39
|
+
} | {
|
|
40
|
+
newValue: Uint8Array | null;
|
|
41
|
+
encoding: undefined;
|
|
42
|
+
oldValue?: Uint8Array | null;
|
|
43
|
+
};
|
|
44
|
+
/** Maps object data changes to object paths. */
|
|
45
|
+
export interface ObjectChangeset {
|
|
46
|
+
[objectPath: string]: ObjectChange;
|
|
47
|
+
}
|
|
48
|
+
/** The result of applying an ObjectChangeset. */
|
|
49
|
+
export interface CommitOutcome {
|
|
50
|
+
newCommitHash?: string;
|
|
51
|
+
conflicts?: {
|
|
52
|
+
[objectPath: string]: true;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/types/data.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,mDAAmD;AACnD,sDAAsD","sourcesContent":["// DEPRECATED: These types are legacy:\n// - for binary data at physical level see buffers,\n// - for structured data at logical level see objects.\n\n// In context of Git/filesystem based data storage backend,\n// which is currently the only context, “object” below refers to a file,\n// and object path is a string like `folder1/folder2/file.yaml`\n// (depending on context, can be relative to repository root or dataset root).\n// Other backends may be implemented later, so let’s not involve filesystem specifics here.\n\n// Encoding can be any string, but types elsewhere may restrict encoding to 'utf-8' or 'binary'\n// (other encodings have not been tested).\n\nexport type FileChangeType = 'modified' | 'added' | 'removed' | 'unchanged';\n\n\n/** Describes single object’s data, can be text with specified encoding or binary data. */\nexport type ObjectData = null\n | { value: string, encoding: string }\n | { value: Uint8Array, encoding: undefined }\n\n\n/** Maps a set of object paths to respective data. */\nexport interface ObjectDataset {\n [objectPath: string]: ObjectData\n}\n\n\n/** Maps a set of object paths to object’s change status. */\nexport interface ObjectChangeStatusSet {\n [objectPath: string]: FileChangeType\n}\n\n\n/** Describes a query to retrieve which objects exist without knowing their paths. */\nexport interface ObjectQuery {\n pathPrefix: string\n contentSubstring?: string\n}\n\n\n/** Describes a query to get object data for specified object paths. */\nexport type ObjectDataRequest = Record<string, 'utf-8' | 'binary'>;\n\n\n/**\n * Describes a change made to a single object.\n *\n * For data consistency, users must provide `oldValue` to indicate which value should be replaced;\n * if preexisting value is different from `oldValue` then there was likely a race condition\n * (object data changed e.g. by another user), the new value should not be written\n * and user should be informed about a conflict.\n *\n * `encoding` is not expected to change through the lifetime of an object.\n */\nexport type ObjectChange =\n | { newValue: string | null, encoding: string, oldValue?: string | null }\n | { newValue: Uint8Array | null, encoding: undefined, oldValue?: Uint8Array | null }\n\n\n/** Maps object data changes to object paths. */\nexport interface ObjectChangeset {\n // Object path must be supplied / is returned relative to repository root.\n // Writing null must cause the object to be deleted.\n // When null is returned, it means object does not exist.\n [objectPath: string]: ObjectChange\n}\n\n\n/** The result of applying an ObjectChangeset. */\nexport interface CommitOutcome {\n // TODO: “Commit hash” ties this to Git; potentially this could be made generic.\n newCommitHash?: string\n conflicts?: {\n [objectPath: string]: true\n }\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FileFilter } from './renderer';
|
|
2
|
+
export interface FSDialogProps {
|
|
3
|
+
prompt: string;
|
|
4
|
+
}
|
|
5
|
+
export interface OpenFileDialogProps extends FSDialogProps {
|
|
6
|
+
filters?: FileFilter[];
|
|
7
|
+
allowMultiple?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SelectDirectoryProps extends FSDialogProps {
|
|
10
|
+
prompt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SaveFileDialogProps extends FSDialogProps {
|
|
13
|
+
prompt: string;
|
|
14
|
+
filters?: FileFilter[];
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialogs.js","sourceRoot":"","sources":["../../src/types/dialogs.ts"],"names":[],"mappings":"","sourcesContent":["import { FileFilter } from './renderer';\n\n\nexport interface FSDialogProps {\n prompt: string\n}\n\nexport interface OpenFileDialogProps extends FSDialogProps {\n filters?: FileFilter[]\n allowMultiple?: boolean\n}\n\nexport interface SelectDirectoryProps extends FSDialogProps {\n prompt: string\n}\n\n\nexport interface SaveFileDialogProps extends FSDialogProps {\n prompt: string\n filters?: FileFilter[]\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Extension } from './extension';
|
|
3
|
+
import { MigrationModule } from './migrations';
|
|
4
|
+
import { ObjectSpec } from './object-spec';
|
|
5
|
+
export interface ExtensionMakerProps {
|
|
6
|
+
name: string;
|
|
7
|
+
requiredHostAppVersion: string;
|
|
8
|
+
mainView: () => Promise<{
|
|
9
|
+
default: React.FC<Record<never, never>>;
|
|
10
|
+
}>;
|
|
11
|
+
objects?: ObjectSpec[];
|
|
12
|
+
datasetInitializer?: () => MigrationModule;
|
|
13
|
+
datasetMigrations?: {
|
|
14
|
+
[versionSpec: string]: () => MigrationModule;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare type ExtensionMaker = (extensionOptions: ExtensionMakerProps) => Promise<Extension>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension-maker.js","sourceRoot":"","sources":["../../src/types/extension-maker.ts"],"names":[],"mappings":"","sourcesContent":["import { Extension } from './extension';\nimport { MigrationModule } from './migrations';\nimport { ObjectSpec } from './object-spec';\n\n\nexport interface ExtensionMakerProps {\n name: string\n requiredHostAppVersion: string\n\n /* Principal dataset view. */\n mainView: () => Promise<{ default: React.FC<Record<never, never>> }>\n\n /* Object specs allow an extension to provide information about\n logical objects extension manipulates,\n such as object view/edit GUI components.\n Eventually this could also make mainView optional.\n */\n objects?: ObjectSpec[]\n\n /* Instructs which migration to run if new dataset is being initialized.\n The migration is supposed to return version matching latest extension version. */\n datasetInitializer?: () => MigrationModule\n\n /* Instructs a migration to run if current dataset version matches\n one of these specs (in semver format).\n The migration will return a new dataset version as a result.\n The returned version will be checked for migration matches again,\n the app will keep running matching migrations until one returns a version\n for which there is no matching migration versionSpec anymore.\n\n For example:\n\n Let’s say current extension version is 1.3.4,\n but user loaded dataset of version 1.1.8.\n\n If extension developer specified a migration with versionSpec \"<1.2\",\n the app will require the user to migrate.\n When migration is run, it’s given dataset path\n and currently specified version (1.1.8),\n based on which it rewrites dataset files as necessary\n and returns a new version (e.g., \"1.2\") after it finishes.\n\n If developer also specified a migration for \">=1.2 <1.3\",\n it will be run automatically.\n\n Let’s say it returns \"1.3\" when finishes.\n 1.3 doesn’t match any migration spec, so dataset version is updated to \"1.3\"\n and user can start the work.\n\n New extension versions continue to come out with no migrations necessary,\n but later the developer changes data schema again in 1.3.7. In that version,\n they include a migration with versionSpec \">=1.3 <1.3.7\".\n When user opens their 1.3 dataset, they will be asked to update again,\n and that migration will run.\n\n The idea is that extension developer only has to support the most current\n data schema version, but they must alwyas provide migrations\n if data schema changes.\n\n IMPORTANT: It is developer’s responsibility\n to carefully specify migration version specs,\n as they could create infinite migration loops if they wanted to.\n */\n datasetMigrations?: {\n [versionSpec: string]: () => MigrationModule\n }\n}\n\n\nexport type ExtensionMaker =\n (extensionOptions: ExtensionMakerProps) => Promise<Extension>;\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { ObjectSpec, ObjectSpecViewID, ObjectViewProps } from './object-spec';
|
|
3
|
+
import type { DatasetMigrationFunction, MigrationModule } from './migrations';
|
|
4
|
+
import type { DatasetContext } from './renderer';
|
|
5
|
+
/**
|
|
6
|
+
* The interface that extension instance exposes to Paneron in main thread.
|
|
7
|
+
*
|
|
8
|
+
* TODO: Deprecated.
|
|
9
|
+
*/
|
|
10
|
+
export interface MainPlugin {
|
|
11
|
+
isCompatible: (withHostAppVersion: string) => boolean;
|
|
12
|
+
getMigration: (datasetVersion: string) => {
|
|
13
|
+
versionSpec: string;
|
|
14
|
+
migration: () => MigrationModule;
|
|
15
|
+
} | undefined;
|
|
16
|
+
initialMigration: DatasetMigrationFunction;
|
|
17
|
+
getObjectSpecs: () => ObjectSpec[];
|
|
18
|
+
}
|
|
19
|
+
/** The interface that extension instance exposes to Paneron in renderer thread. */
|
|
20
|
+
export interface RendererPlugin {
|
|
21
|
+
mainView?: React.FC<DatasetContext>;
|
|
22
|
+
getObjectView: (opts: {
|
|
23
|
+
objectPath: string;
|
|
24
|
+
viewID: ObjectSpecViewID;
|
|
25
|
+
}) => React.FC<ObjectViewProps> | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare type Extension = MainPlugin | RendererPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extension.js","sourceRoot":"","sources":["../../src/types/extension.ts"],"names":[],"mappings":"","sourcesContent":["import type React from 'react';\nimport type { ObjectSpec, ObjectSpecViewID, ObjectViewProps } from './object-spec';\nimport type { DatasetMigrationFunction, MigrationModule } from './migrations';\nimport type { DatasetContext } from './renderer';\n\n\n/**\n * The interface that extension instance exposes to Paneron in main thread.\n * \n * TODO: Deprecated.\n */\nexport interface MainPlugin {\n // False means another version of the host app must be used (probably a newer one).\n isCompatible: (withHostAppVersion: string) => boolean\n\n // Non-null result means migration must be applied for user to proceed.\n getMigration: (datasetVersion: string) => {\n versionSpec: string\n migration: () => MigrationModule \n } | undefined\n\n initialMigration: DatasetMigrationFunction\n\n getObjectSpecs: () => ObjectSpec[]\n}\n\n\n/** The interface that extension instance exposes to Paneron in renderer thread. */\nexport interface RendererPlugin {\n mainView?: React.FC<DatasetContext>\n getObjectView:\n (opts: { objectPath: string, viewID: ObjectSpecViewID }) =>\n React.FC<ObjectViewProps> | undefined\n}\n\nexport type Extension = MainPlugin | RendererPlugin;\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extension = require("./extension");
|
|
8
|
+
|
|
9
|
+
Object.keys(_extension).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
return _extension[key];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
var _data = require("./data");
|
|
20
|
+
|
|
21
|
+
Object.keys(_data).forEach(function (key) {
|
|
22
|
+
if (key === "default" || key === "__esModule") return;
|
|
23
|
+
Object.defineProperty(exports, key, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () {
|
|
26
|
+
return _data[key];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var _renderer = require("./renderer");
|
|
32
|
+
|
|
33
|
+
Object.keys(_renderer).forEach(function (key) {
|
|
34
|
+
if (key === "default" || key === "__esModule") return;
|
|
35
|
+
Object.defineProperty(exports, key, {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return _renderer[key];
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC","sourcesContent":["export * from './extension';\nexport * from './data';\nexport * from './renderer';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.INITIAL_INDEX_STATUS = void 0;
|
|
7
|
+
const INITIAL_INDEX_STATUS = {
|
|
8
|
+
objectCount: 0,
|
|
9
|
+
progress: {
|
|
10
|
+
phase: 'initializing',
|
|
11
|
+
total: 0,
|
|
12
|
+
loaded: 0
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.INITIAL_INDEX_STATUS = INITIAL_INDEX_STATUS;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../src/types/indexes.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,WAAW,EAAE,CAAC;IACd,QAAQ,EAAE;QACR,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;KACV;CACF,CAAA","sourcesContent":["import { Progress } from './progress';\n\n// Describes status of a filtered (or future custom) object index of a dataset\nexport interface IndexStatus {\n objectCount: number\n progress?: Progress<'initializing' | 'counting' | 'indexing'>\n}\n\n\nexport const INITIAL_INDEX_STATUS: IndexStatus = {\n objectCount: 0,\n progress: {\n phase: 'initializing',\n total: 0,\n loaded: 0,\n },\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BufferChangeset } from './buffers';
|
|
2
|
+
export interface DatasetMigrationOptions {
|
|
3
|
+
datasetRootPath: string;
|
|
4
|
+
versionBefore?: string;
|
|
5
|
+
onProgress?: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
interface DatasetMigrationSpec {
|
|
8
|
+
bufferChangeset: BufferChangeset;
|
|
9
|
+
versionAfter: string;
|
|
10
|
+
}
|
|
11
|
+
export declare type DatasetMigrationFunction = (opts: DatasetMigrationOptions) => Promise<DatasetMigrationSpec>;
|
|
12
|
+
export declare type MigrationModule = Promise<{
|
|
13
|
+
default: DatasetMigrationFunction;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/types/migrations.ts"],"names":[],"mappings":"","sourcesContent":["import { BufferChangeset } from './buffers';\n\n\nexport interface DatasetMigrationOptions {\n datasetRootPath: string\n versionBefore?: string\n onProgress?: (message: string) => void\n}\n\n/* Changeset describing changes that will make the dataset\n conform to a version, and that version. */\ninterface DatasetMigrationSpec {\n bufferChangeset: BufferChangeset\n versionAfter: string\n}\n\n/* Given dataset path and current (‘before’) version, checks files at that path\n and returns a migration spec.\n\n If current version is not given, assume that a new dataset is initialized. */\nexport type DatasetMigrationFunction =\n (opts: DatasetMigrationOptions) => Promise<DatasetMigrationSpec>;\n\nexport type MigrationModule =\n Promise<{ default: DatasetMigrationFunction }>;\n"]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BufferDataset } from './buffers';
|
|
3
|
+
export interface PathMatcher {
|
|
4
|
+
/**
|
|
5
|
+
* Will apply any object path under given prefix,
|
|
6
|
+
* slash-prepended, relative to dataset root. */
|
|
7
|
+
pathPrefix?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Will apply if this function,
|
|
10
|
+
* called with object path relative to dataset root, returns true. */
|
|
11
|
+
path?: (objectPath: string) => boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Describes how Paneron built-in GUI should treat an object
|
|
15
|
+
* that matches this spec.
|
|
16
|
+
*/
|
|
17
|
+
export interface ObjectSpec {
|
|
18
|
+
/**
|
|
19
|
+
* All given conditions will be AND’ed together in order.
|
|
20
|
+
*
|
|
21
|
+
* If none are given, object is considered matching by default,
|
|
22
|
+
* so object spec with empty `matches` rule that comes last in a list
|
|
23
|
+
* can act as a catch-all.
|
|
24
|
+
*/
|
|
25
|
+
matches: PathMatcher;
|
|
26
|
+
/**
|
|
27
|
+
* Available views for objects matching this type.
|
|
28
|
+
*
|
|
29
|
+
* Paneron can use these views when showing objects
|
|
30
|
+
* in its own views outside of extension’s main dataset view
|
|
31
|
+
* (e.g., during conflict resolution).
|
|
32
|
+
*
|
|
33
|
+
* Paneron uses views “full” and “item”.
|
|
34
|
+
*/
|
|
35
|
+
views?: () => Promise<{
|
|
36
|
+
default: ObjectSpecViews;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
declare const objectSpecViewIDs: readonly ["full", "item"];
|
|
40
|
+
export declare type ObjectSpecViewID = typeof objectSpecViewIDs[number];
|
|
41
|
+
export interface ObjectViewProps {
|
|
42
|
+
objectPath: string;
|
|
43
|
+
/** Deserialized object data to display. */
|
|
44
|
+
objectData: Record<string, any>;
|
|
45
|
+
/**
|
|
46
|
+
* If object can be changed, view should call this handler with updated data.
|
|
47
|
+
* NOTE: Doesn’t make sense for some views (e.g., item views). */
|
|
48
|
+
onChange?: (newData: Record<string, any>, msg?: string) => void;
|
|
49
|
+
}
|
|
50
|
+
interface ObjectSpecViews {
|
|
51
|
+
full: React.FC<ObjectViewProps>;
|
|
52
|
+
item?: React.FC<ObjectViewProps>;
|
|
53
|
+
}
|
|
54
|
+
export declare enum AtomicSerDesRuleName {
|
|
55
|
+
lfsPointer = "lfspointer",
|
|
56
|
+
textFile = "textfile",
|
|
57
|
+
jsonFile = "jsonfile",
|
|
58
|
+
yamlFile = "yamlfile",
|
|
59
|
+
binaryFile = "binaryfile"
|
|
60
|
+
}
|
|
61
|
+
export declare enum CompositeSerDesRuleName {
|
|
62
|
+
}
|
|
63
|
+
/** A union of available ser/des rule names. */
|
|
64
|
+
export declare type SerDesRuleName = AtomicSerDesRuleName | CompositeSerDesRuleName;
|
|
65
|
+
export declare type SerDesRuleNameExtensionMap = {
|
|
66
|
+
[ext: string]: SerDesRuleName;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Specifies how to transform an object as runtime in-memory structure
|
|
70
|
+
* to a storeable byte array and vice-versa
|
|
71
|
+
* (i.e., serializer/deserializer).
|
|
72
|
+
*
|
|
73
|
+
* Also specifies which objects this rule can be applied to.
|
|
74
|
+
*/
|
|
75
|
+
export interface SerDesRule<ObjectType extends Record<string, any> = any, Opts extends Record<string, any> = any> {
|
|
76
|
+
/**
|
|
77
|
+
* Called with object data,
|
|
78
|
+
* returns buffer dataset (a record that maps file paths to buffer data).
|
|
79
|
+
*/
|
|
80
|
+
serialize: (object: ObjectType, opts: Opts) => Record<string, Uint8Array>;
|
|
81
|
+
/**
|
|
82
|
+
* Called with a buffer dataset,
|
|
83
|
+
* returns object representation,
|
|
84
|
+
* deserialized if possible.
|
|
85
|
+
*/
|
|
86
|
+
deserialize: (data: Record<string, Uint8Array>, opts: Opts) => ObjectType;
|
|
87
|
+
/**
|
|
88
|
+
* Inspects a buffer/object path (tyipcally looks at extension)
|
|
89
|
+
* and returns whether this rule applies to it.
|
|
90
|
+
*
|
|
91
|
+
* If not defined, the rule is assumed to work for any path.
|
|
92
|
+
*/
|
|
93
|
+
worksForPath?: (objPath: string) => boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Inspects object and returns whether this rule can serialize it.
|
|
96
|
+
* (A lot like a type guard for ObjectType would do.)
|
|
97
|
+
*
|
|
98
|
+
* If not defined, assumed to always work.
|
|
99
|
+
*/
|
|
100
|
+
worksForObject?: (obj: ObjectType) => boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Inspects buffer data and returns whether this rule can deserialize it.
|
|
103
|
+
*
|
|
104
|
+
* If not defined, assumed to always work.
|
|
105
|
+
*/
|
|
106
|
+
worksForBufferDataset?: (data: BufferDataset) => boolean;
|
|
107
|
+
}
|
|
108
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.CompositeSerDesRuleName = exports.AtomicSerDesRuleName = void 0;
|
|
7
|
+
const objectSpecViewIDs = ['full', 'item'];
|
|
8
|
+
var AtomicSerDesRuleName;
|
|
9
|
+
exports.AtomicSerDesRuleName = AtomicSerDesRuleName;
|
|
10
|
+
|
|
11
|
+
(function (AtomicSerDesRuleName) {
|
|
12
|
+
AtomicSerDesRuleName["lfsPointer"] = "lfspointer";
|
|
13
|
+
AtomicSerDesRuleName["textFile"] = "textfile";
|
|
14
|
+
AtomicSerDesRuleName["jsonFile"] = "jsonfile";
|
|
15
|
+
AtomicSerDesRuleName["yamlFile"] = "yamlfile";
|
|
16
|
+
AtomicSerDesRuleName["binaryFile"] = "binaryfile";
|
|
17
|
+
})(AtomicSerDesRuleName || (exports.AtomicSerDesRuleName = AtomicSerDesRuleName = {}));
|
|
18
|
+
|
|
19
|
+
var CompositeSerDesRuleName;
|
|
20
|
+
exports.CompositeSerDesRuleName = CompositeSerDesRuleName;
|
|
21
|
+
|
|
22
|
+
(function (CompositeSerDesRuleName) {//paneronObject = 'paneronObject',
|
|
23
|
+
})(CompositeSerDesRuleName || (exports.CompositeSerDesRuleName = CompositeSerDesRuleName = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-spec.js","sourceRoot":"","sources":["../../src/types/object-spec.ts"],"names":[],"mappings":"AA4CA,MAAM,iBAAiB,GAAG;IACxB,MAAM;IACN,MAAM;CACE,CAAC;AAyBX,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC9B,iDAAyB,CAAA;IACzB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,iDAAyB,CAAA;AAC3B,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAED,MAAM,CAAN,IAAY,uBAEX;AAFD,WAAY,uBAAuB;IACjC,kCAAkC;AACpC,CAAC,EAFW,uBAAuB,KAAvB,uBAAuB,QAElC","sourcesContent":["import type { BufferDataset } from './buffers';\n\nexport interface PathMatcher {\n /**\n * Will apply any object path under given prefix,\n * slash-prepended, relative to dataset root. */\n pathPrefix?: string\n\n /**\n * Will apply if this function,\n * called with object path relative to dataset root, returns true. */\n path?: (objectPath: string) => boolean\n}\n\n\n/** \n * Describes how Paneron built-in GUI should treat an object\n * that matches this spec.\n */\nexport interface ObjectSpec {\n\n /**\n * All given conditions will be AND’ed together in order.\n * \n * If none are given, object is considered matching by default,\n * so object spec with empty `matches` rule that comes last in a list\n * can act as a catch-all.\n */\n matches: PathMatcher\n\n /**\n * Available views for objects matching this type.\n * \n * Paneron can use these views when showing objects\n * in its own views outside of extension’s main dataset view\n * (e.g., during conflict resolution).\n * \n * Paneron uses views “full” and “item”.\n */\n views?: () => Promise<{ default: ObjectSpecViews }>\n\n}\n\n\nconst objectSpecViewIDs = [\n 'full',\n 'item',\n] as const;\n\n\nexport type ObjectSpecViewID = typeof objectSpecViewIDs[number];\n\n\nexport interface ObjectViewProps {\n objectPath: string\n\n /** Deserialized object data to display. */\n objectData: Record<string, any>\n\n /**\n * If object can be changed, view should call this handler with updated data.\n * NOTE: Doesn’t make sense for some views (e.g., item views). */\n onChange?: (newData: Record<string, any>, msg?: string) => void\n}\n\n\ninterface ObjectSpecViews {\n full: React.FC<ObjectViewProps>\n item?: React.FC<ObjectViewProps>\n}\n\n\nexport enum AtomicSerDesRuleName {\n lfsPointer = 'lfspointer',\n textFile = 'textfile',\n jsonFile = 'jsonfile',\n yamlFile = 'yamlfile',\n binaryFile = 'binaryfile',\n}\n\nexport enum CompositeSerDesRuleName {\n //paneronObject = 'paneronObject',\n}\n\n/** A union of available ser/des rule names. */\nexport type SerDesRuleName = AtomicSerDesRuleName | CompositeSerDesRuleName\n\n\nexport type SerDesRuleNameExtensionMap = { [ext: string]: SerDesRuleName }\n\n\n\n/**\n * Specifies how to transform an object as runtime in-memory structure\n * to a storeable byte array and vice-versa\n * (i.e., serializer/deserializer).\n *\n * Also specifies which objects this rule can be applied to.\n */\nexport interface SerDesRule<\n ObjectType extends Record<string, any> = any,\n Opts extends Record<string, any> = any,\n> {\n /**\n * Called with object data,\n * returns buffer dataset (a record that maps file paths to buffer data).\n */\n serialize: (object: ObjectType, opts: Opts) => Record<string, Uint8Array>\n\n /**\n * Called with a buffer dataset,\n * returns object representation,\n * deserialized if possible.\n */\n deserialize: (data: Record<string, Uint8Array>, opts: Opts) => ObjectType\n\n /**\n * Inspects a buffer/object path (tyipcally looks at extension)\n * and returns whether this rule applies to it.\n *\n * If not defined, the rule is assumed to work for any path.\n */\n worksForPath?: (objPath: string) => boolean\n\n /**\n * Inspects object and returns whether this rule can serialize it.\n * (A lot like a type guard for ObjectType would do.)\n *\n * If not defined, assumed to always work.\n */\n worksForObject?: (obj: ObjectType) => boolean\n\n /**\n * Inspects buffer data and returns whether this rule can deserialize it.\n *\n * If not defined, assumed to always work.\n */\n worksForBufferDataset?: (data: BufferDataset) => boolean\n\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Objects describe logical data atoms.
|
|
3
|
+
*
|
|
4
|
+
* On physical level, an object is comprised of one or more **buffers**.
|
|
5
|
+
*
|
|
6
|
+
* Object path is taken to be the path to its root buffer
|
|
7
|
+
* relative to dataset (not repository as a whole).
|
|
8
|
+
*
|
|
9
|
+
* Conversion between buffers and objects is specified
|
|
10
|
+
* by ser/des rules.
|
|
11
|
+
*/
|
|
12
|
+
import { Change, Changeset } from './changes';
|
|
13
|
+
export declare type Object = Record<string, any>;
|
|
14
|
+
export declare type ObjectDataset = {
|
|
15
|
+
[objectPath: string]: Object | null;
|
|
16
|
+
};
|
|
17
|
+
export declare type ObjectChange<T extends Object = Record<string, any>> = Change<T>;
|
|
18
|
+
export declare type ObjectChangeset<T extends Object = Record<string, any>> = Changeset<ObjectChange<T>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/types/objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG","sourcesContent":["/**\n * Objects describe logical data atoms.\n *\n * On physical level, an object is comprised of one or more **buffers**.\n *\n * Object path is taken to be the path to its root buffer\n * relative to dataset (not repository as a whole).\n *\n * Conversion between buffers and objects is specified\n * by ser/des rules.\n */\n\nimport { Change, Changeset } from './changes';\n\n\n/* DEPRECATED. */\nexport type Object = Record<string, any>;\n// TODO: Rename this type to avoid the clash with default Object.\n// Options: LogicalObject?\n\nexport type ObjectDataset = { [objectPath: string]: Object | null };\n\nexport type ObjectChange<T extends Object = Record<string, any>> = Change<T>;\n\nexport type ObjectChangeset<T extends Object = Record<string, any>> = Changeset<ObjectChange<T>>\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/types/progress.ts"],"names":[],"mappings":"","sourcesContent":["// Describes progress of some operation\nexport interface Progress<P extends string = string> {\n phase: P\n loaded: number\n total: number\n}\n"]}
|