@plitzi/sdk-shared 0.30.19
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/CHANGELOG.md +1015 -0
- package/dist/_virtual/_rolldown/runtime.mjs +11 -0
- package/dist/builder/contexts/BuilderContext.d.ts +61 -0
- package/dist/builder/contexts/BuilderContext.mjs +5 -0
- package/dist/builder/contexts/index.d.ts +3 -0
- package/dist/builder/contexts/index.mjs +6 -0
- package/dist/builder/index.d.ts +3 -0
- package/dist/builder/index.mjs +3 -0
- package/dist/collections/CollectionContext.d.ts +2 -0
- package/dist/collections/CollectionContext.mjs +5 -0
- package/dist/collections/index.d.ts +3 -0
- package/dist/collections/index.mjs +2 -0
- package/dist/dataSource/DataSourceContext.d.ts +3 -0
- package/dist/dataSource/DataSourceContext.mjs +5 -0
- package/dist/dataSource/hooks/index.d.ts +3 -0
- package/dist/dataSource/hooks/index.mjs +2 -0
- package/dist/dataSource/hooks/useDataSource.d.ts +20 -0
- package/dist/dataSource/hooks/useDataSource.mjs +45 -0
- package/dist/dataSource/index.d.ts +2 -0
- package/dist/dataSource/index.mjs +2 -0
- package/dist/devTools/DevToolsContext.d.ts +11 -0
- package/dist/devTools/DevToolsContext.mjs +8 -0
- package/dist/devTools/index.d.ts +5 -0
- package/dist/devTools/index.mjs +3 -0
- package/dist/devTools/utils/PlitziConsole.d.ts +39 -0
- package/dist/devTools/utils/PlitziConsole.mjs +97 -0
- package/dist/elements/ComponentContext.d.ts +3 -0
- package/dist/elements/ComponentContext.mjs +5 -0
- package/dist/elements/ElementContext.d.ts +19 -0
- package/dist/elements/ElementContext.mjs +6 -0
- package/dist/elements/hooks/useElement.d.ts +3 -0
- package/dist/elements/hooks/useElement.mjs +10 -0
- package/dist/elements/index.d.ts +7 -0
- package/dist/elements/index.mjs +4 -0
- package/dist/helpers/fetchManifest.d.ts +2 -0
- package/dist/helpers/fetchManifest.mjs +14 -0
- package/dist/helpers/formatDate.d.ts +56 -0
- package/dist/helpers/formatDate.mjs +54 -0
- package/dist/helpers/generateFacade.d.ts +2 -0
- package/dist/helpers/generateFacade.mjs +35 -0
- package/dist/helpers/index.d.ts +12 -0
- package/dist/helpers/index.mjs +9 -0
- package/dist/helpers/security.d.ts +6 -0
- package/dist/helpers/security.mjs +10 -0
- package/dist/helpers/stripTypename.d.ts +15 -0
- package/dist/helpers/stripTypename.mjs +41 -0
- package/dist/helpers/syntaxHighlight.d.ts +2 -0
- package/dist/helpers/syntaxHighlight.mjs +7 -0
- package/dist/helpers/twigWrapper.d.ts +4 -0
- package/dist/helpers/twigWrapper.mjs +33 -0
- package/dist/helpers/utils.d.ts +18 -0
- package/dist/helpers/utils.mjs +62 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.mjs +3 -0
- package/dist/hooks/useNetwork.d.ts +12 -0
- package/dist/hooks/useNetwork.mjs +45 -0
- package/dist/hooks/usePlitziServiceContext.d.ts +42 -0
- package/dist/hooks/usePlitziServiceContext.mjs +17 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.mjs +37 -0
- package/dist/network/NetworkContext.d.ts +31 -0
- package/dist/network/NetworkContext.mjs +20 -0
- package/dist/network/NetworkInternalContext.d.ts +7 -0
- package/dist/network/NetworkInternalContext.mjs +6 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddMutation.mjs +24 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddRecordMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionAddRecordMutation.mjs +16 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveMutation.mjs +17 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveRecordMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionRemoveRecordMutation.mjs +14 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateMutation.mjs +32 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateRecordMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Collection/CollectionUpdateRecordMutation.mjs +16 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +59 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +53 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.d.ts +8 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.mjs +14 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.mjs +12 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +35 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +39 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +37 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +37 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +23 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +23 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.mjs +34 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.mjs +18 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.mjs +34 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.mjs +32 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.mjs +29 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.mjs +32 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.mjs +34 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.mjs +12 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.mjs +32 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.mjs +26 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.mjs +18 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.mjs +26 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +37 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddPluginMutation.d.ts +6 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddPluginMutation.mjs +15 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +39 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +35 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.mjs +26 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +35 -0
- package/dist/network/graphql/builder/Mutations/Space/SpacePublishMutation.d.ts +8 -0
- package/dist/network/graphql/builder/Mutations/Space/SpacePublishMutation.mjs +14 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +23 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemovePluginMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemovePluginMutation.mjs +15 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +23 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +34 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.d.ts +6 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +15 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +29 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnMutation.mjs +34 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceSetCdnCredentialMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceSetCdnCredentialMutation.mjs +20 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnMutation.mjs +36 -0
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceAddCredentialMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceAddCredentialMutation.mjs +18 -0
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceRemoveCredentialMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceRemoveCredentialMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceUpdateCredentialMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceUpdateCredentialMutation.mjs +18 -0
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceAddPageFolderMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceAddPageFolderMutation.mjs +14 -0
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceRemovePageFolderMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceRemovePageFolderMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceUpdatePageFolderMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceUpdatePageFolderMutation.mjs +14 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +13 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceHomePageMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceHomePageMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceRemovePageMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceRemovePageMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +13 -0
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceAddResourceMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceAddResourceMutation.mjs +27 -0
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceMoveResourceMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceMoveResourceMutation.mjs +15 -0
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceRemoveResourceMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceRemoveResourceMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceAddVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceAddVariableMutation.mjs +32 -0
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceRemoveVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceRemoveVariableMutation.mjs +11 -0
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceUpdateVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceUpdateVariableMutation.mjs +18 -0
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateMutation.mjs +15 -0
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateSettingsMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateSettingsMutation.mjs +15 -0
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleAddSelectorVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleAddSelectorVariableMutation.mjs +29 -0
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleRemoveSelectorVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleRemoveSelectorVariableMutation.mjs +26 -0
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleUpdateSelectorVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleUpdateSelectorVariableMutation.mjs +29 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleAddSelectorMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleAddSelectorMutation.mjs +32 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.mjs +12 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.mjs +30 -0
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleAddVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleAddVariableMutation.mjs +13 -0
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleRemoveVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleRemoveVariableMutation.mjs +12 -0
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleUpdateVariableMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleUpdateVariableMutation.mjs +13 -0
- package/dist/network/graphql/builder/Mutations/index.d.ts +178 -0
- package/dist/network/graphql/builder/Mutations/index.mjs +151 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionQuery.d.ts +6 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionQuery.mjs +35 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordQuery.d.ts +6 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordQuery.mjs +16 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionRecordsQuery.mjs +27 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/Collection/CollectionsQuery.mjs +37 -0
- package/dist/network/graphql/builder/Queries/InitQuery.d.ts +15 -0
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +130 -0
- package/dist/network/graphql/builder/Queries/PluginsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/PluginsQuery.mjs +54 -0
- package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.d.ts +6 -0
- package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +47 -0
- package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +58 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceCdnsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceCdnsQuery.mjs +32 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceCredentialsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceCredentialsQuery.mjs +29 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.d.ts +9 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +30 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceLatestRevisionQuery.d.ts +11 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceLatestRevisionQuery.mjs +15 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceResourcesQuery.d.ts +8 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceResourcesQuery.mjs +20 -0
- package/dist/network/graphql/builder/Queries/index.d.ts +44 -0
- package/dist/network/graphql/builder/Queries/index.mjs +31 -0
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorConnectedSubscription.d.ts +11 -0
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorConnectedSubscription.mjs +17 -0
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorDisconnectedSubscription.d.ts +11 -0
- package/dist/network/graphql/builder/Subscriptions/Collaborator/CollaboratorDisconnectedSubscription.mjs +17 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/SegmentAddTemplateSubscription.d.ts +2 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/SegmentAddTemplateSubscription.mjs +40 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentAddElementSubscription.d.ts +11 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentAddElementSubscription.mjs +39 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentCloneElementSubscription.d.ts +10 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentCloneElementSubscription.mjs +29 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentMoveElementSubscription.d.ts +10 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentMoveElementSubscription.mjs +15 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentRemoveElementSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentRemoveElementSubscription.mjs +12 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.d.ts +11 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/elements/SegmentUpdateElementSubscription.mjs +26 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.d.ts +7 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceAddVariableSubscription.mjs +21 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceRemoveVariableSubscription.d.ts +7 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceRemoveVariableSubscription.mjs +14 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceUpdateVariableSubscription.d.ts +7 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/space/variables/SegmentSpaceUpdateVariableSubscription.mjs +21 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableSubscription.d.ts +11 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableSubscription.mjs +16 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableSubscription.d.ts +10 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableSubscription.mjs +15 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableSubscription.d.ts +11 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableSubscription.mjs +16 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleAddSelectorSubscription.d.ts +17 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleAddSelectorSubscription.mjs +17 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.d.ts +8 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleRemoveSelectorSubscription.mjs +13 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.d.ts +16 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/selectors/SegmentStyleUpdateSelectorSubscription.mjs +17 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleAddVariableSubscription.d.ts +9 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleAddVariableSubscription.mjs +14 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleRemoveVariableSubscription.d.ts +8 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleRemoveVariableSubscription.mjs +13 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleUpdateVariableSubscription.d.ts +9 -0
- package/dist/network/graphql/builder/Subscriptions/Segment/style/variables/SegmentStyleUpdateVariableSubscription.mjs +14 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceAddTemplateSubscription.d.ts +11 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceAddTemplateSubscription.mjs +39 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdateSettingsSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdateSettingsSubscription.mjs +12 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdatedSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/SpaceUpdatedSubscription.mjs +28 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceAddElementSubscription.d.ts +10 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceAddElementSubscription.mjs +38 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceCloneElementSubscription.d.ts +9 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceCloneElementSubscription.mjs +28 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceMoveElementSubscription.d.ts +9 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceMoveElementSubscription.mjs +14 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceRemoveElementSubscription.d.ts +5 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceRemoveElementSubscription.mjs +11 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/elements/SpaceUpdateElementSubscription.mjs +25 -0
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceAddPageFolderSubscription.mjs +16 -0
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceRemovePageFolderSubscription.d.ts +5 -0
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceRemovePageFolderSubscription.mjs +11 -0
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceUpdatePageFolderSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/folders/SpaceUpdatePageFolderSubscription.mjs +16 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceAddPageSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceAddPageSubscription.mjs +25 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceHomePageSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceHomePageSubscription.mjs +25 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceRemovePageSubscription.d.ts +5 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceRemovePageSubscription.mjs +11 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceUpdatePageSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/pages/SpaceUpdatePageSubscription.mjs +25 -0
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceAddVariableSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceAddVariableSubscription.mjs +20 -0
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceRemoveVariableSubscription.d.ts +5 -0
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceRemoveVariableSubscription.mjs +11 -0
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceUpdateVariableSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Space/variables/SpaceUpdateVariableSubscription.mjs +20 -0
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdateSettingsSubscription.d.ts +6 -0
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdateSettingsSubscription.mjs +12 -0
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdatedSubscription.d.ts +4 -0
- package/dist/network/graphql/builder/Subscriptions/Style/StyleUpdatedSubscription.mjs +13 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleAddSelectorSubscription.d.ts +16 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleAddSelectorSubscription.mjs +16 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.d.ts +7 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleRemoveSelectorSubscription.mjs +12 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.d.ts +15 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selector/StyleUpdateSelectorSubscription.mjs +16 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleAddSelectorVariableSubscription.d.ts +10 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleAddSelectorVariableSubscription.mjs +15 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleRemoveSelectorVariableSubscription.d.ts +9 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleRemoveSelectorVariableSubscription.mjs +14 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleUpdateSelectorVariableSubscription.d.ts +10 -0
- package/dist/network/graphql/builder/Subscriptions/Style/selectorVariables/StyleUpdateSelectorVariableSubscription.mjs +15 -0
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleAddVariableSubscription.d.ts +8 -0
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleAddVariableSubscription.mjs +13 -0
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleRemoveVariableSubscription.d.ts +7 -0
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleRemoveVariableSubscription.mjs +12 -0
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleUpdateVariableSubscription.d.ts +8 -0
- package/dist/network/graphql/builder/Subscriptions/Style/variables/StyleUpdateVariableSubscription.mjs +13 -0
- package/dist/network/graphql/builder/Subscriptions/index.d.ts +151 -0
- package/dist/network/graphql/builder/Subscriptions/index.mjs +103 -0
- package/dist/network/graphql/builder/index.d.ts +7 -0
- package/dist/network/graphql/builder/index.mjs +4 -0
- package/dist/network/graphql/index.d.ts +2 -0
- package/dist/network/graphql/index.mjs +6 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddMutation.d.ts +2 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddRecordMutation.d.ts +4 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionAddRecordMutation.mjs +16 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveMutation.d.ts +2 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveRecordMutation.d.ts +4 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionRemoveRecordMutation.mjs +14 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateMutation.d.ts +2 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateRecordMutation.d.ts +4 -0
- package/dist/network/graphql/sdk/Mutations/Collection/CollectionUpdateRecordMutation.mjs +16 -0
- package/dist/network/graphql/sdk/Mutations/index.d.ts +14 -0
- package/dist/network/graphql/sdk/Mutations/index.mjs +11 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionQuery.d.ts +6 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionQuery.mjs +32 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordQuery.d.ts +6 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordQuery.mjs +14 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordsQuery.d.ts +9 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionRecordsQuery.mjs +25 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionsQuery.d.ts +9 -0
- package/dist/network/graphql/sdk/Queries/Collection/CollectionsQuery.mjs +25 -0
- package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +14 -0
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +100 -0
- package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +6 -0
- package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +46 -0
- package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +9 -0
- package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +57 -0
- package/dist/network/graphql/sdk/Queries/index.d.ts +26 -0
- package/dist/network/graphql/sdk/Queries/index.mjs +19 -0
- package/dist/network/graphql/sdk/index.d.ts +5 -0
- package/dist/network/graphql/sdk/index.mjs +3 -0
- package/dist/network/index.d.ts +6 -0
- package/dist/network/index.mjs +8 -0
- package/dist/schema/SchemaContext.d.ts +3 -0
- package/dist/schema/SchemaContext.mjs +5 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.mjs +3 -0
- package/dist/schema/schemaConstants.d.ts +9 -0
- package/dist/schema/schemaConstants.mjs +19 -0
- package/dist/segments/SegmentsContext.d.ts +2 -0
- package/dist/segments/SegmentsContext.mjs +6 -0
- package/dist/segments/index.d.ts +3 -0
- package/dist/segments/index.mjs +2 -0
- package/dist/server/hooks/useRscData.d.ts +14 -0
- package/dist/server/hooks/useRscData.mjs +16 -0
- package/dist/server/index.d.ts +7 -0
- package/dist/server/index.mjs +4 -0
- package/dist/server/rsc/RscContext.d.ts +13 -0
- package/dist/server/rsc/RscContext.mjs +5 -0
- package/dist/server/rsc/RscProvider.d.ts +13 -0
- package/dist/server/rsc/RscProvider.mjs +42 -0
- package/dist/style/index.d.ts +3 -0
- package/dist/style/index.mjs +2 -0
- package/dist/style/styleConstants.d.ts +105 -0
- package/dist/style/styleConstants.mjs +226 -0
- package/dist/theme/ThemeProvider.d.ts +12 -0
- package/dist/theme/ThemeProvider.mjs +40 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.mjs +2 -0
- package/dist/types/AuthTypes.d.ts +32 -0
- package/dist/types/AuthTypes.mjs +0 -0
- package/dist/types/BuilderTypes.d.ts +20 -0
- package/dist/types/BuilderTypes.mjs +0 -0
- package/dist/types/CollectionTypes.d.ts +84 -0
- package/dist/types/CollectionTypes.mjs +0 -0
- package/dist/types/CommonTypes.d.ts +24 -0
- package/dist/types/CommonTypes.mjs +0 -0
- package/dist/types/ComponentTypes.d.ts +45 -0
- package/dist/types/ComponentTypes.mjs +0 -0
- package/dist/types/DataSourceTypes.d.ts +56 -0
- package/dist/types/DataSourceTypes.mjs +0 -0
- package/dist/types/DevToolsTypes.d.ts +44 -0
- package/dist/types/DevToolsTypes.mjs +0 -0
- package/dist/types/ElementTypes.d.ts +35 -0
- package/dist/types/ElementTypes.mjs +0 -0
- package/dist/types/EventBridgeTypes.d.ts +5 -0
- package/dist/types/EventBridgeTypes.mjs +0 -0
- package/dist/types/InteractionTypes.d.ts +101 -0
- package/dist/types/InteractionTypes.mjs +0 -0
- package/dist/types/McpTypes.d.ts +164 -0
- package/dist/types/McpTypes.mjs +0 -0
- package/dist/types/NavigationTypes.d.ts +13 -0
- package/dist/types/NavigationTypes.mjs +0 -0
- package/dist/types/PluginTypes.d.ts +121 -0
- package/dist/types/PluginTypes.mjs +0 -0
- package/dist/types/ResourceTypes.d.ts +40 -0
- package/dist/types/ResourceTypes.mjs +0 -0
- package/dist/types/SchemaTypes.d.ts +152 -0
- package/dist/types/SchemaTypes.mjs +0 -0
- package/dist/types/SdkTypes.d.ts +16 -0
- package/dist/types/SdkTypes.mjs +0 -0
- package/dist/types/SegmentTypes.d.ts +41 -0
- package/dist/types/SegmentTypes.mjs +0 -0
- package/dist/types/ServerTypes.d.ts +200 -0
- package/dist/types/ServerTypes.mjs +0 -0
- package/dist/types/SpaceTypes.d.ts +25 -0
- package/dist/types/SpaceTypes.mjs +0 -0
- package/dist/types/StateTypes.d.ts +7 -0
- package/dist/types/StateTypes.mjs +0 -0
- package/dist/types/StoreTypes.d.ts +22 -0
- package/dist/types/StoreTypes.mjs +0 -0
- package/dist/types/StyleTypes.d.ts +59 -0
- package/dist/types/StyleTypes.mjs +6 -0
- package/dist/types/ThemeTypes.d.ts +5 -0
- package/dist/types/ThemeTypes.mjs +0 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.mjs +2 -0
- package/dist/websockets/RTCodec.d.ts +134 -0
- package/dist/websockets/RTCodec.mjs +35 -0
- package/dist/websockets/index.d.ts +3 -0
- package/dist/websockets/index.mjs +2 -0
- package/eslint.config.mjs +85 -0
- package/package.json +1063 -0
- package/setupTests.ts +29 -0
- package/tailwind.config.js +29 -0
- package/vite.config.ts +163 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import e from "./fetchManifest.mjs";
|
|
2
|
+
import t from "./generateFacade.mjs";
|
|
3
|
+
import n from "./syntaxHighlight.mjs";
|
|
4
|
+
import { formatDate as r, formatDateUTC as i, formatFromNow as a, formatUTCToLocal as o, getDurationMs as s, isDate as c, isValidFormat as l, parseDate as u, toUnixSeconds as d } from "./formatDate.mjs";
|
|
5
|
+
import { hasValidToken as f, processTwig as p } from "./twigWrapper.mjs";
|
|
6
|
+
import { ParamsFromURL as m, delay as h, emptyObject as g, generateID as _, getDisplayName as v, getKeyDecoded as y, getPathsFromObeject as b, hexToRGB as x, isInViewport as S, isTestMode as C, makeId as w } from "./utils.mjs";
|
|
7
|
+
import { disableReactDevTools as T } from "./security.mjs";
|
|
8
|
+
import { createStripTypenameLink as E, stripTypenameDeep as D } from "./stripTypename.mjs";
|
|
9
|
+
export { m as ParamsFromURL, E as createStripTypenameLink, h as delay, T as disableReactDevTools, g as emptyObject, e as fetchManifest, r as formatDate, i as formatDateUTC, a as formatFromNow, o as formatUTCToLocal, t as generateFacade, _ as generateID, v as getDisplayName, s as getDurationMs, y as getKeyDecoded, b as getPathsFromObeject, f as hasValidToken, x as hexToRGB, c as isDate, S as isInViewport, C as isTestMode, l as isValidFormat, w as makeId, u as parseDate, p as processTwig, D as stripTypenameDeep, n as syntaxHighlight, d as toUnixSeconds };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/helpers/security.ts
|
|
2
|
+
var e = () => {
|
|
3
|
+
if (typeof window > "u") return;
|
|
4
|
+
let e = () => void 0, t = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
5
|
+
typeof t == "object" && Object.keys(t).forEach((n) => {
|
|
6
|
+
t[n] = typeof t[n] == "function" ? e : null;
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as disableReactDevTools };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ApolloLink } from '@apollo/client/core';
|
|
2
|
+
type WithoutTypename<T> = T extends Array<infer U> ? Array<WithoutTypename<U>> : T extends object ? {
|
|
3
|
+
[K in keyof T as K extends '__typename' ? never : K]: WithoutTypename<T[K]>;
|
|
4
|
+
} : T;
|
|
5
|
+
/**
|
|
6
|
+
* Recursively removes __typename from objects and arrays.
|
|
7
|
+
* Optimized to avoid creating new objects/arrays if not needed.
|
|
8
|
+
*/
|
|
9
|
+
export declare function stripTypenameDeep<T>(value: T): WithoutTypename<T>;
|
|
10
|
+
/**
|
|
11
|
+
* ApolloLink that strips __typename from the result data.
|
|
12
|
+
* Uses optimized stripTypenameDeep.
|
|
13
|
+
*/
|
|
14
|
+
export declare const createStripTypenameLink: () => ApolloLink;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ApolloLink as e, Observable as t } from "@apollo/client/core";
|
|
2
|
+
//#region src/helpers/stripTypename.ts
|
|
3
|
+
function n(e) {
|
|
4
|
+
if (Array.isArray(e)) {
|
|
5
|
+
let t = !1, r = e.map((e) => {
|
|
6
|
+
let r = n(e);
|
|
7
|
+
return r !== e && (t = !0), r;
|
|
8
|
+
});
|
|
9
|
+
return t ? r : e;
|
|
10
|
+
}
|
|
11
|
+
if (typeof e == "object" && e) {
|
|
12
|
+
let t = {}, r = !1;
|
|
13
|
+
for (let i in e) {
|
|
14
|
+
if (i === "__typename") {
|
|
15
|
+
r = !0;
|
|
16
|
+
continue;
|
|
17
|
+
}
|
|
18
|
+
let a = e[i], o = n(a);
|
|
19
|
+
o !== a && (r = !0), t[i] = o;
|
|
20
|
+
}
|
|
21
|
+
return r ? t : e;
|
|
22
|
+
}
|
|
23
|
+
return e;
|
|
24
|
+
}
|
|
25
|
+
var r = () => new e((e, r) => new t((t) => {
|
|
26
|
+
let i = r(e).subscribe({
|
|
27
|
+
next: (e) => {
|
|
28
|
+
t.next(e.data ? {
|
|
29
|
+
...e,
|
|
30
|
+
data: n(e.data)
|
|
31
|
+
} : e);
|
|
32
|
+
},
|
|
33
|
+
error: (e) => t.error(e),
|
|
34
|
+
complete: () => t.complete()
|
|
35
|
+
});
|
|
36
|
+
return () => {
|
|
37
|
+
i.unsubscribe();
|
|
38
|
+
};
|
|
39
|
+
}));
|
|
40
|
+
//#endregion
|
|
41
|
+
export { r as createStripTypenameLink, n as stripTypenameDeep };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
//#region src/helpers/syntaxHighlight.ts
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
let t = "number";
|
|
4
|
+
return /^"/.test(e) ? t = /:$/.test(e) ? "text-red-700" : "text-green-700" : /true|false/.test(e) ? t = "text-blue-700" : /null/.test(e) && (t = ""), `<span class="${t}">${e}</span>`;
|
|
5
|
+
}, t = /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g, n = (n) => n?.replace(t, e) ?? n;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import e from "twig";
|
|
2
|
+
//#region src/helpers/twigWrapper.ts
|
|
3
|
+
e.extendFilter("object_as_json", (e) => typeof e == "object" ? JSON.stringify(e) : e);
|
|
4
|
+
var t = "{{\\s*(?<token>[a-zA-Z_][a-zA-Z0-9_]*(?:\\??\\.[a-zA-Z_][a-zA-Z0-9_]*)*)[^}]*}}", n = new RegExp(t, "g"), r = RegExp(`^${t}$`), i = (e, t = !1) => {
|
|
5
|
+
if (typeof e != "string") return !1;
|
|
6
|
+
let i = t ? r : n;
|
|
7
|
+
return i.lastIndex = 0, i.test(e.trim());
|
|
8
|
+
}, a = (t, r = {}, a = !1, o = !1) => {
|
|
9
|
+
if (typeof t != "string" || !i(t)) return t;
|
|
10
|
+
try {
|
|
11
|
+
n.lastIndex = 0;
|
|
12
|
+
let i = t;
|
|
13
|
+
a && [...i.matchAll(n)].forEach((e) => {
|
|
14
|
+
e.groups && (i = i.replace(e[0], `{{ ${e.groups.token} | default('${e[0]}') }}`));
|
|
15
|
+
}), o && [...i.matchAll(n)].forEach((e) => {
|
|
16
|
+
e.groups && (i = i.replace(e[0], `{{ ${e.groups.token} | object_as_json }}`));
|
|
17
|
+
}), "variables" in r && (r = {
|
|
18
|
+
...r,
|
|
19
|
+
...r.variables
|
|
20
|
+
});
|
|
21
|
+
let s = e.twig({ data: i }).render(r);
|
|
22
|
+
if (!o) return s;
|
|
23
|
+
try {
|
|
24
|
+
return JSON.parse(s) || s;
|
|
25
|
+
} catch {
|
|
26
|
+
return s;
|
|
27
|
+
}
|
|
28
|
+
} catch {
|
|
29
|
+
return t;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { i as hasValidToken, a as processTwig };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export declare const isTestMode: () => boolean;
|
|
3
|
+
export declare function getDisplayName<T = unknown>(WrappedComponent?: FC<T>): string;
|
|
4
|
+
declare const emptyObject: {};
|
|
5
|
+
export { emptyObject };
|
|
6
|
+
export declare const generateID: (prevId?: string) => string;
|
|
7
|
+
export declare const getPathsFromObeject: (object?: {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}, basePath?: string, glue?: string, skipArray?: boolean) => string[];
|
|
10
|
+
export declare const makeId: (length: number, includeMayus?: boolean, includeNumbers?: boolean) => string;
|
|
11
|
+
export declare function getKeyDecoded(webKey: string, asWebId: true): number;
|
|
12
|
+
export declare function getKeyDecoded<T = unknown>(webKey: string, asWebId?: false): T;
|
|
13
|
+
export declare function ParamsFromURL(query?: string): {
|
|
14
|
+
[key: string]: string | string[];
|
|
15
|
+
};
|
|
16
|
+
export declare const delay: (ms: number) => Promise<unknown>;
|
|
17
|
+
export declare const isInViewport: (el: HTMLElement) => boolean;
|
|
18
|
+
export declare const hexToRGB: (hex: string, alpha: number) => string | false;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { get as e } from "@plitzi/plitzi-ui/helpers";
|
|
2
|
+
//#region src/helpers/utils.ts
|
|
3
|
+
var t = () => typeof process < "u" && process.env.NODE_ENV === "test";
|
|
4
|
+
function n(e) {
|
|
5
|
+
return e && (e.displayName || e.name) || "Component";
|
|
6
|
+
}
|
|
7
|
+
var r = {};
|
|
8
|
+
Object.freeze(r);
|
|
9
|
+
var i = () => ((/* @__PURE__ */ new Date()).getTime() / 1e3 | 0).toString(16) + "xxxxxxxxxxxxxxxx".replace(/[x]/g, function() {
|
|
10
|
+
return (Math.random() * 16 | 0).toString(16);
|
|
11
|
+
}).toLowerCase(), a = (e = "") => t() ? e ? `id_${e.substring(e.length - 6)}` : "id_000000" : i(), o = (e, t = "", n = ".", r = !1) => !e || typeof e != "object" ? [] : Object.keys(e).reduce((i, a) => {
|
|
12
|
+
a = a.replaceAll(n, "").replaceAll(".", "");
|
|
13
|
+
let s = `${t}${t ? n : ""}${a}`;
|
|
14
|
+
return typeof e[a] != "object" || Array.isArray(e[a]) && r ? [...i, s] : [
|
|
15
|
+
...i,
|
|
16
|
+
s,
|
|
17
|
+
...o(e[a], s, n, r)
|
|
18
|
+
];
|
|
19
|
+
}, []), s = (e, t = !0, n = !0) => {
|
|
20
|
+
let r = "", i = "abcdefghijklmnopqrstuvwxyz";
|
|
21
|
+
t && (i = `ABCDEFGHIJKLMNOPQRSTUVWXYZ${i}`), n && (i = `${i}0123456789`);
|
|
22
|
+
let a = i.length;
|
|
23
|
+
for (let t = 0; t < e; t++) r += i.charAt(Math.floor(Math.random() * a));
|
|
24
|
+
return r;
|
|
25
|
+
};
|
|
26
|
+
function c(t, n) {
|
|
27
|
+
if (!t) return 0;
|
|
28
|
+
let r = {};
|
|
29
|
+
try {
|
|
30
|
+
let e = t.split(".")[1], n = typeof window < "u" ? window.atob(e) : Buffer.from(e, "base64").toString();
|
|
31
|
+
r = JSON.parse(n);
|
|
32
|
+
} catch {
|
|
33
|
+
return 0;
|
|
34
|
+
}
|
|
35
|
+
return n ? e(r, "data.spaceId", 0) : r;
|
|
36
|
+
}
|
|
37
|
+
function l(e) {
|
|
38
|
+
!e && typeof window < "u" && (e = window.location.search);
|
|
39
|
+
let t = {};
|
|
40
|
+
if (!e || e.length === 0) return t;
|
|
41
|
+
let n = e.replace("?", "").split("&");
|
|
42
|
+
for (let e = 0; e < n.length; e++) {
|
|
43
|
+
let r = n[e].split("="), i = decodeURIComponent(r[0]), a = decodeURIComponent(r[1]);
|
|
44
|
+
t[i] === void 0 ? t[i] = decodeURIComponent(a) : typeof t[i] == "string" ? t[i] = [t[i], decodeURIComponent(a)] : t[i].push(decodeURIComponent(a));
|
|
45
|
+
}
|
|
46
|
+
return t;
|
|
47
|
+
}
|
|
48
|
+
var u = (e) => new Promise((t) => {
|
|
49
|
+
setTimeout(t, e);
|
|
50
|
+
}), d = (e) => {
|
|
51
|
+
let { top: t, left: n, bottom: r, right: i } = e.getBoundingClientRect(), { innerHeight: a, innerWidth: o } = window, { documentElement: { clientHeight: s, clientWidth: c } } = document;
|
|
52
|
+
return t >= 0 && n >= 0 && r <= (a || s) && i <= (o || c);
|
|
53
|
+
}, f = (e, t) => {
|
|
54
|
+
if (!e) return !1;
|
|
55
|
+
let n, r, i;
|
|
56
|
+
if (e.length === 7) [n, r, i] = (e.match(/\w\w/g) ?? []).map((e) => parseInt(e, 16));
|
|
57
|
+
else if (e.length === 4) [n, r, i] = (e.match(/\w/g) ?? []).map((e) => parseInt(`${e}${e}`, 16));
|
|
58
|
+
else return !1;
|
|
59
|
+
return t ? `rgba(${n},${r},${i},${t})` : `rgb(${n},${r},${i})`;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { l as ParamsFromURL, u as delay, r as emptyObject, a as generateID, n as getDisplayName, c as getKeyDecoded, o as getPathsFromObeject, f as hexToRGB, d as isInViewport, t as isTestMode, s as makeId };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Server } from '../types';
|
|
2
|
+
export type UseNetworkProps = {
|
|
3
|
+
initLoading?: boolean;
|
|
4
|
+
server?: Server;
|
|
5
|
+
webKey?: string;
|
|
6
|
+
internalUsage?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const useNetwork: ({ initLoading, server, webKey, internalUsage }: UseNetworkProps) => {
|
|
9
|
+
networkLoading: boolean;
|
|
10
|
+
networkQuery: <T = unknown>(url: string, params?: FormData | Record<string, string | object | number | boolean>, method?: string, accessToken?: string) => Promise<T | undefined>;
|
|
11
|
+
};
|
|
12
|
+
export default useNetwork;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useCallback as e, useState as t } from "react";
|
|
2
|
+
//#region src/hooks/useNetwork.ts
|
|
3
|
+
var n = ({ initLoading: n = !1, server: r, webKey: i, internalUsage: a = !0 }) => {
|
|
4
|
+
let [o, s] = t(n);
|
|
5
|
+
return {
|
|
6
|
+
networkLoading: o,
|
|
7
|
+
networkQuery: e(async (e, t = {}, n = "get", o = "") => {
|
|
8
|
+
try {
|
|
9
|
+
s(!0), n = n.toLowerCase();
|
|
10
|
+
let c = new Headers();
|
|
11
|
+
c.append("Content-Type", "application/json"), o ? c.append("Authorization", `Bearer ${o}`) : i && c.append("Authorization", `Bearer ${i}`);
|
|
12
|
+
let l = "";
|
|
13
|
+
if (a && r) {
|
|
14
|
+
let { nodeServer: e } = r;
|
|
15
|
+
l = e;
|
|
16
|
+
}
|
|
17
|
+
let u = t;
|
|
18
|
+
(t instanceof FormData ? Array.from(t.values()) : Object.values(t)).forEach((e) => {
|
|
19
|
+
if (e instanceof Blob && c.get("Content-Type") !== "multipart/form-data") {
|
|
20
|
+
c.delete("Content-Type");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
}), u instanceof FormData || (u = new FormData(), Object.entries(t).forEach(([e, t]) => {
|
|
24
|
+
u.append(e, t);
|
|
25
|
+
}));
|
|
26
|
+
let d = {
|
|
27
|
+
method: n,
|
|
28
|
+
headers: c,
|
|
29
|
+
body: u
|
|
30
|
+
};
|
|
31
|
+
return c.get("Content-Type") === "application/json" && (d.body = JSON.stringify(t)), n === "get" && delete d.body, await (await fetch(`${l}${e}`, d)).json();
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error(e);
|
|
34
|
+
} finally {
|
|
35
|
+
s(!1);
|
|
36
|
+
}
|
|
37
|
+
}, [
|
|
38
|
+
i,
|
|
39
|
+
a,
|
|
40
|
+
r
|
|
41
|
+
])
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { n as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BuilderContextValue } from '../builder';
|
|
2
|
+
import { NetworkContextValue } from '../network';
|
|
3
|
+
import { CollectionContextValue, ComponentContextValue, DataSourceContextValue, EventBridgeContextValue, InteractionsContextValue, NavigationContextValue, PluginsContextValue, SegmentsContextValue, StateManagerContextValue, Theme } from '../types';
|
|
4
|
+
import { Context, ReactNode, RefObject } from 'react';
|
|
5
|
+
export type PlitziServiceContextValue<TEventBridge = any, TInteractions = any> = {
|
|
6
|
+
settings: {
|
|
7
|
+
isHydrating?: boolean;
|
|
8
|
+
previewMode?: boolean;
|
|
9
|
+
environment?: string;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
theme: Theme;
|
|
12
|
+
};
|
|
13
|
+
root: {
|
|
14
|
+
baseElementId: string;
|
|
15
|
+
};
|
|
16
|
+
utils: {
|
|
17
|
+
getWindow: () => Window | null;
|
|
18
|
+
rootRef: RefObject<HTMLElement | null>;
|
|
19
|
+
};
|
|
20
|
+
customContexts: Record<string, Context<any>>;
|
|
21
|
+
contexts: {
|
|
22
|
+
DataSourceContext: Context<DataSourceContextValue>;
|
|
23
|
+
SegmentsContext: Context<SegmentsContextValue>;
|
|
24
|
+
NavigationContext: Context<NavigationContextValue>;
|
|
25
|
+
CollectionContext: Context<CollectionContextValue>;
|
|
26
|
+
ComponentContext: Context<ComponentContextValue>;
|
|
27
|
+
StateManagerContext: Context<StateManagerContextValue>;
|
|
28
|
+
EventBridgeContext: Context<EventBridgeContextValue<TEventBridge>>;
|
|
29
|
+
PluginsContext: Context<PluginsContextValue>;
|
|
30
|
+
InteractionsContext: Context<InteractionsContextValue<TInteractions>>;
|
|
31
|
+
NetworkContext: Context<NetworkContextValue>;
|
|
32
|
+
BuilderContext?: Context<BuilderContextValue>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
declare const PlitziServiceContext: Context<PlitziServiceContextValue<any, any>>;
|
|
36
|
+
declare const usePlitziServiceContext: <TEventBridge = any, TInteractions = any>() => PlitziServiceContextValue<TEventBridge, TInteractions>;
|
|
37
|
+
declare const PlitziServiceProvider: (props: {
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
value: PlitziServiceContextValue;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export { PlitziServiceProvider, PlitziServiceContext };
|
|
42
|
+
export default usePlitziServiceContext;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createContext as e, use as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
var r = e({});
|
|
4
|
+
r.displayName = "PlitziServiceContext";
|
|
5
|
+
var i = () => {
|
|
6
|
+
let e = t(r);
|
|
7
|
+
if (e === void 0) throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");
|
|
8
|
+
return e;
|
|
9
|
+
}, a = (e) => {
|
|
10
|
+
let { children: t, value: i } = e;
|
|
11
|
+
return /* @__PURE__ */ n(r, {
|
|
12
|
+
value: i,
|
|
13
|
+
children: t
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as PlitziServiceContext, a as PlitziServiceProvider, i as default };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './helpers';
|
|
3
|
+
export * from './hooks';
|
|
4
|
+
export * from './builder';
|
|
5
|
+
export * from './style';
|
|
6
|
+
export * from './schema';
|
|
7
|
+
export * from './elements';
|
|
8
|
+
export * from './dataSource';
|
|
9
|
+
export * from './network';
|
|
10
|
+
export * from './network/graphql';
|
|
11
|
+
export * from './segments';
|
|
12
|
+
export * from './collections';
|
|
13
|
+
export * from './websockets';
|
|
14
|
+
export * from './devTools';
|
|
15
|
+
export * from './theme';
|
|
16
|
+
export * from './server';
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import e from "./builder/contexts/BuilderContext.mjs";
|
|
2
|
+
import { contexts_exports as t } from "./builder/contexts/index.mjs";
|
|
3
|
+
import n from "./collections/CollectionContext.mjs";
|
|
4
|
+
import r from "./helpers/fetchManifest.mjs";
|
|
5
|
+
import i from "./helpers/generateFacade.mjs";
|
|
6
|
+
import a from "./helpers/syntaxHighlight.mjs";
|
|
7
|
+
import { formatDate as o, formatDateUTC as s, formatFromNow as c, formatUTCToLocal as l, getDurationMs as u, isDate as d, isValidFormat as f, parseDate as p, toUnixSeconds as m } from "./helpers/formatDate.mjs";
|
|
8
|
+
import { hasValidToken as h, processTwig as g } from "./helpers/twigWrapper.mjs";
|
|
9
|
+
import { ParamsFromURL as _, delay as v, emptyObject as y, generateID as b, getDisplayName as x, getKeyDecoded as S, getPathsFromObeject as C, hexToRGB as w, isInViewport as T, isTestMode as E, makeId as D } from "./helpers/utils.mjs";
|
|
10
|
+
import { disableReactDevTools as O } from "./helpers/security.mjs";
|
|
11
|
+
import { createStripTypenameLink as k, stripTypenameDeep as A } from "./helpers/stripTypename.mjs";
|
|
12
|
+
import j from "./dataSource/hooks/useDataSource.mjs";
|
|
13
|
+
import M from "./devTools/DevToolsContext.mjs";
|
|
14
|
+
import N, { createStoreDevToolsLogger as P, pConsole as F } from "./devTools/utils/PlitziConsole.mjs";
|
|
15
|
+
import I from "./elements/ComponentContext.mjs";
|
|
16
|
+
import L from "./elements/ElementContext.mjs";
|
|
17
|
+
import R from "./elements/hooks/useElement.mjs";
|
|
18
|
+
import z from "./hooks/useNetwork.mjs";
|
|
19
|
+
import B, { PlitziServiceContext as V, PlitziServiceProvider as H } from "./hooks/usePlitziServiceContext.mjs";
|
|
20
|
+
import { StyleVariableCategory as U } from "./types/StyleTypes.mjs";
|
|
21
|
+
import W, { EMPTY_STYLE_SCHEMA as G, StyleBindingsAllowed as K, baseDefaultValue as q, inheritableAttributesBase as J } from "./style/styleConstants.mjs";
|
|
22
|
+
import Y from "./schema/SchemaContext.mjs";
|
|
23
|
+
import { EMPTY_SCHEMA as X, VARIABLE_REGEX as Z } from "./schema/schemaConstants.mjs";
|
|
24
|
+
import Q from "./network/NetworkContext.mjs";
|
|
25
|
+
import $ from "./network/NetworkInternalContext.mjs";
|
|
26
|
+
import ee from "./network/graphql/builder/Mutations/index.mjs";
|
|
27
|
+
import te from "./network/graphql/builder/Queries/index.mjs";
|
|
28
|
+
import ne from "./network/graphql/builder/Subscriptions/index.mjs";
|
|
29
|
+
import re from "./network/graphql/sdk/Mutations/index.mjs";
|
|
30
|
+
import ie from "./network/graphql/sdk/Queries/index.mjs";
|
|
31
|
+
import ae from "./segments/SegmentsContext.mjs";
|
|
32
|
+
import oe, { RTEvent as se, RTEventCloseCode as ce, getInstance as le, isRTEvent as ue, setInstance as de } from "./websockets/RTCodec.mjs";
|
|
33
|
+
import fe, { ThemeContext as pe } from "./theme/ThemeProvider.mjs";
|
|
34
|
+
import me from "./server/rsc/RscContext.mjs";
|
|
35
|
+
import he from "./server/hooks/useRscData.mjs";
|
|
36
|
+
import ge from "./server/rsc/RscProvider.mjs";
|
|
37
|
+
export { e as BuilderContext, ee as BuilderMutations, te as BuilderQueries, ne as BuilderSubscriptions, n as CollectionContext, I as ComponentContext, M as DevToolsContext, X as EMPTY_SCHEMA, G as EMPTY_STYLE_SCHEMA, L as ElementContext, Q as NetworkContext, $ as NetworkInternalContext, _ as ParamsFromURL, N as PlitziConsole, V as PlitziServiceContext, H as PlitziServiceProvider, oe as RTCodec, se as RTEvent, ce as RTEventCloseCode, me as RscContext, ge as RscProvider, Y as SchemaContext, re as SdkMutations, ie as SdkQueries, ae as SegmentsContext, K as StyleBindingsAllowed, U as StyleVariableCategory, pe as ThemeContext, fe as ThemeProvider, Z as VARIABLE_REGEX, q as baseDefaultValue, t as contexts, P as createStoreDevToolsLogger, k as createStripTypenameLink, v as delay, O as disableReactDevTools, y as emptyObject, r as fetchManifest, o as formatDate, s as formatDateUTC, c as formatFromNow, l as formatUTCToLocal, i as generateFacade, b as generateID, x as getDisplayName, u as getDurationMs, le as getInstance, S as getKeyDecoded, C as getPathsFromObeject, h as hasValidToken, w as hexToRGB, J as inheritableAttributesBase, d as isDate, T as isInViewport, ue as isRTEvent, E as isTestMode, f as isValidFormat, D as makeId, F as pConsole, p as parseDate, g as processTwig, de as setInstance, A as stripTypenameDeep, W as styleConstants, a as syntaxHighlight, m as toUnixSeconds, j as useDataSource, R as useElement, z as useNetwork, B as usePlitziServiceContext, he as useRscData };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Environment, Server } from '../types';
|
|
2
|
+
import { ApolloClient, ApolloLink, FetchPolicy, Observable } from '@apollo/client/core';
|
|
3
|
+
type NetworkContextValueBase<Q extends Record<string, unknown> = Record<string, unknown>, M extends Record<string, unknown> = Record<string, unknown>> = {
|
|
4
|
+
mutate: <T extends keyof M>(mutationKey: T, variables: Record<string, unknown>, silentError?: boolean, includeEnvironment?: boolean, uploadOptions?: object) => Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
result?: M[T];
|
|
7
|
+
error?: string | Error;
|
|
8
|
+
}>;
|
|
9
|
+
query: <T extends keyof Q>(queryKey: T, variables?: Record<string, unknown>, fetchPolicy?: FetchPolicy, silentError?: boolean) => Promise<{
|
|
10
|
+
success: boolean;
|
|
11
|
+
result?: Q[T];
|
|
12
|
+
error?: string | Error;
|
|
13
|
+
}>;
|
|
14
|
+
webKey: string;
|
|
15
|
+
server: Server;
|
|
16
|
+
userKey: string;
|
|
17
|
+
webId: number;
|
|
18
|
+
environment: Environment;
|
|
19
|
+
};
|
|
20
|
+
export type NetworkContextValueBuilder<Q extends Record<string, unknown> = Record<string, unknown>, M extends Record<string, unknown> = Record<string, unknown>, S extends Record<string, unknown> = Record<string, unknown>> = NetworkContextValueBase<Q, M> & {
|
|
21
|
+
instanceId: string;
|
|
22
|
+
subscriptionManager: {
|
|
23
|
+
subscribe: <T extends keyof S>(subscriptionKey: T, variables: Record<string, unknown>, callback: (result: ApolloClient.SubscribeResult<S[T]>) => void) => false | Observable<ApolloLink.Result<any>> | null;
|
|
24
|
+
unsubscribe: (subscriptionKey: keyof S | (keyof S)[]) => void;
|
|
25
|
+
stop: () => void;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export type NetworkContextValue<Q extends Record<string, unknown> = Record<string, unknown>, M extends Record<string, unknown> = Record<string, unknown>, S extends Record<string, unknown> = Record<string, unknown>, T extends 'builder' | 'sdk' = 'sdk'> = T extends 'builder' ? NetworkContextValueBuilder<Q, M, S> : NetworkContextValueBase<Q, M>;
|
|
29
|
+
export type BuilderNetworkContextValue<Q extends Record<string, unknown> = Record<string, unknown>, M extends Record<string, unknown> = Record<string, unknown>, S extends Record<string, unknown> = Record<string, unknown>> = NetworkContextValue<Q, M, S, 'builder'>;
|
|
30
|
+
declare const NetworkContext: import('react').Context<NetworkContextValueBase<Record<string, unknown>, Record<string, unknown>>>;
|
|
31
|
+
export default NetworkContext;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createContext as e } from "react";
|
|
2
|
+
var t = e({
|
|
3
|
+
mutate: async () => {},
|
|
4
|
+
query: async () => {},
|
|
5
|
+
subscribe: () => {},
|
|
6
|
+
subscriptionManager: {
|
|
7
|
+
subscribe: () => {},
|
|
8
|
+
unsubscribe: () => {},
|
|
9
|
+
stop: () => {}
|
|
10
|
+
},
|
|
11
|
+
webKey: "",
|
|
12
|
+
instanceId: "",
|
|
13
|
+
server: {},
|
|
14
|
+
userKey: "",
|
|
15
|
+
webId: "",
|
|
16
|
+
environment: "development"
|
|
17
|
+
});
|
|
18
|
+
t.displayName = "NetworkContext";
|
|
19
|
+
//#endregion
|
|
20
|
+
export { t as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OfflineData } from '../types';
|
|
2
|
+
export type NetworkInternalContextValue = Omit<OfflineData, 'collections' | 'segments'> & {
|
|
3
|
+
segments: NonNullable<OfflineData['segments']>;
|
|
4
|
+
collections: NonNullable<OfflineData['collections']>;
|
|
5
|
+
};
|
|
6
|
+
declare const NetworkInternalContext: import('react').Context<NetworkInternalContextValue>;
|
|
7
|
+
export default NetworkInternalContext;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client/core";
|
|
2
|
+
//#region src/network/graphql/builder/Mutations/Collection/CollectionAddMutation.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
mutation CollectionAddMutation(
|
|
5
|
+
$name: String!
|
|
6
|
+
$namePlural: String!
|
|
7
|
+
$description: String
|
|
8
|
+
$privacy: String!
|
|
9
|
+
$fields: Json!
|
|
10
|
+
) {
|
|
11
|
+
CollectionAdd(name: $name, namePlural: $namePlural, description: $description, privacy: $privacy, fields: $fields) {
|
|
12
|
+
id
|
|
13
|
+
name
|
|
14
|
+
namePlural
|
|
15
|
+
description
|
|
16
|
+
privacy
|
|
17
|
+
fields
|
|
18
|
+
createdAt
|
|
19
|
+
updatedAt
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { t as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client/core";
|
|
2
|
+
//#region src/network/graphql/builder/Mutations/Collection/CollectionAddRecordMutation.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
mutation CollectionAddRecordMutation($collectionId: String!, $status: String!, $values: Json!) {
|
|
5
|
+
CollectionAddRecord(collectionId: $collectionId, status: $status, values: $values) {
|
|
6
|
+
id
|
|
7
|
+
status
|
|
8
|
+
values
|
|
9
|
+
createdAt
|
|
10
|
+
updatedAt
|
|
11
|
+
publishedAt
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { t as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client/core";
|
|
2
|
+
//#region src/network/graphql/builder/Mutations/Collection/CollectionRemoveMutation.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
mutation CollectionRemoveMutation($id: String!) {
|
|
5
|
+
CollectionRemove(id: $id) {
|
|
6
|
+
id
|
|
7
|
+
name
|
|
8
|
+
description
|
|
9
|
+
privacy
|
|
10
|
+
fields
|
|
11
|
+
createdAt
|
|
12
|
+
updatedAt
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client/core";
|
|
2
|
+
//#region src/network/graphql/builder/Mutations/Collection/CollectionRemoveRecordMutation.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
mutation CollectionRemoveRecordMutation($id: String!) {
|
|
5
|
+
CollectionRemoveRecord(id: $id) {
|
|
6
|
+
id
|
|
7
|
+
values
|
|
8
|
+
createdAt
|
|
9
|
+
updatedAt
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { t as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client/core";
|
|
2
|
+
//#region src/network/graphql/builder/Mutations/Collection/CollectionUpdateMutation.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
mutation CollectionUpdateMutation(
|
|
5
|
+
$id: String!
|
|
6
|
+
$name: String!
|
|
7
|
+
$namePlural: String!
|
|
8
|
+
$description: String
|
|
9
|
+
$privacy: String!
|
|
10
|
+
$fields: Json!
|
|
11
|
+
) {
|
|
12
|
+
CollectionUpdate(
|
|
13
|
+
id: $id
|
|
14
|
+
name: $name
|
|
15
|
+
namePlural: $namePlural
|
|
16
|
+
description: $description
|
|
17
|
+
privacy: $privacy
|
|
18
|
+
fields: $fields
|
|
19
|
+
) {
|
|
20
|
+
id
|
|
21
|
+
name
|
|
22
|
+
namePlural
|
|
23
|
+
description
|
|
24
|
+
privacy
|
|
25
|
+
fields
|
|
26
|
+
createdAt
|
|
27
|
+
updatedAt
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { t as default };
|