@plitzi/sdk-shared 0.39.1 → 0.39.3
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 +11 -0
- package/dist/_virtual/_rolldown/runtime.mjs +1 -2
- package/dist/actions/access.mjs +1 -2
- package/dist/actions/cron.mjs +1 -2
- package/dist/actions/failureHandler.mjs +1 -2
- package/dist/actions/flowDelay.d.ts +6 -0
- package/dist/actions/flowDelay.mjs +3 -0
- package/dist/actions/functions.d.ts +6 -3
- package/dist/actions/functions.mjs +12 -8
- package/dist/actions/index.d.ts +2 -1
- package/dist/actions/index.mjs +10 -9
- package/dist/actions/jobs.mjs +1 -2
- package/dist/actions/smtp.mjs +1 -2
- package/dist/actions/triggerParams.mjs +1 -2
- package/dist/actions/triggers.mjs +1 -2
- package/dist/actions/validateDocument.mjs +133 -123
- package/dist/activity/describe.mjs +1 -2
- package/dist/activity/guard.mjs +1 -2
- package/dist/activity/types.mjs +1 -2
- package/dist/auth/failureChannel.mjs +1 -2
- package/dist/auth/visitorRoles.mjs +1 -2
- package/dist/authoring/builder.mjs +1 -2
- package/dist/authoring/declare.mjs +1 -2
- package/dist/authoring/elementCallbacks.mjs +1 -2
- package/dist/authoring/index.mjs +3 -3
- package/dist/authoring/paramSpec.mjs +1 -2
- package/dist/authoring/spaceCallbacks.mjs +1 -2
- package/dist/builder/contexts/BuilderContext.mjs +1 -2
- package/dist/builder/contexts/index.mjs +1 -2
- package/dist/conditions/dates.d.ts +2 -0
- package/dist/conditions/dates.mjs +12 -0
- package/dist/conditions/evaluateRuleGroup.d.ts +13 -0
- package/dist/conditions/evaluateRuleGroup.mjs +4 -0
- package/dist/conditions/evaluator.d.ts +39 -0
- package/dist/conditions/evaluator.mjs +75 -0
- package/dist/conditions/index.d.ts +10 -0
- package/dist/conditions/index.mjs +5 -0
- package/dist/conditions/rules.d.ts +3 -0
- package/dist/conditions/rules.mjs +3 -0
- package/dist/conditions/types.d.ts +44 -0
- package/dist/connectors/constants.mjs +1 -2
- package/dist/connectors/manifestTokens.mjs +1 -2
- package/dist/connectors/presets.mjs +1 -2
- package/dist/connectors/validateManifest.mjs +56 -57
- package/dist/dataSource/computed.mjs +16 -17
- package/dist/dataSource/getBindingsDetails.d.ts +5 -6
- package/dist/dataSource/getBindingsDetails.mjs +65 -40
- package/dist/dataSource/globalSources.d.ts +1 -1
- package/dist/dataSource/globalSources.mjs +1 -2
- package/dist/dataSource/helpers/getSourceName.mjs +1 -2
- package/dist/dataSource/index.mjs +5 -5
- package/dist/dataSource/utility/arrayMap.mjs +2 -2
- package/dist/dataSource/utility/capitalize.mjs +1 -2
- package/dist/dataSource/utility/checkboxParams.mjs +1 -2
- package/dist/dataSource/utility/dateConverter.mjs +0 -1
- package/dist/dataSource/utility/index.mjs +15 -16
- package/dist/dataSource/utility/not.mjs +1 -2
- package/dist/dataSource/utility/staticValue.mjs +0 -1
- package/dist/dataSource/utility/stringToArray.mjs +0 -1
- package/dist/dataSource/utility/styleSelector.mjs +1 -2
- package/dist/dataSource/utility/styleVariant.mjs +2 -3
- package/dist/dataSource/utility/truthiness.mjs +1 -2
- package/dist/dataSource/utility/twigTemplate.mjs +0 -1
- package/dist/dataSource/variables/resolveVariables.mjs +2 -3
- package/dist/dates/formatDate.mjs +29 -30
- package/dist/dates/isDate.mjs +1 -2
- package/dist/devTools/chrome.mjs +1 -2
- package/dist/devTools/debugCookie.mjs +1 -2
- package/dist/devTools/index.mjs +5 -5
- package/dist/devTools/interactionLog.mjs +1 -2
- package/dist/devTools/react/DevToolsContext.mjs +1 -2
- package/dist/devTools/sight/sight.mjs +1 -2
- package/dist/devTools/utils/PlitziConsole.mjs +1 -2
- package/dist/elements/ComponentContext.mjs +1 -2
- package/dist/flags/flagsCookie.mjs +5 -6
- package/dist/flags/index.d.ts +1 -0
- package/dist/flags/index.mjs +4 -3
- package/dist/flags/overrides.d.ts +36 -0
- package/dist/flags/overrides.mjs +13 -0
- package/dist/flags/react/useFlagResolution.mjs +5 -6
- package/dist/flags/resolveFlags.d.ts +1 -1
- package/dist/flags/resolveFlags.mjs +2 -3
- package/dist/flags/schemaFlag.mjs +1 -2
- package/dist/functions/contract.d.ts +326 -0
- package/dist/functions/contract.mjs +3 -0
- package/dist/functions/index.d.ts +15 -0
- package/dist/functions/index.mjs +9 -0
- package/dist/functions/kv.d.ts +80 -0
- package/dist/functions/kvChange.d.ts +67 -0
- package/dist/functions/kvChange.mjs +24 -0
- package/dist/functions/later.d.ts +18 -0
- package/dist/functions/messages.d.ts +4 -0
- package/dist/functions/messages.mjs +205 -0
- package/dist/functions/protocol.d.ts +416 -0
- package/dist/functions/protocol.mjs +37 -0
- package/dist/functions/rateLimit.d.ts +17 -0
- package/dist/functions/rateLimit.mjs +0 -0
- package/dist/functions/refusal.d.ts +26 -0
- package/dist/functions/refusal.mjs +11 -0
- package/dist/functions/runtime.d.ts +44 -0
- package/dist/functions/runtime.mjs +13 -0
- package/dist/functions/sizes.d.ts +27 -0
- package/dist/functions/sizes.mjs +7 -0
- package/dist/functions/wire.d.ts +11 -0
- package/dist/functions/wire.mjs +39 -0
- package/dist/helpers/canonicalJson.mjs +1 -2
- package/dist/helpers/clipboard.mjs +1 -2
- package/dist/helpers/cookies.mjs +1 -2
- package/dist/helpers/deepEqual/deepEqual.d.ts +5 -0
- package/dist/helpers/deepEqual/deepEqual.mjs +44 -0
- package/dist/helpers/deepEqual/index.d.ts +1 -0
- package/dist/helpers/deepEqual/index.mjs +1 -0
- package/dist/helpers/eventTarget.mjs +1 -2
- package/dist/helpers/fetchManifest.mjs +1 -2
- package/dist/helpers/images.mjs +1 -2
- package/dist/helpers/index.d.ts +4 -6
- package/dist/helpers/index.mjs +24 -20
- package/dist/helpers/interval.mjs +1 -2
- package/dist/helpers/isRecord.mjs +1 -2
- package/dist/helpers/keys.mjs +1 -2
- package/dist/helpers/lodash/camelCase.d.ts +1 -0
- package/dist/helpers/lodash/camelCase.mjs +7 -0
- package/dist/helpers/lodash/capitalize.d.ts +1 -0
- package/dist/helpers/lodash/capitalize.mjs +5 -0
- package/dist/helpers/lodash/cloneDeep.d.ts +8 -0
- package/dist/helpers/lodash/cloneDeep.mjs +53 -0
- package/dist/helpers/lodash/get.d.ts +11 -0
- package/dist/helpers/lodash/get.mjs +14 -0
- package/dist/helpers/lodash/has.d.ts +2 -0
- package/dist/helpers/lodash/has.mjs +12 -0
- package/dist/helpers/lodash/index.d.ts +11 -0
- package/dist/helpers/lodash/index.mjs +7 -0
- package/dist/helpers/lodash/omit.d.ts +4 -0
- package/dist/helpers/lodash/omit.mjs +35 -0
- package/dist/helpers/lodash/set.d.ts +2 -0
- package/dist/helpers/lodash/set.mjs +20 -0
- package/dist/helpers/lodash/shared.d.ts +2 -0
- package/dist/helpers/lodash/shared.mjs +37 -0
- package/dist/helpers/reducerOrigin.mjs +1 -2
- package/dist/helpers/replaceEqualDeep/index.d.ts +1 -0
- package/dist/helpers/replaceEqualDeep/index.mjs +1 -0
- package/dist/helpers/replaceEqualDeep/replaceEqualDeep.d.ts +12 -0
- package/dist/helpers/replaceEqualDeep/replaceEqualDeep.mjs +30 -0
- package/dist/helpers/resources.d.ts +21 -0
- package/dist/helpers/resources.mjs +40 -0
- package/dist/helpers/scroll.mjs +1 -2
- package/dist/helpers/security.d.ts +15 -0
- package/dist/helpers/security.mjs +8 -4
- package/dist/helpers/spaceRoot.mjs +1 -2
- package/dist/helpers/syntaxHighlight.mjs +1 -2
- package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +75 -76
- package/dist/helpers/twigWrapper/Evaluator/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/Lexer/Lexer.mjs +1 -2
- package/dist/helpers/twigWrapper/Lexer/types.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/Cursor.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/ExpressionParser.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/Parser.mjs +1 -2
- package/dist/helpers/twigWrapper/Parser/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +1 -2
- package/dist/helpers/twigWrapper/charClass.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/arrays.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/catalog/index.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/dateParts.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/dates.mjs +13 -14
- package/dist/helpers/twigWrapper/filters/filters.mjs +21 -22
- package/dist/helpers/twigWrapper/filters/hashing.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/misc.mjs +27 -28
- package/dist/helpers/twigWrapper/filters/numbers.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/objects.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/raw.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/strings.mjs +23 -24
- package/dist/helpers/twigWrapper/filters/types.mjs +1 -2
- package/dist/helpers/twigWrapper/filters/values.mjs +1 -2
- package/dist/helpers/twigWrapper/index.mjs +8 -8
- package/dist/helpers/twigWrapper/inspectTemplate.mjs +12 -13
- package/dist/helpers/twigWrapper/processTwig/helpers.mjs +1 -2
- package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +1 -2
- package/dist/helpers/twigWrapper/processTwig/resolveStepParam.mjs +1 -2
- package/dist/helpers/twigWrapper/templateRoots.d.ts +3 -9
- package/dist/helpers/twigWrapper/templateRoots.mjs +14 -9
- package/dist/helpers/twigWrapper/tokens/hasTemplateSyntax.mjs +1 -2
- package/dist/helpers/twigWrapper/tokens/hasValidToken.mjs +1 -2
- package/dist/helpers/twigWrapper/tokens/tokenPatterns.mjs +1 -2
- package/dist/helpers/utils.mjs +2 -3
- package/dist/history/describe.mjs +1 -2
- package/dist/history/diff.mjs +1 -2
- package/dist/hooks/index.mjs +5 -5
- package/dist/hooks/useFontHead.mjs +1 -2
- package/dist/hooks/useNetwork.mjs +1 -2
- package/dist/hooks/usePlitzi.d.ts +7 -6
- package/dist/hooks/usePlitzi.mjs +1 -2
- package/dist/hooks/useStableValue.mjs +5 -6
- package/dist/navigation/index.mjs +3 -3
- package/dist/navigation/matchPath.mjs +19 -11
- package/dist/navigation/routes.mjs +57 -38
- package/dist/navigation/sitemap.mjs +9 -10
- package/dist/network/entitlements.d.ts +21 -0
- package/dist/network/entitlements.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddPluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceCloneElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceDeployMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceMoveElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpacePublishMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemoveElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRemovePluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRenameElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceRunE2eTestsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceSetTestsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateElementsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdatePluginMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSchemaMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceUpdateSettingsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceAddActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRemoveActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceRunActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/actions/SpaceUpdateActionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceAddCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceRemoveCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceSetCdnCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnBucketMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/cdns/SpaceUpdateCdnMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceAddConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceRemoveConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/connectors/SpaceUpdateConnectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceAddCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceRemoveCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/credentials/SpaceUpdateCredentialMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceAddPageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceRemovePageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/folders/SpaceUpdatePageFolderMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceInstallTemplateFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceRemoveFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceSaveFunctionsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/functions/SpaceTryFunctionMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/jobs/SpaceControlJobMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceAddPageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceHomePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceRemovePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/pages/SpaceUpdatePageMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceAddResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceMoveResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/resources/SpaceRemoveResourceMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeSizeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceSetRuntimeVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStartRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/runtime/SpaceStopRuntimeMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceAddVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceRemoveVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/variables/SpaceUpdateVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceAddVisitorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Space/visitors/SpaceRemoveVisitorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/StyleUpdateSettingsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleAddFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleRemoveFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/fonts/StyleUpdateFontMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleAddSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleRemoveSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectorVariables/StyleUpdateSelectorVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleAddSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleRemoveSelectorsMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/selectors/StyleUpdateSelectorMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleAddVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleRemoveVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/Style/variables/StyleUpdateVariableMutation.mjs +1 -2
- package/dist/network/graphql/builder/Mutations/index.mjs +155 -156
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionEventsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceActionsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCdnsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceChangesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCheckActionQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceConnectorsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceCredentialsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceDeploymentsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceFunctionsQuery.mjs +2 -3
- package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceJobsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceLatestRevisionQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceQuotaQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceResourcesQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceRuntimeQuery.mjs +2 -3
- package/dist/network/graphql/builder/Queries/Space/SpaceTestsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceVisitorsQuery.mjs +1 -2
- package/dist/network/graphql/builder/Queries/index.mjs +37 -38
- package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.mjs +1 -2
- package/dist/network/graphql/builder/Subscriptions/index.mjs +1 -2
- package/dist/network/graphql/builder/fragments/cdnFields.mjs +1 -2
- package/dist/network/graphql/index.d.ts +0 -1
- package/dist/network/graphql/index.mjs +1 -3
- package/dist/network/index.d.ts +1 -5
- package/dist/network/index.mjs +7 -11
- package/dist/network/{NetworkContext.d.ts → react/NetworkContext.d.ts} +12 -11
- package/dist/network/{NetworkContext.mjs → react/NetworkContext.mjs} +1 -2
- package/dist/network/{NetworkInternalContext.d.ts → react/NetworkInternalContext.d.ts} +1 -1
- package/dist/network/react/NetworkInternalContext.mjs +4 -0
- package/dist/network/react/index.d.ts +5 -0
- package/dist/network/react/index.mjs +3 -0
- package/dist/network/spaceEvents.mjs +16 -17
- package/dist/plugins/bundle/bundle.mjs +1 -2
- package/dist/plugins/declaration.mjs +1 -2
- package/dist/plugins/react/ElementRegistryContext.d.ts +26 -0
- package/dist/plugins/react/ElementRegistryContext.mjs +17 -0
- package/dist/plugins/react/PluginAssetsContext.d.ts +11 -0
- package/dist/plugins/react/PluginAssetsContext.mjs +4 -0
- package/dist/plugins/react/PluginsContext.mjs +6 -3
- package/dist/plugins/react/index.d.ts +3 -0
- package/dist/plugins/react/index.mjs +4 -1
- package/dist/project/index.mjs +7 -7
- package/dist/project/layout/check.mjs +26 -27
- package/dist/project/layout/codes.mjs +1 -2
- package/dist/project/layout/contents.mjs +12 -13
- package/dist/project/layout/files.mjs +1 -2
- package/dist/project/layout/folders.mjs +43 -44
- package/dist/project/layout/index.mjs +3 -3
- package/dist/project/layout/plugins.mjs +56 -57
- package/dist/project/layout/vendor.mjs +14 -15
- package/dist/project/network.mjs +1 -2
- package/dist/project/pages/index.mjs +1 -2
- package/dist/project/paths/index.d.ts +8 -2
- package/dist/project/paths/index.mjs +3 -4
- package/dist/project/root.mjs +1 -2
- package/dist/queries/index.mjs +1 -2
- package/dist/queries/queryCache.mjs +1 -2
- package/dist/queries/serverQueries.mjs +1 -2
- package/dist/queries/useQuery.mjs +1 -2
- package/dist/queries/useServerQuery.mjs +1 -2
- package/dist/{helpers → react}/enclosingSpace.mjs +1 -2
- package/dist/react/generateFacade.d.ts +1 -0
- package/dist/{helpers → react}/generateFacade.mjs +4 -5
- package/dist/react/index.d.ts +8 -0
- package/dist/react/index.mjs +4 -0
- package/dist/{helpers → react}/sharedContext.mjs +0 -1
- package/dist/realtime/client.mjs +3 -4
- package/dist/realtime/index.mjs +4 -4
- package/dist/realtime/presence.mjs +1 -2
- package/dist/realtime/topics.mjs +1 -2
- package/dist/runs/index.mjs +1 -2
- package/dist/runs/report.mjs +1 -2
- package/dist/schema/anchor.mjs +1 -2
- package/dist/schema/index.mjs +18 -18
- package/dist/schema/layoutChain.mjs +1 -2
- package/dist/schema/markdownHeadings.mjs +1 -2
- package/dist/schema/motion.mjs +1 -2
- package/dist/schema/motionReveal.mjs +1 -2
- package/dist/schema/pageAccess.d.ts +9 -0
- package/dist/schema/pageAccess.mjs +42 -36
- package/dist/schema/pageElements.d.ts +3 -1
- package/dist/schema/pageElements.mjs +9 -3
- package/dist/schema/pageHead.d.ts +5 -2
- package/dist/schema/pageHead.mjs +3 -4
- package/dist/schema/providerAnswer.mjs +1 -2
- package/dist/schema/providerWhen.d.ts +1 -1
- package/dist/schema/providerWhen.mjs +6 -7
- package/dist/schema/react/SchemaContext.mjs +1 -2
- package/dist/schema/schemaConstants.mjs +1 -2
- package/dist/schema/schemaSettings.mjs +1 -2
- package/dist/schema/serverElements.d.ts +0 -24
- package/dist/schema/serverElements.mjs +60 -39
- package/dist/schema/serverInput.mjs +23 -24
- package/dist/schema/serverQuery.d.ts +15 -5
- package/dist/schema/serverQuery.mjs +47 -35
- package/dist/schema/snippet.mjs +1 -2
- package/dist/schema/wire.mjs +1 -2
- package/dist/security/index.d.ts +49 -0
- package/dist/security/index.mjs +44 -0
- package/dist/server/actions/useActionsSync.mjs +1 -2
- package/dist/server/actions/useImagesSync.mjs +1 -2
- package/dist/server/actions/useRealtimeSync.mjs +1 -2
- package/dist/server/index.mjs +7 -7
- package/dist/server/rsc/refreshRsc.mjs +23 -24
- package/dist/server/rsc/useRscRefresh.mjs +1 -2
- package/dist/server/rsc/useRscSync.mjs +1 -2
- package/dist/server/usePluginRoute.mjs +1 -2
- package/dist/source/export.d.ts +1 -1
- package/dist/source/export.mjs +1 -2
- package/dist/source/import.mjs +1 -2
- package/dist/source/index.mjs +4 -4
- package/dist/source/snapshot.mjs +1 -2
- package/dist/state/index.d.ts +0 -1
- package/dist/state/index.mjs +1 -3
- package/dist/state/paintedState.mjs +10 -11
- package/dist/store/actionRuns/actionRunsRecorder.mjs +1 -2
- package/dist/store/actionRuns/actionRunsStore.mjs +1 -2
- package/dist/store/actionRuns/index.mjs +3 -3
- package/dist/store/actionRuns/useActionRuns.mjs +5 -6
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.mjs +2 -1
- package/dist/store/renderSettings.d.ts +1 -1
- package/dist/store/renderSettings.mjs +1 -2
- package/dist/{state → store}/runtimeStatePersist.mjs +29 -30
- package/dist/store/storeHooks.d.ts +45 -45
- package/dist/store/storeHooks.mjs +1 -2
- package/dist/store/tracing/index.mjs +5 -5
- package/dist/store/tracing/preview.mjs +1 -2
- package/dist/store/tracing/tracingCollector.d.ts +2 -2
- package/dist/store/tracing/tracingCollector.mjs +79 -78
- package/dist/store/tracing/tracingMiddleware.mjs +1 -2
- package/dist/store/tracing/tracingStore.mjs +1 -2
- package/dist/store/tracing/useTracing.mjs +6 -7
- package/dist/style/breakpoints.mjs +1 -2
- package/dist/style/cssLayers.mjs +1 -2
- package/dist/style/displayModes.mjs +1 -2
- package/dist/style/fontAssets.mjs +1 -2
- package/dist/style/fontValidation.mjs +14 -15
- package/dist/style/fonts.d.ts +5 -3
- package/dist/style/fonts.mjs +23 -24
- package/dist/style/fontsFromCss.mjs +1 -2
- package/dist/style/index.mjs +18 -18
- package/dist/style/keyframes.mjs +1 -2
- package/dist/style/layoutGrid.mjs +1 -2
- package/dist/style/notifications.mjs +1 -2
- package/dist/style/react/useDisplayMode.mjs +1 -2
- package/dist/style/react/useElementSize.mjs +1 -2
- package/dist/style/runtimeStyle.d.ts +19 -21
- package/dist/style/runtimeStyle.mjs +4 -7
- package/dist/style/snippetStyle.mjs +5 -6
- package/dist/style/styleConditions.mjs +1 -2
- package/dist/style/styleConstants.mjs +1 -2
- package/dist/style/stylePseudos.mjs +1 -2
- package/dist/style/styleStates.mjs +1 -2
- package/dist/style/styleTarget.mjs +24 -25
- package/dist/theme/cookie/index.mjs +1 -1
- package/dist/theme/cookie/themeCookie.d.ts +21 -1
- package/dist/theme/cookie/themeCookie.mjs +19 -4
- package/dist/theme/index.d.ts +1 -9
- package/dist/theme/index.mjs +1 -6
- package/dist/theme/{ThemeProvider.d.ts → react/ThemeProvider.d.ts} +8 -2
- package/dist/theme/react/ThemeProvider.mjs +78 -0
- package/dist/theme/{ThemeScope.d.ts → react/ThemeScope.d.ts} +6 -2
- package/dist/theme/react/ThemeScope.mjs +9 -0
- package/dist/theme/react/index.d.ts +9 -0
- package/dist/theme/react/index.mjs +5 -0
- package/dist/theme/{themeStore.d.ts → react/themeStore.d.ts} +5 -5
- package/dist/theme/{themeStore.mjs → react/themeStore.mjs} +4 -4
- package/dist/theme/{useTheme.d.ts → react/useTheme.d.ts} +1 -1
- package/dist/theme/react/useTheme.mjs +19 -0
- package/dist/types/ActionTypes.d.ts +33 -0
- package/dist/types/AuthTypes.d.ts +6 -0
- package/dist/types/CommonTypes.d.ts +14 -3
- package/dist/types/DataSourceTypes.d.ts +1 -1
- package/dist/types/FunctionTypes.d.ts +16 -6
- package/dist/types/InteractionTypes.d.ts +1 -1
- package/dist/types/JobTypes.d.ts +56 -182
- package/dist/types/PluginTypes.d.ts +8 -1
- package/dist/types/SchemaTypes.d.ts +1 -1
- package/dist/types/SchemaTypes.mjs +1 -2
- package/dist/types/ServerAdapterTypes.d.ts +0 -326
- package/dist/types/ServerTypes.d.ts +0 -311
- package/dist/types/SpaceTypes.d.ts +5 -2
- package/dist/types/StoreTypes.d.ts +9 -3
- package/dist/types/StyleTypes.d.ts +6 -0
- package/dist/types/StyleTypes.mjs +1 -2
- package/dist/types/index.d.ts +0 -3
- package/dist/websockets/RTCodec.mjs +1 -2
- package/eslint.config.mjs +25 -0
- package/package.json +29 -18
- package/vite.config.ts +58 -0
- package/dist/helpers/generateFacade.d.ts +0 -2
- package/dist/helpers/ruleEvaluator.d.ts +0 -16
- package/dist/helpers/ruleEvaluator.mjs +0 -5
- package/dist/network/NetworkInternalContext.mjs +0 -5
- package/dist/network/graphql/sdk/Mutations/index.d.ts +0 -3
- package/dist/network/graphql/sdk/Mutations/index.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +0 -16
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/index.d.ts +0 -6
- package/dist/network/graphql/sdk/Queries/index.mjs +0 -5
- package/dist/network/graphql/sdk/index.d.ts +0 -5
- package/dist/network/graphql/sdk/index.mjs +0 -3
- package/dist/theme/ThemeProvider.mjs +0 -69
- package/dist/theme/ThemeScope.mjs +0 -10
- package/dist/theme/useTheme.mjs +0 -20
- package/dist/types/OAuthTypes.d.ts +0 -246
- package/dist/types/ServerConfigTypes.d.ts +0 -527
- package/dist/types/ServerLogTypes.d.ts +0 -119
- /package/dist/{types/OAuthTypes.mjs → conditions/types.mjs} +0 -0
- /package/dist/{types/ServerConfigTypes.mjs → functions/kv.mjs} +0 -0
- /package/dist/{types/ServerLogTypes.mjs → functions/later.mjs} +0 -0
- /package/dist/{helpers → react}/enclosingSpace.d.ts +0 -0
- /package/dist/{helpers → react}/sharedContext.d.ts +0 -0
- /package/dist/{state → store}/runtimeStatePersist.d.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isDottedPath as e } from "../charClass.mjs";
|
|
2
2
|
import { lex as t } from "../Lexer/Lexer.mjs";
|
|
3
3
|
import { parse as n } from "../Parser/Parser.mjs";
|
|
4
|
-
|
|
4
|
+
// src/helpers/twigWrapper/TemplateCache/TemplateCache.ts
|
|
5
5
|
var r = /* @__PURE__ */ new Map(), i = 1024, a = {
|
|
6
6
|
hits: 0,
|
|
7
7
|
misses: 0
|
|
@@ -60,5 +60,4 @@ var r = /* @__PURE__ */ new Map(), i = 1024, a = {
|
|
|
60
60
|
let n = u(e);
|
|
61
61
|
return n ? (l(), r.set(e, n), n) : null;
|
|
62
62
|
}, f = (e, t) => t ? e.nodesWithSource : e.nodes;
|
|
63
|
-
//#endregion
|
|
64
63
|
export { o as getCacheStats, f as getNodes, s as resetCacheStats, d as resolveTokens };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/charClass.ts
|
|
2
2
|
var e = {
|
|
3
3
|
Tab: 9,
|
|
4
4
|
Newline: 10,
|
|
@@ -55,5 +55,4 @@ var e = {
|
|
|
55
55
|
}
|
|
56
56
|
return !o;
|
|
57
57
|
}, c = (e) => o(e);
|
|
58
|
-
//#endregion
|
|
59
58
|
export { e as Char, i as isDigit, s as isDottedPath, n as isIdentPart, t as isIdentStart, r as isPathPart, o as isSimpleIdentifier, a as isSpace, c as isVariableName };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ARROW_PARAMS as e } from "./types.mjs";
|
|
2
2
|
import { compareValues as t, toStr as n } from "./values.mjs";
|
|
3
|
-
|
|
3
|
+
// src/helpers/twigWrapper/filters/arrays.ts
|
|
4
4
|
var r = {
|
|
5
5
|
sort: (n, r) => {
|
|
6
6
|
if (!Array.isArray(n)) return n;
|
|
@@ -62,5 +62,4 @@ var r = {
|
|
|
62
62
|
return e.map((e) => typeof e == "object" && e ? e[r] : void 0);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
//#endregion
|
|
66
65
|
export { r as arrayTransformFilters };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/filters/catalog/index.ts
|
|
2
2
|
var e = {
|
|
3
3
|
raw: {
|
|
4
4
|
signature: "raw",
|
|
@@ -347,5 +347,4 @@ var e = {
|
|
|
347
347
|
example: "{% for n in range(1, 5) %}{{ n }}{% endfor %}"
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
//#endregion
|
|
351
350
|
export { e as FILTER_DOCS, t as FUNCTION_DOCS };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/filters/dateParts.ts
|
|
2
2
|
var e = [
|
|
3
3
|
"Sun",
|
|
4
4
|
"Mon",
|
|
@@ -52,5 +52,4 @@ var e = [
|
|
|
52
52
|
weekday: e.indexOf(o("weekday"))
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
-
//#endregion
|
|
56
55
|
export { a as dateParts, i as toDate };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { dateParts as e, toDate as t } from "./dateParts.mjs";
|
|
2
|
+
import { numberOf as n, toStr as r } from "./values.mjs";
|
|
3
|
+
// src/helpers/twigWrapper/filters/dates.ts
|
|
4
4
|
var i = {
|
|
5
|
-
date: (
|
|
6
|
-
if (i.length === 0) return
|
|
7
|
-
let a =
|
|
5
|
+
date: (n, i) => {
|
|
6
|
+
if (i.length === 0) return n;
|
|
7
|
+
let a = r(i[0]), o = t(n);
|
|
8
8
|
if (Number.isNaN(o.getTime())) return "";
|
|
9
|
-
let s =
|
|
9
|
+
let s = e(o, i.length > 1 ? r(i[1]) : "");
|
|
10
10
|
if (!s) return "";
|
|
11
11
|
let c = (e) => String(e).padStart(2, "0"), l = [
|
|
12
12
|
"January",
|
|
@@ -69,7 +69,7 @@ var i = {
|
|
|
69
69
|
return p;
|
|
70
70
|
},
|
|
71
71
|
ago: (e, n) => {
|
|
72
|
-
let i =
|
|
72
|
+
let i = t(e);
|
|
73
73
|
if (Number.isNaN(i.getTime())) return "";
|
|
74
74
|
let a = Math.round((i.getTime() - Date.now()) / 1e3), [o, s] = [
|
|
75
75
|
["year", 31536e3],
|
|
@@ -79,19 +79,18 @@ var i = {
|
|
|
79
79
|
["hour", 3600],
|
|
80
80
|
["minute", 60]
|
|
81
81
|
].find(([, e]) => Math.abs(a) >= e) ?? ["second", 1], c = o === "second" ? Math.abs(a) < 10 ? 0 : a : Math.trunc(a / s);
|
|
82
|
-
for (let e of [n.length > 0 ?
|
|
82
|
+
for (let e of [n.length > 0 ? r(n[0]) : "en", "en"]) try {
|
|
83
83
|
return new Intl.RelativeTimeFormat(e, { numeric: "auto" }).format(c, o);
|
|
84
84
|
} catch {
|
|
85
85
|
continue;
|
|
86
86
|
}
|
|
87
87
|
return "";
|
|
88
88
|
},
|
|
89
|
-
duration: (
|
|
90
|
-
let
|
|
91
|
-
if (
|
|
92
|
-
let r = Math.round(
|
|
89
|
+
duration: (e) => {
|
|
90
|
+
let t = n(e);
|
|
91
|
+
if (t === void 0 || t < 0) return "";
|
|
92
|
+
let r = Math.round(t), i = Math.floor(r / 3600), a = Math.floor(r % 3600 / 60), o = String(r % 60).padStart(2, "0");
|
|
93
93
|
return i > 0 ? `${String(i)}:${String(a).padStart(2, "0")}:${o}` : `${String(a)}:${o}`;
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
//#endregion
|
|
97
96
|
export { i as dateFilters };
|
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { RAW_MARKER as
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { arrayTransformFilters as e } from "./arrays.mjs";
|
|
2
|
+
import { dateFilters as t } from "./dates.mjs";
|
|
3
|
+
import { encodingFilters as n, miscFilters as r, randomFilters as i, whitespaceFilters as a } from "./misc.mjs";
|
|
4
|
+
import { numberFilters as o } from "./numbers.mjs";
|
|
5
|
+
import { objectFilters as s, queryFilters as c } from "./objects.mjs";
|
|
6
|
+
import { defaultFilters as l, identityFilters as u, serialisationFilters as d, stringOperationFilters as f, stringQueryFilters as p, stringTransformFilters as m } from "./strings.mjs";
|
|
7
|
+
import { RAW_MARKER as h, isRawMarker as g, unwrapRaw as _, wrapRaw as v } from "./raw.mjs";
|
|
8
|
+
import { ARROW_PARAMS as y } from "./types.mjs";
|
|
9
|
+
// src/helpers/twigWrapper/filters/filters.ts
|
|
10
10
|
var b = {
|
|
11
|
-
...
|
|
12
|
-
...
|
|
11
|
+
...u,
|
|
12
|
+
...d,
|
|
13
|
+
...l,
|
|
13
14
|
...m,
|
|
14
|
-
...
|
|
15
|
-
...
|
|
16
|
-
...v,
|
|
17
|
-
...s,
|
|
18
|
-
...t,
|
|
19
|
-
...i,
|
|
15
|
+
...f,
|
|
16
|
+
...p,
|
|
20
17
|
...o,
|
|
18
|
+
...e,
|
|
19
|
+
...r,
|
|
21
20
|
...a,
|
|
21
|
+
...i,
|
|
22
|
+
...t,
|
|
22
23
|
...n,
|
|
23
|
-
...
|
|
24
|
-
...c
|
|
25
|
-
...l
|
|
24
|
+
...s,
|
|
25
|
+
...c
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
export { e as ARROW_PARAMS, u as RAW_MARKER, b as filters, d as isRawMarker, f as unwrapRaw, p as wrapRaw };
|
|
27
|
+
export { y as ARROW_PARAMS, h as RAW_MARKER, b as filters, g as isRawMarker, _ as unwrapRaw, v as wrapRaw };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/filters/hashing.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t = new TextEncoder().encode(e), n = "";
|
|
4
4
|
for (let e = 0; e < t.length; e++) n += String.fromCharCode(t[e]);
|
|
@@ -97,5 +97,4 @@ var e = (e) => {
|
|
|
97
97
|
};
|
|
98
98
|
return p(c) + p(l) + p(u) + p(d);
|
|
99
99
|
};
|
|
100
|
-
//#endregion
|
|
101
100
|
export { t as base64ToUtf8, n as md5Hex, e as utf8ToBase64 };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { base64ToUtf8 as e, md5Hex as t, utf8ToBase64 as n } from "./hashing.mjs";
|
|
2
|
+
import { toStr as r } from "./values.mjs";
|
|
3
|
+
// src/helpers/twigWrapper/filters/misc.ts
|
|
4
4
|
var i = {
|
|
5
|
-
url_encode: (
|
|
5
|
+
url_encode: (e) => typeof e == "string" ? encodeURIComponent(e) : typeof e == "object" && e && !Array.isArray(e) ? new URLSearchParams(Object.fromEntries(Object.entries(e).map(([e, t]) => [e, r(t)]))).toString() : e,
|
|
6
6
|
nl2br: (e) => typeof e == "string" ? e.replace(/\n/g, "<br>") : e,
|
|
7
|
-
striptags: (
|
|
8
|
-
if (typeof
|
|
9
|
-
let
|
|
10
|
-
if (
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
13
|
-
let n = RegExp(`<(?!/?(?:${
|
|
14
|
-
return
|
|
7
|
+
striptags: (e, t) => {
|
|
8
|
+
if (typeof e != "string") return e;
|
|
9
|
+
let n = t.length > 0 ? r(t[0]).trim() : "";
|
|
10
|
+
if (n) {
|
|
11
|
+
let t = n.split(/(?:\s*>\s*<\s*|<\s*|>\s*)/).filter(Boolean).map((e) => e.replace(/[/>]/g, "").trim());
|
|
12
|
+
if (t.length > 0) {
|
|
13
|
+
let n = RegExp(`<(?!/?(?:${t.join("|")})\\b)[^>]+>`, "gi");
|
|
14
|
+
return e.replace(n, "").replace(/\s+/g, " ").trim();
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return e.replace(/<[^>]+>/g, "").replace(/\s+/g, " ").trim();
|
|
18
18
|
},
|
|
19
19
|
abs: (e) => typeof e == "number" ? Math.abs(e) : e,
|
|
20
|
-
round: (
|
|
21
|
-
if (typeof
|
|
22
|
-
let
|
|
23
|
-
return i === "ceil" ? Math.ceil(
|
|
20
|
+
round: (e, t) => {
|
|
21
|
+
if (typeof e != "number") return e;
|
|
22
|
+
let n = Number(t[0]) || 0, i = t[1] == null ? "common" : r(t[1]), a = 10 ** n;
|
|
23
|
+
return i === "ceil" ? Math.ceil(e * a) / a : i === "floor" ? Math.floor(e * a) / a : Math.round(e * a) / a;
|
|
24
24
|
},
|
|
25
|
-
format: (
|
|
26
|
-
if (typeof
|
|
27
|
-
let
|
|
28
|
-
return
|
|
25
|
+
format: (e, t) => {
|
|
26
|
+
if (typeof e != "string") return e;
|
|
27
|
+
let n = 0;
|
|
28
|
+
return e.replace(/%((?:[-+ 0]|'.)*)(\d*)(?:\.(\d+))?([sdf%])/g, (e, i, a, o, s) => {
|
|
29
29
|
if (s === "%") return "%";
|
|
30
|
-
let c = n
|
|
31
|
-
if (
|
|
30
|
+
let c = t[n];
|
|
31
|
+
if (n++, c === void 0) return e;
|
|
32
32
|
let l = i.includes("+"), u;
|
|
33
33
|
if (s === "d") {
|
|
34
34
|
let e = Math.trunc(Number(c));
|
|
@@ -36,7 +36,7 @@ var i = {
|
|
|
36
36
|
} else if (s === "f") {
|
|
37
37
|
let e = Number(c);
|
|
38
38
|
u = `${l && e >= 0 ? "+" : ""}${o === void 0 ? String(e) : e.toFixed(Number(o))}`;
|
|
39
|
-
} else u =
|
|
39
|
+
} else u = r(c), u = o === void 0 ? u : u.slice(0, Number(o));
|
|
40
40
|
let d = Number(a || 0);
|
|
41
41
|
if (u.length >= d) return u;
|
|
42
42
|
let f = /'(.)/.exec(i), p = f ? f[1] : i.includes("0") ? "0" : " ";
|
|
@@ -44,9 +44,8 @@ var i = {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
}, a = { spaceless: (e) => typeof e == "string" ? e.replace(/>\s+</g, "><").trim() : e }, o = { random: (e) => Array.isArray(e) ? e.length > 0 ? e[Math.floor(Math.random() * e.length)] : void 0 : typeof e == "string" ? e.length > 0 ? e[Math.floor(Math.random() * e.length)] : "" : typeof e == "number" ? Math.floor(Math.random() * e) : e }, s = {
|
|
47
|
-
base64_encode: (e) => typeof e == "string" ?
|
|
48
|
-
base64_decode: (
|
|
49
|
-
md5: (e) => typeof e == "string" ?
|
|
47
|
+
base64_encode: (e) => typeof e == "string" ? n(e) : e,
|
|
48
|
+
base64_decode: (t) => typeof t == "string" ? e(t) : t,
|
|
49
|
+
md5: (e) => typeof e == "string" ? t(e) : e
|
|
50
50
|
};
|
|
51
|
-
//#endregion
|
|
52
51
|
export { s as encodingFilters, i as miscFilters, o as randomFilters, a as whitespaceFilters };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatNumber as e, numberOf as t, toStr as n } from "./values.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/twigWrapper/filters/numbers.ts
|
|
3
3
|
var r = {
|
|
4
4
|
number_format: (e, t) => {
|
|
5
5
|
if (typeof e != "number") return e;
|
|
@@ -32,5 +32,4 @@ var r = {
|
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { r as numberFilters };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toStr as e } from "./values.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/twigWrapper/filters/objects.ts
|
|
3
3
|
var t = {
|
|
4
4
|
without: (t, n) => {
|
|
5
5
|
if (typeof t != "object" || !t || Array.isArray(t)) return t;
|
|
@@ -57,5 +57,4 @@ var t = {
|
|
|
57
57
|
return i;
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
//#endregion
|
|
61
60
|
export { t as objectFilters, n as queryFilters };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/filters/raw.ts
|
|
2
2
|
var e = "__PLITZI_RAW__", t = (e) => typeof e == "object" && !!e && e.__marker === "__PLITZI_RAW__", n = (t) => ({
|
|
3
3
|
__raw: t,
|
|
4
4
|
__marker: e
|
|
5
5
|
}), r = (e) => t(e) ? e.__raw : e;
|
|
6
|
-
//#endregion
|
|
7
6
|
export { e as RAW_MARKER, t as isRawMarker, r as unwrapRaw, n as wrapRaw };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var i = { raw: (
|
|
5
|
-
to_json: (e) =>
|
|
6
|
-
json_encode: (e) =>
|
|
1
|
+
import { wrapRaw as e } from "./raw.mjs";
|
|
2
|
+
import { isEmpty as t, toJson as n, toStr as r } from "./values.mjs";
|
|
3
|
+
// src/helpers/twigWrapper/filters/strings.ts
|
|
4
|
+
var i = { raw: (t) => e(t) }, a = {
|
|
5
|
+
to_json: (e) => n(e),
|
|
6
|
+
json_encode: (e) => n(e),
|
|
7
7
|
object_as_json: (e) => typeof e == "object" && e ? JSON.stringify(e) : e
|
|
8
|
-
}, o = { default: (
|
|
8
|
+
}, o = { default: (e, n) => t(e) ? n[0] : e }, s = {
|
|
9
9
|
upper: (e) => typeof e == "string" ? e.toUpperCase() : e,
|
|
10
10
|
lower: (e) => typeof e == "string" ? e.toLowerCase() : e,
|
|
11
11
|
trim: (e) => typeof e == "string" ? e.trim() : e,
|
|
@@ -18,18 +18,18 @@ var i = { raw: (e) => r(e) }, a = {
|
|
|
18
18
|
rtrim: (e) => typeof e == "string" ? e.trimEnd() : e,
|
|
19
19
|
pad: (e, t) => {
|
|
20
20
|
if (typeof e != "string") return e;
|
|
21
|
-
let
|
|
21
|
+
let n = Number(t[0]) || 0, i = t.length > 1 ? r(t[1]) : " ";
|
|
22
22
|
if (i === "") return e;
|
|
23
|
-
let a =
|
|
23
|
+
let a = n - e.length;
|
|
24
24
|
if (a <= 0) return e;
|
|
25
25
|
let o = Math.ceil(a / i.length);
|
|
26
26
|
return i.repeat(o).slice(0, a) + e;
|
|
27
27
|
},
|
|
28
28
|
padRight: (e, t) => {
|
|
29
29
|
if (typeof e != "string") return e;
|
|
30
|
-
let
|
|
30
|
+
let n = Number(t[0]) || 0, i = t.length > 1 ? r(t[1]) : " ";
|
|
31
31
|
if (i === "") return e;
|
|
32
|
-
let a =
|
|
32
|
+
let a = n - e.length;
|
|
33
33
|
if (a <= 0) return e;
|
|
34
34
|
let o = Math.ceil(a / i.length);
|
|
35
35
|
return e + i.repeat(o).slice(0, a);
|
|
@@ -46,34 +46,33 @@ var i = { raw: (e) => r(e) }, a = {
|
|
|
46
46
|
}, c = {
|
|
47
47
|
replace: (e, t) => {
|
|
48
48
|
if (typeof e != "string" || t.length === 0) return e;
|
|
49
|
-
let [
|
|
50
|
-
if (typeof
|
|
51
|
-
let t = new Map(Object.entries(
|
|
49
|
+
let [n] = t;
|
|
50
|
+
if (typeof n == "object" && n && !Array.isArray(n)) {
|
|
51
|
+
let t = new Map(Object.entries(n).filter(([e]) => e !== ""));
|
|
52
52
|
if (t.size === 0) return e;
|
|
53
53
|
let i = [...t.keys()].sort((e, t) => t.length - e.length), a = new RegExp(i.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), "g");
|
|
54
|
-
return e.replace(a, (e) =>
|
|
54
|
+
return e.replace(a, (e) => r(t.get(e)));
|
|
55
55
|
}
|
|
56
|
-
return e.split(n
|
|
56
|
+
return e.split(r(n)).join(r(t[1]));
|
|
57
57
|
},
|
|
58
58
|
slice: (e, t) => {
|
|
59
59
|
if (t.length === 0) return e;
|
|
60
60
|
let n = Number(t[0]) || 0, r = t.length > 1 && Number.isFinite(Number(t[1])) ? n + Number(t[1]) : void 0;
|
|
61
61
|
return typeof e == "string" || Array.isArray(e) ? e.slice(n, r) : e;
|
|
62
62
|
},
|
|
63
|
-
split: (e, t) => typeof e == "string" && t.length > 0 ? e.split(
|
|
64
|
-
join: (e, t) => Array.isArray(e) ? e.join(t.length === 0 ? "" :
|
|
63
|
+
split: (e, t) => typeof e == "string" && t.length > 0 ? e.split(r(t[0])) : e,
|
|
64
|
+
join: (e, t) => Array.isArray(e) ? e.join(t.length === 0 ? "" : r(t[0])) : e,
|
|
65
65
|
reverse: (e) => typeof e == "string" ? e.split("").reverse().join("") : Array.isArray(e) ? [...e].reverse() : e
|
|
66
66
|
}, l = {
|
|
67
|
-
length: (e) => typeof e == "string" || Array.isArray(e) ? e.length : typeof e == "number" ?
|
|
67
|
+
length: (e) => typeof e == "string" || Array.isArray(e) ? e.length : typeof e == "number" ? r(e).length : typeof e == "object" && e ? Object.keys(e).length : 0,
|
|
68
68
|
first: (e) => typeof e == "string" ? e.length > 0 ? e[0] : "" : Array.isArray(e) ? e.length > 0 ? e[0] : void 0 : e,
|
|
69
69
|
last: (e) => typeof e == "string" ? e.length > 0 ? e[e.length - 1] : "" : Array.isArray(e) ? e.length > 0 ? e[e.length - 1] : void 0 : e,
|
|
70
70
|
contains: (e, t) => {
|
|
71
71
|
if (t.length === 0) return !1;
|
|
72
|
-
let
|
|
73
|
-
return typeof e == "string" ? e.includes(n
|
|
72
|
+
let n = t[0];
|
|
73
|
+
return typeof e == "string" ? e.includes(r(n)) : Array.isArray(e) ? e.includes(n) : !1;
|
|
74
74
|
},
|
|
75
|
-
startswith: (e, t) => typeof e == "string" && t.length > 0 && e.startsWith(
|
|
76
|
-
endswith: (e, t) => typeof e == "string" && t.length > 0 && e.endsWith(
|
|
75
|
+
startswith: (e, t) => typeof e == "string" && t.length > 0 && e.startsWith(r(t[0])),
|
|
76
|
+
endswith: (e, t) => typeof e == "string" && t.length > 0 && e.endsWith(r(t[0]))
|
|
77
77
|
};
|
|
78
|
-
//#endregion
|
|
79
78
|
export { o as defaultFilters, i as identityFilters, a as serialisationFilters, c as stringOperationFilters, l as stringQueryFilters, s as stringTransformFilters };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/filters/values.ts
|
|
2
2
|
var e = (e) => e == null || e === "", t = (e, t) => e === t ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t)), n = (e) => e === void 0 || typeof e == "function" || typeof e == "symbol" ? "null" : typeof e == "bigint" ? e.toString() : JSON.stringify(e), r = (e) => e == null ? "" : String(e), i = (e) => {
|
|
3
3
|
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
4
4
|
if (typeof e == "string" && e.trim() !== "") {
|
|
@@ -13,5 +13,4 @@ var e = (e) => e == null || e === "", t = (e, t) => e === t ? 0 : e == null ? -1
|
|
|
13
13
|
}
|
|
14
14
|
return String(e);
|
|
15
15
|
};
|
|
16
|
-
//#endregion
|
|
17
16
|
export { t as compareValues, a as formatNumber, e as isEmpty, i as numberOf, n as toJson, r as toStr };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { processTwig as
|
|
3
|
-
import { hasTemplateSyntax as
|
|
4
|
-
import { hasValidToken as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
export {
|
|
1
|
+
import { MAX_PARAM_PASSES as e, resolveStepParam as t } from "./processTwig/resolveStepParam.mjs";
|
|
2
|
+
import { processTwig as n, processTwigParam as r, processTwigValue as i } from "./processTwig/processTwig.mjs";
|
|
3
|
+
import { hasTemplateSyntax as a } from "./tokens/hasTemplateSyntax.mjs";
|
|
4
|
+
import { hasValidToken as o } from "./tokens/hasValidToken.mjs";
|
|
5
|
+
import { inspectTemplate as s } from "./inspectTemplate.mjs";
|
|
6
|
+
import { templatePaths as c, templateRootNames as l } from "./templateRoots.mjs";
|
|
7
|
+
import { filters as u } from "./filters/filters.mjs";
|
|
8
|
+
export { e as MAX_PARAM_PASSES, u as filters, a as hasTemplateSyntax, o as hasValidToken, s as inspectTemplate, n as processTwig, r as processTwigParam, i as processTwigValue, t as resolveStepParam, c as templatePaths, l as templateRootNames };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FUNCTION_DOCS as e } from "./filters/catalog/index.mjs";
|
|
2
2
|
import { lex as t } from "./Lexer/Lexer.mjs";
|
|
3
3
|
import { parse as n } from "./Parser/Parser.mjs";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
var i = (e) => e.replace(/_/g, "").toLowerCase(), a = (
|
|
4
|
+
import { filters as r } from "./filters/filters.mjs";
|
|
5
|
+
// src/helpers/twigWrapper/inspectTemplate.ts
|
|
6
|
+
var i = (e) => e.replace(/_/g, "").toLowerCase(), a = (e) => Object.keys(r).find((t) => i(t) === i(e)), o = {
|
|
7
7
|
concat: "first|merge(second)",
|
|
8
8
|
push: "list|merge([item])",
|
|
9
9
|
includes: "item in list",
|
|
@@ -16,13 +16,13 @@ var i = (e) => e.replace(/_/g, "").toLowerCase(), a = (t) => Object.keys(e).find
|
|
|
16
16
|
stringify: "value|to_json",
|
|
17
17
|
uniq: "list|unique",
|
|
18
18
|
groupBy: "list|group_by('field')"
|
|
19
|
-
}, s = new Set(Object.keys(
|
|
19
|
+
}, s = new Set(Object.keys(e)), c = (e) => `value|round(0, '${e}')`, l = {
|
|
20
20
|
floor: c("floor"),
|
|
21
21
|
ceil: c("ceil"),
|
|
22
22
|
clamp: "min(max(value, low), high)"
|
|
23
|
-
}, u = (
|
|
24
|
-
let
|
|
25
|
-
return `Unknown function "${
|
|
23
|
+
}, u = (e) => {
|
|
24
|
+
let t = Object.hasOwn(r, e) ? `value|${e}` : l[e];
|
|
25
|
+
return `Unknown function "${e}()"${t ? ` — write \`${t}\`` : ""}: the functions are ${[...s].join(", ")}`;
|
|
26
26
|
}, d = "loop", f = (e) => e.type === "literal" && (typeof e.value == "string" || typeof e.value == "number"), p = class {
|
|
27
27
|
issues = [];
|
|
28
28
|
notes = [];
|
|
@@ -65,10 +65,10 @@ var i = (e) => e.replace(/_/g, "").toLowerCase(), a = (t) => Object.keys(e).find
|
|
|
65
65
|
setsIn(e) {
|
|
66
66
|
return e.flatMap((e) => e.type === "set" ? [e.name] : []);
|
|
67
67
|
}
|
|
68
|
-
filterNames(
|
|
69
|
-
for (let
|
|
70
|
-
let e = o[
|
|
71
|
-
this.issues.push(`Unknown filter "${
|
|
68
|
+
filterNames(e) {
|
|
69
|
+
for (let t of e) if (t && !Object.hasOwn(r, t)) {
|
|
70
|
+
let e = o[t], n = e === void 0 ? a(t) : void 0;
|
|
71
|
+
this.issues.push(`Unknown filter "${t}"${e ? ` — write \`${e}\`` : n ? ` — did you mean \`${n}\`?` : ""}`);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
expression(e, t) {
|
|
@@ -132,5 +132,4 @@ var i = (e) => e.replace(/_/g, "").toLowerCase(), a = (t) => Object.keys(e).find
|
|
|
132
132
|
notes: [...new Set(i.notes)]
|
|
133
133
|
};
|
|
134
134
|
};
|
|
135
|
-
//#endregion
|
|
136
135
|
export { m as inspectTemplate };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/processTwig/helpers.ts
|
|
2
2
|
var e = (e, t) => e[t], t = (e, t) => {
|
|
3
3
|
let n = t.indexOf(".");
|
|
4
4
|
if (n === -1) return e[t];
|
|
@@ -31,5 +31,4 @@ var e = (e, t) => e[t], t = (e, t) => {
|
|
|
31
31
|
}
|
|
32
32
|
return a;
|
|
33
33
|
};
|
|
34
|
-
//#endregion
|
|
35
34
|
export { r as finalizeRaw, i as flattenContext, a as renderSimpleTokens, t as resolveDottedPath, e as resolveSimplePath, n as serializeValue };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { finalizeRaw as e, flattenContext as t, renderSimpleTokens as n } from "./helpers.mjs";
|
|
2
2
|
import { evaluate as r, evaluateExpression as i } from "../Evaluator/Evaluator.mjs";
|
|
3
3
|
import { getNodes as a, resolveTokens as o } from "../TemplateCache/TemplateCache.mjs";
|
|
4
|
-
|
|
4
|
+
// src/helpers/twigWrapper/processTwig/processTwig.ts
|
|
5
5
|
var s = (i, s = {}, c = !1, l = !1) => {
|
|
6
6
|
if (typeof i != "string") return i;
|
|
7
7
|
try {
|
|
@@ -87,5 +87,4 @@ var s = (i, s = {}, c = !1, l = !1) => {
|
|
|
87
87
|
return e;
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
//#endregion
|
|
91
90
|
export { s as processTwig, g as processTwigParam, f as processTwigValue };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { processTwigParam as e } from "./processTwig.mjs";
|
|
2
2
|
import { hasTemplateSyntax as t } from "../tokens/hasTemplateSyntax.mjs";
|
|
3
3
|
import { hasValidToken as n } from "../tokens/hasValidToken.mjs";
|
|
4
|
-
|
|
4
|
+
// src/helpers/twigWrapper/processTwig/resolveStepParam.ts
|
|
5
5
|
var r = 5, i = (r, i) => {
|
|
6
6
|
let a = r, o = 5;
|
|
7
7
|
for (t(a) && !n(r) && (a = e(r, i), o--); typeof a == "string" && n(a) && o > 0;) a = e(a, i), o--;
|
|
@@ -10,5 +10,4 @@ var r = 5, i = (r, i) => {
|
|
|
10
10
|
unresolved: typeof a == "string" && n(a)
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { r as MAX_PARAM_PASSES, i as resolveStepParam };
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* known at run time ends the path at what came before it.
|
|
5
|
-
*
|
|
6
|
-
* What a caller SUBSCRIBES to, where the root alone would be too much: an element whose template reads
|
|
7
|
-
* `computed.tool` has no reason to render again when `computed.selectionCount` changes, and every element on a page
|
|
8
|
-
* reads some computed value. Names the template binds itself — a loop variable, a `set`, an arrow's parameter —
|
|
9
|
-
* come back too: they resolve to no source, and asking for a path that is not there costs nothing.
|
|
2
|
+
* The paths a template reads, read once per template: every element asks it of its own on every render — the
|
|
3
|
+
* server's and the browser's — and the same few hundred templates walked their syntax tree again each time.
|
|
10
4
|
*/
|
|
11
|
-
export declare const templatePaths: (template: string) => string[];
|
|
5
|
+
export declare const templatePaths: (template: string) => readonly string[];
|
|
12
6
|
/**
|
|
13
7
|
* Every top-level name a template reads: `{{ theme.resolved }}` and `{% if state.open %}` both give their first segment.
|
|
14
8
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveTokens as e } from "./TemplateCache/TemplateCache.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/twigWrapper/templateRoots.ts
|
|
3
3
|
var t = (e, n) => {
|
|
4
4
|
if (Array.isArray(e)) for (let r of e) t(r, n);
|
|
5
5
|
else if (typeof e == "object" && e) {
|
|
@@ -8,11 +8,16 @@ var t = (e, n) => {
|
|
|
8
8
|
t.length > 0 && n.add(t.join("."));
|
|
9
9
|
} else for (let r of Object.values(e)) t(r, n);
|
|
10
10
|
}
|
|
11
|
-
}, n = (
|
|
12
|
-
let
|
|
13
|
-
if (
|
|
14
|
-
let i = /* @__PURE__ */ new Set();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
}, n = 5e3, r = /* @__PURE__ */ new Map(), i = (i) => {
|
|
12
|
+
let a = r.get(i);
|
|
13
|
+
if (a) return a;
|
|
14
|
+
let o = e(i), s = /* @__PURE__ */ new Set();
|
|
15
|
+
o && t(o.nodes ?? o.nodesWithSource, s);
|
|
16
|
+
let c = [...s];
|
|
17
|
+
if (r.set(i, c), r.size > n) {
|
|
18
|
+
let [e] = r.keys();
|
|
19
|
+
r.delete(e);
|
|
20
|
+
}
|
|
21
|
+
return c;
|
|
22
|
+
}, a = (e) => [...new Set(i(e).map((e) => e.split(".")[0]))];
|
|
23
|
+
export { i as templatePaths, a as templateRootNames };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TOKEN_REGEX as e, TOKEN_STRICT_REGEX as t } from "./tokenPatterns.mjs";
|
|
2
|
-
|
|
2
|
+
// src/helpers/twigWrapper/tokens/hasValidToken.ts
|
|
3
3
|
var n = (n, r = !1) => {
|
|
4
4
|
if (typeof n != "string") return !1;
|
|
5
5
|
let i = r ? t : e;
|
|
6
6
|
return i.lastIndex = 0, i.test(n.trim());
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { n as hasValidToken };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/helpers/twigWrapper/tokens/tokenPatterns.ts
|
|
2
2
|
var e = "[a-zA-Z_][a-zA-Z0-9_]*(?:-[a-zA-Z0-9_]+)*", t = `(?:${e}|\\d+)`, n = `\\[\\s*(?:\\d+|'[^']*'|"[^"]*"|${e}(?:\\.${t})*)\\s*\\]`, r = `${`${e}(?:${n})*(?:\\??\\.${t}(?:${n})*)*`}(?:\\s*\\?\\?\\s*[^|{}]+?)?(?:\\s*\\|\\s*[a-zA-Z_]+(?:\\([^)]*\\))?)*`, i = `\\{\\{\\s*${r}\\s*\\}\\}`, a = `(?:${`\\{\\{\\{\\s*${r}\\s*\\}\\}\\}`}|${i})`, o = new RegExp(a, "g"), s = RegExp(`^${a}$`);
|
|
3
|
-
//#endregion
|
|
4
3
|
export { o as TOKEN_REGEX, s as TOKEN_STRICT_REGEX };
|
package/dist/helpers/utils.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { get as e } from "
|
|
2
|
-
|
|
1
|
+
import { get as e } from "./lodash/get.mjs";
|
|
2
|
+
// src/helpers/utils.ts
|
|
3
3
|
function t(e) {
|
|
4
4
|
return e && (e.displayName || e.name) || "Component";
|
|
5
5
|
}
|
|
@@ -55,5 +55,4 @@ var s = (e) => new Promise((t) => {
|
|
|
55
55
|
else return !1;
|
|
56
56
|
return t ? `rgba(${n},${r},${i},${t})` : `rgb(${n},${r},${i})`;
|
|
57
57
|
};
|
|
58
|
-
//#endregion
|
|
59
58
|
export { o as ParamsFromURL, s as delay, n as emptyObject, t as getDisplayName, a as getKeyDecoded, r as getPathsFromObject, l as hexToRGB, c as isInViewport, i as makeId };
|