@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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What sdk-shared offers code that renders with React: a context that is one across every copy of the SDK a page loads
|
|
3
|
+
* (`sharedContext`), the facade a plugin's element is drawn through, and whether a space is drawn inside another. Apart
|
|
4
|
+
* from `/helpers`, which a server loads: nothing there reaches React (RFC 0032, D13).
|
|
5
|
+
*/
|
|
6
|
+
export * from './sharedContext';
|
|
7
|
+
export * from './generateFacade';
|
|
8
|
+
export * from './enclosingSpace';
|
package/dist/realtime/client.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { pConsole as e } from "../devTools/utils/PlitziConsole.mjs";
|
|
2
1
|
import "./topics.mjs";
|
|
3
|
-
|
|
2
|
+
import { pConsole as e } from "../devTools/utils/PlitziConsole.mjs";
|
|
3
|
+
// src/realtime/client.ts
|
|
4
4
|
var t = 30, n = [
|
|
5
5
|
500,
|
|
6
6
|
1e3,
|
|
@@ -154,7 +154,7 @@ var t = 30, n = [
|
|
|
154
154
|
let t = l(e.data);
|
|
155
155
|
t?.event === "ready" && a(t.data) ? (f = !0, F(g, t.data)) : t?.event === "message" && o(t.data) ? P(t.data) : t?.event === "ack" && s(t.data) && (c.get(t.data.id)?.(t.data.ok), c.delete(t.data.id));
|
|
156
156
|
}, i.onclose = () => {
|
|
157
|
-
h(),
|
|
157
|
+
h(), p || y !== g || (f ? I(g) : (D = !1, z()));
|
|
158
158
|
}, g;
|
|
159
159
|
};
|
|
160
160
|
function z() {
|
|
@@ -222,5 +222,4 @@ var t = 30, n = [
|
|
|
222
222
|
let i = d(e, { transport: t });
|
|
223
223
|
return p.set(n, i), i;
|
|
224
224
|
};
|
|
225
|
-
//#endregion
|
|
226
225
|
export { d as createRealtimeClient, m as realtimeClientFor };
|
package/dist/realtime/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
1
|
+
import { createRealtimeClient as e, realtimeClientFor as t } from "./client.mjs";
|
|
2
|
+
import { trackPresence as n } from "./presence.mjs";
|
|
3
|
+
import { JOB_TYPE as r, JOIN_TYPE as i, LEAVE_TYPE as a, OBSERVER_COOKIE_NAME as o, PRESENCE_TYPE as s, REVOKED_TYPE as c, channelLimits as l, channelProblems as u, isValidTopic as d, jobOfTopic as f, jobTopic as p, matchChannel as m } from "./topics.mjs";
|
|
4
|
+
export { r as JOB_TYPE, i as JOIN_TYPE, a as LEAVE_TYPE, o as OBSERVER_COOKIE_NAME, s as PRESENCE_TYPE, c as REVOKED_TYPE, l as channelLimits, u as channelProblems, e as createRealtimeClient, d as isValidTopic, f as jobOfTopic, p as jobTopic, m as matchChannel, t as realtimeClientFor, n as trackPresence };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PRESENCE_TYPE as e } from "./topics.mjs";
|
|
2
|
-
|
|
2
|
+
// src/realtime/presence.ts
|
|
3
3
|
var t = 2e4, n = 65e3, r = /* @__PURE__ */ new WeakMap(), i = (r, i, a) => {
|
|
4
4
|
let o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), u, d = !1, f = () => [...d && r.me ? [{
|
|
5
5
|
from: r.me,
|
|
@@ -72,5 +72,4 @@ var t = 2e4, n = 65e3, r = /* @__PURE__ */ new WeakMap(), i = (r, i, a) => {
|
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
//#endregion
|
|
76
75
|
export { a as trackPresence };
|
package/dist/realtime/topics.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
-
|
|
2
|
+
// src/realtime/topics.ts
|
|
3
3
|
var t = /^[A-Za-z0-9:_.-]{1,128}$/, n = "[A-Za-z0-9_.-]{1,64}", r = (e) => t.test(e), i = /^\$job:([A-Za-z0-9:_.-]{1,128})$/, a = (e) => `$job:${e}`, o = (e) => i.exec(e)?.[1], s = "job", c = (e) => RegExp(`^${e.split(/(\{[A-Za-z0-9_]+\})/).map((e) => /^\{[A-Za-z0-9_]+\}$/.test(e) ? n : e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("")}$`), l = (e, t) => {
|
|
4
4
|
if (!t || !r(e)) return;
|
|
5
5
|
let n = Object.keys(t).find((t) => c(t).test(e));
|
|
@@ -22,5 +22,4 @@ var t = /^[A-Za-z0-9:_.-]{1,128}$/, n = "[A-Za-z0-9_.-]{1,64}", r = (e) => t.tes
|
|
|
22
22
|
maxMessageBytes: e.maxMessageBytes ?? 4096,
|
|
23
23
|
messagesPerSecond: e.messagesPerSecond ?? 30
|
|
24
24
|
}), m = "$presence", h = "$leave", g = "$join", _ = "$revoked", v = "plitzi-observer";
|
|
25
|
-
//#endregion
|
|
26
25
|
export { s as JOB_TYPE, g as JOIN_TYPE, h as LEAVE_TYPE, v as OBSERVER_COOKIE_NAME, m as PRESENCE_TYPE, _ as REVOKED_TYPE, p as channelLimits, f as channelProblems, r as isValidTopic, o as jobOfTopic, a as jobTopic, l as matchChannel };
|
package/dist/runs/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
2
|
import { RUN_REPORTS_ENV as t, RUN_REPORT_PATH as n, RUN_REPORT_STEPS_MOST as r, RUN_REPORT_TEXT_MOST as i, isRunReport as a, runReportProblems as o } from "./report.mjs";
|
|
3
|
-
|
|
3
|
+
// src/runs/index.ts
|
|
4
4
|
var s = "/__plitzi/run", c = "PLITZI_RUN_STATUS", l = (t) => e(t) && typeof t.id == "string" && typeof t.title == "string" && typeof t.role == "string" && typeof t.status == "string" && typeof t.round == "number" && Array.isArray(t.files) && t.files.every((e) => typeof e == "string"), u = (t) => e(t) && typeof t.runId == "string" && typeof t.goal == "string" && typeof t.status == "string" && typeof t.done == "number" && typeof t.total == "number" && typeof t.at == "string" && Array.isArray(t.tasks) && t.tasks.every(l) && Array.isArray(t.attention) && t.attention.every((t) => e(t) && typeof t.text == "string" && typeof t.who == "string");
|
|
5
|
-
//#endregion
|
|
6
5
|
export { t as RUN_REPORTS_ENV, n as RUN_REPORT_PATH, r as RUN_REPORT_STEPS_MOST, i as RUN_REPORT_TEXT_MOST, c as RUN_STATUS_ENV, s as RUN_STATUS_PATH, a as isRunReport, u as isRunSnapshot, o as runReportProblems };
|
package/dist/runs/report.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
-
|
|
2
|
+
// src/runs/report.ts
|
|
3
3
|
var t = "/__plitzi/run/report", n = "PLITZI_RUN_REPORTS", r = 40, i = 2e3, a = (t) => e(t) && typeof t.element == "string" && t.element !== "" && (t.kind === "click" || t.kind === "type" && (typeof t.text == "string" || t.secret === !0)), o = (e) => typeof e == "number" && Number.isInteger(e) && e > 0, s = (t) => e(t) ? [
|
|
4
4
|
...typeof t.text == "string" && t.text.trim() !== "" ? [] : ["text: what is wrong, in words"],
|
|
5
5
|
...typeof t.text == "string" && t.text.length > 2e3 ? [`text: ${String(i)} characters at most`] : [],
|
|
@@ -13,5 +13,4 @@ var t = "/__plitzi/run/report", n = "PLITZI_RUN_REPORTS", r = 40, i = 2e3, a = (
|
|
|
13
13
|
...t.earlier === void 0 || typeof t.earlier == "number" && t.earlier > 0 ? [] : ["earlier: how many steps were left out"],
|
|
14
14
|
...typeof t.at == "string" && !Number.isNaN(Date.parse(t.at)) ? [] : ["at: when, ISO"]
|
|
15
15
|
] : ["a report is a JSON object"], c = (e) => s(e).length === 0;
|
|
16
|
-
//#endregion
|
|
17
16
|
export { n as RUN_REPORTS_ENV, t as RUN_REPORT_PATH, r as RUN_REPORT_STEPS_MOST, i as RUN_REPORT_TEXT_MOST, c as isRunReport, s as runReportProblems };
|
package/dist/schema/anchor.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// src/schema/anchor.ts
|
|
2
2
|
var e = /^[a-z][a-z0-9-]*$/, t = (t) => typeof t == "string" && e.test(t), n = (e) => e.normalize("NFKD").replace(/[̀-ͯ]/g, "").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^[^a-z]+|-+$/g, "") || "section", r = (e, t) => {
|
|
3
3
|
let r = n(e), i = r;
|
|
4
4
|
for (let e = 2; t.has(i); e += 1) i = `${r}-${String(e)}`;
|
|
5
5
|
return t.add(i), i;
|
|
6
6
|
};
|
|
7
|
-
//#endregion
|
|
8
7
|
export { e as ANCHOR_PATTERN, n as anchorOf, t as isAnchor, r as uniqueAnchor };
|
package/dist/schema/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
export {
|
|
1
|
+
import { ANCHOR_PATTERN as e, anchorOf as t, isAnchor as n, uniqueAnchor as r } from "./anchor.mjs";
|
|
2
|
+
import { COMPONENT_PROPS_SOURCE as i, EMPTY_SCHEMA as a, VARIABLE_REGEX as o } from "./schemaConstants.mjs";
|
|
3
|
+
import { findLayoutCycle as s, resolveLayoutChain as c } from "./layoutChain.mjs";
|
|
4
|
+
import { RSC_FAILURE as l, collectServerElements as u, hasServerElements as d, jsonForScript as f, notFoundProvider as p, pageNotFound as m, pageSeoText as h, pageServerContext as g, pageStructuredData as _, rscFailureOf as v } from "./serverElements.mjs";
|
|
5
|
+
import { isEmptyAnswer as y } from "./providerAnswer.mjs";
|
|
6
|
+
import { isRuleGroup as b, serverProviderSource as x, serverWhenValues as S, whenOf as C, whenPaths as w, whenProviders as T, whenUnknownToServer as E } from "./providerWhen.mjs";
|
|
7
|
+
import { browserServerInput as D, inputProviders as O, inputReadings as k, serverInputOf as A } from "./serverInput.mjs";
|
|
8
|
+
import { serverQueryOf as j, serverQueryProblem as M } from "./serverQuery.mjs";
|
|
9
|
+
import { DEFAULT_FAVICON as N, OG_TYPES as P, absoluteAddress as F, isHeadAddress as I, isOgType as L, pageHeadTags as R, spaceIdentity as z, spaceIdentityProblems as B } from "./pageHead.mjs";
|
|
10
|
+
import { SCHEMA_SETTINGS as V, isSchemaSetting as H } from "./schemaSettings.mjs";
|
|
11
|
+
import { isSnippet as U } from "./snippet.mjs";
|
|
12
|
+
import { MOTION_DEFAULT_DURATION as W, MOTION_EASING_KEYWORDS as G, MOTION_ENTERS as K, MOTION_ENTER_EASING as q, MOTION_ENTER_FRAMES as J, MOTION_ENTER_FROM as Y, MOTION_ENTER_TRAVEL as X, MOTION_LOOPS as Z, MOTION_LOOP_FRAMES as Q, MOTION_MAX_DISTANCE as $, MOTION_MAX_MS as ee, MOTION_PLAY_CSS as te, MOTION_SEEN_ATTRIBUTE as ne, MOTION_SEEN_CSS as re, MOTION_STILL_CSS as ie, MOTION_TRAVEL_PROPERTY as ae, MOTION_TRIGGERS as oe, MOTION_VIEW_SELECTOR as se, MOVING_SELECTOR as ce, isMotion as le, isMotionAnimation as ue, isMotionEasing as de, motionAttributes as fe, motionProblems as pe, travelled as me } from "./motion.mjs";
|
|
13
|
+
import { revealOnView as he } from "./motionReveal.mjs";
|
|
14
|
+
import { elementFromWire as ge, schemaFromWire as _e, schemaToWire as ve } from "./wire.mjs";
|
|
15
|
+
import { pageElementTypes as ye } from "./pageElements.mjs";
|
|
16
|
+
import { headingText as be, markdownHeadings as xe } from "./markdownHeadings.mjs";
|
|
17
|
+
import { NOT_FOUND_WHEN_REFUSED as Se, WITHHELD_ATTRIBUTE as Ce, mayReceive as we, notFoundWhenRefused as Te, pageAccessOf as Ee, pageAccessRefusal as De, pageWithheldOf as Oe, withheldPageOf as ke, withholdPages as Ae } from "./pageAccess.mjs";
|
|
18
|
+
export { e as ANCHOR_PATTERN, i as COMPONENT_PROPS_SOURCE, N as DEFAULT_FAVICON, a as EMPTY_SCHEMA, W as MOTION_DEFAULT_DURATION, G as MOTION_EASING_KEYWORDS, K as MOTION_ENTERS, q as MOTION_ENTER_EASING, J as MOTION_ENTER_FRAMES, Y as MOTION_ENTER_FROM, X as MOTION_ENTER_TRAVEL, Z as MOTION_LOOPS, Q as MOTION_LOOP_FRAMES, $ as MOTION_MAX_DISTANCE, ee as MOTION_MAX_MS, te as MOTION_PLAY_CSS, ne as MOTION_SEEN_ATTRIBUTE, re as MOTION_SEEN_CSS, ie as MOTION_STILL_CSS, ae as MOTION_TRAVEL_PROPERTY, oe as MOTION_TRIGGERS, se as MOTION_VIEW_SELECTOR, ce as MOVING_SELECTOR, Se as NOT_FOUND_WHEN_REFUSED, P as OG_TYPES, l as RSC_FAILURE, V as SCHEMA_SETTINGS, o as VARIABLE_REGEX, Ce as WITHHELD_ATTRIBUTE, F as absoluteAddress, t as anchorOf, D as browserServerInput, u as collectServerElements, ge as elementFromWire, s as findLayoutCycle, d as hasServerElements, be as headingText, O as inputProviders, k as inputReadings, n as isAnchor, y as isEmptyAnswer, I as isHeadAddress, le as isMotion, ue as isMotionAnimation, de as isMotionEasing, L as isOgType, b as isRuleGroup, H as isSchemaSetting, U as isSnippet, f as jsonForScript, xe as markdownHeadings, we as mayReceive, fe as motionAttributes, pe as motionProblems, p as notFoundProvider, Te as notFoundWhenRefused, Ee as pageAccessOf, De as pageAccessRefusal, ye as pageElementTypes, R as pageHeadTags, m as pageNotFound, h as pageSeoText, g as pageServerContext, _ as pageStructuredData, Oe as pageWithheldOf, c as resolveLayoutChain, he as revealOnView, v as rscFailureOf, _e as schemaFromWire, ve as schemaToWire, A as serverInputOf, x as serverProviderSource, j as serverQueryOf, M as serverQueryProblem, S as serverWhenValues, z as spaceIdentity, B as spaceIdentityProblems, me as travelled, r as uniqueAnchor, C as whenOf, w as whenPaths, T as whenProviders, E as whenUnknownToServer, ke as withheldPageOf, Ae as withholdPages };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/schema/layoutChain.ts
|
|
2
2
|
var e = (e, t) => {
|
|
3
3
|
let n = e?.attributes[t];
|
|
4
4
|
return typeof n == "string" ? n : "";
|
|
@@ -21,5 +21,4 @@ var e = (e, t) => {
|
|
|
21
21
|
}
|
|
22
22
|
return [];
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { n as findLayoutCycle, t as resolveLayoutChain };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { uniqueAnchor as e } from "./anchor.mjs";
|
|
2
|
-
|
|
2
|
+
// src/schema/markdownHeadings.ts
|
|
3
3
|
var t = /^ {0,3}(`{3,}|~{3,})/, n = /^ {0,3}(#{1,6})[ \t]+(.*?)(?:[ \t]+#+)?[ \t]*$/, r = (e) => e.replace(/!\[[^\]]*\]\([^)]*\)/g, "").replace(/<[^>]+>/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/`+([^`]*?)`+/g, "$1").replace(/(\*\*|~~)(.+?)\1/g, "$2").replace(/\*(.+?)\*/g, "$1").replace(/\b__(.+?)__\b/g, "$1").replace(/\b_(.+?)_\b/g, "$1").replace(/\\([\\`*_{}[\]()#+\-.!|~>])/g, "$1").trim(), i = (i) => {
|
|
4
4
|
let a = /* @__PURE__ */ new Set(), o = [], s;
|
|
5
5
|
for (let c of i.split("\n")) {
|
|
@@ -20,5 +20,4 @@ var t = /^ {0,3}(`{3,}|~{3,})/, n = /^ {0,3}(#{1,6})[ \t]+(.*?)(?:[ \t]+#+)?[ \t
|
|
|
20
20
|
}
|
|
21
21
|
return o;
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { r as headingText, i as markdownHeadings };
|
package/dist/schema/motion.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
-
|
|
2
|
+
// src/schema/motion.ts
|
|
3
3
|
var t = [
|
|
4
4
|
"fade",
|
|
5
5
|
"fade-up",
|
|
@@ -295,5 +295,4 @@ var t = [
|
|
|
295
295
|
k,
|
|
296
296
|
"[data-motion-on=\"scroll\"][data-motion-enter], [data-motion-on=\"scroll\"][data-motion-stagger] > * { animation-timeline: auto, auto !important; }"
|
|
297
297
|
].join("\n"), j = (e) => "animationName" in e && typeof e.animationName == "string" && e.animationName.startsWith("plitzi-motion-");
|
|
298
|
-
//#endregion
|
|
299
298
|
export { i as MOTION_DEFAULT_DURATION, o as MOTION_EASING_KEYWORDS, t as MOTION_ENTERS, a as MOTION_ENTER_EASING, h as MOTION_ENTER_FRAMES, g as MOTION_ENTER_FROM, d as MOTION_ENTER_TRAVEL, r as MOTION_LOOPS, v as MOTION_LOOP_FRAMES, f as MOTION_MAX_DISTANCE, y as MOTION_MAX_MS, A as MOTION_PLAY_CSS, D as MOTION_SEEN_ATTRIBUTE, k as MOTION_SEEN_CSS, E as MOTION_STILL_CSS, p as MOTION_TRAVEL_PROPERTY, n as MOTION_TRIGGERS, O as MOTION_VIEW_SELECTOR, T as MOVING_SELECTOR, C as isMotion, j as isMotionAnimation, u as isMotionEasing, w as motionAttributes, S as motionProblems, m as travelled };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MOTION_SEEN_ATTRIBUTE as e, MOTION_VIEW_SELECTOR as t } from "./motion.mjs";
|
|
2
|
-
|
|
2
|
+
// src/schema/motionReveal.ts
|
|
3
3
|
var n = `${t}:not([${e}])`, r = (t) => {
|
|
4
4
|
let r = (t) => t.setAttribute(e, ""), i = (e) => [...e.matches(n) ? [e] : [], ...Array.from(e.querySelectorAll(n))];
|
|
5
5
|
if (typeof Reflect.get(globalThis, "IntersectionObserver") != "function") return i(t).forEach(r), () => void 0;
|
|
@@ -19,5 +19,4 @@ var n = `${t}:not([${e}])`, r = (t) => {
|
|
|
19
19
|
a.disconnect(), s.disconnect();
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
//#endregion
|
|
23
22
|
export { r as revealOnView };
|
|
@@ -13,6 +13,15 @@ import { Schema } from '../types';
|
|
|
13
13
|
export type PageAccess = {
|
|
14
14
|
permissions: string[];
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* What a page answers whoever it is not for (`unauthorizedBehaviour`): its refusal when it says nothing — 401 or 403
|
|
18
|
+
* and `settings.withheldPage` —, `redirect` to `unauthorizedPageRedirect` (signed out), or `notFound`: as if it did not
|
|
19
|
+
* exist — the space's 404 — and nothing of it is sent, not even its name or its path, because a refusal tells whoever
|
|
20
|
+
* probes a path that something is there (a back-office).
|
|
21
|
+
*/
|
|
22
|
+
export declare const NOT_FOUND_WHEN_REFUSED = "notFound";
|
|
23
|
+
/** Whether a page answers as if it did not exist to whoever it is not for. */
|
|
24
|
+
export declare const notFoundWhenRefused: (attributes: Record<string, unknown> | undefined) => boolean;
|
|
16
25
|
/** A page's access, when its attributes declare one — at least one permission, each a name — or nothing. */
|
|
17
26
|
export declare const pageAccessOf: (attributes: Record<string, unknown> | undefined) => PageAccess | undefined;
|
|
18
27
|
/** Why this visitor may not see a page that declares `access`, or nothing when they may — or when it declares none. */
|
|
@@ -1,59 +1,65 @@
|
|
|
1
1
|
import { accessRefusal as e } from "../actions/access.mjs";
|
|
2
|
-
|
|
3
|
-
var t = (e) => {
|
|
2
|
+
// src/schema/pageAccess.ts
|
|
3
|
+
var t = "notFound", n = (e) => e?.unauthorizedBehaviour === t, r = (e) => {
|
|
4
4
|
let t = e?.access;
|
|
5
5
|
if (typeof t != "object" || !t || !("permissions" in t)) return;
|
|
6
6
|
let { permissions: n } = t;
|
|
7
7
|
if (!Array.isArray(n)) return;
|
|
8
8
|
let r = n.filter((e) => typeof e == "string" && e !== "");
|
|
9
9
|
return r.length > 0 ? { permissions: r } : void 0;
|
|
10
|
-
},
|
|
10
|
+
}, i = (t, n) => t ? e({
|
|
11
11
|
mode: "role",
|
|
12
12
|
permissions: t.permissions
|
|
13
|
-
}, n) : void 0,
|
|
14
|
-
let t = e?.[
|
|
13
|
+
}, n) : void 0, a = "withheld", o = (e) => {
|
|
14
|
+
let t = e?.[a];
|
|
15
15
|
return t === "unauthenticated" || t === "forbidden" ? t : void 0;
|
|
16
|
-
},
|
|
17
|
-
let
|
|
18
|
-
if (
|
|
19
|
-
let
|
|
20
|
-
return
|
|
21
|
-
},
|
|
16
|
+
}, s = (e) => {
|
|
17
|
+
let t = e.settings?.withheldPage;
|
|
18
|
+
if (t === void 0 || !e.pages?.includes(t)) return;
|
|
19
|
+
let n = e.flat[t];
|
|
20
|
+
return n && !r(n.attributes) ? t : void 0;
|
|
21
|
+
}, c = (e, t) => {
|
|
22
22
|
let a = /* @__PURE__ */ new Map(), o = [];
|
|
23
|
-
for (let
|
|
24
|
-
let
|
|
25
|
-
if (!
|
|
26
|
-
let
|
|
27
|
-
|
|
23
|
+
for (let s of e.pages) {
|
|
24
|
+
let c = e.flat[s]?.attributes, l = n(c), u = r(c) ?? (l && c?.accessLevel === "authenticated" ? { permissions: [] } : void 0);
|
|
25
|
+
if (!u) continue;
|
|
26
|
+
let d = i(u, t);
|
|
27
|
+
d ? a.set(s, l ? "hidden" : d) : o.push(u);
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
return a.size === 0 ? {
|
|
30
30
|
schema: e,
|
|
31
31
|
withheld: [],
|
|
32
32
|
kept: o
|
|
33
|
+
} : {
|
|
34
|
+
schema: d(e, a),
|
|
35
|
+
withheld: [...a.keys()],
|
|
36
|
+
kept: o
|
|
33
37
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
}, l = /* @__PURE__ */ new WeakMap(), u = 16, d = (e, t) => {
|
|
39
|
+
let n = [...t].map(([e, t]) => `${e}:${t}`).join("\n"), r = l.get(e) ?? /* @__PURE__ */ new Map();
|
|
40
|
+
l.set(e, r);
|
|
41
|
+
let i = r.get(n);
|
|
42
|
+
if (i) return i;
|
|
43
|
+
let o = {};
|
|
44
|
+
for (let [n, r] of Object.entries(e.flat)) {
|
|
45
|
+
let e = t.get(n);
|
|
46
|
+
e !== "hidden" && (e ? o[n] = {
|
|
47
|
+
...r,
|
|
39
48
|
attributes: {
|
|
40
|
-
...
|
|
41
|
-
[
|
|
49
|
+
...r.attributes,
|
|
50
|
+
[a]: e
|
|
42
51
|
},
|
|
43
52
|
definition: {
|
|
44
|
-
...
|
|
53
|
+
...r.definition,
|
|
45
54
|
items: []
|
|
46
55
|
}
|
|
47
|
-
} :
|
|
56
|
+
} : n !== r.definition.rootId && t.has(r.definition.rootId) || (o[n] = r));
|
|
48
57
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
withheld: [...a.keys()],
|
|
55
|
-
kept: o
|
|
58
|
+
let s = [...t].filter(([, e]) => e === "hidden").map(([e]) => e), c = {
|
|
59
|
+
...e,
|
|
60
|
+
flat: o,
|
|
61
|
+
...s.length > 0 ? { pages: e.pages.filter((e) => !s.includes(e)) } : {}
|
|
56
62
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export {
|
|
63
|
+
return r.size >= u && r.delete(r.keys().next().value ?? ""), r.set(n, c), c;
|
|
64
|
+
}, f = (e, t) => e.every((e) => i(e, t) === void 0);
|
|
65
|
+
export { t as NOT_FOUND_WHEN_REFUSED, a as WITHHELD_ATTRIBUTE, f as mayReceive, n as notFoundWhenRefused, r as pageAccessOf, i as pageAccessRefusal, o as pageWithheldOf, s as withheldPageOf, c as withholdPages };
|
|
@@ -8,5 +8,7 @@ import { Schema } from '../types';
|
|
|
8
8
|
* every shell around it, into every component an instance names and every element a reference copies, and it counts
|
|
9
9
|
* what a flag or a visibility binding might hide: those are decided as the page renders, and may change while it is
|
|
10
10
|
* open. A `custom` element counts as the plugin it names (`renderType`), which is what it renders.
|
|
11
|
+
*
|
|
12
|
+
* Kept per schema object and page: the server asks it on every render of the same space.
|
|
11
13
|
*/
|
|
12
|
-
export declare const pageElementTypes: (schema: Schema, pageId: string) =>
|
|
14
|
+
export declare const pageElementTypes: (schema: Schema, pageId: string) => ReadonlySet<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveLayoutChain as e } from "./layoutChain.mjs";
|
|
2
|
-
|
|
2
|
+
// src/schema/pageElements.ts
|
|
3
3
|
var t = (e) => typeof e == "string" ? e : "", n = (n, r) => {
|
|
4
4
|
let i = /* @__PURE__ */ new Set(), a = n.flat[r];
|
|
5
5
|
if (!a) return i;
|
|
@@ -36,6 +36,12 @@ var t = (e) => typeof e == "string" ? e : "", n = (n, r) => {
|
|
|
36
36
|
})));
|
|
37
37
|
}
|
|
38
38
|
return i;
|
|
39
|
+
}, r = /* @__PURE__ */ new WeakMap(), i = (e, t) => {
|
|
40
|
+
let i = r.get(e) ?? /* @__PURE__ */ new Map();
|
|
41
|
+
r.set(e, i);
|
|
42
|
+
let a = i.get(t);
|
|
43
|
+
if (a) return a;
|
|
44
|
+
let o = n(e, t);
|
|
45
|
+
return i.set(t, o), o;
|
|
39
46
|
};
|
|
40
|
-
|
|
41
|
-
export { n as pageElementTypes };
|
|
47
|
+
export { i as pageElementTypes };
|
|
@@ -51,8 +51,11 @@ export declare const absoluteAddress: (value: string, origin: string) => string;
|
|
|
51
51
|
* shows them as they are typed. None when they are right.
|
|
52
52
|
*/
|
|
53
53
|
export declare const spaceIdentityProblems: (settings: SpaceIdentity) => string[];
|
|
54
|
-
/**
|
|
55
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Plitzi's own icon: the tab of a space that names none — on the page's own origin, where its server answers it
|
|
56
|
+
* (sdk-server's `defaultFaviconStage`): asked of another site, the browser sent that site's cookies with it.
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_FAVICON = "/_plitzi/favicon.svg";
|
|
56
59
|
/**
|
|
57
60
|
* Every tag a page's head carries besides its title and its JSON-LD: its description, its robots, its Open Graph and
|
|
58
61
|
* card — the title, the description, the picture and its words, the kind, the site, the language, the page's own
|
package/dist/schema/pageHead.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
-
|
|
2
|
+
// src/schema/pageHead.ts
|
|
3
3
|
var t = [
|
|
4
4
|
"website",
|
|
5
5
|
"article",
|
|
@@ -19,7 +19,7 @@ var t = [
|
|
|
19
19
|
for (let [e, t] of [["favicon", c], ["shareImage", l]]) t !== void 0 && !s(t) && n.push(`${e} "${t}" is neither a file of the site nor an address: \`/${e === "favicon" ? "favicon.svg" : "og.png"}\` (in public/), or \`https://…\`.`);
|
|
20
20
|
let d = u === void 0 ? [] : typeof u == "string" ? [["themeColor", u]] : Object.entries(u).map(([e, t]) => [`themeColor.${e}`, t]);
|
|
21
21
|
e(u) && Object.keys(u).some((e) => e !== "light" && e !== "dark") && n.push("themeColor is one colour, or one a scheme: `{ light: \"#ffffff\", dark: \"#09090b\" }`.");
|
|
22
|
-
for (let [e, t] of d)
|
|
22
|
+
for (let [e, t] of d) typeof t == "string" && o.test(t.trim()) || n.push(`${e} ${JSON.stringify(t)} is no colour a browser reads here: \`#ff6a3d\`, \`oklch(…)\`.`);
|
|
23
23
|
return n;
|
|
24
24
|
}, d = (e) => {
|
|
25
25
|
let t = e.split(/[?#]/)[0] ?? "";
|
|
@@ -29,7 +29,7 @@ var t = [
|
|
|
29
29
|
ico: "image/x-icon",
|
|
30
30
|
webp: "image/webp"
|
|
31
31
|
}[t.slice(t.lastIndexOf(".") + 1).toLowerCase()];
|
|
32
|
-
}, f = "
|
|
32
|
+
}, f = "/_plitzi/favicon.svg", p = (e, t, n) => {
|
|
33
33
|
let i = /^https?:\/\/[^/]+/.exec(n)?.[0] ?? "", a = e.image ?? t.shareImage, o = a && s(a) ? c(a, i) : void 0, u = [], p = (e, t, n, r) => {
|
|
34
34
|
n !== void 0 && n.trim() !== "" && u.push({
|
|
35
35
|
attribute: e,
|
|
@@ -64,5 +64,4 @@ var t = [
|
|
|
64
64
|
...a === void 0 ? {} : { themeColor: a }
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
-
//#endregion
|
|
68
67
|
export { f as DEFAULT_FAVICON, t as OG_TYPES, c as absoluteAddress, s as isHeadAddress, n as isOgType, p as pageHeadTags, m as spaceIdentity, u as spaceIdentityProblems };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/schema/providerAnswer.ts
|
|
2
2
|
var e = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0 || typeof e == "object" && !Array.isArray(e) && Object.keys(e).length === 0, t = (t, n, r) => r ? t.record === void 0 : Array.isArray(t.records) ? n.length === 0 : e(t.data);
|
|
3
|
-
//#endregion
|
|
4
3
|
export { t as isEmptyAnswer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RuleGroup, RuleValue } from '../
|
|
1
|
+
import { RuleGroup, RuleValue } from '../conditions';
|
|
2
2
|
import { Element, SSRUser } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* A provider's `when`: the rule group it waits on before it asks — read the same way by the browser, which waits on it,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isEmptyAnswer as e } from "./providerAnswer.mjs";
|
|
2
2
|
import { GLOBAL_SOURCES as t } from "../dataSource/globalSources.mjs";
|
|
3
3
|
import n from "../dataSource/helpers/getSourceName.mjs";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var i = (
|
|
4
|
+
import { isRecord as r } from "../helpers/isRecord.mjs";
|
|
5
|
+
// src/schema/providerWhen.ts
|
|
6
|
+
var i = (e) => r(e) && (e.combinator === "and" || e.combinator === "or") && Array.isArray(e.rules) && e.rules.every((e) => i(e) || r(e) && typeof e.field == "string" && typeof e.operator == "string"), a = (e) => {
|
|
7
7
|
let { when: t } = e.attributes;
|
|
8
8
|
return i(t) && t.rules.length > 0 && t.enabled !== !1 ? t : void 0;
|
|
9
9
|
}, o = (e) => e.rules.flatMap((e) => "rules" in e ? o(e) : [e.field, ...e.isBinding && typeof e.value == "string" ? [e.value] : []]), s = "apiContainer", c = ["navigation", "auth"], l = (e, r, i) => {
|
|
@@ -16,7 +16,7 @@ var i = (t) => e(t) && (t.combinator === "and" || t.combinator === "or") && Arra
|
|
|
16
16
|
let [n] = e.split("."), r = n.startsWith(`${s}_`) ? n.slice(s.length + 1) : void 0;
|
|
17
17
|
return r !== void 0 && t.has(r) ? [r] : [];
|
|
18
18
|
}))], f = (t, n) => {
|
|
19
|
-
if (!
|
|
19
|
+
if (!r(t)) return {
|
|
20
20
|
isLoading: !1,
|
|
21
21
|
isEmpty: !0,
|
|
22
22
|
hasError: !0,
|
|
@@ -26,7 +26,7 @@ var i = (t) => e(t) && (t.combinator === "and" || t.combinator === "or") && Arra
|
|
|
26
26
|
return {
|
|
27
27
|
...t,
|
|
28
28
|
isLoading: !1,
|
|
29
|
-
isEmpty:
|
|
29
|
+
isEmpty: e(t, i, n),
|
|
30
30
|
hasError: !1,
|
|
31
31
|
isStale: !1
|
|
32
32
|
};
|
|
@@ -54,5 +54,4 @@ var i = (t) => e(t) && (t.combinator === "and" || t.combinator === "or") && Arra
|
|
|
54
54
|
},
|
|
55
55
|
...Object.fromEntries(Object.entries(a).map(([e, { answer: t, singleRecord: r }]) => [n(s, e), f(t, r)]))
|
|
56
56
|
});
|
|
57
|
-
//#endregion
|
|
58
57
|
export { i as isRuleGroup, f as serverProviderSource, p as serverWhenValues, a as whenOf, o as whenPaths, d as whenProviders, u as whenUnknownToServer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EMPTY_STYLE_SCHEMA as e } from "../style/styleConstants.mjs";
|
|
2
|
-
|
|
2
|
+
// src/schema/schemaConstants.ts
|
|
3
3
|
var t = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/, n = "props", r = {
|
|
4
4
|
schema: {
|
|
5
5
|
definition: {
|
|
@@ -16,5 +16,4 @@ var t = /var\(\s*--([a-zA-Z0-9_-]+)\s*\)|\{\{\s*([a-zA-Z0-9_-]+)\s*\}\}/, n = "p
|
|
|
16
16
|
style: e,
|
|
17
17
|
definition: { rootId: "" }
|
|
18
18
|
};
|
|
19
|
-
//#endregion
|
|
20
19
|
export { n as COMPONENT_PROPS_SOURCE, r as EMPTY_SCHEMA, t as VARIABLE_REGEX };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/schema/schemaSettings.ts
|
|
2
2
|
var e = /* @__PURE__ */ "keepState.stateStorage.transientState.keptState.paintedState.browserState.robotsTxt.blockAiCrawlers.viewTransitions.siteName.language.favicon.shareImage.themeColor.customCss.withheldPage.visitorRoles.userProvider.tokenStorage.loginUrl.userUrl.refreshUrl.logoutUrl.revokeUrl.detailsPath.tokenPath.refreshTokenPath.expirationTimePath.refreshExpirationTimePath.sessionHintCookie.sessionExchangeUrl.mfaUrl.sessionGate.sessionRevalidateSeconds.debugMode.computed.channels".split("."), t = new Set(e), n = (e) => t.has(e);
|
|
3
|
-
//#endregion
|
|
4
3
|
export { e as SCHEMA_SETTINGS, n as isSchemaSetting };
|
|
@@ -1,28 +1,4 @@
|
|
|
1
1
|
import { Element, Schema } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Which elements of a page want data from the server — the one definition of it, because both sides of RSC have to
|
|
4
|
-
* agree on the answer. The rendering server asks before calling its `getRscData` adapter, and the client asks before
|
|
5
|
-
* spending a request on `/_rsc`: a page whose subtree holds no `runtime: 'server'` element has nobody to give a
|
|
6
|
-
* payload to, so resolving one costs an API call, a connector read or a round trip that nothing will ever read.
|
|
7
|
-
*
|
|
8
|
-
* Page-scoped and not schema-scoped on purpose. A space is normally a mix — one page backed by a CMS, the next one
|
|
9
|
-
* static — and the whole point is that rendering the static one must not pay for the other one's providers.
|
|
10
|
-
*
|
|
11
|
-
* The walk is iterative to stay safe on deeply nested schemas, and follows `definition.items`, so a server element
|
|
12
|
-
* nested under any number of plain containers is still found.
|
|
13
|
-
*
|
|
14
|
-
* **It starts from the page AND every shell around it.** A layout is rendered with the page — its sidebar, its header
|
|
15
|
-
* — so a server element that lives in one is on this page as far as the visitor can tell. Walked from the page alone,
|
|
16
|
-
* a provider in the dashboard's sidebar was never resolved: the payload came back empty, the element rendered with
|
|
17
|
-
* nothing, and no layer reported it.
|
|
18
|
-
*
|
|
19
|
-
* A page withheld from its visitor holds nothing of its own; the page the space draws in its place
|
|
20
|
-
* (`settings.withheldPage`) is walked instead, as its body.
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Given the flags as they resolved, an element gated off by one is skipped with its whole subtree — it will not be
|
|
24
|
-
* rendered, so nothing in it wants data, and resolving it would put a feature that is off into the payload anyway.
|
|
25
|
-
*/
|
|
26
2
|
export declare const collectServerElements: (schema: Pick<Schema, "flat"> & Partial<Pick<Schema, "pages" | "settings">>, pageId: string | undefined, ids?: string[], flags?: Record<string, boolean>) => Element[];
|
|
27
3
|
/** Whether anything on this page consumes server data at all — the question both RSC gates actually ask. */
|
|
28
4
|
export declare const hasServerElements: (schema: Schema, pageId: string | undefined, flags?: Record<string, boolean>) => boolean;
|