@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
package/setupTests.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { vi } from 'vitest';
|
|
2
|
+
import createFetchMock from 'vitest-fetch-mock';
|
|
3
|
+
|
|
4
|
+
// set globalThis.fetch and globalThis.fetchMock
|
|
5
|
+
const fetchMocker = createFetchMock(vi);
|
|
6
|
+
fetchMocker.enableMocks();
|
|
7
|
+
|
|
8
|
+
vi.stubGlobal(
|
|
9
|
+
'ResizeObserver',
|
|
10
|
+
vi.fn(() => ({
|
|
11
|
+
observe: vi.fn(),
|
|
12
|
+
unobserve: vi.fn(),
|
|
13
|
+
disconnect: vi.fn()
|
|
14
|
+
}))
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(window, 'matchMedia', {
|
|
18
|
+
writable: true,
|
|
19
|
+
value: vi.fn().mockImplementation((query: unknown) => ({
|
|
20
|
+
matches: false,
|
|
21
|
+
media: query,
|
|
22
|
+
onchange: null,
|
|
23
|
+
addListener: vi.fn(),
|
|
24
|
+
removeListener: vi.fn(),
|
|
25
|
+
addEventListener: vi.fn(),
|
|
26
|
+
removeEventListener: vi.fn(),
|
|
27
|
+
dispatchEvent: vi.fn()
|
|
28
|
+
}))
|
|
29
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import defaultTheme from 'tailwindcss/defaultTheme';
|
|
2
|
+
import plugin from 'tailwindcss/plugin';
|
|
3
|
+
import { colors } from '@plitzi/plitzi-ui/tailwind';
|
|
4
|
+
|
|
5
|
+
const config = {
|
|
6
|
+
theme: {
|
|
7
|
+
extend: {
|
|
8
|
+
colors
|
|
9
|
+
},
|
|
10
|
+
groups: ['1', '2', '3', '4', '5'],
|
|
11
|
+
fontFamily: {
|
|
12
|
+
...defaultTheme.fontFamily,
|
|
13
|
+
rubik: ['Rubik', 'sans-serif']
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
plugins: [
|
|
17
|
+
plugin(({ addVariant, theme }) => {
|
|
18
|
+
const groups = theme('groups') || [];
|
|
19
|
+
|
|
20
|
+
groups.forEach(group => {
|
|
21
|
+
addVariant(`group-${group}-hover`, () => {
|
|
22
|
+
return `:merge(.group-${group}):hover &`;
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default config;
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
/// <reference types="vitest" />
|
|
3
|
+
|
|
4
|
+
import fs from 'node:fs';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
|
|
7
|
+
import react from '@vitejs/plugin-react';
|
|
8
|
+
import { defineConfig } from 'vite';
|
|
9
|
+
import dts from 'vite-plugin-dts';
|
|
10
|
+
|
|
11
|
+
const importedPackages = new Set();
|
|
12
|
+
|
|
13
|
+
type Options = {
|
|
14
|
+
root?: string;
|
|
15
|
+
pattern?: RegExp;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export function getEntries(options: Options = {}) {
|
|
19
|
+
const root = options.root ?? path.resolve(process.cwd(), 'src');
|
|
20
|
+
const pattern = options.pattern ?? /index\.(ts|tsx|js|mjs)$/;
|
|
21
|
+
|
|
22
|
+
const entries: Record<string, string> = {};
|
|
23
|
+
|
|
24
|
+
function walk(dir: string) {
|
|
25
|
+
const files = fs.readdirSync(dir);
|
|
26
|
+
|
|
27
|
+
for (const file of files) {
|
|
28
|
+
const fullPath = path.join(dir, file);
|
|
29
|
+
const stat = fs.statSync(fullPath);
|
|
30
|
+
|
|
31
|
+
if (stat.isDirectory()) {
|
|
32
|
+
walk(fullPath);
|
|
33
|
+
} else if (pattern.test(file)) {
|
|
34
|
+
// nombre del entry basado en carpeta
|
|
35
|
+
const name = path.relative(root, fullPath).replace(pattern, '').replace(/\/$/, '') || 'index';
|
|
36
|
+
|
|
37
|
+
entries[name] = fullPath;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
walk(root);
|
|
43
|
+
|
|
44
|
+
return entries;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default defineConfig(({ mode, command }) => {
|
|
48
|
+
return {
|
|
49
|
+
plugins: [
|
|
50
|
+
react(),
|
|
51
|
+
dts({
|
|
52
|
+
entryRoot: 'src',
|
|
53
|
+
exclude: ['**/*.test.(ts|tsx)', '**/*.stories.(ts|tsx)', 'vite.config.ts', 'setupTests.ts'],
|
|
54
|
+
tsconfigPath: './tsconfig.app.json'
|
|
55
|
+
}),
|
|
56
|
+
// {
|
|
57
|
+
// name: 'trace-import-chain',
|
|
58
|
+
// enforce: 'pre',
|
|
59
|
+
// resolveId(source, importer) {
|
|
60
|
+
// if (source.includes('plitzi')) {
|
|
61
|
+
// console.log('\n---');
|
|
62
|
+
// console.log('IMPORT:', source);
|
|
63
|
+
// console.log('FROM :', importer);
|
|
64
|
+
// }
|
|
65
|
+
// return null;
|
|
66
|
+
// }
|
|
67
|
+
// },
|
|
68
|
+
{
|
|
69
|
+
name: 'externalize-and-log',
|
|
70
|
+
enforce: 'pre',
|
|
71
|
+
resolveId(source, importer) {
|
|
72
|
+
if (!importer || command === 'serve' || process.env.VITEST) {
|
|
73
|
+
// Ignore main entries or runtime or tests
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Mark as external modules or sub-modules from node_modules
|
|
78
|
+
if (!source.startsWith('.') && !path.isAbsolute(source)) {
|
|
79
|
+
importedPackages.add(source);
|
|
80
|
+
|
|
81
|
+
return { id: source, external: true };
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return null;
|
|
85
|
+
},
|
|
86
|
+
buildEnd() {
|
|
87
|
+
if (mode === 'development' && importedPackages.size > 0) {
|
|
88
|
+
console.log('Packages imported:', Array.from(importedPackages));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
resolve: {
|
|
94
|
+
alias: {
|
|
95
|
+
// '@icons': resolve(__dirname, './src/icons'),
|
|
96
|
+
// '@components': path.resolve(__dirname, './src/components'),
|
|
97
|
+
// '@hooks': path.resolve(__dirname, './src/hooks'),
|
|
98
|
+
// '@': resolve(__dirname, './src'),
|
|
99
|
+
},
|
|
100
|
+
extensions: ['.js', '.ts', '.tsx', '.mjs']
|
|
101
|
+
},
|
|
102
|
+
build: {
|
|
103
|
+
// outDir: 'dist/src',
|
|
104
|
+
lib: {
|
|
105
|
+
entry: Object.values(getEntries()) // ['./src/index.ts'] // , './src/network/index.ts', './src/network/graphql/index.ts'
|
|
106
|
+
},
|
|
107
|
+
rollupOptions: {
|
|
108
|
+
treeshake: false,
|
|
109
|
+
output: [
|
|
110
|
+
{
|
|
111
|
+
format: 'es',
|
|
112
|
+
exports: 'named',
|
|
113
|
+
preserveModules: true, // Keep module structure for tree-shaking
|
|
114
|
+
preserveModulesRoot: 'src', // Tell Rollup where to "root" the modules (under src)
|
|
115
|
+
entryFileNames: '[name].mjs',
|
|
116
|
+
chunkFileNames: '[name].mjs',
|
|
117
|
+
assetFileNames: '[name].[ext]', // assetFileNames: 'assets/[name][extname]',
|
|
118
|
+
globals: {
|
|
119
|
+
react: 'React',
|
|
120
|
+
'react-dom': 'ReactDOM',
|
|
121
|
+
'react/jsx-runtime': 'react/jsx-runtime' // tailwindcss: "tailwindcss",
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
external: id => {
|
|
126
|
+
if (id.startsWith('node:') || id.startsWith('node/')) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (id === 'react' || id === 'react-dom' || id.startsWith('react-dom/') || id.startsWith('react/')) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if (!id.startsWith('.') && !id.startsWith('/')) {
|
|
135
|
+
return true;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
sourcemap: false,
|
|
142
|
+
emptyOutDir: mode === 'production'
|
|
143
|
+
},
|
|
144
|
+
test: {
|
|
145
|
+
globals: true,
|
|
146
|
+
environment: 'jsdom',
|
|
147
|
+
setupFiles: ['../sdk-shared/setupTests.ts'],
|
|
148
|
+
coverage: {
|
|
149
|
+
provider: 'v8',
|
|
150
|
+
reporter: ['text', 'html'],
|
|
151
|
+
reportsDirectory: 'tests',
|
|
152
|
+
include: ['src'],
|
|
153
|
+
exclude: ['**/*.test.tsx', '**/*.stories.ts', '**/*.stories.tsx'] // , 'src/index.ts'
|
|
154
|
+
},
|
|
155
|
+
server: {
|
|
156
|
+
deps: {
|
|
157
|
+
inline: ['@plitzi/plitzi-ui']
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
reporters: ['default']
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
});
|