@plitzi/sdk-shared 0.39.1 → 0.39.2
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 +7 -0
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/actions/access.mjs +1 -2
- package/dist/actions/cron.mjs +1 -2
- package/dist/actions/failureHandler.mjs +1 -2
- package/dist/actions/flowDelay.d.ts +6 -0
- package/dist/actions/flowDelay.mjs +3 -0
- package/dist/actions/functions.d.ts +6 -3
- package/dist/actions/functions.mjs +12 -8
- package/dist/actions/index.d.ts +2 -1
- package/dist/actions/index.mjs +10 -9
- package/dist/actions/jobs.mjs +1 -2
- package/dist/actions/smtp.mjs +1 -2
- package/dist/actions/triggerParams.mjs +1 -2
- package/dist/actions/triggers.mjs +1 -2
- package/dist/actions/validateDocument.mjs +133 -123
- package/dist/activity/describe.mjs +1 -2
- package/dist/activity/guard.mjs +1 -2
- package/dist/activity/types.mjs +1 -2
- package/dist/auth/failureChannel.mjs +1 -2
- package/dist/auth/visitorRoles.mjs +1 -2
- package/dist/authoring/builder.mjs +1 -2
- package/dist/authoring/declare.mjs +1 -2
- package/dist/authoring/elementCallbacks.mjs +1 -2
- package/dist/authoring/index.mjs +3 -3
- package/dist/authoring/paramSpec.mjs +1 -2
- package/dist/authoring/spaceCallbacks.mjs +1 -2
- package/dist/builder/contexts/BuilderContext.mjs +1 -2
- package/dist/builder/contexts/index.mjs +1 -2
- package/dist/conditions/dates.d.ts +2 -0
- package/dist/conditions/dates.mjs +12 -0
- package/dist/conditions/evaluateRuleGroup.d.ts +13 -0
- package/dist/conditions/evaluateRuleGroup.mjs +4 -0
- package/dist/conditions/evaluator.d.ts +39 -0
- package/dist/conditions/evaluator.mjs +75 -0
- package/dist/conditions/index.d.ts +10 -0
- package/dist/conditions/index.mjs +5 -0
- package/dist/conditions/rules.d.ts +3 -0
- package/dist/conditions/rules.mjs +3 -0
- package/dist/conditions/types.d.ts +44 -0
- package/dist/connectors/constants.mjs +1 -2
- package/dist/connectors/manifestTokens.mjs +1 -2
- package/dist/connectors/presets.mjs +1 -2
- package/dist/connectors/validateManifest.mjs +56 -57
- package/dist/dataSource/computed.mjs +16 -17
- package/dist/dataSource/getBindingsDetails.d.ts +5 -6
- package/dist/dataSource/getBindingsDetails.mjs +65 -40
- package/dist/dataSource/globalSources.d.ts +1 -1
- package/dist/dataSource/globalSources.mjs +1 -2
- package/dist/dataSource/helpers/getSourceName.mjs +1 -2
- package/dist/dataSource/index.mjs +5 -5
- package/dist/dataSource/utility/arrayMap.mjs +2 -2
- package/dist/dataSource/utility/capitalize.mjs +1 -2
- package/dist/dataSource/utility/checkboxParams.mjs +1 -2
- package/dist/dataSource/utility/dateConverter.mjs +0 -1
- package/dist/dataSource/utility/index.mjs +15 -16
- package/dist/dataSource/utility/not.mjs +1 -2
- package/dist/dataSource/utility/staticValue.mjs +0 -1
- package/dist/dataSource/utility/stringToArray.mjs +0 -1
- package/dist/dataSource/utility/styleSelector.mjs +1 -2
- package/dist/dataSource/utility/styleVariant.mjs +2 -3
- package/dist/dataSource/utility/truthiness.mjs +1 -2
- package/dist/dataSource/utility/twigTemplate.mjs +0 -1
- package/dist/dataSource/variables/resolveVariables.mjs +2 -3
- package/dist/dates/formatDate.mjs +29 -30
- package/dist/dates/isDate.mjs +1 -2
- package/dist/devTools/chrome.mjs +1 -2
- package/dist/devTools/debugCookie.mjs +1 -2
- package/dist/devTools/index.mjs +5 -5
- package/dist/devTools/interactionLog.mjs +1 -2
- package/dist/devTools/react/DevToolsContext.mjs +1 -2
- package/dist/devTools/sight/sight.mjs +1 -2
- package/dist/devTools/utils/PlitziConsole.mjs +1 -2
- package/dist/elements/ComponentContext.mjs +1 -2
- package/dist/flags/flagsCookie.mjs +5 -6
- package/dist/flags/index.d.ts +1 -0
- package/dist/flags/index.mjs +4 -3
- package/dist/flags/overrides.d.ts +36 -0
- package/dist/flags/overrides.mjs +13 -0
- package/dist/flags/react/useFlagResolution.mjs +5 -6
- package/dist/flags/resolveFlags.d.ts +1 -1
- package/dist/flags/resolveFlags.mjs +2 -3
- package/dist/flags/schemaFlag.mjs +1 -2
- package/dist/functions/contract.d.ts +326 -0
- package/dist/functions/contract.mjs +3 -0
- package/dist/functions/index.d.ts +15 -0
- package/dist/functions/index.mjs +9 -0
- package/dist/functions/kv.d.ts +80 -0
- package/dist/functions/kvChange.d.ts +67 -0
- package/dist/functions/kvChange.mjs +24 -0
- package/dist/functions/later.d.ts +18 -0
- package/dist/functions/messages.d.ts +4 -0
- package/dist/functions/messages.mjs +205 -0
- package/dist/functions/protocol.d.ts +416 -0
- package/dist/functions/protocol.mjs +37 -0
- package/dist/functions/rateLimit.d.ts +17 -0
- package/dist/functions/rateLimit.mjs +0 -0
- package/dist/functions/refusal.d.ts +26 -0
- package/dist/functions/refusal.mjs +11 -0
- package/dist/functions/runtime.d.ts +44 -0
- package/dist/functions/runtime.mjs +13 -0
- package/dist/functions/sizes.d.ts +27 -0
- package/dist/functions/sizes.mjs +7 -0
- package/dist/functions/wire.d.ts +11 -0
- package/dist/functions/wire.mjs +39 -0
- package/dist/helpers/canonicalJson.mjs +1 -2
- package/dist/helpers/clipboard.mjs +1 -2
- package/dist/helpers/cookies.mjs +1 -2
- package/dist/helpers/deepEqual/deepEqual.d.ts +5 -0
- package/dist/helpers/deepEqual/deepEqual.mjs +44 -0
- package/dist/helpers/deepEqual/index.d.ts +1 -0
- package/dist/helpers/deepEqual/index.mjs +1 -0
- package/dist/helpers/eventTarget.mjs +1 -2
- package/dist/helpers/fetchManifest.mjs +1 -2
- package/dist/helpers/images.mjs +1 -2
- package/dist/helpers/index.d.ts +4 -6
- package/dist/helpers/index.mjs +24 -20
- package/dist/helpers/interval.mjs +1 -2
- package/dist/helpers/isRecord.mjs +1 -2
- package/dist/helpers/keys.mjs +1 -2
- package/dist/helpers/lodash/camelCase.d.ts +1 -0
- package/dist/helpers/lodash/camelCase.mjs +7 -0
- package/dist/helpers/lodash/capitalize.d.ts +1 -0
- package/dist/helpers/lodash/capitalize.mjs +5 -0
- package/dist/helpers/lodash/cloneDeep.d.ts +8 -0
- package/dist/helpers/lodash/cloneDeep.mjs +53 -0
- package/dist/helpers/lodash/get.d.ts +11 -0
- package/dist/helpers/lodash/get.mjs +14 -0
- package/dist/helpers/lodash/has.d.ts +2 -0
- package/dist/helpers/lodash/has.mjs +12 -0
- package/dist/helpers/lodash/index.d.ts +11 -0
- package/dist/helpers/lodash/index.mjs +7 -0
- package/dist/helpers/lodash/omit.d.ts +4 -0
- package/dist/helpers/lodash/omit.mjs +35 -0
- package/dist/helpers/lodash/set.d.ts +2 -0
- package/dist/helpers/lodash/set.mjs +20 -0
- package/dist/helpers/lodash/shared.d.ts +2 -0
- package/dist/helpers/lodash/shared.mjs +37 -0
- package/dist/helpers/reducerOrigin.mjs +1 -2
- package/dist/helpers/replaceEqualDeep/index.d.ts +1 -0
- package/dist/helpers/replaceEqualDeep/index.mjs +1 -0
- package/dist/helpers/replaceEqualDeep/replaceEqualDeep.d.ts +12 -0
- package/dist/helpers/replaceEqualDeep/replaceEqualDeep.mjs +30 -0
- package/dist/helpers/resources.d.ts +21 -0
- package/dist/helpers/resources.mjs +40 -0
- package/dist/helpers/scroll.mjs +1 -2
- package/dist/helpers/security.d.ts +15 -0
- package/dist/helpers/security.mjs +8 -4
- package/dist/helpers/spaceRoot.mjs +1 -2
- package/dist/helpers/syntaxHighlight.mjs +1 -2
- package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +75 -76
- package/dist/helpers/twigWrapper/Evaluator/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/Lexer/Lexer.mjs +1 -2
- package/dist/helpers/twigWrapper/Lexer/types.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/Cursor.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/Parser.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +1 -2
- package/dist/helpers/twigWrapper/charClass.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/arrays.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/catalog/index.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/dateParts.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/dates.mjs +13 -14
- package/dist/helpers/twigWrapper/filters/filters.mjs +21 -22
- package/dist/helpers/twigWrapper/filters/hashing.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/misc.mjs +27 -28
- package/dist/helpers/twigWrapper/filters/numbers.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/objects.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/raw.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/strings.mjs +23 -24
- package/dist/helpers/twigWrapper/filters/types.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/values.mjs +1 -2
- package/dist/helpers/twigWrapper/index.mjs +8 -8
- package/dist/helpers/twigWrapper/inspectTemplate.mjs +12 -13
- package/dist/helpers/twigWrapper/processTwig/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +1 -2
- package/dist/helpers/twigWrapper/processTwig/resolveStepParam.mjs +1 -2
- package/dist/helpers/twigWrapper/templateRoots.d.ts +3 -9
- package/dist/helpers/twigWrapper/templateRoots.mjs +14 -9
- package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.mjs +1 -2
- package/dist/helpers/twigWrapper/tokens/hasValidToken.mjs +1 -2
- package/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs +1 -2
- package/dist/helpers/utils.mjs +2 -3
- package/dist/history/describe.mjs +1 -2
- package/dist/history/diff.mjs +1 -2
- package/dist/hooks/index.mjs +5 -5
- package/dist/hooks/useFontHead.mjs +1 -2
- package/dist/hooks/useNetwork.mjs +1 -2
- package/dist/hooks/usePlitzi.d.ts +7 -6
- package/dist/hooks/usePlitzi.mjs +1 -2
- package/dist/hooks/useStableValue.mjs +5 -6
- package/dist/navigation/index.mjs +3 -3
- package/dist/navigation/matchPath.mjs +19 -11
- package/dist/navigation/routes.mjs +57 -38
- package/dist/navigation/sitemap.mjs +9 -10
- package/dist/network/entitlements.d.ts +21 -0
- package/dist/network/entitlements.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddPluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpacePublishMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemovePluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRunE2eTestsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceSetTestsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceSetCdnCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceAddCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceRemoveCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceUpdateCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceAddPageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceRemovePageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceUpdatePageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceInstallTemplateFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/jobs/SpaceControlJobMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceHomePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceRemovePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceAddResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceMoveResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceRemoveResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceAddVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceRemoveVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceUpdateVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateSettingsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleAddSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleRemoveSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleUpdateSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleAddSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleAddVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleRemoveVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleUpdateVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/index.mjs +155 -156
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCdnsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCredentialsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.mjs +2 -3
- package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceJobsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceLatestRevisionQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceResourcesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.mjs +2 -3
- package/dist/network/graphql/builder/Queries/Space/SpaceTestsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/index.mjs +37 -38
- package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.mjs +1 -2
- package/dist/network/graphql/builder/Subscriptions/index.mjs +1 -2
- package/dist/network/graphql/builder/fragments/cdnFields.mjs +1 -2
- package/dist/network/graphql/index.d.ts +0 -1
- package/dist/network/graphql/index.mjs +1 -3
- package/dist/network/index.d.ts +1 -5
- package/dist/network/index.mjs +7 -11
- package/dist/network/{NetworkContext.d.ts → react/NetworkContext.d.ts} +12 -11
- package/dist/network/{NetworkContext.mjs → react/NetworkContext.mjs} +1 -2
- package/dist/network/{NetworkInternalContext.d.ts → react/NetworkInternalContext.d.ts} +1 -1
- package/dist/network/react/NetworkInternalContext.mjs +4 -0
- package/dist/network/react/index.d.ts +5 -0
- package/dist/network/react/index.mjs +3 -0
- package/dist/network/spaceEvents.mjs +16 -17
- package/dist/plugins/bundle/bundle.mjs +1 -2
- package/dist/plugins/declaration.mjs +1 -2
- package/dist/plugins/react/ElementRegistryContext.d.ts +26 -0
- package/dist/plugins/react/ElementRegistryContext.mjs +17 -0
- package/dist/plugins/react/PluginAssetsContext.d.ts +11 -0
- package/dist/plugins/react/PluginAssetsContext.mjs +4 -0
- package/dist/plugins/react/PluginsContext.mjs +6 -3
- package/dist/plugins/react/index.d.ts +3 -0
- package/dist/plugins/react/index.mjs +4 -1
- package/dist/project/index.mjs +7 -7
- package/dist/project/layout/check.mjs +26 -27
- package/dist/project/layout/codes.mjs +1 -2
- package/dist/project/layout/contents.mjs +12 -13
- package/dist/project/layout/files.mjs +1 -2
- package/dist/project/layout/folders.mjs +43 -44
- package/dist/project/layout/index.mjs +3 -3
- package/dist/project/layout/plugins.mjs +56 -57
- package/dist/project/layout/vendor.mjs +14 -15
- package/dist/project/network.mjs +1 -2
- package/dist/project/pages/index.mjs +1 -2
- package/dist/project/paths/index.d.ts +8 -2
- package/dist/project/paths/index.mjs +3 -4
- package/dist/project/root.mjs +1 -2
- package/dist/queries/index.mjs +1 -2
- package/dist/queries/queryCache.mjs +1 -2
- package/dist/queries/serverQueries.mjs +1 -2
- package/dist/queries/useQuery.mjs +1 -2
- package/dist/queries/useServerQuery.mjs +1 -2
- package/dist/{helpers → react}/enclosingSpace.mjs +1 -2
- package/dist/react/generateFacade.d.ts +1 -0
- package/dist/{helpers → react}/generateFacade.mjs +4 -5
- package/dist/react/index.d.ts +8 -0
- package/dist/react/index.mjs +4 -0
- package/dist/{helpers → react}/sharedContext.mjs +0 -1
- package/dist/realtime/client.mjs +3 -4
- package/dist/realtime/index.mjs +4 -4
- package/dist/realtime/presence.mjs +1 -2
- package/dist/realtime/topics.mjs +1 -2
- package/dist/runs/index.mjs +1 -2
- package/dist/runs/report.mjs +1 -2
- package/dist/schema/anchor.mjs +1 -2
- package/dist/schema/index.mjs +18 -18
- package/dist/schema/layoutChain.mjs +1 -2
- package/dist/schema/markdownHeadings.mjs +1 -2
- package/dist/schema/motion.mjs +1 -2
- package/dist/schema/motionReveal.mjs +1 -2
- package/dist/schema/pageAccess.d.ts +9 -0
- package/dist/schema/pageAccess.mjs +42 -36
- package/dist/schema/pageElements.d.ts +3 -1
- package/dist/schema/pageElements.mjs +9 -3
- package/dist/schema/pageHead.d.ts +5 -2
- package/dist/schema/pageHead.mjs +3 -4
- package/dist/schema/providerAnswer.mjs +1 -2
- package/dist/schema/providerWhen.d.ts +1 -1
- package/dist/schema/providerWhen.mjs +6 -7
- package/dist/schema/react/SchemaContext.mjs +1 -2
- package/dist/schema/schemaConstants.mjs +1 -2
- package/dist/schema/schemaSettings.mjs +1 -2
- package/dist/schema/serverElements.d.ts +0 -24
- package/dist/schema/serverElements.mjs +60 -39
- package/dist/schema/serverInput.mjs +23 -24
- package/dist/schema/serverQuery.d.ts +15 -5
- package/dist/schema/serverQuery.mjs +47 -35
- package/dist/schema/snippet.mjs +1 -2
- package/dist/schema/wire.mjs +1 -2
- package/dist/security/index.d.ts +49 -0
- package/dist/security/index.mjs +44 -0
- package/dist/server/actions/useActionsSync.mjs +1 -2
- package/dist/server/actions/useImagesSync.mjs +1 -2
- package/dist/server/actions/useRealtimeSync.mjs +1 -2
- package/dist/server/index.mjs +7 -7
- package/dist/server/rsc/refreshRsc.mjs +23 -24
- package/dist/server/rsc/useRscRefresh.mjs +1 -2
- package/dist/server/rsc/useRscSync.mjs +1 -2
- package/dist/server/usePluginRoute.mjs +1 -2
- package/dist/source/export.d.ts +1 -1
- package/dist/source/export.mjs +1 -2
- package/dist/source/import.mjs +1 -2
- package/dist/source/index.mjs +4 -4
- package/dist/source/snapshot.mjs +1 -2
- package/dist/state/index.d.ts +0 -1
- package/dist/state/index.mjs +1 -3
- package/dist/state/paintedState.mjs +10 -11
- package/dist/store/actionRuns/actionRunsRecorder.mjs +1 -2
- package/dist/store/actionRuns/actionRunsStore.mjs +1 -2
- package/dist/store/actionRuns/index.mjs +3 -3
- package/dist/store/actionRuns/useActionRuns.mjs +5 -6
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.mjs +2 -1
- package/dist/store/renderSettings.d.ts +1 -1
- package/dist/store/renderSettings.mjs +1 -2
- package/dist/{state → store}/runtimeStatePersist.mjs +29 -30
- package/dist/store/storeHooks.d.ts +45 -45
- package/dist/store/storeHooks.mjs +1 -2
- package/dist/store/tracing/index.mjs +5 -5
- package/dist/store/tracing/preview.mjs +1 -2
- package/dist/store/tracing/tracingCollector.d.ts +2 -2
- package/dist/store/tracing/tracingCollector.mjs +79 -78
- package/dist/store/tracing/tracingMiddleware.mjs +1 -2
- package/dist/store/tracing/tracingStore.mjs +1 -2
- package/dist/store/tracing/useTracing.mjs +6 -7
- package/dist/style/breakpoints.mjs +1 -2
- package/dist/style/cssLayers.mjs +1 -2
- package/dist/style/displayModes.mjs +1 -2
- package/dist/style/fontAssets.mjs +1 -2
- package/dist/style/fontValidation.mjs +14 -15
- package/dist/style/fonts.d.ts +5 -3
- package/dist/style/fonts.mjs +23 -24
- package/dist/style/fontsFromCss.mjs +1 -2
- package/dist/style/index.mjs +18 -18
- package/dist/style/keyframes.mjs +1 -2
- package/dist/style/layoutGrid.mjs +1 -2
- package/dist/style/notifications.mjs +1 -2
- package/dist/style/react/useDisplayMode.mjs +1 -2
- package/dist/style/react/useElementSize.mjs +1 -2
- package/dist/style/runtimeStyle.d.ts +19 -21
- package/dist/style/runtimeStyle.mjs +4 -7
- package/dist/style/snippetStyle.mjs +5 -6
- package/dist/style/styleConditions.mjs +1 -2
- package/dist/style/styleConstants.mjs +1 -2
- package/dist/style/stylePseudos.mjs +1 -2
- package/dist/style/styleStates.mjs +1 -2
- package/dist/style/styleTarget.mjs +24 -25
- package/dist/theme/cookie/index.mjs +1 -1
- package/dist/theme/cookie/themeCookie.d.ts +21 -1
- package/dist/theme/cookie/themeCookie.mjs +19 -4
- package/dist/theme/index.d.ts +1 -9
- package/dist/theme/index.mjs +1 -6
- package/dist/theme/{ThemeProvider.d.ts → react/ThemeProvider.d.ts} +8 -2
- package/dist/theme/react/ThemeProvider.mjs +78 -0
- package/dist/theme/{ThemeScope.d.ts → react/ThemeScope.d.ts} +6 -2
- package/dist/theme/react/ThemeScope.mjs +9 -0
- package/dist/theme/react/index.d.ts +9 -0
- package/dist/theme/react/index.mjs +5 -0
- package/dist/theme/{themeStore.d.ts → react/themeStore.d.ts} +5 -5
- package/dist/theme/{themeStore.mjs → react/themeStore.mjs} +4 -4
- package/dist/theme/{useTheme.d.ts → react/useTheme.d.ts} +1 -1
- package/dist/theme/react/useTheme.mjs +19 -0
- package/dist/types/ActionTypes.d.ts +33 -0
- package/dist/types/AuthTypes.d.ts +6 -0
- package/dist/types/CommonTypes.d.ts +14 -3
- package/dist/types/DataSourceTypes.d.ts +1 -1
- package/dist/types/FunctionTypes.d.ts +16 -6
- package/dist/types/InteractionTypes.d.ts +1 -1
- package/dist/types/JobTypes.d.ts +56 -182
- package/dist/types/PluginTypes.d.ts +8 -1
- package/dist/types/SchemaTypes.d.ts +1 -1
- package/dist/types/SchemaTypes.mjs +1 -2
- package/dist/types/ServerAdapterTypes.d.ts +0 -326
- package/dist/types/ServerTypes.d.ts +0 -311
- package/dist/types/SpaceTypes.d.ts +5 -2
- package/dist/types/StoreTypes.d.ts +9 -3
- package/dist/types/StyleTypes.d.ts +6 -0
- package/dist/types/StyleTypes.mjs +1 -2
- package/dist/types/index.d.ts +0 -3
- package/dist/websockets/RTCodec.mjs +1 -2
- package/eslint.config.mjs +25 -0
- package/package.json +29 -18
- package/vite.config.ts +58 -0
- package/dist/helpers/generateFacade.d.ts +0 -2
- package/dist/helpers/ruleEvaluator.d.ts +0 -16
- package/dist/helpers/ruleEvaluator.mjs +0 -5
- package/dist/network/NetworkInternalContext.mjs +0 -5
- package/dist/network/graphql/sdk/Mutations/index.d.ts +0 -3
- package/dist/network/graphql/sdk/Mutations/index.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +0 -16
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/index.d.ts +0 -6
- package/dist/network/graphql/sdk/Queries/index.mjs +0 -5
- package/dist/network/graphql/sdk/index.d.ts +0 -5
- package/dist/network/graphql/sdk/index.mjs +0 -3
- package/dist/theme/ThemeProvider.mjs +0 -69
- package/dist/theme/ThemeScope.mjs +0 -10
- package/dist/theme/useTheme.mjs +0 -20
- package/dist/types/OAuthTypes.d.ts +0 -246
- package/dist/types/ServerConfigTypes.d.ts +0 -527
- package/dist/types/ServerLogTypes.d.ts +0 -119
- /package/dist/{types/OAuthTypes.mjs → conditions/types.mjs} +0 -0
- /package/dist/{types/ServerConfigTypes.mjs → functions/kv.mjs} +0 -0
- /package/dist/{types/ServerLogTypes.mjs → functions/later.mjs} +0 -0
- /package/dist/{helpers → react}/enclosingSpace.d.ts +0 -0
- /package/dist/{helpers → react}/sharedContext.d.ts +0 -0
- /package/dist/{state → store}/runtimeStatePersist.d.ts +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import e from "./refreshRsc.mjs";
|
|
2
2
|
import { useCallback as t } from "react";
|
|
3
3
|
import { useStoreById as n } from "@plitzi/nexus/react";
|
|
4
|
-
|
|
4
|
+
// src/server/rsc/useRscRefresh.ts
|
|
5
5
|
var r = () => {
|
|
6
6
|
let r = n();
|
|
7
7
|
return t((t, n, { fresh: i } = {}) => e(r, t, n, { fresh: i }), [r]);
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { r as default };
|
|
@@ -2,7 +2,7 @@ import { useCommonStore as e, useCommonStoreSync as t } from "../../store/storeH
|
|
|
2
2
|
import n, { currentRscLocation as r, holdRscRoot as i, noteRscFailures as a, releaseRscRequests as o } from "./refreshRsc.mjs";
|
|
3
3
|
import { useEffect as s, useId as c } from "react";
|
|
4
4
|
import { useStoreById as l } from "@plitzi/nexus/react";
|
|
5
|
-
|
|
5
|
+
// src/server/rsc/useRscSync.ts
|
|
6
6
|
var u = (u) => {
|
|
7
7
|
let d = l(), f = c(), [p] = e("schema.rsc", { mode: "mount" }), [m] = e([
|
|
8
8
|
"navigation.routeParams",
|
|
@@ -38,5 +38,4 @@ var u = (u) => {
|
|
|
38
38
|
d
|
|
39
39
|
]);
|
|
40
40
|
};
|
|
41
|
-
//#endregion
|
|
42
41
|
export { u as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pluginRoutePath as e } from "../actions/functions.mjs";
|
|
2
2
|
import { useCommonStore as t } from "../store/storeHooks.mjs";
|
|
3
3
|
import { useCallback as n } from "react";
|
|
4
|
-
|
|
4
|
+
// src/server/usePluginRoute.ts
|
|
5
5
|
var r = (r) => {
|
|
6
6
|
let [i] = t("actions.endpoint");
|
|
7
7
|
return n((t = "/") => {
|
|
@@ -10,5 +10,4 @@ var r = (r) => {
|
|
|
10
10
|
return typeof window > "u" ? n : new URL(n, new URL(i, window.location.href)).href;
|
|
11
11
|
}, [i, r]);
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { r as default };
|
package/dist/source/export.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ export type SpaceExport = {
|
|
|
94
94
|
files: SpaceExportFile[];
|
|
95
95
|
functions?: Record<string, string>;
|
|
96
96
|
}[];
|
|
97
|
-
/** The packed runtime, in base64 — what `@plitzi/sdk-
|
|
97
|
+
/** The packed runtime, in base64 — what `@plitzi/sdk-actions/runtimes` loads. */
|
|
98
98
|
runtime: string | null;
|
|
99
99
|
};
|
|
100
100
|
/** The space's files on its CDN — pictures, fonts, data — for the project to serve itself. */
|
package/dist/source/export.mjs
CHANGED
package/dist/source/import.mjs
CHANGED
package/dist/source/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { SOURCE_SNAPSHOT_FORMAT as e, SOURCE_SNAPSHOT_LIMITS as t, readSourceSnapshot as n, secretIn as r, sourcePathProblem as i } from "./snapshot.mjs";
|
|
2
|
+
import { SPACE_EXPORT_FORMAT as a } from "./export.mjs";
|
|
3
|
+
import { SPACE_IMPORT_FORMAT as o } from "./import.mjs";
|
|
4
|
+
export { e as SOURCE_SNAPSHOT_FORMAT, t as SOURCE_SNAPSHOT_LIMITS, a as SPACE_EXPORT_FORMAT, o as SPACE_IMPORT_FORMAT, n as readSourceSnapshot, r as secretIn, i as sourcePathProblem };
|
package/dist/source/snapshot.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
-
|
|
2
|
+
// src/source/snapshot.ts
|
|
3
3
|
var t = 1, n = {
|
|
4
4
|
files: 2e3,
|
|
5
5
|
fileBytes: 4194304,
|
|
@@ -77,5 +77,4 @@ var t = 1, n = {
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
//#endregion
|
|
81
80
|
export { t as SOURCE_SNAPSHOT_FORMAT, n as SOURCE_SNAPSHOT_LIMITS, p as readSourceSnapshot, s as secretIn, o as sourcePathProblem };
|
package/dist/state/index.d.ts
CHANGED
package/dist/state/index.mjs
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { runtimeStatePersist as d, stateOwner as f } from "./runtimeStatePersist.mjs";
|
|
3
|
-
export { e as PAINTED_STATE_BUDGET, t as accountOwner, n as browserKeys, r as clearPaintedEntry, i as paintedEntryFromCookies, a as paintedKeys, o as paintedStateCookieName, s as paintedStateFor, c as pickPainted, l as readPaintedEntry, d as runtimeStatePersist, f as stateOwner, u as writePaintedEntry };
|
|
1
|
+
export { PAINTED_STATE_BUDGET, accountOwner, browserKeys, clearPaintedEntry, paintedEntryFromCookies, paintedKeys, paintedStateCookieName, paintedStateFor, pickPainted, readPaintedEntry, writePaintedEntry } from "./paintedState.mjs";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { cookieFromHeader as e, documentCookies as t } from "../helpers/cookies.mjs";
|
|
2
|
+
import { isRecord as n } from "../helpers/isRecord.mjs";
|
|
3
|
+
// src/state/paintedState.ts
|
|
4
4
|
var r = 3072, i = 31536e3, a = (e) => `user:${String(e)}`, o = (e, t) => {
|
|
5
5
|
let n = t?.split(":")[1];
|
|
6
6
|
return n ? `plitzi_${e}_painted_${n}` : `plitzi_${e}_painted`;
|
|
7
|
-
}, s = (e) => new Set(Array.isArray(e) ? e.filter((e) => typeof e == "string" && e !== "") : []), c = (e) => s(e?.paintedState), l = (e) => s(e?.browserState), u = (
|
|
8
|
-
let i = t
|
|
7
|
+
}, s = (e) => new Set(Array.isArray(e) ? e.filter((e) => typeof e == "string" && e !== "") : []), c = (e) => s(e?.paintedState), l = (e) => s(e?.browserState), u = (e, t) => n(e) ? Object.fromEntries(Object.entries(e).filter(([e, n]) => t.has(e) && n !== void 0)) : {}, d = (t, r) => {
|
|
8
|
+
let i = e(t, r);
|
|
9
9
|
if (i !== void 0) try {
|
|
10
|
-
let
|
|
11
|
-
return e
|
|
12
|
-
owner:
|
|
13
|
-
values:
|
|
10
|
+
let e = JSON.parse(i);
|
|
11
|
+
return n(e) && typeof e.owner == "string" && n(e.values) ? {
|
|
12
|
+
owner: e.owner,
|
|
13
|
+
values: e.values
|
|
14
14
|
} : void 0;
|
|
15
15
|
} catch {
|
|
16
16
|
return;
|
|
@@ -22,7 +22,7 @@ var r = 3072, i = 31536e3, a = (e) => `user:${String(e)}`, o = (e, t) => {
|
|
|
22
22
|
if (!o) return;
|
|
23
23
|
let s = r !== void 0 && o.owner.startsWith("user:") && o.owner !== a(r), f = l(n), p = u(o.values, s ? new Set([...i].filter((e) => f.has(e))) : i);
|
|
24
24
|
return Object.keys(p).length > 0 ? p : void 0;
|
|
25
|
-
}, p = (e) => d(
|
|
25
|
+
}, p = (e) => d(t(), e), m = (e, t) => {
|
|
26
26
|
let n = encodeURIComponent(JSON.stringify(t));
|
|
27
27
|
if (n.length > 3072) return h(e), "too-large";
|
|
28
28
|
try {
|
|
@@ -35,5 +35,4 @@ var r = 3072, i = 31536e3, a = (e) => `user:${String(e)}`, o = (e, t) => {
|
|
|
35
35
|
document.cookie = `${e}=;path=/;max-age=0;SameSite=Lax`;
|
|
36
36
|
} catch {}
|
|
37
37
|
};
|
|
38
|
-
//#endregion
|
|
39
38
|
export { r as PAINTED_STATE_BUDGET, a as accountOwner, l as browserKeys, h as clearPaintedEntry, d as paintedEntryFromCookies, c as paintedKeys, o as paintedStateCookieName, f as paintedStateFor, u as pickPainted, p as readPaintedEntry, m as writePaintedEntry };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import e from "./actionRunsStore.mjs";
|
|
2
|
-
|
|
2
|
+
// src/store/actionRuns/actionRunsRecorder.ts
|
|
3
3
|
var t = 0, n = (t) => e.setState("runs", t), r = /* @__PURE__ */ new Map(), i = (e, t) => {
|
|
4
4
|
r.set(e, t);
|
|
5
5
|
}, a = (e) => {
|
|
@@ -50,5 +50,4 @@ var t = 0, n = (t) => e.setState("runs", t), r = /* @__PURE__ */ new Map(), i =
|
|
|
50
50
|
t.has(e) || r.delete(e);
|
|
51
51
|
}), n([]);
|
|
52
52
|
};
|
|
53
|
-
//#endregion
|
|
54
53
|
export { o as cancelActionRun, f as clearActionRuns, d as recordActionProgress, s as recordActionRun, l as recordRenderActionRuns, i as registerActionCanceller, a as releaseActionCanceller, u as updateActionRun };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createStore as e } from "@plitzi/nexus";
|
|
2
|
-
|
|
2
|
+
// src/store/actionRuns/actionRunsStore.ts
|
|
3
3
|
var t = 100, n = 500, r = () => ({ runs: [] }), i = e(r(), { id: "action-runs" });
|
|
4
|
-
//#endregion
|
|
5
4
|
export { n as MAX_PROGRESS_CHUNKS, t as MAX_RUNS, r as createActionRunsState, i as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import e, { MAX_RUNS as t, createActionRunsState as n } from "./actionRunsStore.mjs";
|
|
2
|
-
import
|
|
3
|
-
import d from "./
|
|
4
|
-
export { t as MAX_RUNS, e as actionRunsStore,
|
|
2
|
+
import r from "./useActionRuns.mjs";
|
|
3
|
+
import { cancelActionRun as i, clearActionRuns as a, recordActionProgress as o, recordActionRun as s, recordRenderActionRuns as c, registerActionCanceller as l, releaseActionCanceller as u, updateActionRun as d } from "./actionRunsRecorder.mjs";
|
|
4
|
+
export { t as MAX_RUNS, e as actionRunsStore, i as cancelActionRun, a as clearActionRuns, n as createActionRunsState, o as recordActionProgress, s as recordActionRun, c as recordRenderActionRuns, l as registerActionCanceller, u as releaseActionCanceller, d as updateActionRun, r as useActionRuns };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import
|
|
1
|
+
import { clearActionRuns as e } from "./actionRunsRecorder.mjs";
|
|
2
|
+
import t from "./actionRunsStore.mjs";
|
|
3
3
|
import { useSyncExternalStore as n } from "react";
|
|
4
|
-
|
|
4
|
+
// src/store/actionRuns/useActionRuns.ts
|
|
5
5
|
var r = () => ({
|
|
6
|
-
...n(
|
|
7
|
-
clear:
|
|
6
|
+
...n(t.subscribe, t.getState, t.getState),
|
|
7
|
+
clear: e
|
|
8
8
|
});
|
|
9
|
-
//#endregion
|
|
10
9
|
export { r as default };
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * from './storeHooks';
|
|
2
2
|
export { default as useRenderSettings, useRenderOverride, DEFAULT_RENDER_SETTINGS } from './renderSettings';
|
|
3
3
|
export { actionRunsStore, cancelActionRun, clearActionRuns, recordActionProgress, recordActionRun, recordRenderActionRuns, registerActionCanceller, releaseActionCanceller, updateActionRun, useActionRuns } from './actionRuns';
|
|
4
|
+
export * from './runtimeStatePersist';
|
package/dist/store/index.mjs
CHANGED
|
@@ -3,4 +3,5 @@ import f, { DEFAULT_RENDER_SETTINGS as p, useRenderOverride as m } from "./rende
|
|
|
3
3
|
import h from "./actionRuns/actionRunsStore.mjs";
|
|
4
4
|
import { cancelActionRun as g, clearActionRuns as _, recordActionProgress as v, recordActionRun as y, recordRenderActionRuns as b, registerActionCanceller as x, releaseActionCanceller as S, updateActionRun as C } from "./actionRuns/actionRunsRecorder.mjs";
|
|
5
5
|
import w from "./actionRuns/useActionRuns.mjs";
|
|
6
|
-
|
|
6
|
+
import { runtimeStatePersist as T, stateOwner as E } from "./runtimeStatePersist.mjs";
|
|
7
|
+
export { p as DEFAULT_RENDER_SETTINGS, h as actionRunsStore, g as cancelActionRun, _ as clearActionRuns, v as recordActionProgress, y as recordActionRun, b as recordRenderActionRuns, x as registerActionCanceller, S as releaseActionCanceller, T as runtimeStatePersist, E as stateOwner, C as updateActionRun, w as useActionRuns, e as useBuilderStore, t as useBuilderStoreGetter, n as useBuilderStoreSetter, r as useBuilderStoreSync, i as useCommonStore, a as useCommonStoreGetter, o as useCommonStoreSetter, s as useCommonStoreSync, m as useRenderOverride, f as useRenderSettings, c as useSdkStore, l as useSdkStoreGetter, u as useSdkStoreSetter, d as useSdkStoreSync };
|
|
@@ -27,7 +27,7 @@ export declare const useRenderOverride: (overrides: RenderSettings) => {
|
|
|
27
27
|
hydrated: boolean;
|
|
28
28
|
overQuota: boolean;
|
|
29
29
|
quotaNear: boolean;
|
|
30
|
-
badge:
|
|
30
|
+
badge: import('..').BadgeLinks | false;
|
|
31
31
|
testAttributes: boolean;
|
|
32
32
|
ownsHead: boolean;
|
|
33
33
|
enclosed: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCommonStore as e } from "./storeHooks.mjs";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
|
-
|
|
3
|
+
// src/store/renderSettings.ts
|
|
4
4
|
var n = {
|
|
5
5
|
previewMode: !0,
|
|
6
6
|
debugMode: !1,
|
|
@@ -63,5 +63,4 @@ var n = {
|
|
|
63
63
|
...e
|
|
64
64
|
} }), [n, e]);
|
|
65
65
|
};
|
|
66
|
-
//#endregion
|
|
67
66
|
export { n as DEFAULT_RENDER_SETTINGS, r as default, i as useRenderOverride };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { accountOwner as n, browserKeys as r, clearPaintedEntry as i, paintedKeys as a, paintedStateCookieName as o, pickPainted as s, readPaintedEntry as c, writePaintedEntry as l } from "
|
|
1
|
+
import { pConsole as e } from "../devTools/utils/PlitziConsole.mjs";
|
|
2
|
+
import { isRecord as t } from "../helpers/isRecord.mjs";
|
|
3
|
+
import { accountOwner as n, browserKeys as r, clearPaintedEntry as i, paintedKeys as a, paintedStateCookieName as o, pickPainted as s, readPaintedEntry as c, writePaintedEntry as l } from "../state/paintedState.mjs";
|
|
4
4
|
import { persistMiddleware as u } from "@plitzi/nexus";
|
|
5
|
-
|
|
5
|
+
// src/store/runtimeStatePersist.ts
|
|
6
6
|
var d = /* @__PURE__ */ new Set([
|
|
7
7
|
"init",
|
|
8
8
|
"initLoading",
|
|
@@ -42,7 +42,7 @@ var d = /* @__PURE__ */ new Set([
|
|
|
42
42
|
if (t.size > 0) return (e) => t.has(e);
|
|
43
43
|
let n = v(e?.transientState);
|
|
44
44
|
return (e) => !n.has(e);
|
|
45
|
-
}, b = (
|
|
45
|
+
}, b = (e, n) => t(e) ? Object.fromEntries(Object.entries(e).filter(([e]) => n(e))) : {}, x = (e) => {
|
|
46
46
|
let t = y(e), n = r(e);
|
|
47
47
|
return (e) => t(e) && !n.has(e);
|
|
48
48
|
}, S = (e) => {
|
|
@@ -61,21 +61,21 @@ var d = /* @__PURE__ */ new Set([
|
|
|
61
61
|
let b = p(y), x = o.runtime?.state;
|
|
62
62
|
if (!m) {
|
|
63
63
|
m = !0;
|
|
64
|
-
let
|
|
65
|
-
if (
|
|
66
|
-
let
|
|
67
|
-
if (
|
|
68
|
-
n.setState("runtime.state", g(x,
|
|
64
|
+
let e = c(d);
|
|
65
|
+
if (e && e.owner !== b) {
|
|
66
|
+
let i = r(u), a = new Set([...v].filter((n) => !i.has(n) && t(x) && n in x && JSON.stringify(x[n]) === JSON.stringify(e.values[n])));
|
|
67
|
+
if (t(x) && a.size > 0) {
|
|
68
|
+
n.setState("runtime.state", g(x, a));
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
h =
|
|
72
|
+
h = e?.owner === b ? JSON.stringify(s(e.values, v)) : void 0;
|
|
73
73
|
}
|
|
74
74
|
let S = s(x, v), C = JSON.stringify(S);
|
|
75
75
|
C !== h && (h = C, Object.keys(S).length === 0 ? i(d) : l(d, {
|
|
76
76
|
owner: b,
|
|
77
77
|
values: S
|
|
78
|
-
}) === "too-large" &&
|
|
78
|
+
}) === "too-large" && e.warning("store", `settings.paintedState holds more than a cookie can carry — the first paint uses the space's defaults for ${[...v].join(", ")}. Declare only what the first paint shows.`, {
|
|
79
79
|
storeName: "runtime",
|
|
80
80
|
path: "runtime.state",
|
|
81
81
|
prev: void 0,
|
|
@@ -99,14 +99,14 @@ var d = /* @__PURE__ */ new Set([
|
|
|
99
99
|
let d = i.runtime?.state, f = (e) => b(e, (e) => l.has(e));
|
|
100
100
|
if (!o) {
|
|
101
101
|
o = !0;
|
|
102
|
-
let
|
|
103
|
-
if (s = JSON.stringify(
|
|
102
|
+
let e = f(T(u, a));
|
|
103
|
+
if (s = JSON.stringify(e), Object.keys(e).length > 0 && JSON.stringify({
|
|
104
104
|
...f(d),
|
|
105
|
-
...
|
|
105
|
+
...e
|
|
106
106
|
}) !== JSON.stringify(f(d))) {
|
|
107
107
|
n.setState("runtime.state", {
|
|
108
|
-
...
|
|
109
|
-
...
|
|
108
|
+
...t(d) ? d : {},
|
|
109
|
+
...e
|
|
110
110
|
});
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
@@ -117,7 +117,7 @@ var d = /* @__PURE__ */ new Set([
|
|
|
117
117
|
try {
|
|
118
118
|
Object.keys(p).length === 0 ? u.removeItem(a) : u.setItem(a, m);
|
|
119
119
|
} catch {
|
|
120
|
-
|
|
120
|
+
e.warning("store", `settings.browserState could not be kept — the browser refused to store ${[...l].join(", ")}, so the next visit starts without them.`, {
|
|
121
121
|
storeName: "runtime",
|
|
122
122
|
path: "runtime.state",
|
|
123
123
|
prev: void 0,
|
|
@@ -126,17 +126,17 @@ var d = /* @__PURE__ */ new Set([
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
}, D = (
|
|
129
|
+
}, D = (e) => {
|
|
130
130
|
let n = u({
|
|
131
|
-
key: `plitzi_${
|
|
131
|
+
key: `plitzi_${e}_state`,
|
|
132
132
|
paths: [h],
|
|
133
|
-
partializePath: (
|
|
133
|
+
partializePath: (e, n, r) => {
|
|
134
134
|
let i = x(_(r));
|
|
135
|
-
return
|
|
135
|
+
return t(n) ? b(n, i) : n;
|
|
136
136
|
},
|
|
137
|
-
mergePath: (
|
|
137
|
+
mergePath: (e, n, r, i) => {
|
|
138
138
|
let a = x(_(i));
|
|
139
|
-
return
|
|
139
|
+
return t(n) ? {
|
|
140
140
|
...b(r, () => !0),
|
|
141
141
|
...b(n, a)
|
|
142
142
|
} : n;
|
|
@@ -151,22 +151,21 @@ var d = /* @__PURE__ */ new Set([
|
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
153
|
return (i) => {
|
|
154
|
-
let o = n(i), s = i.getState().runtime?.state, c = f(i.getState()), l = C(i,
|
|
154
|
+
let o = n(i), s = i.getState().runtime?.state, c = f(i.getState()), l = C(i, e), u = E(i, e);
|
|
155
155
|
return {
|
|
156
156
|
...o,
|
|
157
|
-
onChange: (
|
|
157
|
+
onChange: (e) => {
|
|
158
158
|
let n = c, d = f(i.getState());
|
|
159
159
|
if (d !== void 0 && (c = d), n?.kind === "account" && d !== void 0 && p(d) !== p(n)) {
|
|
160
|
-
let
|
|
161
|
-
...
|
|
160
|
+
let e = _(i.getState()), n = b(i.getState().runtime?.state, (t) => r(e).has(t)), o = t(s) ? g(s, a(e)) : s, c = Object.keys(n).length > 0 ? {
|
|
161
|
+
...t(o) ? o : {},
|
|
162
162
|
...n
|
|
163
163
|
} : o;
|
|
164
164
|
i.setState("runtime.state", c);
|
|
165
165
|
}
|
|
166
|
-
o?.onChange?.(
|
|
166
|
+
o?.onChange?.(e), l(), u();
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
|
-
//#endregion
|
|
172
171
|
export { D as runtimeStatePersist, f as stateOwner };
|