@plitzi/sdk-shared 0.39.0 → 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 +14 -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.d.ts +1 -1
- package/dist/schema/schemaSettings.mjs +2 -3
- 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.d.ts +20 -4
- package/dist/state/paintedState.mjs +21 -21
- 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/store/runtimeStatePersist.mjs +171 -0
- 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 +8 -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/state/runtimeStatePersist.mjs +0 -119
- 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,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The lodash-like utilities sdk-shared reads paths and keys with — a copy of plitzi-ui's own, which keeps its for its 29
|
|
3
|
+
* files (RFC 0032, D13): generic, with no Plitzi rule in them, so two copies are not two sources of truth for any rule,
|
|
4
|
+
* and a server reaches neither React nor a UI library to read a path.
|
|
5
|
+
*/
|
|
6
|
+
export * from './get';
|
|
7
|
+
export * from './set';
|
|
8
|
+
export * from './omit';
|
|
9
|
+
export * from './has';
|
|
10
|
+
export * from './capitalize';
|
|
11
|
+
export * from './camelCase';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { get as e } from "./get.mjs";
|
|
2
|
+
import { set as t } from "./set.mjs";
|
|
3
|
+
import { omit as n } from "./omit.mjs";
|
|
4
|
+
import { has as r } from "./has.mjs";
|
|
5
|
+
import { capitalize as i } from "./capitalize.mjs";
|
|
6
|
+
import { camelCase as a } from "./camelCase.mjs";
|
|
7
|
+
export { a as camelCase, i as capitalize, e as get, r as has, n as omit, t as set };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Path } from './shared';
|
|
2
|
+
export declare function omit<T extends object>(obj: T): T;
|
|
3
|
+
export declare function omit<T extends Record<string, unknown>, K extends keyof T & string>(obj: T, paths: K | readonly [K] | readonly K[]): Omit<T, K>;
|
|
4
|
+
export declare function omit<T extends Record<string, unknown>>(obj: T, paths: Path | readonly Path[]): Partial<T>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cloneAtPath as e, cloneObject as t } from "./cloneDeep.mjs";
|
|
2
|
+
import { has as n } from "./has.mjs";
|
|
3
|
+
import { toPath as r } from "./shared.mjs";
|
|
4
|
+
// src/helpers/lodash/omit.ts
|
|
5
|
+
function i(i, a) {
|
|
6
|
+
let o = Array.isArray(a) ? a : a ? [a] : [];
|
|
7
|
+
if (o.length === 0) return { ...i };
|
|
8
|
+
let s = [], c = [];
|
|
9
|
+
for (let e of o) {
|
|
10
|
+
let t = r(e);
|
|
11
|
+
t.length !== 0 && (t.length === 1 ? s.push(t[0]) : c.push(e));
|
|
12
|
+
}
|
|
13
|
+
let l = i;
|
|
14
|
+
if (s.length) {
|
|
15
|
+
let e;
|
|
16
|
+
for (let n of s) Object.prototype.hasOwnProperty.call(l, n) && (e ??= t(l), delete e[n]);
|
|
17
|
+
e && (l = e);
|
|
18
|
+
}
|
|
19
|
+
for (let t of c) {
|
|
20
|
+
let i = r(t);
|
|
21
|
+
if (!n(l, t)) continue;
|
|
22
|
+
let a = e(l, t), o = a;
|
|
23
|
+
for (let e = 0; e < i.length - 1 && o && typeof o == "object"; e++) {
|
|
24
|
+
let t = i[e];
|
|
25
|
+
o = o[t];
|
|
26
|
+
}
|
|
27
|
+
if (o && typeof o == "object") {
|
|
28
|
+
let e = i[i.length - 1];
|
|
29
|
+
Object.prototype.hasOwnProperty.call(o, e) && delete o[e];
|
|
30
|
+
}
|
|
31
|
+
l = a;
|
|
32
|
+
}
|
|
33
|
+
return l;
|
|
34
|
+
}
|
|
35
|
+
export { i as omit };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { toPath as e } from "./shared.mjs";
|
|
2
|
+
// src/helpers/lodash/set.ts
|
|
3
|
+
function t(t, n, r) {
|
|
4
|
+
let i = e(n);
|
|
5
|
+
if (!i.length) return t;
|
|
6
|
+
let a = t;
|
|
7
|
+
for (let e = 0; e < i.length - 1; e++) {
|
|
8
|
+
let n = i[e], r = i[e + 1];
|
|
9
|
+
if (typeof a != "object" || !a) return t;
|
|
10
|
+
let o = a;
|
|
11
|
+
(o[n] == null || typeof o[n] != "object") && (o[n] = /^\d+$/.test(r) ? [] : {}), a = o[n];
|
|
12
|
+
}
|
|
13
|
+
let o = i[i.length - 1];
|
|
14
|
+
if (typeof a == "object" && a) {
|
|
15
|
+
let e = a;
|
|
16
|
+
e[o] = r;
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
export { t as set };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/helpers/lodash/shared.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
if (typeof e == "string" || typeof e == "number") {
|
|
4
|
+
let t = String(e);
|
|
5
|
+
return t === "" ? null : /^[a-zA-Z0-9_-]+$/.test(t) || /^\d+$/.test(t) ? t : null;
|
|
6
|
+
}
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
function t(t, n) {
|
|
10
|
+
if (!t || t.startsWith(".") || t.endsWith(".") || /[^a-zA-Z0-9_.[\]-]/.test(t) || n && (/\.\.|(\[\])/g.test(t) || (t.match(/\[/g) || []).length !== (t.match(/\]/g) || []).length || /\][^.[]/.test(t))) return [];
|
|
11
|
+
let r = [], i = /([^.[\]]+)|\[(\d+)\]/g, a;
|
|
12
|
+
for (; a = i.exec(t);) if (a[1]) {
|
|
13
|
+
if (!n && a[1] === "") continue;
|
|
14
|
+
let t = e(a[1]);
|
|
15
|
+
if (t !== null) r.push(t);
|
|
16
|
+
else if (n) return [];
|
|
17
|
+
} else if (a[2]) {
|
|
18
|
+
let t = e(a[2]);
|
|
19
|
+
if (t !== null) r.push(t);
|
|
20
|
+
else if (n) return [];
|
|
21
|
+
}
|
|
22
|
+
return r.length ? r : [];
|
|
23
|
+
}
|
|
24
|
+
function n(t, n) {
|
|
25
|
+
if (!Array.isArray(t)) return [];
|
|
26
|
+
let r = [];
|
|
27
|
+
for (let i of t) {
|
|
28
|
+
let t = e(i);
|
|
29
|
+
if (t !== null) r.push(t);
|
|
30
|
+
else if (n) return [];
|
|
31
|
+
}
|
|
32
|
+
return r;
|
|
33
|
+
}
|
|
34
|
+
function r(e, r = !0) {
|
|
35
|
+
return e ? typeof e == "string" ? t(e, r) : Array.isArray(e) ? n(e, r) : [] : [];
|
|
36
|
+
}
|
|
37
|
+
export { r as toPath };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './replaceEqualDeep';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { replaceEqualDeep } from "./replaceEqualDeep.mjs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `next`, with every part of it equal to the same part of `previous` replaced by that part of `previous` — `previous`
|
|
3
|
+
* itself when the two are equal all through.
|
|
4
|
+
*
|
|
5
|
+
* A provider answers a new object every time it is asked, the same data or not: a refresh, a loading flag flipping,
|
|
6
|
+
* the answer published again. Whatever is drawn from it — a list's rows, an element bound to one field — was drawn
|
|
7
|
+
* again for each, though nothing it shows had changed (the dashboard's list of spaces drew every card thirteen times
|
|
8
|
+
* as the page loaded). With what did not change kept as it was, a reader that compares by identity draws only what did.
|
|
9
|
+
*
|
|
10
|
+
* Plain objects and arrays are compared field by field; anything else (a Date, a Map, a function) by identity.
|
|
11
|
+
*/
|
|
12
|
+
export declare const replaceEqualDeep: <T>(previous: unknown, next: T) => T;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// src/helpers/replaceEqualDeep/replaceEqualDeep.ts
|
|
2
|
+
var e = (e) => {
|
|
3
|
+
if (typeof e != "object" || !e || Array.isArray(e)) return !1;
|
|
4
|
+
let t = Object.getPrototypeOf(e);
|
|
5
|
+
return t === Object.prototype || t === null;
|
|
6
|
+
}, t = (n, r) => {
|
|
7
|
+
if (Object.is(n, r)) return r;
|
|
8
|
+
if (Array.isArray(n) && Array.isArray(r)) {
|
|
9
|
+
let e = n.length === r.length, i = !1, a = [];
|
|
10
|
+
for (let o = 0; o < r.length; o++) {
|
|
11
|
+
let s = t(n[o], r[o]);
|
|
12
|
+
a.push(s);
|
|
13
|
+
let c = o < n.length && Object.is(s, n[o]);
|
|
14
|
+
e &&= c, i ||= !Object.is(s, r[o]);
|
|
15
|
+
}
|
|
16
|
+
return e ? n : i ? a : r;
|
|
17
|
+
}
|
|
18
|
+
if (e(n) && e(r)) {
|
|
19
|
+
let e = Object.keys(r), i = e.length === Object.keys(n).length, a = !1, o = {};
|
|
20
|
+
for (let s of e) {
|
|
21
|
+
let e = t(n[s], r[s]);
|
|
22
|
+
o[s] = e;
|
|
23
|
+
let c = Object.hasOwn(n, s) && Object.is(e, n[s]);
|
|
24
|
+
i &&= c, a ||= !Object.is(e, r[s]);
|
|
25
|
+
}
|
|
26
|
+
return i ? n : a ? o : r;
|
|
27
|
+
}
|
|
28
|
+
return r;
|
|
29
|
+
};
|
|
30
|
+
export { t as replaceEqualDeep };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CPU and memory as the clouds and Kubernetes name them, so a developer, an operator and a customer read one size the
|
|
3
|
+
* same way: CPU in vCPU — `0.25 vCPU`, Kubernetes' `250m` — and memory in MiB and GiB — `512 MiB`, Kubernetes' `512Mi`.
|
|
4
|
+
* One scale of each, doubling, the one every size here is picked from: an instance of a pool, a space's runtime.
|
|
5
|
+
*/
|
|
6
|
+
/** The CPU sizes there are, in millicores (Kubernetes' `m`: a thousandth of a vCPU) — 0.125 to 4 vCPU. */
|
|
7
|
+
export declare const VCPU_STEPS: readonly [125, 250, 500, 1000, 2000, 4000];
|
|
8
|
+
/** The memory sizes there are, in MiB (Kubernetes' `Mi`) — 128 MiB to 8 GiB. */
|
|
9
|
+
export declare const MEMORY_STEPS: readonly [128, 256, 512, 1024, 2048, 4096, 8192];
|
|
10
|
+
/** Millicores as a cloud says them: `0.125 vCPU`, `0.5 vCPU`, `2 vCPU`. */
|
|
11
|
+
export declare const vcpuWords: (millicores: number) => string;
|
|
12
|
+
/** MiB as a cloud says them: `256 MiB`, `1 GiB`, `1.5 GiB` — GiB from 1024 up. */
|
|
13
|
+
export declare const memoryWords: (mib: number) => string;
|
|
14
|
+
/** A size in one line: `0.25 vCPU · 512 MiB`. */
|
|
15
|
+
export declare const sizeWords: (millicores: number, mib: number) => string;
|
|
16
|
+
/** A CPU quantity as Kubernetes writes one — `250m`, `1`, `0.5` — in millicores; undefined for anything else. */
|
|
17
|
+
export declare const millicoresOf: (quantity: unknown) => number | undefined;
|
|
18
|
+
/** A memory quantity as Kubernetes writes one — `512Mi`, `1Gi`, `512M`, or bytes — in MiB; undefined otherwise. */
|
|
19
|
+
export declare const mibOf: (quantity: unknown) => number | undefined;
|
|
20
|
+
/** A Kubernetes size — its `cpu` and `memory` quantities — in one line, or undefined when either is not one. */
|
|
21
|
+
export declare const quantityWords: (cpu: unknown, memory: unknown) => string | undefined;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// src/helpers/resources.ts
|
|
2
|
+
var e = [
|
|
3
|
+
125,
|
|
4
|
+
250,
|
|
5
|
+
500,
|
|
6
|
+
1e3,
|
|
7
|
+
2e3,
|
|
8
|
+
4e3
|
|
9
|
+
], t = [
|
|
10
|
+
128,
|
|
11
|
+
256,
|
|
12
|
+
512,
|
|
13
|
+
1024,
|
|
14
|
+
2048,
|
|
15
|
+
4096,
|
|
16
|
+
8192
|
|
17
|
+
], n = 1048576, r = (e) => String(Math.round(e * 1e3) / 1e3), i = (e) => `${r(e / 1e3)} vCPU`, a = (e) => e >= 1024 ? `${r(e / 1024)} GiB` : `${String(Math.round(e))} MiB`, o = (e, t) => `${i(e)} · ${a(t)}`, s = (e) => {
|
|
18
|
+
if (typeof e != "string" && typeof e != "number") return;
|
|
19
|
+
let t = /^(\d+(?:\.\d+)?)(m)?$/.exec(String(e).trim());
|
|
20
|
+
if (!t) return;
|
|
21
|
+
let n = t[2] ? Number(t[1]) : Number(t[1]) * 1e3;
|
|
22
|
+
return n > 0 ? Math.round(n) : void 0;
|
|
23
|
+
}, c = {
|
|
24
|
+
Ki: 1024,
|
|
25
|
+
Mi: n,
|
|
26
|
+
Gi: 1024 * n,
|
|
27
|
+
K: 1e3,
|
|
28
|
+
M: 1e6,
|
|
29
|
+
G: 1e9
|
|
30
|
+
}, l = (e) => {
|
|
31
|
+
if (typeof e != "string" && typeof e != "number") return;
|
|
32
|
+
let t = /^(\d+(?:\.\d+)?)(Ki|Mi|Gi|K|M|G)?$/.exec(String(e).trim());
|
|
33
|
+
if (!t) return;
|
|
34
|
+
let r = Math.round(Number(t[1]) * (t[2] ? c[t[2]] ?? 1 : 1) / n);
|
|
35
|
+
return r > 0 ? r : void 0;
|
|
36
|
+
}, u = (e, t) => {
|
|
37
|
+
let n = s(e), r = l(t);
|
|
38
|
+
return n === void 0 || r === void 0 ? void 0 : o(n, r);
|
|
39
|
+
};
|
|
40
|
+
export { t as MEMORY_STEPS, e as VCPU_STEPS, a as memoryWords, l as mibOf, s as millicoresOf, u as quantityWords, o as sizeWords, i as vcpuWords };
|
package/dist/helpers/scroll.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/scroll.ts
|
|
2
2
|
var e = ["smooth", "auto"], t = [
|
|
3
3
|
"start",
|
|
4
4
|
"center",
|
|
@@ -26,5 +26,4 @@ var e = ["smooth", "auto"], t = [
|
|
|
26
26
|
atEnd: r >= i - n
|
|
27
27
|
};
|
|
28
28
|
}, s = "onScroll", c = "onView";
|
|
29
|
-
//#endregion
|
|
30
29
|
export { e as SCROLL_BEHAVIORS, t as SCROLL_POSITIONS, s as SCROLL_TRIGGER, c as VIEW_TRIGGER, i as scrollDistance, a as scrollPosition, o as scrollState };
|
|
@@ -4,3 +4,18 @@ declare global {
|
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
export declare const disableReactDevTools: () => void;
|
|
7
|
+
/**
|
|
8
|
+
* The Trusted Types policies the SDK makes, by name: what a page's policy lets write markup into it
|
|
9
|
+
* (`trusted-types …`, the server's header), and what the SDK creates them as (`security`) — one list, so the two cannot
|
|
10
|
+
* come apart.
|
|
11
|
+
*
|
|
12
|
+
* - `plitzi-html`: markup the page itself made — the server's own HTML kept through hydration, the dev tools'.
|
|
13
|
+
* - `plitzi-author-html`: markup an author or the data wrote — a raw HTML block, rich text, an SVG — cleaned when the
|
|
14
|
+
* page's script policy is enforced (sdk-elements, beside the cleaner).
|
|
15
|
+
* - `default`: what a library writes without asking for a policy, and only what cannot run: text (the head's JSON-LD,
|
|
16
|
+
* which Helmet writes as `innerHTML`), the empty script React makes one from, JSON as a script, and a worker from the
|
|
17
|
+
* page's own origin (a map's, from a `blob:` it made; the builder's, from its assets).
|
|
18
|
+
* - `dompurify`: the cleaner's own, which it makes to read the markup it is handed before it cleans it.
|
|
19
|
+
*/
|
|
20
|
+
export declare const TRUSTED_TYPES_POLICIES: readonly ["plitzi-html", "plitzi-author-html", "default", "dompurify"];
|
|
21
|
+
export type TrustedTypesPolicyName = (typeof TRUSTED_TYPES_POLICIES)[number];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/security.ts
|
|
2
2
|
var e = () => {
|
|
3
3
|
if (typeof window > "u") return;
|
|
4
4
|
let e = () => void 0, t = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
@@ -6,6 +6,10 @@ var e = () => {
|
|
|
6
6
|
let r = t[n];
|
|
7
7
|
t[n] = typeof r == "function" ? e : null;
|
|
8
8
|
});
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
}, t = [
|
|
10
|
+
"plitzi-html",
|
|
11
|
+
"plitzi-author-html",
|
|
12
|
+
"default",
|
|
13
|
+
"dompurify"
|
|
14
|
+
];
|
|
15
|
+
export { t as TRUSTED_TYPES_POLICIES, e as disableReactDevTools };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/syntaxHighlight.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t = "number";
|
|
4
4
|
return /^"/.test(e) ? t = /:$/.test(e) ? "text-red-700" : "text-green-700" : /true|false/.test(e) ? t = "text-blue-700" : /null/.test(e) && (t = ""), `<span class="${t}">${e}</span>`;
|
|
5
5
|
}, t = /("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)/g, n = (n) => n?.replace(t, e) ?? n;
|
|
6
|
-
//#endregion
|
|
7
6
|
export { n as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isTruthy as e, order as t, resolveCollection as n, resolveObjectEntries as r, valueIn as i } from "./helpers.mjs";
|
|
2
|
+
import { filters as a } from "../filters/filters.mjs";
|
|
3
3
|
import { ARROW_PARAMS as o } from "../filters/types.mjs";
|
|
4
4
|
import { isRawMarker as s, unwrapRaw as c } from "../filters/raw.mjs";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { serializeValue as l } from "../processTwig/helpers.mjs";
|
|
6
|
+
// src/helpers/twigWrapper/Evaluator/Evaluator.ts
|
|
7
7
|
var u = {
|
|
8
8
|
defined: (e) => e !== void 0,
|
|
9
9
|
null: (e) => e == null,
|
|
@@ -66,27 +66,27 @@ var u = {
|
|
|
66
66
|
this.escaping ? this.escaping = !1 : this.inString && n === "\\" ? this.escaping = !0 : n === "\"" && (this.inString = !this.inString);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
evalIf(
|
|
70
|
-
if (
|
|
71
|
-
for (let n of
|
|
72
|
-
return
|
|
69
|
+
evalIf(t) {
|
|
70
|
+
if (e(this.evalExpression(t.condition))) return this.evalNodes(t.body);
|
|
71
|
+
for (let n of t.elseifClauses) if (e(this.evalExpression(n.condition))) return this.evalNodes(n.body);
|
|
72
|
+
return t.elseBody ? this.evalNodes(t.elseBody) : "";
|
|
73
73
|
}
|
|
74
74
|
evalFor(e) {
|
|
75
75
|
let t = this.evalExpression(e.collection);
|
|
76
76
|
if (e.source !== void 0 && t === void 0 && this.keeps(e.collection)) return e.source;
|
|
77
|
-
let
|
|
77
|
+
let i, a = null;
|
|
78
78
|
if (e.keyVar !== null) {
|
|
79
|
-
let
|
|
80
|
-
if (!
|
|
81
|
-
let o =
|
|
82
|
-
a = Array(o),
|
|
83
|
-
for (let e = 0; e < o; e++) a[e] =
|
|
79
|
+
let n = r(t);
|
|
80
|
+
if (!n || n.length === 0) return e.elseBody ? this.evalNodes(e.elseBody) : "";
|
|
81
|
+
let o = n.length;
|
|
82
|
+
a = Array(o), i = Array(o);
|
|
83
|
+
for (let e = 0; e < o; e++) a[e] = n[e][0], i[e] = n[e][1];
|
|
84
84
|
} else {
|
|
85
|
-
let
|
|
86
|
-
if (!
|
|
87
|
-
|
|
85
|
+
let r = n(t);
|
|
86
|
+
if (!r || r.length === 0) return e.elseBody ? this.evalNodes(e.elseBody) : "";
|
|
87
|
+
i = r;
|
|
88
88
|
}
|
|
89
|
-
return this.runLoop(e,
|
|
89
|
+
return this.runLoop(e, i, a);
|
|
90
90
|
}
|
|
91
91
|
runLoop(e, t, n) {
|
|
92
92
|
let { valueVar: r, keyVar: i, body: a } = e, o = t.length, s = this.variables.loop, c = {
|
|
@@ -118,7 +118,7 @@ var u = {
|
|
|
118
118
|
applyFilters(e, t) {
|
|
119
119
|
let n = e;
|
|
120
120
|
for (let e of t) {
|
|
121
|
-
let t =
|
|
121
|
+
let t = a[e.name];
|
|
122
122
|
t !== void 0 && (n = t(n, e.args.length === 0 ? h : this.evalArgs(e.args)));
|
|
123
123
|
}
|
|
124
124
|
return n;
|
|
@@ -128,43 +128,43 @@ var u = {
|
|
|
128
128
|
for (let r = 0; r < t; r++) n[r] = this.evalExpression(e[r]);
|
|
129
129
|
return n;
|
|
130
130
|
}
|
|
131
|
-
evalExpression(
|
|
132
|
-
switch (
|
|
133
|
-
case "literal": return
|
|
131
|
+
evalExpression(t) {
|
|
132
|
+
switch (t.type) {
|
|
133
|
+
case "literal": return t.value;
|
|
134
134
|
case "array": {
|
|
135
|
-
let
|
|
136
|
-
for (let
|
|
135
|
+
let e = t.elements, n = Array(e.length);
|
|
136
|
+
for (let t = 0; t < e.length; t++) n[t] = this.evalExpression(e[t]);
|
|
137
137
|
return n;
|
|
138
138
|
}
|
|
139
139
|
case "object": {
|
|
140
|
-
let
|
|
141
|
-
for (let n of
|
|
142
|
-
let
|
|
143
|
-
|
|
140
|
+
let e = {};
|
|
141
|
+
for (let n of t.entries) {
|
|
142
|
+
let t = this.evalExpression(n.key), r = typeof t == "string" ? t : typeof t == "number" || typeof t == "boolean" ? String(t) : "";
|
|
143
|
+
e[r] = this.evalExpression(n.value);
|
|
144
144
|
}
|
|
145
|
-
return
|
|
145
|
+
return e;
|
|
146
146
|
}
|
|
147
|
-
case "range": return this.evalRange(
|
|
148
|
-
case "path": return this.resolvePath(
|
|
149
|
-
case "index": return this.resolveIndex(
|
|
150
|
-
case "function": return this.evalFunction(
|
|
151
|
-
case "filter": return this.applyFilters(this.evalExpression(
|
|
147
|
+
case "range": return this.evalRange(t.start, t.end);
|
|
148
|
+
case "path": return this.resolvePath(t.segments);
|
|
149
|
+
case "index": return this.resolveIndex(t.object, t.index);
|
|
150
|
+
case "function": return this.evalFunction(t.name, t.args);
|
|
151
|
+
case "filter": return this.applyFilters(this.evalExpression(t.subject), t.filters);
|
|
152
152
|
case "concat": {
|
|
153
|
-
let
|
|
154
|
-
for (let
|
|
155
|
-
let n = this.evalExpression(t
|
|
153
|
+
let e = t.parts, n = e.length, r = "";
|
|
154
|
+
for (let t = 0; t < n; t++) {
|
|
155
|
+
let n = this.evalExpression(e[t]);
|
|
156
156
|
r += n == null ? "" : String(n);
|
|
157
157
|
}
|
|
158
158
|
return r;
|
|
159
159
|
}
|
|
160
|
-
case "unary": return
|
|
161
|
-
case "binary": return this.evalBinary(
|
|
162
|
-
case "default": return this.evalExpression(
|
|
160
|
+
case "unary": return t.operator === "-" ? -Number(this.evalExpression(t.operand)) : !e(this.evalExpression(t.operand));
|
|
161
|
+
case "binary": return this.evalBinary(t.operator, t.left, t.right);
|
|
162
|
+
case "default": return this.evalExpression(t.value) ?? this.evalExpression(t.defaultExpr);
|
|
163
163
|
case "ternary": {
|
|
164
|
-
let n = this.evalExpression(
|
|
165
|
-
return
|
|
164
|
+
let n = this.evalExpression(t.condition);
|
|
165
|
+
return e(n) ? t.trueExpr ? this.evalExpression(t.trueExpr) : n : this.evalExpression(t.falseExpr);
|
|
166
166
|
}
|
|
167
|
-
case "arrow": return this.createArrowFunction(
|
|
167
|
+
case "arrow": return this.createArrowFunction(t.params, t.body);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
createArrowFunction(e, t) {
|
|
@@ -227,46 +227,45 @@ var u = {
|
|
|
227
227
|
for (let e = 0; e < i; e++) a[e] = t + e * r;
|
|
228
228
|
return a;
|
|
229
229
|
}
|
|
230
|
-
evalBinary(
|
|
231
|
-
let
|
|
232
|
-
if ((
|
|
233
|
-
let e = u[
|
|
230
|
+
evalBinary(n, r, a) {
|
|
231
|
+
let o = m(a);
|
|
232
|
+
if ((n === "is" || n === "is not") && o !== void 0) {
|
|
233
|
+
let e = u[o];
|
|
234
234
|
if (e) {
|
|
235
|
-
let t = e(this.evalExpression(
|
|
236
|
-
return
|
|
235
|
+
let t = e(this.evalExpression(r));
|
|
236
|
+
return n === "is" ? t : !t;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
if (
|
|
240
|
-
if (
|
|
241
|
-
let
|
|
242
|
-
switch (
|
|
243
|
-
case "+": return d ?
|
|
244
|
-
case "-": return d ?
|
|
245
|
-
case "*": return d ?
|
|
246
|
-
case "/": return d ?
|
|
247
|
-
case "//": return Math.floor(Number(
|
|
248
|
-
case "**": return Number(
|
|
249
|
-
case "starts with": return typeof
|
|
250
|
-
case "ends with": return typeof
|
|
251
|
-
case "%": return d ?
|
|
252
|
-
case "==": return
|
|
253
|
-
case "!=": return
|
|
254
|
-
case ">": return d ?
|
|
255
|
-
case "<": return d ?
|
|
256
|
-
case ">=": return d ?
|
|
257
|
-
case "<=": return d ?
|
|
258
|
-
case "in": return
|
|
259
|
-
case "not in": return !
|
|
260
|
-
case "same as": return
|
|
239
|
+
if (n === "or") return e(this.evalExpression(r)) || e(this.evalExpression(a));
|
|
240
|
+
if (n === "and") return e(this.evalExpression(r)) && e(this.evalExpression(a));
|
|
241
|
+
let s = this.evalExpression(r), c = this.evalExpression(a), d = typeof s == "number" && typeof c == "number";
|
|
242
|
+
switch (n) {
|
|
243
|
+
case "+": return d ? s + c : Number(s) + Number(c);
|
|
244
|
+
case "-": return d ? s - c : Number(s) - Number(c);
|
|
245
|
+
case "*": return d ? s * c : Number(s) * Number(c);
|
|
246
|
+
case "/": return d ? s / c : Number(s) / Number(c);
|
|
247
|
+
case "//": return Math.floor(Number(s) / Number(c));
|
|
248
|
+
case "**": return Number(s) ** Number(c);
|
|
249
|
+
case "starts with": return typeof s == "string" && s.startsWith(l(c));
|
|
250
|
+
case "ends with": return typeof s == "string" && s.endsWith(l(c));
|
|
251
|
+
case "%": return d ? s % c : Number(s) % Number(c);
|
|
252
|
+
case "==": return s === c || String(s) === String(c);
|
|
253
|
+
case "!=": return s !== c && String(s) !== String(c);
|
|
254
|
+
case ">": return d ? s > c : t(s, c) > 0;
|
|
255
|
+
case "<": return d ? s < c : t(s, c) < 0;
|
|
256
|
+
case ">=": return d ? s >= c : t(s, c) >= 0;
|
|
257
|
+
case "<=": return d ? s <= c : t(s, c) <= 0;
|
|
258
|
+
case "in": return i(s, c);
|
|
259
|
+
case "not in": return !i(s, c);
|
|
260
|
+
case "same as": return s === c;
|
|
261
261
|
case "divisible by": {
|
|
262
|
-
let e = Number(
|
|
263
|
-
return e !== 0 && Number.isFinite(e) && Number(
|
|
262
|
+
let e = Number(c);
|
|
263
|
+
return e !== 0 && Number.isFinite(e) && Number(s) % e === 0;
|
|
264
264
|
}
|
|
265
|
-
case "is": return
|
|
266
|
-
case "is not": return
|
|
265
|
+
case "is": return s === c;
|
|
266
|
+
case "is not": return s !== c;
|
|
267
267
|
default: return !1;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
};
|
|
271
|
-
//#endregion
|
|
272
271
|
export { g as evaluate, _ as evaluateExpression };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { serializeValue as e } from "../processTwig/helpers.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/twigWrapper/Evaluator/helpers.ts
|
|
3
3
|
var t = (e) => !(e == null || e === !1 || e === "" || e === 0 || Array.isArray(e) && e.length === 0), n = (e, t) => typeof t == "string" ? t.includes(String(e)) : Array.isArray(t) ? t.includes(e) : typeof t == "object" && t ? String(e) in t : !1, r = (e) => Array.isArray(e) ? e : typeof e == "object" && e ? Object.values(e) : null, i = (e) => typeof e == "object" && e && !Array.isArray(e) ? Object.entries(e) : null, a = (e) => typeof e == "number" || typeof e == "string" && e.trim() !== "" && Number.isFinite(Number(e)), o = (t, n) => {
|
|
4
4
|
if (t == null || n == null) return NaN;
|
|
5
5
|
if (a(t) && a(n)) return Number(t) - Number(n);
|
|
@@ -9,5 +9,4 @@ var t = (e) => !(e == null || e === !1 || e === "" || e === 0 || Array.isArray(e
|
|
|
9
9
|
}
|
|
10
10
|
return Number(t) - Number(n);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { t as isTruthy, o as order, r as resolveCollection, i as resolveObjectEntries, n as valueIn };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/Lexer/Lexer.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t = [], n = 0;
|
|
4
4
|
for (; n < e.length;) {
|
|
@@ -49,5 +49,4 @@ var e = (e) => {
|
|
|
49
49
|
error: null
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { e as lex };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/Lexer/types.ts
|
|
2
2
|
var e = (e, t) => t ? `{{{${e}}}}` : `{{${e}}}`, t = (t) => {
|
|
3
3
|
switch (t.type) {
|
|
4
4
|
case "text": return t.value;
|
|
@@ -6,5 +6,4 @@ var e = (e, t) => t ? `{{{${e}}}}` : `{{${e}}}`, t = (t) => {
|
|
|
6
6
|
case "tag": return `{%${t.content}%}`;
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { e as reconstructSource, t as reconstructToken };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Char as e, isDigit as t, isIdentPart as n, isIdentStart as r, isPathPart as i, isSpace as a } from "../charClass.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/twigWrapper/Parser/Cursor.ts
|
|
3
3
|
var o = class {
|
|
4
4
|
src;
|
|
5
5
|
pos = 0;
|
|
@@ -64,5 +64,4 @@ var o = class {
|
|
|
64
64
|
return t === e.Greater ? (this.pos++, ">") : t === e.Less ? (this.pos++, "<") : null;
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
//#endregion
|
|
68
67
|
export { o as Cursor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Char as e, isDigit as t } from "../charClass.mjs";
|
|
2
2
|
import { Cursor as n } from "./Cursor.mjs";
|
|
3
|
-
|
|
3
|
+
// src/helpers/twigWrapper/Parser/ExpressionParser.ts
|
|
4
4
|
var r = (e, t) => {
|
|
5
5
|
let n = new s(e, t), r = n.parseTernary();
|
|
6
6
|
return n.expectEnd(), r;
|
|
@@ -439,5 +439,4 @@ var r = (e, t) => {
|
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
|
-
//#endregion
|
|
443
442
|
export { i as parseApplyFilters, r as parseExpression };
|
|
@@ -2,7 +2,7 @@ import { isSimpleIdentifier as e, isVariableName as t } from "../charClass.mjs";
|
|
|
2
2
|
import { reconstructSource as n, reconstructToken as r } from "../Lexer/types.mjs";
|
|
3
3
|
import { parseApplyFilters as i, parseExpression as a } from "./ExpressionParser.mjs";
|
|
4
4
|
import { extractFirstWord as o, splitRange as s } from "./helpers.mjs";
|
|
5
|
-
|
|
5
|
+
// src/helpers/twigWrapper/Parser/Parser.ts
|
|
6
6
|
var c = (e, t = !1, n) => {
|
|
7
7
|
let r = new f(e, t, n), i = r.parseBody();
|
|
8
8
|
if (!r.error) {
|
|
@@ -236,5 +236,4 @@ var c = (e, t = !1, n) => {
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
};
|
|
239
|
-
//#endregion
|
|
240
239
|
export { c as parse };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Char as e, isSpace as t } from "../charClass.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/twigWrapper/Parser/helpers.ts
|
|
3
3
|
var n = (e) => {
|
|
4
4
|
let n = 0;
|
|
5
5
|
for (; n < e.length && !t(e.charCodeAt(n));) n++;
|
|
@@ -14,5 +14,4 @@ var n = (e) => {
|
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { n as extractFirstWord, r as splitRange };
|