@ryuzaki13/react-foundation-lib 2.31.1 → 2.32.0
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/README.md +17 -5
- package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts +17 -0
- package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts.map +1 -0
- package/dist/analytical-table/definition/compileAnalyticalTableDefinition.d.ts.map +1 -1
- package/dist/analytical-table/definition/types.d.ts +6 -5
- package/dist/analytical-table/definition/types.d.ts.map +1 -1
- package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts +7 -0
- package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts.map +1 -0
- package/dist/analytical-table/dynamic-columns/dateColumns.d.ts.map +1 -1
- package/dist/analytical-table/dynamic-columns/types.d.ts +2 -1
- package/dist/analytical-table/dynamic-columns/types.d.ts.map +1 -1
- package/dist/analytical-table/index.js +124 -114
- package/dist/analytical-table/index.js.map +1 -1
- package/dist/analytical-table/projections/analyticalExportConstants.d.ts +7 -0
- package/dist/analytical-table/projections/analyticalExportConstants.d.ts.map +1 -0
- package/dist/analytical-table/projections/expansion.d.ts +2 -1
- package/dist/analytical-table/projections/expansion.d.ts.map +1 -1
- package/dist/analytical-table/projections/exportProjection.d.ts.map +1 -1
- package/dist/analytical-table/projections/types.d.ts +3 -2
- package/dist/analytical-table/projections/types.d.ts.map +1 -1
- package/dist/analytical-table/runtime/aggregation.d.ts.map +1 -1
- package/dist/analytical-table/runtime/analyticalRowConstants.d.ts +4 -0
- package/dist/analytical-table/runtime/analyticalRowConstants.d.ts.map +1 -0
- package/dist/analytical-table/runtime/analyticalViewConstants.d.ts +16 -0
- package/dist/analytical-table/runtime/analyticalViewConstants.d.ts.map +1 -0
- package/dist/analytical-table/runtime/buildGroupedModel.d.ts.map +1 -1
- package/dist/analytical-table/runtime/filtering.d.ts.map +1 -1
- package/dist/analytical-table/runtime/grouping.d.ts.map +1 -1
- package/dist/analytical-table/runtime/hierarchy.d.ts +2 -1
- package/dist/analytical-table/runtime/hierarchy.d.ts.map +1 -1
- package/dist/analytical-table/runtime/totals.d.ts +2 -2
- package/dist/analytical-table/runtime/totals.d.ts.map +1 -1
- package/dist/analytical-table/runtime/types.d.ts +5 -3
- package/dist/analytical-table/runtime/types.d.ts.map +1 -1
- package/dist/analytical-table/runtime/valueComparison.d.ts.map +1 -1
- package/dist/array/index.js +1 -1
- package/dist/array/reorder.d.ts +6 -1
- package/dist/array/reorder.d.ts.map +1 -1
- package/dist/async-task-runner/createCoalescingTaskRunner.d.ts.map +1 -1
- package/dist/async-task-runner/createDeadlineTimer.d.ts.map +1 -1
- package/dist/async-task-runner/index.js +39 -36
- package/dist/async-task-runner/index.js.map +1 -1
- package/dist/async-task-runner/nativeTimerConstants.d.ts +3 -0
- package/dist/async-task-runner/nativeTimerConstants.d.ts.map +1 -0
- package/dist/binary/base64Constants.d.ts +6 -0
- package/dist/binary/base64Constants.d.ts.map +1 -0
- package/dist/binary/binaryToBlob.d.ts.map +1 -1
- package/dist/binary/getBase64DecodedSize.d.ts.map +1 -1
- package/dist/binary/index.js +95 -70
- package/dist/binary/index.js.map +1 -1
- package/dist/browser-notifications/browserNotificationConstants.d.ts +3 -0
- package/dist/browser-notifications/browserNotificationConstants.d.ts.map +1 -0
- package/dist/browser-notifications/browserNotificationTypes.d.ts +2 -1
- package/dist/browser-notifications/browserNotificationTypes.d.ts.map +1 -1
- package/dist/browser-notifications/createBrowserNotificationPresenter.d.ts.map +1 -1
- package/dist/browser-notifications/index.js +38 -37
- package/dist/browser-notifications/index.js.map +1 -1
- package/dist/chunks/{array-D-_yMMUK.js → array-bd7LYFto.js} +1 -3
- package/dist/chunks/{array-D-_yMMUK.js.map → array-bd7LYFto.js.map} +1 -1
- package/dist/chunks/{dom-BK22UmgF.js → dom-ZSeWZ0Gg.js} +103 -98
- package/dist/chunks/dom-ZSeWZ0Gg.js.map +1 -0
- package/dist/chunks/formatDate-CNPcfNte.js +133 -0
- package/dist/chunks/formatDate-CNPcfNte.js.map +1 -0
- package/dist/chunks/{formatters-rxriDRPk.js → formatters-CO40zvVB.js} +496 -497
- package/dist/chunks/formatters-CO40zvVB.js.map +1 -0
- package/dist/chunks/{formulas-BXT_XBWI.js → formulas-Y0HOcFhe.js} +90 -86
- package/dist/chunks/formulas-Y0HOcFhe.js.map +1 -0
- package/dist/chunks/hasSignatureBytes-D2wO_Myl.js +11 -0
- package/dist/chunks/hasSignatureBytes-D2wO_Myl.js.map +1 -0
- package/dist/chunks/keyboardConstants-BZKskWsm.js +6 -0
- package/dist/chunks/keyboardConstants-BZKskWsm.js.map +1 -0
- package/dist/chunks/media-imBOXWwa.js +192 -0
- package/dist/chunks/media-imBOXWwa.js.map +1 -0
- package/dist/chunks/mimeTypeConstants-BzONV-b1.js +6 -0
- package/dist/chunks/mimeTypeConstants-BzONV-b1.js.map +1 -0
- package/dist/chunks/{query-client-CVRfrYZM.js → query-client-D0HQZ84w.js} +142 -142
- package/dist/chunks/query-client-D0HQZ84w.js.map +1 -0
- package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js +766 -0
- package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js.map +1 -0
- package/dist/chunks/scalarTypeConstants-CnSsjpGO.js +6 -0
- package/dist/chunks/scalarTypeConstants-CnSsjpGO.js.map +1 -0
- package/dist/chunks/utils-DW0Yso1Q.js +210 -0
- package/dist/chunks/utils-DW0Yso1Q.js.map +1 -0
- package/dist/chunks/{uuid-CUJPAbRY.js → uuid-izDzLv18.js} +1 -2
- package/dist/chunks/uuid-izDzLv18.js.map +1 -0
- package/dist/chunks/validate-8URYKKly.js +613 -0
- package/dist/chunks/validate-8URYKKly.js.map +1 -0
- package/dist/copy/index.js +5 -5
- package/dist/copy/index.js.map +1 -1
- package/dist/copy/useCopyFeedback.d.ts.map +1 -1
- package/dist/crypto/hashString.d.ts.map +1 -1
- package/dist/crypto/hexadecimalConstants.d.ts +3 -0
- package/dist/crypto/hexadecimalConstants.d.ts.map +1 -0
- package/dist/crypto/index.js +25 -24
- package/dist/crypto/index.js.map +1 -1
- package/dist/crypto/uuid.d.ts.map +1 -1
- package/dist/date-segments/index.js +81 -81
- package/dist/date-segments/index.js.map +1 -1
- package/dist/date-segments/mask.d.ts +13 -3
- package/dist/date-segments/mask.d.ts.map +1 -1
- package/dist/decimal/decimalConstants.d.ts +3 -0
- package/dist/decimal/decimalConstants.d.ts.map +1 -0
- package/dist/decimal/index.js +0 -2
- package/dist/decimal/index.js.map +1 -1
- package/dist/decimal/normalizeDecimal.d.ts.map +1 -1
- package/dist/decimal/normalizeDecimalLiteral.d.ts.map +1 -1
- package/dist/decimal/resolveDecimalMaxLength.d.ts.map +1 -1
- package/dist/decimal/sumDecimals.d.ts.map +1 -1
- package/dist/decimal/writeDecimalParts.d.ts.map +1 -1
- package/dist/dom/document-scroll/acquireDocumentScrollLock.d.ts.map +1 -1
- package/dist/dom/document-scroll/attachDocumentTouchScrollGuard.d.ts.map +1 -1
- package/dist/dom/document-scroll/canConsumeVerticalTouchScroll.d.ts.map +1 -1
- package/dist/dom/domEventConstants.d.ts +4 -0
- package/dist/dom/domEventConstants.d.ts.map +1 -0
- package/dist/dom/domScrollConstants.d.ts +3 -0
- package/dist/dom/domScrollConstants.d.ts.map +1 -0
- package/dist/dom/index.js +1 -1
- package/dist/dom/installFaviconOverride.d.ts.map +1 -1
- package/dist/dom/overlayFocusConstants.d.ts +4 -0
- package/dist/dom/overlayFocusConstants.d.ts.map +1 -0
- package/dist/dom/scroll-anchor/captureScrollAnchor.d.ts.map +1 -1
- package/dist/dom/useClickOutside.d.ts +1 -1
- package/dist/dom/useClickOutside.d.ts.map +1 -1
- package/dist/dom/useEscapeDismiss.d.ts +1 -1
- package/dist/dom/useEscapeDismiss.d.ts.map +1 -1
- package/dist/dom/useFocusTrap.d.ts.map +1 -1
- package/dist/dom/useIsTouchDevice.d.ts.map +1 -1
- package/dist/dom/useOverlayFocus.d.ts +3 -2
- package/dist/dom/useOverlayFocus.d.ts.map +1 -1
- package/dist/dom/visual-viewport/attachVisualViewportFrame.d.ts.map +1 -1
- package/dist/error-report/breadcrumbs.d.ts.map +1 -1
- package/dist/error-report/capture.d.ts.map +1 -1
- package/dist/error-report/captureOptions.d.ts +3 -2
- package/dist/error-report/captureOptions.d.ts.map +1 -1
- package/dist/error-report/capturePolicyConstants.d.ts +4 -0
- package/dist/error-report/capturePolicyConstants.d.ts.map +1 -0
- package/dist/error-report/dataPreview.d.ts.map +1 -1
- package/dist/error-report/diagnostics.d.ts.map +1 -1
- package/dist/error-report/drafts.d.ts.map +1 -1
- package/dist/error-report/environment.d.ts.map +1 -1
- package/dist/error-report/errorInfo.d.ts.map +1 -1
- package/dist/error-report/errorReportCaptureLimits.d.ts +26 -0
- package/dist/error-report/errorReportCaptureLimits.d.ts.map +1 -0
- package/dist/error-report/errorReportContractConstants.d.ts +32 -0
- package/dist/error-report/errorReportContractConstants.d.ts.map +1 -0
- package/dist/error-report/index.js +586 -587
- package/dist/error-report/index.js.map +1 -1
- package/dist/error-report/payload.d.ts.map +1 -1
- package/dist/error-report/queue.d.ts.map +1 -1
- package/dist/error-report/queueContract.d.ts +7 -6
- package/dist/error-report/queueContract.d.ts.map +1 -1
- package/dist/error-report/queueRecord.d.ts.map +1 -1
- package/dist/error-report/queueResultConstants.d.ts +14 -0
- package/dist/error-report/queueResultConstants.d.ts.map +1 -0
- package/dist/error-report/runtimeDeduplication.d.ts +2 -1
- package/dist/error-report/runtimeDeduplication.d.ts.map +1 -1
- package/dist/error-report/safeValue.d.ts.map +1 -1
- package/dist/error-report/safeValueMarkerConstants.d.ts +16 -0
- package/dist/error-report/safeValueMarkerConstants.d.ts.map +1 -0
- package/dist/error-report/schema.d.ts.map +1 -1
- package/dist/error-report/types.d.ts +10 -8
- package/dist/error-report/types.d.ts.map +1 -1
- package/dist/error-report-source-maps/archive.d.ts.map +1 -1
- package/dist/error-report-source-maps/artifact.d.ts.map +1 -1
- package/dist/error-report-source-maps/index.js +238 -238
- package/dist/error-report-source-maps/index.js.map +1 -1
- package/dist/error-report-source-maps/manifest.d.ts.map +1 -1
- package/dist/error-report-source-maps/package.d.ts.map +1 -1
- package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts +11 -0
- package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts.map +1 -0
- package/dist/error-report-source-maps/symbolicate.d.ts.map +1 -1
- package/dist/error-report-source-maps/symbolicationResultConstants.d.ts +6 -0
- package/dist/error-report-source-maps/symbolicationResultConstants.d.ts.map +1 -0
- package/dist/error-report-source-maps/types.d.ts +4 -2
- package/dist/error-report-source-maps/types.d.ts.map +1 -1
- package/dist/excel/excel.d.ts.map +1 -1
- package/dist/excel/excelWorkbookConstants.d.ts +6 -0
- package/dist/excel/excelWorkbookConstants.d.ts.map +1 -0
- package/dist/excel/index.js +117 -116
- package/dist/excel/index.js.map +1 -1
- package/dist/excel/matrixWorkbook.d.ts +6 -1
- package/dist/excel/matrixWorkbook.d.ts.map +1 -1
- package/dist/excel/tableExport.d.ts.map +1 -1
- package/dist/file/checkFileSignature.d.ts.map +1 -1
- package/dist/file/contentDisposition.d.ts.map +1 -1
- package/dist/file/fileSignatureConstants.d.ts +14 -18
- package/dist/file/fileSignatureConstants.d.ts.map +1 -1
- package/dist/file/fileSignatureTypes.d.ts +3 -3
- package/dist/file/fileSignatureTypes.d.ts.map +1 -1
- package/dist/file/image/imageReadConstants.d.ts +3 -0
- package/dist/file/image/imageReadConstants.d.ts.map +1 -0
- package/dist/file/image/readImageFile.d.ts +3 -2
- package/dist/file/image/readImageFile.d.ts.map +1 -1
- package/dist/file/image/types.d.ts +5 -3
- package/dist/file/image/types.d.ts.map +1 -1
- package/dist/file/index.js +139 -165
- package/dist/file/index.js.map +1 -1
- package/dist/file/mimeType.d.ts.map +1 -1
- package/dist/file/mimeTypeConstants.d.ts +18 -0
- package/dist/file/mimeTypeConstants.d.ts.map +1 -0
- package/dist/file/read-file/assert.d.ts.map +1 -1
- package/dist/file/read-file/readFile.d.ts +3 -11
- package/dist/file/read-file/readFile.d.ts.map +1 -1
- package/dist/file/read-file/readFileConstants.d.ts +13 -0
- package/dist/file/read-file/readFileConstants.d.ts.map +1 -0
- package/dist/file/read-file/types.d.ts +7 -6
- package/dist/file/read-file/types.d.ts.map +1 -1
- package/dist/file/signature/checkArchiveSignature.d.ts.map +1 -1
- package/dist/file-system/fileSystemConstants.d.ts +5 -0
- package/dist/file-system/fileSystemConstants.d.ts.map +1 -0
- package/dist/file-system/fileSystemTypes.d.ts +2 -1
- package/dist/file-system/fileSystemTypes.d.ts.map +1 -1
- package/dist/file-system/index.js +11 -10
- package/dist/file-system/index.js.map +1 -1
- package/dist/file-system/resolvePathInsideRoot.d.ts.map +1 -1
- package/dist/formatters/boolean/parseAbapBoolean.d.ts.map +1 -1
- package/dist/formatters/boolean/toAbapBoolean.d.ts.map +1 -1
- package/dist/formatters/date/calendarDate.d.ts.map +1 -1
- package/dist/formatters/date/calendarDateConstants.d.ts +13 -0
- package/dist/formatters/date/calendarDateConstants.d.ts.map +1 -0
- package/dist/formatters/date/calendarPeriod.d.ts +11 -2
- package/dist/formatters/date/calendarPeriod.d.ts.map +1 -1
- package/dist/formatters/date/dateFormatConstants.d.ts +17 -0
- package/dist/formatters/date/dateFormatConstants.d.ts.map +1 -0
- package/dist/formatters/date/datePatternConstants.d.ts +16 -0
- package/dist/formatters/date/datePatternConstants.d.ts.map +1 -0
- package/dist/formatters/date/datePresetNameConstants.d.ts +27 -0
- package/dist/formatters/date/datePresetNameConstants.d.ts.map +1 -0
- package/dist/formatters/date/dateRange.d.ts +3 -1
- package/dist/formatters/date/dateRange.d.ts.map +1 -1
- package/dist/formatters/date/dateValueConstants.d.ts +15 -0
- package/dist/formatters/date/dateValueConstants.d.ts.map +1 -0
- package/dist/formatters/date/educationDate.d.ts.map +1 -1
- package/dist/formatters/date/formatDate.d.ts.map +1 -1
- package/dist/formatters/date/formatInstantDateTime.d.ts.map +1 -1
- package/dist/formatters/date/parseDate.d.ts.map +1 -1
- package/dist/formatters/date/pattern.d.ts.map +1 -1
- package/dist/formatters/date/presets.d.ts.map +1 -1
- package/dist/formatters/date/types.d.ts +8 -6
- package/dist/formatters/date/types.d.ts.map +1 -1
- package/dist/formatters/formatDurationMinutes.d.ts.map +1 -1
- package/dist/formatters/formatFileSize.d.ts.map +1 -1
- package/dist/formatters/formatPhone.d.ts.map +1 -1
- package/dist/formatters/index.js +6 -6
- package/dist/formatters/normalizeLeadingZeros.d.ts.map +1 -1
- package/dist/formatters/number/compact.d.ts.map +1 -1
- package/dist/formatters/number/formatCompactNumber.d.ts.map +1 -1
- package/dist/formatters/number/formatNumber.d.ts.map +1 -1
- package/dist/formatters/number/numberFormatConstants.d.ts +11 -0
- package/dist/formatters/number/numberFormatConstants.d.ts.map +1 -0
- package/dist/formatters/number/numberPresetNameConstants.d.ts +16 -0
- package/dist/formatters/number/numberPresetNameConstants.d.ts.map +1 -0
- package/dist/formatters/number/parseNumber.d.ts.map +1 -1
- package/dist/formatters/number/presets.d.ts.map +1 -1
- package/dist/formatters/number/types.d.ts +2 -1
- package/dist/formatters/number/types.d.ts.map +1 -1
- package/dist/formatters/pipeline/clone.d.ts.map +1 -1
- package/dist/formatters/pipeline/definitions.d.ts.map +1 -1
- package/dist/formatters/pipeline/dependencies.d.ts.map +1 -1
- package/dist/formatters/pipeline/execute.d.ts +4 -1
- package/dist/formatters/pipeline/execute.d.ts.map +1 -1
- package/dist/formatters/pipeline/formattersPipelineConstants.d.ts +19 -0
- package/dist/formatters/pipeline/formattersPipelineConstants.d.ts.map +1 -0
- package/dist/formatters/pipeline/normalize.d.ts.map +1 -1
- package/dist/formatters/pipeline/pipelineValidationConstants.d.ts +40 -0
- package/dist/formatters/pipeline/pipelineValidationConstants.d.ts.map +1 -0
- package/dist/formatters/pipeline/registry.d.ts +1 -1
- package/dist/formatters/pipeline/registry.d.ts.map +1 -1
- package/dist/formatters/pipeline/rekey.d.ts.map +1 -1
- package/dist/formatters/pipeline/runtime.d.ts.map +1 -1
- package/dist/formatters/pipeline/types.d.ts +24 -21
- package/dist/formatters/pipeline/types.d.ts.map +1 -1
- package/dist/formatters/pipeline/validate.d.ts +2 -1
- package/dist/formatters/pipeline/validate.d.ts.map +1 -1
- package/dist/formatters/strings/spaceCharacterConstants.d.ts +5 -0
- package/dist/formatters/strings/spaceCharacterConstants.d.ts.map +1 -0
- package/dist/formatters/strings/stripInnerSpaces.d.ts.map +1 -1
- package/dist/formatters/strings/stripLeadingZeros.d.ts.map +1 -1
- package/dist/formatters/valueState/fixedValueStateResolver.d.ts.map +1 -1
- package/dist/formatters/valueState/presentation.d.ts.map +1 -1
- package/dist/formatters/valueState/resolveValueStateClassName.d.ts.map +1 -1
- package/dist/formatters/valueState/thresholdValueStateResolver.d.ts.map +1 -1
- package/dist/formatters/valueState/types.d.ts +2 -1
- package/dist/formatters/valueState/types.d.ts.map +1 -1
- package/dist/formatters/valueState/valueStateRegistry.d.ts.map +1 -1
- package/dist/formatters/valueState/valueStateResolverConstants.d.ts +6 -0
- package/dist/formatters/valueState/valueStateResolverConstants.d.ts.map +1 -0
- package/dist/formulas/execute.d.ts +3 -2
- package/dist/formulas/execute.d.ts.map +1 -1
- package/dist/formulas/index.js +1 -1
- package/dist/formulas/isTableFormulaDependency.d.ts.map +1 -1
- package/dist/formulas/tableFormulaConstants.d.ts +12 -0
- package/dist/formulas/tableFormulaConstants.d.ts.map +1 -0
- package/dist/formulas/types.d.ts +2 -1
- package/dist/formulas/types.d.ts.map +1 -1
- package/dist/formulas/validate.d.ts +2 -1
- package/dist/formulas/validate.d.ts.map +1 -1
- package/dist/hooks/index.js +110 -107
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useBlockBrowserZoom.d.ts.map +1 -1
- package/dist/hooks/useDndSortableSensors.d.ts.map +1 -1
- package/dist/hooks/useFloatingListbox.d.ts +15 -33
- package/dist/hooks/useFloatingListbox.d.ts.map +1 -1
- package/dist/http/index.js +8 -7
- package/dist/http/index.js.map +1 -1
- package/dist/http/textResponse.d.ts.map +1 -1
- package/dist/indexed-records/createIndexedRecordsSchema.d.ts.map +1 -1
- package/dist/indexed-records/schema.js +24 -23
- package/dist/indexed-records/schema.js.map +1 -1
- package/dist/media/breakpointConstants.d.ts +5 -0
- package/dist/media/breakpointConstants.d.ts.map +1 -0
- package/dist/media/breakpoints.d.ts +2 -1
- package/dist/media/breakpoints.d.ts.map +1 -1
- package/dist/media/createNotificationTonePlayer.d.ts.map +1 -1
- package/dist/media/getCurrentFontSize.d.ts.map +1 -1
- package/dist/media/index.js +1 -1
- package/dist/media/mediaQueryConstants.d.ts +3 -0
- package/dist/media/mediaQueryConstants.d.ts.map +1 -0
- package/dist/media/responsive.d.ts +1 -1
- package/dist/media/responsive.d.ts.map +1 -1
- package/dist/media/useMatchMedia.d.ts.map +1 -1
- package/dist/media/useMediaQuery.d.ts.map +1 -1
- package/dist/metadata/baseMetaTypes.d.ts.map +1 -1
- package/dist/metadata/metadataTypes.d.ts +8 -7
- package/dist/metadata/metadataTypes.d.ts.map +1 -1
- package/dist/metadata/scalarTypeClassification.d.ts.map +1 -1
- package/dist/metadata/scalarTypeConstants.d.ts +21 -0
- package/dist/metadata/scalarTypeConstants.d.ts.map +1 -0
- package/dist/notifications/index.js +62 -62
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/notificationTypeConstants.d.ts +6 -0
- package/dist/notifications/notificationTypeConstants.d.ts.map +1 -0
- package/dist/notifications/notify.d.ts.map +1 -1
- package/dist/notifications/store.d.ts.map +1 -1
- package/dist/notifications/types.d.ts +2 -1
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/number-scale/index.js +47 -46
- package/dist/number-scale/index.js.map +1 -1
- package/dist/number-scale/marksPositionConstants.d.ts +4 -0
- package/dist/number-scale/marksPositionConstants.d.ts.map +1 -0
- package/dist/number-scale/numberScale.d.ts +1 -1
- package/dist/number-scale/numberScale.d.ts.map +1 -1
- package/dist/number-scale/types.d.ts +2 -1
- package/dist/number-scale/types.d.ts.map +1 -1
- package/dist/odata-service/builder.d.ts.map +1 -1
- package/dist/odata-service/columns.d.ts.map +1 -1
- package/dist/odata-service/entityOperationConstants.d.ts +4 -0
- package/dist/odata-service/entityOperationConstants.d.ts.map +1 -0
- package/dist/odata-service/filterDefinitionConstants.d.ts +24 -0
- package/dist/odata-service/filterDefinitionConstants.d.ts.map +1 -0
- package/dist/odata-service/filterDefinitions.d.ts +19 -17
- package/dist/odata-service/filterDefinitions.d.ts.map +1 -1
- package/dist/odata-service/filterOperationConstants.d.ts +14 -0
- package/dist/odata-service/filterOperationConstants.d.ts.map +1 -0
- package/dist/odata-service/filters.d.ts.map +1 -1
- package/dist/odata-service/formatters.d.ts.map +1 -1
- package/dist/odata-service/index.js +439 -433
- package/dist/odata-service/index.js.map +1 -1
- package/dist/odata-service/odataMetadataConstants.d.ts +8 -0
- package/dist/odata-service/odataMetadataConstants.d.ts.map +1 -0
- package/dist/odata-service/parser.d.ts +1 -3
- package/dist/odata-service/parser.d.ts.map +1 -1
- package/dist/odata-service/schema.d.ts.map +1 -1
- package/dist/odata-service/sorts.d.ts.map +1 -1
- package/dist/odata-service/sqlFilters.d.ts +10 -5
- package/dist/odata-service/sqlFilters.d.ts.map +1 -1
- package/dist/odata-service/types.d.ts +5 -3
- package/dist/odata-service/types.d.ts.map +1 -1
- package/dist/pwa/index.js +72 -71
- package/dist/pwa/index.js.map +1 -1
- package/dist/pwa/sw-cache-policy.js +47 -47
- package/dist/pwa/sw-cache-policy.js.map +1 -1
- package/dist/pwa/swCachePolicy.d.ts +5 -1
- package/dist/pwa/swCachePolicy.d.ts.map +1 -1
- package/dist/pwa/useBrowserOnlineStatus.d.ts.map +1 -1
- package/dist/query-client/broadcast.d.ts +4 -3
- package/dist/query-client/broadcast.d.ts.map +1 -1
- package/dist/query-client/createQueryRestoreSchedulerGuard.d.ts.map +1 -1
- package/dist/query-client/createQueryRestoreStorage.d.ts.map +1 -1
- package/dist/query-client/index.js +1 -1
- package/dist/query-client/invalidationBroadcast.d.ts +2 -1
- package/dist/query-client/invalidationBroadcast.d.ts.map +1 -1
- package/dist/query-client/persistence.d.ts +9 -6
- package/dist/query-client/persistence.d.ts.map +1 -1
- package/dist/query-client/queryCacheEventConstants.d.ts +11 -0
- package/dist/query-client/queryCacheEventConstants.d.ts.map +1 -0
- package/dist/query-client/queryClient.d.ts +2 -1
- package/dist/query-client/queryClient.d.ts.map +1 -1
- package/dist/query-client/queryMeta.d.ts.map +1 -1
- package/dist/query-client/sessionPersistenceConstants.d.ts +5 -0
- package/dist/query-client/sessionPersistenceConstants.d.ts.map +1 -0
- package/dist/query-client/sessionScoped.d.ts.map +1 -1
- package/dist/query-client/sessionScopedResetConstants.d.ts +4 -0
- package/dist/query-client/sessionScopedResetConstants.d.ts.map +1 -0
- package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts +2 -1
- package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts.map +1 -1
- package/dist/seo/index.js +0 -1
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/seo.d.ts +3 -2
- package/dist/seo/seo.d.ts.map +1 -1
- package/dist/seo/seoContentTypeConstants.d.ts +6 -0
- package/dist/seo/seoContentTypeConstants.d.ts.map +1 -0
- package/dist/seo/types.d.ts +2 -1
- package/dist/seo/types.d.ts.map +1 -1
- package/dist/session-storage/index.js +1 -1
- package/dist/table/cellSelection.d.ts.map +1 -1
- package/dist/table/columnSizing.d.ts +11 -3
- package/dist/table/columnSizing.d.ts.map +1 -1
- package/dist/table/index.d.ts +1 -0
- package/dist/table/index.d.ts.map +1 -1
- package/dist/table/index.js +102 -92
- package/dist/table/index.js.map +1 -1
- package/dist/table/odataAdapter.d.ts +3 -3
- package/dist/table/odataAdapter.d.ts.map +1 -1
- package/dist/table/resolveTableColumnsWidth.d.ts +9 -0
- package/dist/table/resolveTableColumnsWidth.d.ts.map +1 -0
- package/dist/table/selection.d.ts +2 -2
- package/dist/table/selection.d.ts.map +1 -1
- package/dist/table/tableColumnConstants.d.ts +5 -0
- package/dist/table/tableColumnConstants.d.ts.map +1 -0
- package/dist/table/tableSelectionConstants.d.ts +8 -0
- package/dist/table/tableSelectionConstants.d.ts.map +1 -0
- package/dist/table/tanStackFeatures.d.ts +8 -8
- package/dist/table/types.d.ts +6 -4
- package/dist/table/types.d.ts.map +1 -1
- package/dist/table/useTableRowSelection.d.ts +2 -2
- package/dist/table/useTableRowSelection.d.ts.map +1 -1
- package/dist/table-document/index.js +88 -87
- package/dist/table-document/index.js.map +1 -1
- package/dist/table-document/insertTableDocumentAxis.d.ts +2 -1
- package/dist/table-document/insertTableDocumentAxis.d.ts.map +1 -1
- package/dist/table-document/tableDocument.d.ts +2 -1
- package/dist/table-document/tableDocument.d.ts.map +1 -1
- package/dist/table-document/tableDocumentAxisGroups.d.ts +4 -3
- package/dist/table-document/tableDocumentAxisGroups.d.ts.map +1 -1
- package/dist/table-document/tableDocumentConstants.d.ts +8 -0
- package/dist/table-document/tableDocumentConstants.d.ts.map +1 -0
- package/dist/table-document/tableDocumentGeometry.d.ts.map +1 -1
- package/dist/three-scene/index.js +32 -32
- package/dist/three-scene/index.js.map +1 -1
- package/dist/three-scene/threeSceneAvailability.d.ts +4 -3
- package/dist/three-scene/threeSceneAvailability.d.ts.map +1 -1
- package/dist/three-scene/threeSceneConstants.d.ts +14 -0
- package/dist/three-scene/threeSceneConstants.d.ts.map +1 -0
- package/dist/three-scene/useThreeSceneAvailability.d.ts.map +1 -1
- package/dist/tree-table/index.js +1 -1
- package/dist/types/abapBooleanConstants.d.ts +4 -0
- package/dist/types/abapBooleanConstants.d.ts.map +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/types.d.ts +4 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/valueStateConstants.d.ts +8 -0
- package/dist/types/valueStateConstants.d.ts.map +1 -0
- package/dist/utils/cloneFunctionStrategyConstants.d.ts +4 -0
- package/dist/utils/cloneFunctionStrategyConstants.d.ts.map +1 -0
- package/dist/utils/createLazyComponent.d.ts.map +1 -1
- package/dist/utils/deepCloneWithoutFunctions.d.ts +2 -1
- package/dist/utils/deepCloneWithoutFunctions.d.ts.map +1 -1
- package/dist/utils/deepCopyWithoutFunctions.d.ts +2 -1
- package/dist/utils/deepCopyWithoutFunctions.d.ts.map +1 -1
- package/dist/utils/index.js +2 -209
- package/dist/utils/keyboard.d.ts +2 -1
- package/dist/utils/keyboard.d.ts.map +1 -1
- package/dist/utils/keyboardConstants.d.ts +16 -0
- package/dist/utils/keyboardConstants.d.ts.map +1 -0
- package/dist/validators/index.js +3 -3
- package/dist/validators/index.js.map +1 -1
- package/dist/validators/validateUrl.d.ts.map +1 -1
- package/dist/value-transformers/execute.d.ts.map +1 -1
- package/dist/value-transformers/index.js +9 -6
- package/dist/value-transformers/index.js.map +1 -1
- package/dist/value-transformers/types.d.ts +3 -2
- package/dist/value-transformers/types.d.ts.map +1 -1
- package/dist/value-transformers/valueTransformerConstants.d.ts +4 -0
- package/dist/value-transformers/valueTransformerConstants.d.ts.map +1 -0
- package/package.json +6 -5
- package/src/binary/README.mdx +1 -1
- package/src/dom/README.mdx +1 -1
- package/src/query-client/README.mdx +4 -4
- package/src/table/README.mdx +49 -23
- package/dist/chunks/dom-BK22UmgF.js.map +0 -1
- package/dist/chunks/formatDate-BUvpRI7H.js +0 -133
- package/dist/chunks/formatDate-BUvpRI7H.js.map +0 -1
- package/dist/chunks/formatters-rxriDRPk.js.map +0 -1
- package/dist/chunks/formulas-BXT_XBWI.js.map +0 -1
- package/dist/chunks/media-WK38KtMl.js +0 -191
- package/dist/chunks/media-WK38KtMl.js.map +0 -1
- package/dist/chunks/query-client-CVRfrYZM.js.map +0 -1
- package/dist/chunks/scalarTypeClassification-BZcFmIyR.js +0 -764
- package/dist/chunks/scalarTypeClassification-BZcFmIyR.js.map +0 -1
- package/dist/chunks/uuid-CUJPAbRY.js.map +0 -1
- package/dist/chunks/validate-DsUR-bFF.js +0 -608
- package/dist/chunks/validate-DsUR-bFF.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateUrl.d.ts","sourceRoot":"","sources":["../../src/validators/validateUrl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validateUrl.d.ts","sourceRoot":"","sources":["../../src/validators/validateUrl.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM;;;CAwCtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/value-transformers/execute.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,+BAA+B,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/value-transformers/execute.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,6BAA6B,EAAE,KAAK,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAGnG;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAAE,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,6BAA6B,CAelH;AAED,0GAA0G;AAC1G,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAAE,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,+BAA+B,CAGpI"}
|
|
@@ -31,12 +31,15 @@ function i(e) {
|
|
|
31
31
|
return n ? t.byId.get(n) : void 0;
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
+
//#region src/value-transformers/valueTransformerConstants.ts
|
|
35
|
+
var a = "transformer_not_found", o = "runtime_error";
|
|
36
|
+
//#endregion
|
|
34
37
|
//#region src/value-transformers/execute.ts
|
|
35
|
-
function
|
|
38
|
+
function s(e) {
|
|
36
39
|
let t = i(e.transformerId);
|
|
37
40
|
if (!t) return {
|
|
38
41
|
ok: !1,
|
|
39
|
-
reason:
|
|
42
|
+
reason: a
|
|
40
43
|
};
|
|
41
44
|
let n = t.fn;
|
|
42
45
|
return {
|
|
@@ -50,20 +53,20 @@ function a(e) {
|
|
|
50
53
|
} catch {
|
|
51
54
|
return {
|
|
52
55
|
ok: !1,
|
|
53
|
-
reason:
|
|
56
|
+
reason: o
|
|
54
57
|
};
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
};
|
|
58
61
|
}
|
|
59
|
-
function
|
|
60
|
-
let t =
|
|
62
|
+
function c(e) {
|
|
63
|
+
let t = s(e);
|
|
61
64
|
return t.ok ? t.execute(e.value) : {
|
|
62
65
|
ok: !1,
|
|
63
66
|
reason: t.reason
|
|
64
67
|
};
|
|
65
68
|
}
|
|
66
69
|
//#endregion
|
|
67
|
-
export {
|
|
70
|
+
export { s as compileValueTransformer, n as configureValueTransformerRegistry, e as createValueTransformerRegistry, c as executeValueTransformer, i as getValueTransformerById, r as getValueTransformerList };
|
|
68
71
|
|
|
69
72
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/value-transformers/registry.ts","../../src/value-transformers/execute.ts"],"sourcesContent":["import { type ValueTransformerDefinition } from \"./types\";\n\nexport type ValueTransformerRegistry = Readonly<{\n\tlist: readonly ValueTransformerDefinition[];\n\tbyId: ReadonlyMap<string, ValueTransformerDefinition>;\n}>;\n\n/** Создаёт независимый каталог с устойчивыми ID и неизменяемыми метаданными. */\nexport function createValueTransformerRegistry(definitions: readonly ValueTransformerDefinition[]): ValueTransformerRegistry {\n\tconst byId = new Map<string, ValueTransformerDefinition>();\n\tconst list: ValueTransformerDefinition[] = [];\n\n\tfor (const definition of definitions) {\n\t\tconst id = definition.id.trim();\n\t\tif (!id) throw new Error(\"ID преобразования значения не может быть пустым.\");\n\t\tif (byId.has(id)) throw new Error(`Найден дублирующийся transformerId: ${id}.`);\n\n\t\tconst normalizedDefinition: ValueTransformerDefinition = Object.freeze({\n\t\t\t...definition,\n\t\t\tid,\n\t\t\tname: definition.name.trim(),\n\t\t\tdescription: definition.description.trim(),\n\t\t\t...(definition.keywords === undefined ? {} : { keywords: Object.freeze([...definition.keywords]) })\n\t\t});\n\t\tbyId.set(id, normalizedDefinition);\n\t\tlist.push(normalizedDefinition);\n\t}\n\n\treturn Object.freeze({ list: Object.freeze(list), byId });\n}\n\nlet valueTransformerRegistry = createValueTransformerRegistry([]);\n\n/**\n * Устанавливает каталог host-приложения до первого чтения или компиляции.\n * Библиотека предоставляет механизм и не регистрирует прикладные преобразования.\n */\nexport function configureValueTransformerRegistry(registry: ValueTransformerRegistry): void {\n\tvalueTransformerRegistry = registry;\n}\n\nexport function getValueTransformerList(): readonly ValueTransformerDefinition[] {\n\treturn valueTransformerRegistry.list;\n}\n\nexport function getValueTransformerById(transformerId: string | undefined): ValueTransformerDefinition | undefined {\n\tconst id = transformerId?.trim();\n\treturn id ? valueTransformerRegistry.byId.get(id) : undefined;\n}\n","import { getValueTransformerById } from \"./registry\";\nimport { type ValueTransformerCompileResult, type ValueTransformerExecutionResult } from \"./types\";\n\n/**\n * Фиксирует доверенную функцию один раз для многократной обработки значений.\n *\n * Вход и результат не приводятся к числу и не заменяются значением по умолчанию:\n * parsing и правила пустых данных принадлежат самой функции преобразования.\n */\nexport function compileValueTransformer(args: { transformerId: string | undefined }): ValueTransformerCompileResult {\n\tconst definition = getValueTransformerById(args.transformerId);\n\tif (!definition) return { ok: false, reason:
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/value-transformers/registry.ts","../../src/value-transformers/valueTransformerConstants.ts","../../src/value-transformers/execute.ts"],"sourcesContent":["import { type ValueTransformerDefinition } from \"./types\";\n\nexport type ValueTransformerRegistry = Readonly<{\n\tlist: readonly ValueTransformerDefinition[];\n\tbyId: ReadonlyMap<string, ValueTransformerDefinition>;\n}>;\n\n/** Создаёт независимый каталог с устойчивыми ID и неизменяемыми метаданными. */\nexport function createValueTransformerRegistry(definitions: readonly ValueTransformerDefinition[]): ValueTransformerRegistry {\n\tconst byId = new Map<string, ValueTransformerDefinition>();\n\tconst list: ValueTransformerDefinition[] = [];\n\n\tfor (const definition of definitions) {\n\t\tconst id = definition.id.trim();\n\t\tif (!id) throw new Error(\"ID преобразования значения не может быть пустым.\");\n\t\tif (byId.has(id)) throw new Error(`Найден дублирующийся transformerId: ${id}.`);\n\n\t\tconst normalizedDefinition: ValueTransformerDefinition = Object.freeze({\n\t\t\t...definition,\n\t\t\tid,\n\t\t\tname: definition.name.trim(),\n\t\t\tdescription: definition.description.trim(),\n\t\t\t...(definition.keywords === undefined ? {} : { keywords: Object.freeze([...definition.keywords]) })\n\t\t});\n\t\tbyId.set(id, normalizedDefinition);\n\t\tlist.push(normalizedDefinition);\n\t}\n\n\treturn Object.freeze({ list: Object.freeze(list), byId });\n}\n\nlet valueTransformerRegistry = createValueTransformerRegistry([]);\n\n/**\n * Устанавливает каталог host-приложения до первого чтения или компиляции.\n * Библиотека предоставляет механизм и не регистрирует прикладные преобразования.\n */\nexport function configureValueTransformerRegistry(registry: ValueTransformerRegistry): void {\n\tvalueTransformerRegistry = registry;\n}\n\nexport function getValueTransformerList(): readonly ValueTransformerDefinition[] {\n\treturn valueTransformerRegistry.list;\n}\n\nexport function getValueTransformerById(transformerId: string | undefined): ValueTransformerDefinition | undefined {\n\tconst id = transformerId?.trim();\n\treturn id ? valueTransformerRegistry.byId.get(id) : undefined;\n}\n","/** Причины отказа используются и при выполнении, и в типах результата преобразования. */\nexport const VALUE_TRANSFORMER_NOT_FOUND = \"transformer_not_found\";\nexport const VALUE_TRANSFORMER_RUNTIME_ERROR = \"runtime_error\";\n","import { getValueTransformerById } from \"./registry\";\nimport { type ValueTransformerCompileResult, type ValueTransformerExecutionResult } from \"./types\";\nimport { VALUE_TRANSFORMER_NOT_FOUND, VALUE_TRANSFORMER_RUNTIME_ERROR } from \"./valueTransformerConstants\";\n\n/**\n * Фиксирует доверенную функцию один раз для многократной обработки значений.\n *\n * Вход и результат не приводятся к числу и не заменяются значением по умолчанию:\n * parsing и правила пустых данных принадлежат самой функции преобразования.\n */\nexport function compileValueTransformer(args: { transformerId: string | undefined }): ValueTransformerCompileResult {\n\tconst definition = getValueTransformerById(args.transformerId);\n\tif (!definition) return { ok: false, reason: VALUE_TRANSFORMER_NOT_FOUND };\n\tconst fn = definition.fn;\n\n\treturn {\n\t\tok: true,\n\t\texecute: (value) => {\n\t\t\ttry {\n\t\t\t\treturn { ok: true, value: fn(value) };\n\t\t\t} catch {\n\t\t\t\treturn { ok: false, reason: VALUE_TRANSFORMER_RUNTIME_ERROR };\n\t\t\t}\n\t\t}\n\t};\n}\n\n/** Разовый запуск через активный реестр; для строк таблицы предпочтительна предварительная компиляция. */\nexport function executeValueTransformer(args: { transformerId: string | undefined; value: unknown }): ValueTransformerExecutionResult {\n\tconst compiled = compileValueTransformer(args);\n\treturn compiled.ok ? compiled.execute(args.value) : { ok: false, reason: compiled.reason };\n}\n"],"mappings":";AAQA,SAAgB,EAA+B,GAA8E;CAC5H,IAAM,oBAAO,IAAI,IAAwC,GACnD,IAAqC,CAAC;CAE5C,KAAK,IAAM,KAAc,GAAa;EACrC,IAAM,IAAK,EAAW,GAAG,KAAK;EAC9B,IAAI,CAAC,GAAI,MAAU,MAAM,kDAAkD;EAC3E,IAAI,EAAK,IAAI,CAAE,GAAG,MAAU,MAAM,uCAAuC,EAAG,EAAE;EAE9E,IAAM,IAAmD,OAAO,OAAO;GACtE,GAAG;GACH;GACA,MAAM,EAAW,KAAK,KAAK;GAC3B,aAAa,EAAW,YAAY,KAAK;GACzC,GAAI,EAAW,aAAa,KAAA,IAAY,CAAC,IAAI,EAAE,UAAU,OAAO,OAAO,CAAC,GAAG,EAAW,QAAQ,CAAC,EAAE;EAClG,CAAC;EAED,AADA,EAAK,IAAI,GAAI,CAAoB,GACjC,EAAK,KAAK,CAAoB;CAC/B;CAEA,OAAO,OAAO,OAAO;EAAE,MAAM,OAAO,OAAO,CAAI;EAAG;CAAK,CAAC;AACzD;AAEA,IAAI,IAA2B,EAA+B,CAAC,CAAC;AAMhE,SAAgB,EAAkC,GAA0C;CAC3F,IAA2B;AAC5B;AAEA,SAAgB,IAAiE;CAChF,OAAO,EAAyB;AACjC;AAEA,SAAgB,EAAwB,GAA2E;CAClH,IAAM,IAAK,GAAe,KAAK;CAC/B,OAAO,IAAK,EAAyB,KAAK,IAAI,CAAE,IAAI,KAAA;AACrD;;;AC/CA,IAAa,IAA8B,yBAC9B,IAAkC;;;ACQ/C,SAAgB,EAAwB,GAA4E;CACnH,IAAM,IAAa,EAAwB,EAAK,aAAa;CAC7D,IAAI,CAAC,GAAY,OAAO;EAAE,IAAI;EAAO,QAAQ;CAA4B;CACzE,IAAM,IAAK,EAAW;CAEtB,OAAO;EACN,IAAI;EACJ,UAAU,MAAU;GACnB,IAAI;IACH,OAAO;KAAE,IAAI;KAAM,OAAO,EAAG,CAAK;IAAE;GACrC,QAAQ;IACP,OAAO;KAAE,IAAI;KAAO,QAAQ;IAAgC;GAC7D;EACD;CACD;AACD;AAGA,SAAgB,EAAwB,GAA8F;CACrI,IAAM,IAAW,EAAwB,CAAI;CAC7C,OAAO,EAAS,KAAK,EAAS,QAAQ,EAAK,KAAK,IAAI;EAAE,IAAI;EAAO,QAAQ,EAAS;CAAO;AAC1F"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type VALUE_TRANSFORMER_NOT_FOUND, type VALUE_TRANSFORMER_RUNTIME_ERROR } from "./valueTransformerConstants";
|
|
1
2
|
/**
|
|
2
3
|
* Синхронное преобразование одного исходного значения в числовое значение.
|
|
3
4
|
*
|
|
@@ -19,7 +20,7 @@ export type ValueTransformerExecutionResult = {
|
|
|
19
20
|
value: number | null | undefined;
|
|
20
21
|
} | {
|
|
21
22
|
ok: false;
|
|
22
|
-
reason:
|
|
23
|
+
reason: typeof VALUE_TRANSFORMER_NOT_FOUND | typeof VALUE_TRANSFORMER_RUNTIME_ERROR;
|
|
23
24
|
};
|
|
24
25
|
export type ValueTransformerCompiledExecutor = (value: unknown) => ValueTransformerExecutionResult;
|
|
25
26
|
export type ValueTransformerCompileResult = {
|
|
@@ -27,6 +28,6 @@ export type ValueTransformerCompileResult = {
|
|
|
27
28
|
execute: ValueTransformerCompiledExecutor;
|
|
28
29
|
} | {
|
|
29
30
|
ok: false;
|
|
30
|
-
reason:
|
|
31
|
+
reason: typeof VALUE_TRANSFORMER_NOT_FOUND;
|
|
31
32
|
};
|
|
32
33
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/value-transformers/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAE/E,oFAAoF;AACpF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,EAAE,EAAE,kBAAkB,CAAC;CACvB,CAAC,CAAC;AAEH,kFAAkF;AAClF,MAAM,MAAM,+BAA+B,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/value-transformers/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,2BAA2B,EAAE,KAAK,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAErH;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAE/E,oFAAoF;AACpF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,EAAE,EAAE,kBAAkB,CAAC;CACvB,CAAC,CAAC;AAEH,kFAAkF;AAClF,MAAM,MAAM,+BAA+B,GACxC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAC9C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,OAAO,2BAA2B,GAAG,OAAO,+BAA+B,CAAA;CAAE,CAAC;AAEtG,MAAM,MAAM,gCAAgC,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,+BAA+B,CAAC;AAEnG,MAAM,MAAM,6BAA6B,GACxC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,gCAAgC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,OAAO,2BAA2B,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Причины отказа используются и при выполнении, и в типах результата преобразования. */
|
|
2
|
+
export declare const VALUE_TRANSFORMER_NOT_FOUND = "transformer_not_found";
|
|
3
|
+
export declare const VALUE_TRANSFORMER_RUNTIME_ERROR = "runtime_error";
|
|
4
|
+
//# sourceMappingURL=valueTransformerConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"valueTransformerConstants.d.ts","sourceRoot":"","sources":["../../src/value-transformers/valueTransformerConstants.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,2BAA2B,0BAA0B,CAAC;AACnE,eAAO,MAAM,+BAA+B,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryuzaki13/react-foundation-lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "Reusable React and TypeScript foundation utilities, hooks, and primitives.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ryuzaki13",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"vite",
|
|
23
23
|
"esm"
|
|
24
24
|
],
|
|
25
|
-
"packageManager": "
|
|
25
|
+
"packageManager": "pnpm@12.4.1",
|
|
26
26
|
"type": "module",
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"files": [
|
|
@@ -241,9 +241,9 @@
|
|
|
241
241
|
"test": "vitest run",
|
|
242
242
|
"lint": "eslint .",
|
|
243
243
|
"lint:fix": "eslint . --fix",
|
|
244
|
-
"validate": "
|
|
245
|
-
"pack:dry-run": "
|
|
246
|
-
"prepublishOnly": "
|
|
244
|
+
"validate": "pnpm run lint:fix && pnpm run typecheck && pnpm run test && pnpm run build",
|
|
245
|
+
"pack:dry-run": "pnpm run validate && npm pack --dry-run",
|
|
246
|
+
"prepublishOnly": "pnpm run validate"
|
|
247
247
|
},
|
|
248
248
|
"publishConfig": {
|
|
249
249
|
"access": "public",
|
|
@@ -294,6 +294,7 @@
|
|
|
294
294
|
"immer": "^11.1.15",
|
|
295
295
|
"jiti": "^2.7.0",
|
|
296
296
|
"jsdom": "^29.1.1",
|
|
297
|
+
"prettier": "3.9.4",
|
|
297
298
|
"react": "^19.2.8",
|
|
298
299
|
"react-dom": "^19.2.8",
|
|
299
300
|
"typescript": "^6.0.3",
|
package/src/binary/README.mdx
CHANGED
package/src/dom/README.mdx
CHANGED
|
@@ -745,7 +745,7 @@ CSS scroll-snap и преобразования масштаба/поворот
|
|
|
745
745
|
|
|
746
746
|
Реальная геометрия, native anchoring, CSS smooth и browser clamp проверяются
|
|
747
747
|
в [browser fixture](./scroll-anchor/scroll-anchor.browser.html). Для повторения
|
|
748
|
-
запустить `
|
|
748
|
+
запустить `pnpm exec vite dev --host 127.0.0.1 --port 6011 --strictPort`, открыть
|
|
749
749
|
`http://127.0.0.1:6011/src/dom/scroll-anchor/scroll-anchor.browser.html` и нажать
|
|
750
750
|
«Запустить проверки». Результаты и измерения выводятся на странице; этот
|
|
751
751
|
dev-only сценарий дополняет unit-тесты, а не заменяет проверку React-host.
|
|
@@ -2504,10 +2504,10 @@ queryClient.clear();
|
|
|
2504
2504
|
### Проверки самого пакета
|
|
2505
2505
|
|
|
2506
2506
|
```bash
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2507
|
+
pnpm run typecheck
|
|
2508
|
+
pnpm run lint
|
|
2509
|
+
pnpm run test src/query-client
|
|
2510
|
+
pnpm run build
|
|
2511
2511
|
```
|
|
2512
2512
|
|
|
2513
2513
|
Profile tests подтверждают:
|
package/src/table/README.mdx
CHANGED
|
@@ -394,7 +394,7 @@ const orderColumns = [
|
|
|
394
394
|
] satisfies TableColumnDef<Order>[];
|
|
395
395
|
```
|
|
396
396
|
|
|
397
|
-
Число `24` в `meta.width` означает `24em`, а не `24px`.
|
|
397
|
+
Число `24` в `meta.width` означает `24em`, а не `24px`. Размеры resize хранятся отдельно в `TableColumnSizingState`; по умолчанию это px, при явном выборе единицы поддерживаются em.
|
|
398
398
|
|
|
399
399
|
### 3. Вычислите selection
|
|
400
400
|
|
|
@@ -538,7 +538,7 @@ const fullNameColumn: TableColumnDef<Person, string> = {
|
|
|
538
538
|
|
|
539
539
|
```ts
|
|
540
540
|
interface TableColumnMeta {
|
|
541
|
-
width?: number | "auto" | `${number}
|
|
541
|
+
width?: number | "auto" | `${number}%` | `${number}px` | `${number}em`;
|
|
542
542
|
align?: "left" | "center" | "right";
|
|
543
543
|
mergeDuplicates?: boolean;
|
|
544
544
|
formatting?: TableColumnFormattingMeta;
|
|
@@ -547,13 +547,15 @@ interface TableColumnMeta {
|
|
|
547
547
|
|
|
548
548
|
#### `width`
|
|
549
549
|
|
|
550
|
-
| Значение
|
|
551
|
-
|
|
|
552
|
-
| `12`
|
|
553
|
-
| `"auto"`
|
|
554
|
-
| `"25%"`
|
|
550
|
+
| Значение | Смысл |
|
|
551
|
+
| ---------- | --------------------------------------- |
|
|
552
|
+
| `12` | `12em` в декларативной metadata колонки |
|
|
553
|
+
| `"auto"` | автоматическая CSS-ширина |
|
|
554
|
+
| `"25%"` | процентная CSS-ширина |
|
|
555
|
+
| `"120px"` | фиксированная ширина в px |
|
|
556
|
+
| `"12.5em"` | явная относительная ширина |
|
|
555
557
|
|
|
556
|
-
Это не то же самое, что `TableColumnSizingState`: sizing state хранит
|
|
558
|
+
Это не то же самое, что `TableColumnSizingState`: sizing state хранит размеры resize runtime в выбранной единице (`px` по умолчанию, `em` при явном включении).
|
|
557
559
|
|
|
558
560
|
#### `align`
|
|
559
561
|
|
|
@@ -904,12 +906,33 @@ if (nextOrder) {
|
|
|
904
906
|
|
|
905
907
|
Не смешивайте:
|
|
906
908
|
|
|
907
|
-
| Представление | Пример | Единица
|
|
908
|
-
| ------------------------ | ----------------------- |
|
|
909
|
-
| `TableColumnMeta.width` | `12`, `"auto"`, `"25%"` | число означает `em`
|
|
910
|
-
| `TableColumnSizingState` | `{ amount: 160 }` |
|
|
909
|
+
| Представление | Пример | Единица |
|
|
910
|
+
| ------------------------ | ----------------------- | ------------------------------------ |
|
|
911
|
+
| `TableColumnMeta.width` | `12`, `"auto"`, `"25%"` | число означает `em` |
|
|
912
|
+
| `TableColumnSizingState` | `{ amount: 160 }` | px по умолчанию; em при явном выборе |
|
|
911
913
|
|
|
912
|
-
Helpers этого раздела работают со вторым
|
|
914
|
+
Helpers этого раздела работают со вторым представлением. Необязательный аргумент `unit: TableColumnSizingUnit` выбирает `"px"` (по умолчанию) или `"em"`. Единица должна совпадать у нормализации, UI и сохранённого профиля; изменение единицы не конвертирует существующие числа.
|
|
915
|
+
|
|
916
|
+
Для `em` минимальная ширина по умолчанию равна `DEFAULT_TABLE_COLUMN_MIN_WIDTH_EM` (`4em`); размеры и явно переданный minimum сохраняют до четырёх знаков после запятой:
|
|
917
|
+
|
|
918
|
+
```ts
|
|
919
|
+
normalizeTableColumnWidth(12.345678, undefined, "em"); // 12.3456
|
|
920
|
+
normalizeTableColumnSizing({ name: 20.5 }, undefined, "em"); // { name: 20.5 }
|
|
921
|
+
patchTableColumnWidth({ name: 20.5 }, "amount", 10.25, undefined, "em");
|
|
922
|
+
// { name: 20.5, amount: 10.25 }
|
|
923
|
+
```
|
|
924
|
+
|
|
925
|
+
### `resolveTableColumnsWidth`
|
|
926
|
+
|
|
927
|
+
Суммирует определённые ширины видимых колонок в `em` и `px`, сохраняя CSS-единицы для SSR и масштабирования шрифта:
|
|
928
|
+
|
|
929
|
+
```ts
|
|
930
|
+
resolveTableColumnsWidth(["20em", "10.5em"]); // "calc(20em + 10.5em)"
|
|
931
|
+
resolveTableColumnsWidth(["20em", "120px"]); // "calc(20em + 120px)"
|
|
932
|
+
resolveTableColumnsWidth(["auto", "20em"]); // undefined
|
|
933
|
+
```
|
|
934
|
+
|
|
935
|
+
Пустой набор, проценты и неподдерживаемые значения возвращают `undefined`: для них общей шириной управляет браузер. Результат предназначен для `width` таблицы с `table-layout: fixed`.
|
|
913
936
|
|
|
914
937
|
### `DEFAULT_TABLE_COLUMN_MIN_WIDTH`
|
|
915
938
|
|
|
@@ -927,7 +950,7 @@ normalizeTableColumnWidth(12); // 60
|
|
|
927
950
|
normalizeTableColumnWidth(Number.NaN, 80); // 80
|
|
928
951
|
```
|
|
929
952
|
|
|
930
|
-
|
|
953
|
+
Алгоритм для единицы `px`:
|
|
931
954
|
|
|
932
955
|
1. Проверяет `minWidth`.
|
|
933
956
|
2. Если minimum не finite или не больше нуля, использует `60`.
|
|
@@ -2773,14 +2796,17 @@ it("не активирует строку по клику на кнопку", (
|
|
|
2773
2796
|
|
|
2774
2797
|
### Column sizing
|
|
2775
2798
|
|
|
2776
|
-
| API
|
|
2777
|
-
|
|
|
2778
|
-
| `TableColumnSizingState`
|
|
2779
|
-
| `
|
|
2780
|
-
| `
|
|
2781
|
-
| `
|
|
2782
|
-
| `
|
|
2783
|
-
| `
|
|
2799
|
+
| API | Вид | Назначение |
|
|
2800
|
+
| ----------------------------------- | -------- | --------------------------------------------- |
|
|
2801
|
+
| `TableColumnSizingState` | type | `Record<columnId, width>` в выбранной единице |
|
|
2802
|
+
| `TableColumnSizingUnit` | type | `"px"` или `"em"` |
|
|
2803
|
+
| `DEFAULT_TABLE_COLUMN_MIN_WIDTH_EM` | constant | default minimum `4em` |
|
|
2804
|
+
| `resolveTableColumnsWidth` | function | сумма определённых ширин колонок в CSS |
|
|
2805
|
+
| `DEFAULT_TABLE_COLUMN_MIN_WIDTH` | constant | default minimum `60` px |
|
|
2806
|
+
| `normalizeTableColumnWidth` | function | размер в выбранной единице не меньше minimum |
|
|
2807
|
+
| `normalizeTableColumnSizing` | function | очищает весь sizing state |
|
|
2808
|
+
| `patchTableColumnWidth` | function | immutable add/update одной ширины |
|
|
2809
|
+
| `removeTableColumnWidth` | function | immutable delete одной ширины |
|
|
2784
2810
|
|
|
2785
2811
|
### Row selection
|
|
2786
2812
|
|
|
@@ -2935,7 +2961,7 @@ const column = {
|
|
|
2935
2961
|
};
|
|
2936
2962
|
```
|
|
2937
2963
|
|
|
2938
|
-
Здесь `120em`, а не `120px`.
|
|
2964
|
+
Здесь `120em`, а не `120px`. Размеры resize храните в `TableColumnSizingState`, сохраняя выбранную единицу.
|
|
2939
2965
|
|
|
2940
2966
|
### Считать `normalizeTableColumnOrder` полным restore
|
|
2941
2967
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dom-BK22UmgF.js","names":[],"sources":["../../src/dom/downloadFile.ts","../../src/dom/installFaviconOverride.ts","../../src/dom/getOrCreatePortalRoot.ts","../../src/dom/observeElementResize.ts","../../src/dom/scroll-anchor/captureScrollAnchor.ts","../../src/dom/useClickOutside.ts","../../src/dom/useElementHeightObserver.ts","../../src/dom/useEscapeDismiss.ts","../../src/dom/useOverlayFocus.ts","../../src/dom/useFocusTrap.ts","../../src/dom/useIntersectionObserver.ts","../../src/dom/useIsTouchDevice.ts","../../src/dom/document-scroll/canConsumeVerticalTouchScroll.ts","../../src/dom/document-scroll/isNativeTouchInteraction.ts","../../src/dom/document-scroll/attachDocumentTouchScrollGuard.ts","../../src/dom/document-scroll/acquireDocumentScrollLock.ts","../../src/dom/useDocumentScrollLock.ts","../../src/dom/visual-viewport/attachVisualViewportFrame.ts","../../src/dom/useVisualViewportFrame.ts"],"sourcesContent":["export function downloadFileFromObjectURL(filename: string, objectUrl: string) {\n\tconst link = document.createElement(\"a\");\n\n\tlink.href = objectUrl;\n\tlink.download = filename;\n\tlink.click();\n\n\twindow.setTimeout(() => {\n\t\twindow.URL.revokeObjectURL(objectUrl);\n\t}, 0);\n}\n\nexport function downloadFileFromBlob(filename: string, blob: Blob) {\n\tconst objectUrl = window.URL.createObjectURL(blob);\n\tdownloadFileFromObjectURL(filename, objectUrl);\n}\n\nexport function downloadFileFromJson(filename: string, payload: unknown) {\n\tconst blob = new Blob([JSON.stringify(payload, null, 2)], { type: \"application/json;charset=utf-8\" });\n\tdownloadFileFromBlob(filename, blob);\n}\n","/**\n * Временный SVG favicon с симметричным восстановлением атрибутов. Сохраняет\n * media исходных links; не меняет Apple/mask icons и не удаляет чужие узлы head.\n */\nexport function installFaviconOverride(document: Document, href: string): () => void {\n\tconst icons = [...document.querySelectorAll<HTMLLinkElement>('link[rel=\"icon\"]')];\n\tconst snapshots = icons.map((icon) => ({\n\t\ticon,\n\t\thref: icon.getAttribute(\"href\"),\n\t\ttype: icon.getAttribute(\"type\"),\n\t\tsizes: icon.getAttribute(\"sizes\")\n\t}));\n\tfor (const icon of icons) {\n\t\ticon.setAttribute(\"href\", href);\n\t\ticon.setAttribute(\"type\", \"image/svg+xml\");\n\t\ticon.setAttribute(\"sizes\", \"any\");\n\t}\n\treturn () => {\n\t\tfor (const snapshot of snapshots) {\n\t\t\tif (snapshot.icon.getAttribute(\"href\") !== href) continue;\n\t\t\tfor (const attribute of [\"href\", \"type\", \"sizes\"] as const) {\n\t\t\t\tconst value = snapshot[attribute];\n\t\t\t\tif (value === null) snapshot.icon.removeAttribute(attribute);\n\t\t\t\telse snapshot.icon.setAttribute(attribute, value);\n\t\t\t}\n\t\t}\n\t};\n}\n","export function getOrCreatePortalRoot(id: string): HTMLElement | null {\n\tif (typeof document === \"undefined\") {\n\t\treturn null;\n\t}\n\n\tconst existingElement = document.getElementById(id);\n\tif (existingElement instanceof HTMLElement) {\n\t\treturn existingElement;\n\t}\n\n\tconst portalRoot = document.createElement(\"div\");\n\tportalRoot.id = id;\n\tdocument.body.append(portalRoot);\n\n\treturn portalRoot;\n}\n","/**\n * Наблюдает изменение одного DOM-контейнера без React state. Callback вызывается\n * в batched delivery ResizeObserver, поэтому дополнительный animation frame не нужен.\n * Возвращённый cleanup отключает observer и игнорирует уже поставленную delivery.\n */\nexport function observeElementResize(element: HTMLElement, onResize: () => void): () => void {\n\tif (typeof ResizeObserver === \"undefined\") return () => undefined;\n\tlet active = true;\n\tconst observer = new ResizeObserver((entries) => {\n\t\tif (active && entries.some((entry) => entry.target === element)) onResize();\n\t});\n\tobserver.observe(element);\n\treturn () => {\n\t\tif (!active) return;\n\t\tactive = false;\n\t\tobserver.disconnect();\n\t};\n}\n","import { type CapturedScrollAnchor } from \"./scrollAnchorTypes\";\n\n// Один scroll host не может одновременно компенсировать один и тот же prepend дважды.\nconst activeAnchors = new WeakMap<HTMLElement, CapturedScrollAnchor>();\n\n/**\n * Захватывает позицию сохраняемого элемента перед изменением обычного вертикального списка.\n * Вызывать только на browser event/effect boundary; restore — после DOM commit, release — при отмене.\n * Новый захват того же viewport завершает предыдущий без прокрутки.\n */\nexport function captureScrollAnchor(viewport: HTMLElement | null, anchor: HTMLElement | null): CapturedScrollAnchor | null {\n\tif (!viewport?.isConnected || !anchor?.isConnected || viewport === anchor || !viewport.contains(anchor)) return null;\n\n\tactiveAnchors.get(viewport)?.release();\n\tconst initialOffset =\n\t\tanchor.getBoundingClientRect().top - viewport.getBoundingClientRect().top - viewport.clientTop + viewport.scrollTop;\n\tconst initialStyle = viewport.style.getPropertyValue(\"overflow-anchor\");\n\tconst initialPriority = viewport.style.getPropertyPriority(\"overflow-anchor\");\n\tlet active = true;\n\n\t// Native anchoring иначе успеет компенсировать prepend до restore и приведёт к двойному сдвигу.\n\tviewport.style.setProperty(\"overflow-anchor\", \"none\", \"important\");\n\t// В браузере без этого CSS-свойства native anchoring тоже отсутствует: сравниваем фактически принятый стиль.\n\tconst ownedStyle = viewport.style.getPropertyValue(\"overflow-anchor\");\n\tconst ownedPriority = viewport.style.getPropertyPriority(\"overflow-anchor\");\n\tconst ownsStyle = () =>\n\t\tviewport.style.getPropertyValue(\"overflow-anchor\") === ownedStyle &&\n\t\tviewport.style.getPropertyPriority(\"overflow-anchor\") === ownedPriority;\n\n\tconst operation: CapturedScrollAnchor = {\n\t\trelease() {\n\t\t\tif (!active) return;\n\t\t\tactive = false;\n\t\t\tactiveAnchors.delete(viewport);\n\t\t\t// Не затираем новое решение host, если он сам изменил свойство во время ожидания.\n\t\t\tif (!ownsStyle()) return;\n\t\t\tif (initialStyle) viewport.style.setProperty(\"overflow-anchor\", initialStyle, initialPriority);\n\t\t\telse viewport.style.removeProperty(\"overflow-anchor\");\n\t\t},\n\t\trestore() {\n\t\t\tif (!active) return false;\n\t\t\ttry {\n\t\t\t\tif (!viewport.isConnected || !anchor.isConnected || !viewport.contains(anchor) || !ownsStyle()) return false;\n\t\t\t\tconst currentOffset =\n\t\t\t\t\tanchor.getBoundingClientRect().top - viewport.getBoundingClientRect().top - viewport.clientTop + viewport.scrollTop;\n\t\t\t\tconst delta = currentOffset - initialOffset;\n\t\t\t\t// Content-space delta не отменяет ручную прокрутку между запросом и commit.\n\t\t\t\t// Instant не наследует CSS smooth; горизонтальная позиция остаётся неизменной.\n\t\t\t\tif (delta !== 0) viewport.scrollBy({ top: delta, behavior: \"instant\" });\n\t\t\t\treturn true;\n\t\t\t} finally {\n\t\t\t\toperation.release();\n\t\t\t}\n\t\t}\n\t};\n\tactiveAnchors.set(viewport, operation);\n\treturn operation;\n}\n","import { RefObject, useEffect } from \"react\";\n\nexport function useClickOutside(ref: RefObject<HTMLElement | null> | RefObject<HTMLElement | null>[], handler: () => void) {\n\tuseEffect(() => {\n\t\tconst handleClickOutside = (event: MouseEvent) => {\n\t\t\tif (Array.isArray(ref)) {\n\t\t\t\tlet isOutside = true;\n\t\t\t\tfor (const r of ref) {\n\t\t\t\t\tif (r.current && r.current.contains(event.target as Node)) {\n\t\t\t\t\t\tisOutside = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isOutside) {\n\t\t\t\t\thandler();\n\t\t\t\t}\n\t\t\t} else if (ref.current && !ref.current.contains(event.target as Node)) {\n\t\t\t\thandler();\n\t\t\t}\n\t\t};\n\n\t\tdocument.addEventListener(\"mousedown\", handleClickOutside);\n\t\treturn () => document.removeEventListener(\"mousedown\", handleClickOutside);\n\t}, [ref, handler]);\n}\n","import { type RefObject, useLayoutEffect, useState } from \"react\";\n\nexport function useElementHeightObserver<TElement extends HTMLElement>(elementRef: RefObject<TElement | null>) {\n\tconst [height, setHeight] = useState(0);\n\n\tuseLayoutEffect(() => {\n\t\tconst element = elementRef.current;\n\t\tif (!element) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst observer = new ResizeObserver((entries) => {\n\t\t\tconst nextHeight = entries[0]?.contentRect.height ?? element.getBoundingClientRect().height;\n\t\t\tsetHeight(nextHeight);\n\t\t});\n\t\tobserver.observe(element);\n\n\t\treturn () => observer.disconnect();\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/refs\n\t}, [elementRef.current]);\n\n\treturn height;\n}\n","import { RefObject, useEffect, useEffectEvent } from \"react\";\n\ninterface UseEscapeDismissOptions {\n\tactive: boolean;\n\tonDismiss: () => void;\n\tenabled?: boolean;\n\tdocumentTarget?: Document | null;\n\tcontainerRef?: RefObject<HTMLElement | null>;\n}\n\n/**\n * Подписывает overlay на закрытие по клавише Escape.\n */\nexport function useEscapeDismiss({ active, onDismiss, enabled = true, documentTarget, containerRef }: UseEscapeDismissOptions) {\n\tconst dismiss = useEffectEvent(() => onDismiss());\n\n\tuseEffect(() => {\n\t\tif (!active || !enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst targetDocument = documentTarget ?? (typeof document === \"undefined\" ? null : document);\n\t\tif (!targetDocument) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst handleKeyDown = (event: KeyboardEvent) => {\n\t\t\tif (event.key !== \"Escape\" /*|| event.defaultPrevented*/) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst activeElement = targetDocument.activeElement;\n\t\t\tconst container = containerRef?.current;\n\t\t\tif (container && activeElement instanceof Node && activeElement !== container && !container.contains(activeElement)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\t\t\tdismiss();\n\t\t};\n\n\t\ttargetDocument.addEventListener(\"keydown\", handleKeyDown, true);\n\t\treturn () => targetDocument.removeEventListener(\"keydown\", handleKeyDown, true);\n\t}, [active, enabled, documentTarget, containerRef]);\n}\n","import { RefObject, useEffect, useEffectEvent, useRef } from \"react\";\n\nconst focusableElementsSelector =\n\t'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [contenteditable=\"true\"]:not([tabindex=\"-1\"]), [contenteditable=\"\"]:not([tabindex=\"-1\"]), [tabindex]:not([tabindex=\"-1\"]):not([disabled])';\n\nexport interface UseOverlayFocusOptions<T extends HTMLElement> {\n\tactive: boolean;\n\ttrapFocus?: boolean;\n\trestoreFocus?: boolean;\n\tinitialFocus?: \"auto\" | \"container\" | ((container: T) => HTMLElement | null | undefined);\n\trestoreFocusTarget?: () => HTMLElement | null | undefined;\n\tcontainerRef?: RefObject<T | null>;\n}\n\n/**\n * Возвращает ref overlay-контейнера и управляет начальными/возвратными переходами фокуса.\n * Открытие и закрытие не прокручивают документ: портал может получить фокус\n * до завершения позиционирования. Пользовательский Tab по-прежнему раскрывает\n * выбранный элемент в прокручиваемом содержимом overlay.\n */\nexport function useOverlayFocus<T extends HTMLElement>({\n\tactive,\n\ttrapFocus = false,\n\trestoreFocus = true,\n\tinitialFocus = \"auto\",\n\trestoreFocusTarget,\n\tcontainerRef\n}: UseOverlayFocusOptions<T>) {\n\tconst internalOverlayRef = useRef<T | null>(null);\n\tconst overlayRef = containerRef ?? internalOverlayRef;\n\tconst previousActiveElementRef = useRef<HTMLElement | null>(null);\n\n\t/**\n\t * Собирает фокусируемые элементы overlay в актуальном DOM-порядке.\n\t */\n\tconst getFocusableElements = useEffectEvent((container: T) =>\n\t\tArray.from(container.querySelectorAll<HTMLElement>(focusableElementsSelector)).filter(\n\t\t\t(element) => !element.hasAttribute(\"aria-hidden\")\n\t\t)\n\t);\n\n\t/**\n\t * Вычисляет стартовый фокус при открытии overlay.\n\t */\n\tconst resolveInitialFocus = useEffectEvent((container: T) => {\n\t\tif (initialFocus === \"container\") {\n\t\t\treturn container;\n\t\t}\n\n\t\tif (typeof initialFocus === \"function\") {\n\t\t\treturn initialFocus(container) ?? container;\n\t\t}\n\n\t\tconst focusableElements = getFocusableElements(container);\n\t\treturn (\n\t\t\tfocusableElements.find((element) => element.hasAttribute(\"autofocus\") || element.hasAttribute(\"autoFocus\")) ??\n\t\t\tfocusableElements[0] ??\n\t\t\tcontainer\n\t\t);\n\t});\n\n\t/**\n\t * Вычисляет элемент, которому нужно вернуть фокус после закрытия overlay.\n\t */\n\tconst resolveRestoreFocusTarget = useEffectEvent(() => restoreFocusTarget?.() ?? previousActiveElementRef.current);\n\n\tuseEffect(() => {\n\t\tif (!active) {\n\t\t\treturn;\n\t\t}\n\n\t\tpreviousActiveElementRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n\t\tlet overlayElement: T | null = null;\n\t\tlet rafId = 0;\n\n\t\t/**\n\t\t * Цикл откладывает инициализацию, пока ref контейнера не будет привязан к DOM.\n\t\t */\n\t\tconst attachOverlay = () => {\n\t\t\toverlayElement = overlayRef.current;\n\t\t\tif (!overlayElement) {\n\t\t\t\trafId = window.requestAnimationFrame(attachOverlay);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst focusTarget = resolveInitialFocus(overlayElement);\n\t\t\tif (focusTarget instanceof HTMLElement && focusTarget.isConnected) {\n\t\t\t\tfocusTarget.focus({ preventScroll: true });\n\t\t\t}\n\n\t\t\tif (trapFocus) {\n\t\t\t\toverlayElement.addEventListener(\"keydown\", handleTabKey);\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Зацикливает Tab внутри overlay, пока он открыт как модальный слой.\n\t\t */\n\t\tconst handleTabKey = (event: KeyboardEvent) => {\n\t\t\tif (!trapFocus || event.key !== \"Tab\" || !overlayElement) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst focusableElements = getFocusableElements(overlayElement);\n\t\t\tif (focusableElements.length === 0) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\toverlayElement.focus();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst firstElement = focusableElements[0];\n\t\t\tconst lastElement = focusableElements[focusableElements.length - 1];\n\t\t\tconst activeElement = document.activeElement;\n\n\t\t\tif (event.shiftKey) {\n\t\t\t\tif (activeElement === firstElement || activeElement === overlayElement) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tlastElement.focus();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (activeElement === lastElement) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tfirstElement.focus();\n\t\t\t}\n\t\t};\n\n\t\tattachOverlay();\n\n\t\treturn () => {\n\t\t\twindow.cancelAnimationFrame(rafId);\n\t\t\tif (trapFocus && overlayElement) {\n\t\t\t\toverlayElement.removeEventListener(\"keydown\", handleTabKey);\n\t\t\t}\n\n\t\t\tif (!restoreFocus) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst restoreTarget = resolveRestoreFocusTarget();\n\t\t\tif (restoreTarget?.isConnected) {\n\t\t\t\trestoreTarget.focus({ preventScroll: true });\n\t\t\t}\n\t\t};\n\t}, [active, trapFocus, restoreFocus, overlayRef]);\n\n\treturn overlayRef;\n}\n","import { useOverlayFocus } from \"./useOverlayFocus\";\n\n/**\n * Совместимый wrapper для overlay с фокус-ловушкой.\n */\nexport const useFocusTrap = (isOpen: boolean) => {\n\treturn useOverlayFocus<HTMLDivElement>({ active: isOpen, trapFocus: true, restoreFocus: true, initialFocus: \"auto\" });\n};\n","import { useEffect, useState } from \"react\";\n\nexport function useIntersectionObserver(ref: React.RefObject<Element | null>, options?: IntersectionObserverInit) {\n\tconst [isIntersecting, setIsIntersecting] = useState(false);\n\n\tuseEffect(() => {\n\t\tconst el = ref.current;\n\t\tif (!el) return;\n\n\t\tconst observer = new IntersectionObserver(([entry]) => {\n\t\t\tsetIsIntersecting(entry.isIntersecting);\n\t\t}, options);\n\n\t\tobserver.observe(el);\n\n\t\treturn () => {\n\t\t\tif (el) {\n\t\t\t\tobserver.unobserve(el);\n\t\t\t}\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [options, ref]); // не забыть, что ref.current может меняться\n\n\treturn { isIntersecting };\n}\n","import { useEffect, useState } from \"react\";\n\nexport const useIsTouchDevice = () => {\n\tconst [isTouchDevice, setIsTouchDevice] = useState(false);\n\n\tuseEffect(() => {\n\t\tconst checkTouchDevice = () => {\n\t\t\tconst isTouch = window.matchMedia(\"(pointer: coarse)\").matches || \"ontouchstart\" in window || navigator.maxTouchPoints > 0;\n\t\t\tsetIsTouchDevice(isTouch);\n\t\t};\n\n\t\tcheckTouchDevice();\n\n\t\t// Обработчик для изменений в типе устройства\n\t\twindow.addEventListener(\"resize\", checkTouchDevice);\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"resize\", checkTouchDevice);\n\t\t};\n\t}, []);\n\n\treturn isTouchDevice;\n};\n","/** Проверяет обычную вложенную scroll-цепочку; корневой документ не является разрешённым host. */\nexport function canConsumeVerticalTouchScroll(documentTarget: Document, path: readonly EventTarget[], deltaY: number): boolean {\n\tconst view = documentTarget.defaultView;\n\tif (!view) return true;\n\tfor (const entry of path) {\n\t\tif (entry === documentTarget.body || entry === documentTarget.documentElement) break;\n\t\tif (!(entry instanceof view.Element) || !entry.isConnected) continue;\n\t\tconst style = view.getComputedStyle(entry);\n\t\tif (!/^(auto|scroll|overlay)$/.test(style.overflowY)) continue;\n\t\t// Reverse/writing-mode layout имеет другую систему координат. В этом patch\n\t\t// не подменяем её предположением 0..max и не реализуем собственную scroll physics.\n\t\tif (style.flexDirection === \"column-reverse\" || (style.writingMode && style.writingMode !== \"horizontal-tb\")) return true;\n\t\tconst maximum = Math.max(0, entry.scrollHeight - entry.clientHeight);\n\t\tconst top = Math.max(0, Math.min(maximum, entry.scrollTop));\n\t\t// scrollTop дробный, а scrollHeight/clientHeight округлены: 1 CSS px\n\t\t// допуска перекрывает ложный остаток на физически достигнутом краю.\n\t\tif (deltaY > 0 ? maximum - top > 1 : top > 1) return true;\n\t\t// На краю contain/none движение не должно переходить к следующему ancestor.\n\t\tif (/^(contain|none)$/.test(style.overscrollBehaviorY)) return false;\n\t}\n\treturn false;\n}\n","/** Редактирование/выделение остаются у браузера: перехват move способен сорвать drag каретки. */\nexport function isNativeTouchInteraction(documentTarget: Document, path: readonly EventTarget[]): boolean {\n\tconst view = documentTarget.defaultView;\n\tif (!view) return true;\n\tlet editableBoundarySeen = false;\n\tlet target: Element | undefined;\n\tfor (const entry of path) {\n\t\tif (!(entry instanceof view.Element)) continue;\n\t\ttarget ??= entry;\n\t\tif (entry.matches(\"input:not(:disabled), textarea:not(:disabled), select:not(:disabled), audio[controls], video[controls]\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (editableBoundarySeen) continue;\n\t\tconst editable = entry.getAttribute(\"contenteditable\")?.toLowerCase();\n\t\tif (editable === \"\" || editable === \"true\" || editable === \"plaintext-only\") return true;\n\t\tif (editable === \"false\") editableBoundarySeen = true;\n\t}\n\tconst selection = documentTarget.getSelection();\n\t// Чужое выделение не отключает защиту заголовка/фона на всей странице.\n\tif (!target || !selection || selection.isCollapsed) return false;\n\tfor (let index = 0; index < selection.rangeCount; index += 1) {\n\t\tif (selection.getRangeAt(index).intersectsNode(target)) return true;\n\t}\n\treturn false;\n}\n","import { canConsumeVerticalTouchScroll } from \"./canConsumeVerticalTouchScroll\";\nimport { isNativeTouchInteraction } from \"./isNativeTouchInteraction\";\n\ntype TouchScrollObservation = Readonly<{\n\tidentifier: number;\n\tx: number;\n\ty: number;\n\tpath: readonly EventTarget[];\n}>;\n\n/**\n * Safari может передать вертикальный pan корню при открытой клавиатуре даже\n * с fixed body. Страхуем пустую область/достигнутый край, не имитируя скроллинг.\n * Один listener set живёт ровно столько же, сколько общий document lock.\n */\nexport function attachDocumentTouchScrollGuard(documentTarget: Document): () => void {\n\tconst view = documentTarget.defaultView;\n\tlet observation: TouchScrollObservation | null = null;\n\tlet bypassGesture = false;\n\n\tconst onStart = (event: TouchEvent): void => {\n\t\t// После pinch даже оставшийся один палец принадлежит тому же native gesture.\n\t\tif (bypassGesture) return;\n\t\tconst touch = event.touches[0];\n\t\tconst path = event.composedPath();\n\t\tif (\n\t\t\tevent.touches.length !== 1 ||\n\t\t\t!touch ||\n\t\t\t(view?.visualViewport?.scale ?? 1) > 1 ||\n\t\t\tisNativeTouchInteraction(documentTarget, path)\n\t\t) {\n\t\t\tbypassGesture = true;\n\t\t\tobservation = null;\n\t\t\treturn;\n\t\t}\n\t\tobservation = { identifier: touch.identifier, x: touch.clientX, y: touch.clientY, path };\n\t};\n\n\tconst onMove = (event: TouchEvent): void => {\n\t\tif (bypassGesture || !observation) return;\n\t\tconst touch = event.touches[0];\n\t\tif (event.touches.length !== 1 || !touch || touch.identifier !== observation.identifier || (view?.visualViewport?.scale ?? 1) > 1) {\n\t\t\tbypassGesture = true;\n\t\t\tobservation = null;\n\t\t\treturn;\n\t\t}\n\t\tconst { x, y, path } = observation;\n\t\tconst deltaX = x - touch.clientX;\n\t\tconst deltaY = y - touch.clientY;\n\t\tobservation = { identifier: touch.identifier, x: touch.clientX, y: touch.clientY, path };\n\t\tif (isNativeTouchInteraction(documentTarget, path)) {\n\t\t\tbypassGesture = true;\n\t\t\treturn;\n\t\t}\n\t\t// Горизонтальные жесты, wheel и touchstart остаются без изменений.\n\t\tif (!event.cancelable || event.defaultPrevented || !deltaY || Math.abs(deltaX) >= Math.abs(deltaY)) return;\n\t\tif (!canConsumeVerticalTouchScroll(documentTarget, path, deltaY)) event.preventDefault();\n\t};\n\n\tconst onEnd = (event: TouchEvent): void => {\n\t\tif (event.touches.length > 0) return;\n\t\tobservation = null;\n\t\tbypassGesture = false;\n\t};\n\n\tdocumentTarget.addEventListener(\"touchstart\", onStart, { capture: true, passive: true });\n\tdocumentTarget.addEventListener(\"touchmove\", onMove, { capture: true, passive: false });\n\tdocumentTarget.addEventListener(\"touchend\", onEnd, { capture: true, passive: true });\n\tdocumentTarget.addEventListener(\"touchcancel\", onEnd, { capture: true, passive: true });\n\treturn () => {\n\t\tdocumentTarget.removeEventListener(\"touchstart\", onStart, true);\n\t\tdocumentTarget.removeEventListener(\"touchmove\", onMove, true);\n\t\tdocumentTarget.removeEventListener(\"touchend\", onEnd, true);\n\t\tdocumentTarget.removeEventListener(\"touchcancel\", onEnd, true);\n\t\tobservation = null;\n\t};\n}\n","import { attachDocumentTouchScrollGuard } from \"./attachDocumentTouchScrollGuard\";\n\ntype InlineProperty = Readonly<{ name: string; value: string; priority: string }>;\n\ntype DocumentScrollLock = Readonly<{\n\tleases: Map<symbol, boolean>;\n\tupdateCompensation: () => void;\n\trestore: () => void;\n}>;\n\nconst locks = new WeakMap<Document, DocumentScrollLock>();\n\n/** Снимок ограничен принадлежащими lock свойствами, остальные inline-правки не затрагиваются. */\nfunction captureProperties(style: CSSStyleDeclaration, names: readonly string[]): readonly InlineProperty[] {\n\treturn names.map((name) => ({ name, value: style.getPropertyValue(name), priority: style.getPropertyPriority(name) }));\n}\n\nfunction restoreProperties(style: CSSStyleDeclaration, properties: readonly InlineProperty[]): void {\n\t// Сначала снимаем весь принадлежащий нам shorthand/longhand набор: иначе позднее\n\t// удаление пустого longhand может отменить только что восстановленный shorthand.\n\tfor (const { name } of properties) style.removeProperty(name);\n\tfor (const { name, value, priority } of properties) {\n\t\tif (value) style.setProperty(name, value, priority);\n\t}\n}\n\n/** Один владелец body/html на документ предотвращает преждевременный unlock вложенных overlays. */\nexport function acquireDocumentScrollLock(documentTarget: Document, compensateScrollbar: boolean): () => void {\n\tconst view = documentTarget.defaultView;\n\tconst body = documentTarget.body;\n\tif (!view || !body) return () => undefined;\n\n\tlet lock = locks.get(documentTarget);\n\tif (!lock) {\n\t\tconst rootStyle = documentTarget.documentElement.style;\n\t\tconst bodyStyle = body.style;\n\t\tconst rootProperties = captureProperties(rootStyle, [\"overflow\", \"overflow-x\", \"overflow-y\"]);\n\t\tconst bodyProperties = captureProperties(bodyStyle, [\n\t\t\t\"position\",\n\t\t\t\"top\",\n\t\t\t\"left\",\n\t\t\t\"width\",\n\t\t\t\"overflow\",\n\t\t\t\"overflow-x\",\n\t\t\t\"overflow-y\",\n\t\t\t\"box-sizing\",\n\t\t\t\"padding-right\"\n\t\t]);\n\t\tconst originalPadding = captureProperties(bodyStyle, [\"padding-right\"]);\n\t\tconst scrollX = view.scrollX;\n\t\tconst scrollY = view.scrollY;\n\t\tconst scrollbarWidth = Math.max(0, view.innerWidth - documentTarget.documentElement.clientWidth);\n\t\tconst computedPadding = Number.parseFloat(view.getComputedStyle(body).paddingRight) || 0;\n\t\tconst leases = new Map<symbol, boolean>();\n\n\t\t// Fixed body нужен и при iOS visual-viewport pan: одного overflow hidden недостаточно.\n\t\trootStyle.setProperty(\"overflow\", \"hidden\");\n\t\tbodyStyle.setProperty(\"position\", \"fixed\");\n\t\tbodyStyle.setProperty(\"top\", `${-scrollY}px`);\n\t\tbodyStyle.setProperty(\"left\", `${-scrollX}px`);\n\t\tbodyStyle.setProperty(\"width\", \"100%\");\n\t\tbodyStyle.setProperty(\"overflow\", \"hidden\");\n\t\tbodyStyle.setProperty(\"box-sizing\", \"border-box\");\n\t\tconst releaseTouchGuard = attachDocumentTouchScrollGuard(documentTarget);\n\n\t\tlock = {\n\t\t\tleases,\n\t\t\tupdateCompensation: () => {\n\t\t\t\tif (scrollbarWidth > 0 && [...leases.values()].some(Boolean)) {\n\t\t\t\t\tbodyStyle.setProperty(\"padding-right\", `${computedPadding + scrollbarWidth}px`);\n\t\t\t\t} else restoreProperties(bodyStyle, originalPadding);\n\t\t\t},\n\t\t\trestore: () => {\n\t\t\t\treleaseTouchGuard();\n\t\t\t\trestoreProperties(rootStyle, rootProperties);\n\t\t\t\trestoreProperties(bodyStyle, bodyProperties);\n\t\t\t\tview.scrollTo({ left: scrollX, top: scrollY, behavior: \"instant\" });\n\t\t\t}\n\t\t};\n\t\tlocks.set(documentTarget, lock);\n\t}\n\n\tconst lease = Symbol();\n\tlock.leases.set(lease, compensateScrollbar);\n\tlock.updateCompensation();\n\treturn () => {\n\t\tif (!lock.leases.delete(lease)) return;\n\t\tif (lock.leases.size > 0) lock.updateCompensation();\n\t\telse {\n\t\t\tlocks.delete(documentTarget);\n\t\t\tlock.restore();\n\t\t}\n\t};\n}\n","import { useEffect } from \"react\";\n\nimport { acquireDocumentScrollLock } from \"./document-scroll/acquireDocumentScrollLock\";\nimport { type UseDocumentScrollLockOptions } from \"./document-scroll/documentScrollLockTypes\";\n\n/** Блокирует фоновую прокрутку до освобождения последнего потребителя; не управляет focus/inert. */\nexport function useDocumentScrollLock({ active, documentTarget, compensateScrollbar = false }: UseDocumentScrollLockOptions): void {\n\tuseEffect(() => {\n\t\tif (!active) return;\n\t\tconst target = documentTarget === undefined ? (typeof document === \"undefined\" ? null : document) : documentTarget;\n\t\tif (!target) return;\n\t\treturn acquireDocumentScrollLock(target, compensateScrollbar);\n\t}, [active, documentTarget, compensateScrollbar]);\n}\n","const properties = [\"--visual-viewport-top\", \"--visual-viewport-left\", \"--visual-viewport-width\", \"--visual-viewport-height\"] as const;\n\nconst attachments = new WeakMap<HTMLElement, { leases: Set<symbol>; detach: () => void }>();\n\n/** Подписка меняет CSS-переменные конкретной поверхности, не вызывает React render на каждом pan. */\nfunction createVisualViewportFrame(container: HTMLElement): () => void {\n\tconst view = container.ownerDocument.defaultView;\n\tif (!view) return () => undefined;\n\tconst viewport = view.visualViewport;\n\tconst style = container.style;\n\tconst previous = properties.map((name) => ({ name, value: style.getPropertyValue(name), priority: style.getPropertyPriority(name) }));\n\tconst ownedValues = new Map<string, string>();\n\tlet frame = 0;\n\n\tconst update = (): void => {\n\t\tframe = 0;\n\t\tconst bounds = [\n\t\t\tviewport?.offsetTop ?? 0,\n\t\t\tviewport?.offsetLeft ?? 0,\n\t\t\tviewport?.width ?? view.innerWidth,\n\t\t\tviewport?.height ?? view.innerHeight\n\t\t];\n\t\tconst fallback = [0, 0, view.innerWidth, view.innerHeight];\n\t\tproperties.forEach((name, index) => {\n\t\t\tconst value = `${Number.isFinite(bounds[index]) ? bounds[index] : fallback[index]}px`;\n\t\t\tif (ownedValues.get(name) === value) return;\n\t\t\tstyle.setProperty(name, value);\n\t\t\townedValues.set(name, value);\n\t\t});\n\t};\n\n\tconst schedule = (): void => {\n\t\tif (!frame) frame = view.requestAnimationFrame(update);\n\t};\n\n\tupdate();\n\tviewport?.addEventListener(\"resize\", schedule);\n\tviewport?.addEventListener(\"scroll\", schedule);\n\tview.addEventListener(\"resize\", schedule);\n\treturn () => {\n\t\tview.cancelAnimationFrame(frame);\n\t\tviewport?.removeEventListener(\"resize\", schedule);\n\t\tviewport?.removeEventListener(\"scroll\", schedule);\n\t\tview.removeEventListener(\"resize\", schedule);\n\t\tfor (const { name, value, priority } of previous) {\n\t\t\t// Не затираем новое значение, если внешний owner уже забрал это CSS-свойство.\n\t\t\tif (style.getPropertyValue(name) !== ownedValues.get(name) || style.getPropertyPriority(name)) continue;\n\t\t\tif (value) style.setProperty(name, value, priority);\n\t\t\telse style.removeProperty(name);\n\t\t}\n\t};\n}\n\n/** Несколько модалок могут разделять portal-root; его frame снимается только последним owner. */\nexport function attachVisualViewportFrame(container: HTMLElement): () => void {\n\tlet attachment = attachments.get(container);\n\tif (!attachment) {\n\t\tattachment = { leases: new Set(), detach: createVisualViewportFrame(container) };\n\t\tattachments.set(container, attachment);\n\t}\n\tconst lease = Symbol();\n\tattachment.leases.add(lease);\n\treturn () => {\n\t\tif (!attachment.leases.delete(lease) || attachment.leases.size > 0) return;\n\t\tattachments.delete(container);\n\t\tattachment.detach();\n\t};\n}\n","import { useEffect } from \"react\";\n\nimport { attachVisualViewportFrame } from \"./visual-viewport/attachVisualViewportFrame\";\nimport { type UseVisualViewportFrameOptions } from \"./visual-viewport/visualViewportFrameTypes\";\n\n/** CSS frame использует реальные visualViewport размеры без отмены pinch zoom; SSR оставляет CSS fallback. */\nexport function useVisualViewportFrame({ active, containerRef }: UseVisualViewportFrameOptions): void {\n\tuseEffect(() => {\n\t\tif (!active || typeof window === \"undefined\") return;\n\t\tlet frame = 0;\n\t\tlet detach: (() => void) | undefined;\n\t\t// Portal может установить ref позже родительского effect; ожидание завершается при cleanup.\n\t\tconst attach = () => {\n\t\t\tconst container = containerRef.current;\n\t\t\tif (container) detach = attachVisualViewportFrame(container);\n\t\t\telse frame = window.requestAnimationFrame(attach);\n\t\t};\n\t\tattach();\n\t\treturn () => {\n\t\t\twindow.cancelAnimationFrame(frame);\n\t\t\tdetach?.();\n\t\t};\n\t}, [active, containerRef]);\n}\n"],"mappings":";;AAAA,SAAgB,EAA0B,GAAkB,GAAmB;CAC9E,IAAM,IAAO,SAAS,cAAc,GAAG;CAMvC,AAJA,EAAK,OAAO,GACZ,EAAK,WAAW,GAChB,EAAK,MAAM,GAEX,OAAO,iBAAiB;EACvB,OAAO,IAAI,gBAAgB,CAAS;CACrC,GAAG,CAAC;AACL;AAEA,SAAgB,EAAqB,GAAk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AM;EACjD;EAEA,OADA,EAAO,SACM;GAEZ,AADA,OAAO,qBAAqB,CAAK,GACjC,IAAS;EACV;CACD,GAAG,CAAC,GAAQ,CAAY,CAAC;AAC1B"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { g as e, h as t, m as n, u as r } from "./scalarTypeClassification-BZcFmIyR.js";
|
|
2
|
-
//#region src/formatters/boolean/parseAbapBoolean.ts
|
|
3
|
-
function i(e) {
|
|
4
|
-
return !!(e && typeof e == "string" && e === "X");
|
|
5
|
-
}
|
|
6
|
-
function a(e) {
|
|
7
|
-
return e ? typeof e == "string" ? [
|
|
8
|
-
"true",
|
|
9
|
-
"x",
|
|
10
|
-
"1"
|
|
11
|
-
].includes(e.toLowerCase()) : !!e : !1;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/formatters/date/formatDate.ts
|
|
15
|
-
var o = /* @__PURE__ */ new WeakMap();
|
|
16
|
-
function s(e) {
|
|
17
|
-
return String(e).padStart(2, "0");
|
|
18
|
-
}
|
|
19
|
-
function c(n) {
|
|
20
|
-
if (typeof n != "string") {
|
|
21
|
-
let e = o.get(n);
|
|
22
|
-
if (e) return e;
|
|
23
|
-
let r = t(n);
|
|
24
|
-
return o.set(n, r), r;
|
|
25
|
-
}
|
|
26
|
-
let r = e(n);
|
|
27
|
-
if (!r) throw Error(`Предустановка даты "${n}" не найдена`);
|
|
28
|
-
return r;
|
|
29
|
-
}
|
|
30
|
-
function l(e, t) {
|
|
31
|
-
return t?.fallback ?? e.invalidFallback;
|
|
32
|
-
}
|
|
33
|
-
function u(e, t, n, r) {
|
|
34
|
-
return e.kind === "duration" ? t.formatDuration ? t.formatDuration(e.durationMs, n) : n : t.formatDateTime(e.date, r);
|
|
35
|
-
}
|
|
36
|
-
function d(e, t = n.date, i) {
|
|
37
|
-
let a = c(t), o = l(a, i), s = i?.precision ?? "day", d = r(e);
|
|
38
|
-
return d ? u(d, a, o, s) : o;
|
|
39
|
-
}
|
|
40
|
-
function f(e, t) {
|
|
41
|
-
return d(e, n.date, t);
|
|
42
|
-
}
|
|
43
|
-
function p(e, t) {
|
|
44
|
-
return d(e, n.datetime, t);
|
|
45
|
-
}
|
|
46
|
-
function m(e, t) {
|
|
47
|
-
return d(e, n.time, t);
|
|
48
|
-
}
|
|
49
|
-
function h(e, t) {
|
|
50
|
-
return d(e, n.timeSeconds, t);
|
|
51
|
-
}
|
|
52
|
-
function g(e, t) {
|
|
53
|
-
return d(e, n.dateShort, t);
|
|
54
|
-
}
|
|
55
|
-
function _(e, t) {
|
|
56
|
-
return d(e, n.dateMedium, t);
|
|
57
|
-
}
|
|
58
|
-
function v(e, t) {
|
|
59
|
-
return d(e, n.dateLong, t);
|
|
60
|
-
}
|
|
61
|
-
function y(e, t) {
|
|
62
|
-
return d(e, n.monthShort, t);
|
|
63
|
-
}
|
|
64
|
-
function b(e, t) {
|
|
65
|
-
return d(e, n.monthMedium, t);
|
|
66
|
-
}
|
|
67
|
-
function x(e, t) {
|
|
68
|
-
return d(e, n.monthLong, t);
|
|
69
|
-
}
|
|
70
|
-
function S(e, t) {
|
|
71
|
-
return d(e, n.monthYearMedium, t);
|
|
72
|
-
}
|
|
73
|
-
function C(e, t) {
|
|
74
|
-
return d(e, n.monthYearLong, t);
|
|
75
|
-
}
|
|
76
|
-
function w(e, t) {
|
|
77
|
-
return d(e, n.timeShort, t);
|
|
78
|
-
}
|
|
79
|
-
function T(e, t) {
|
|
80
|
-
return d(e, n.timeMedium, t);
|
|
81
|
-
}
|
|
82
|
-
function E(e, t) {
|
|
83
|
-
return d(e, n.timeLong, t);
|
|
84
|
-
}
|
|
85
|
-
function D(e, t) {
|
|
86
|
-
return d(e, n.datetimeShort, t);
|
|
87
|
-
}
|
|
88
|
-
function O(e, t) {
|
|
89
|
-
return d(e, n.datetimeMedium, t);
|
|
90
|
-
}
|
|
91
|
-
function k(e, t) {
|
|
92
|
-
return d(e, n.datetimeLong, t);
|
|
93
|
-
}
|
|
94
|
-
function A(e, t, i = n.date, a) {
|
|
95
|
-
let o = c(i), s = l(o, a), d = a?.precision ?? "day", f = r(e), p = r(t);
|
|
96
|
-
if (!f || !p) return s;
|
|
97
|
-
let m = u(f, o, s, d), h = u(p, o, s, d);
|
|
98
|
-
return !m || !h ? s : `${m} - ${h}`;
|
|
99
|
-
}
|
|
100
|
-
function j(e, t) {
|
|
101
|
-
return d(e, n.abapYear, t);
|
|
102
|
-
}
|
|
103
|
-
function M(e, t) {
|
|
104
|
-
return d(e, n.abapMonth, t);
|
|
105
|
-
}
|
|
106
|
-
function N(e, t) {
|
|
107
|
-
return d(e, n.abapDate, t);
|
|
108
|
-
}
|
|
109
|
-
function P(e, t) {
|
|
110
|
-
return d(e, n.abapDatetime, t);
|
|
111
|
-
}
|
|
112
|
-
function F(e, t) {
|
|
113
|
-
return d(e, n.odataDate, t);
|
|
114
|
-
}
|
|
115
|
-
function I(e, t) {
|
|
116
|
-
return d(e, n.odataDatetime, t);
|
|
117
|
-
}
|
|
118
|
-
function L(e, t) {
|
|
119
|
-
let i = t?.fallback ?? "", a = r(e);
|
|
120
|
-
if (!a) return i;
|
|
121
|
-
if (a.kind === "duration") {
|
|
122
|
-
let e = c(n.timeSeconds).formatDuration?.(a.durationMs, i) ?? i;
|
|
123
|
-
if (e === i) return i;
|
|
124
|
-
let [t = "00", r = "00", o = "00"] = e.split(":");
|
|
125
|
-
return `PT${t}H${r}M${o}S`;
|
|
126
|
-
}
|
|
127
|
-
let o = a.date;
|
|
128
|
-
return `PT${s(o.getHours())}H${s(o.getMinutes())}M${s(o.getSeconds())}S`;
|
|
129
|
-
}
|
|
130
|
-
//#endregion
|
|
131
|
-
export { E as C, A as D, w as E, i as O, m as S, h as T, C as _, j as a, I as b, _ as c, k as d, O as f, y as g, b as h, M as i, a as k, g as l, x as m, N as n, f as o, D as p, P as r, v as s, d as t, p as u, S as v, T as w, L as x, F as y };
|
|
132
|
-
|
|
133
|
-
//# sourceMappingURL=formatDate-BUvpRI7H.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatDate-BUvpRI7H.js","names":[],"sources":["../../src/formatters/boolean/parseAbapBoolean.ts","../../src/formatters/date/formatDate.ts"],"sourcesContent":["export function parseAbapBoolean(value: unknown): boolean {\n\tif (value && typeof value === \"string\" && value === \"X\") return true;\n\treturn false;\n}\n\nexport function parseBoolean(value: unknown): boolean {\n\tif (!value) return false;\n\tif (typeof value === \"string\") {\n\t\treturn [\"true\", \"x\", \"1\"].includes(value.toLowerCase());\n\t}\n\treturn Boolean(value);\n}\n","import { parseDateValue } from \"./parseDate\";\nimport { compileDatePreset, CompiledDateFormatPreset, DEFAULT_DATE_PRESET_NAMES, getCompiledDatePreset } from \"./presets\";\nimport { DateFormatPrecision, DateFormatPreset, FormatDateOptions, ParsedDateValue } from \"./types\";\n\n/**\n * Кеш скомпилированных объектных предустановок.\n *\n * Именованные предустановки компилируются в реестре, а объектные могут\n * передаваться напрямую в горячем пути таблиц. WeakMap сохраняет готовый\n * Intl.DateTimeFormat на время жизни объекта и не мешает сборке мусора.\n */\nconst objectPresetCache = new WeakMap<DateFormatPreset, CompiledDateFormatPreset>();\n\n/**\n * Дополняет числовую часть даты ведущим нулём.\n */\nfunction padDatePart(value: number): string {\n\treturn String(value).padStart(2, \"0\");\n}\n\n/**\n * Разрешает предустановку по имени или объекту.\n */\nfunction resolvePreset(presetOrName: string | DateFormatPreset): CompiledDateFormatPreset {\n\tif (typeof presetOrName !== \"string\") {\n\t\tconst cachedPreset = objectPresetCache.get(presetOrName);\n\t\tif (cachedPreset) return cachedPreset;\n\n\t\tconst compiledPreset = compileDatePreset(presetOrName);\n\t\tobjectPresetCache.set(presetOrName, compiledPreset);\n\t\treturn compiledPreset;\n\t}\n\n\tconst preset = getCompiledDatePreset(presetOrName);\n\tif (!preset) {\n\t\tthrow new Error(`Предустановка даты \"${presetOrName}\" не найдена`);\n\t}\n\treturn preset;\n}\n\n/**\n * Определяет fallback с учётом опций вызова и предустановки.\n */\nfunction resolveFallback(preset: CompiledDateFormatPreset, options?: FormatDateOptions): string {\n\treturn options?.fallback ?? preset.invalidFallback;\n}\n\n/**\n * Форматирует уже распарсенное значение.\n */\nfunction formatParsedValue(\n\tparsed: ParsedDateValue,\n\tpreset: CompiledDateFormatPreset,\n\tfallback: string,\n\tprecision: DateFormatPrecision\n): string {\n\tif (parsed.kind === \"duration\") {\n\t\treturn preset.formatDuration ? preset.formatDuration(parsed.durationMs, fallback) : fallback;\n\t}\n\n\treturn preset.formatDateTime(parsed.date, precision);\n}\n\n/**\n * Универсально форматирует дату/время по предустановке или её имени.\n */\nexport function formatDate(\n\tvalue: unknown,\n\tpresetOrName: string | DateFormatPreset = DEFAULT_DATE_PRESET_NAMES.date,\n\toptions?: FormatDateOptions\n): string {\n\tconst preset = resolvePreset(presetOrName);\n\tconst fallback = resolveFallback(preset, options);\n\tconst precision = options?.precision ?? \"day\";\n\tconst parsed = parseDateValue(value);\n\n\tif (!parsed) return fallback;\n\treturn formatParsedValue(parsed, preset, fallback, precision);\n}\n\n/**\n * Форматирует значение как дату `dd.MM.yyyy`.\n */\nexport function formatDateAsDate(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.date, options);\n}\n\n/**\n * Форматирует значение как дату и время `dd.MM.yyyy HH:mm`.\n */\nexport function formatDateAsDateTime(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.datetime, options);\n}\n\n/**\n * Форматирует значение как время `HH:mm`.\n */\nexport function formatDateAsTime(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.time, options);\n}\n\n/**\n * Форматирует значение как время `HH:mm:ss`.\n */\nexport function formatDateAsTimeSeconds(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.timeSeconds, options);\n}\n\n/**\n * Форматирует значение как короткую дату `03.03.2026`.\n */\nexport function formatDateAsDateShort(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.dateShort, options);\n}\n\n/**\n * Форматирует значение как среднюю дату `3 мар. 2026 г.`.\n */\nexport function formatDateAsDateMedium(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.dateMedium, options);\n}\n\n/**\n * Форматирует значение как длинную дату `3 марта 2026 г.`.\n */\nexport function formatDateAsDateLong(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.dateLong, options);\n}\n\n/**\n * Форматирует значение как короткую дату без года `03.03`.\n */\nexport function formatDateAsMonthShort(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.monthShort, options);\n}\n\n/**\n * Форматирует значение как среднюю дату без года `3 мар.`.\n */\nexport function formatDateAsMonthMedium(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.monthMedium, options);\n}\n\n/**\n * Форматирует значение как длинную дату без года `3 марта`.\n */\nexport function formatDateAsMonthLong(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.monthLong, options);\n}\n\n/**\n * Форматирует значение как сокращённый месяц и год `мар. 2026`.\n */\nexport function formatDateAsMonthYearMedium(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.monthYearMedium, options);\n}\n\n/**\n * Форматирует значение как полный месяц и год `март 2026`.\n */\nexport function formatDateAsMonthYearLong(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.monthYearLong, options);\n}\n\n/**\n * Форматирует значение как короткое время `18:03`.\n */\nexport function formatDateAsTimeShort(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.timeShort, options);\n}\n\n/**\n * Форматирует значение как среднее время `18:03:50`.\n */\nexport function formatDateAsTimeMedium(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.timeMedium, options);\n}\n\n/**\n * Форматирует значение как длинное время `18:03:50`.\n */\nexport function formatDateAsTimeLong(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.timeLong, options);\n}\n\n/**\n * Форматирует значение как короткую дату и время `03.03.2026 18:03`.\n */\nexport function formatDateAsDatetimeShort(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.datetimeShort, options);\n}\n\n/**\n * Форматирует значение как среднюю дату и время `3 мар. 2026 г. 18:03:50`.\n */\nexport function formatDateAsDatetimeMedium(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.datetimeMedium, options);\n}\n\n/**\n * Форматирует значение как длинную дату и время `3 марта 2026 г. 18:03:50`.\n */\nexport function formatDateAsDatetimeLong(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.datetimeLong, options);\n}\n\n/**\n * Форматирует диапазон дат через разделитель ` - `.\n */\nexport function formatDateRange(\n\tstartValue: unknown,\n\tendValue: unknown,\n\tpresetOrName: string | DateFormatPreset = DEFAULT_DATE_PRESET_NAMES.date,\n\toptions?: FormatDateOptions\n): string {\n\tconst preset = resolvePreset(presetOrName);\n\tconst fallback = resolveFallback(preset, options);\n\tconst precision = options?.precision ?? \"day\";\n\n\tconst startParsed = parseDateValue(startValue);\n\tconst endParsed = parseDateValue(endValue);\n\tif (!startParsed || !endParsed) return fallback;\n\n\tconst start = formatParsedValue(startParsed, preset, fallback, precision);\n\tconst end = formatParsedValue(endParsed, preset, fallback, precision);\n\tif (!start || !end) return fallback;\n\n\treturn `${start} - ${end}`;\n}\n\n/**\n * Форматирует значение как год `yyyy`.\n */\nexport function formatDateAsAbapYear(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.abapYear, options);\n}\n\n/**\n * Форматирует значение как календарный месяц `yyyyMM`.\n */\nexport function formatDateAsAbapMonth(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.abapMonth, options);\n}\n\n/**\n * Форматирует значение как дату `yyyyMMdd`.\n */\nexport function formatDateAsAbapDate(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.abapDate, options);\n}\n\n/**\n * Форматирует значение как дату `yyyyMMddHHmmss`.\n */\nexport function formatDateAsAbapDatetime(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.abapDatetime, options);\n}\n\n/**\n * Форматирует значение как дату `yyyy-MM-dd`.\n */\nexport function formatDateAsODataDate(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.odataDate, options);\n}\n\n/**\n * Форматирует значение как дату и время `yyyy-MM-ddTHH:mm:ss`.\n */\nexport function formatDateAsODataDatetime(value: unknown, options?: FormatDateOptions): string {\n\treturn formatDate(value, DEFAULT_DATE_PRESET_NAMES.odataDatetime, options);\n}\n\n/**\n * Форматирует значение как время `PT00H00M00S`.\n */\nexport function formatDateAsODataTime(value: unknown, options?: FormatDateOptions): string {\n\tconst fallback = options?.fallback ?? \"\";\n\tconst parsed = parseDateValue(value);\n\tif (!parsed) return fallback;\n\n\tif (parsed.kind === \"duration\") {\n\t\tconst timePreset = resolvePreset(DEFAULT_DATE_PRESET_NAMES.timeSeconds);\n\t\tconst formattedDuration = timePreset.formatDuration?.(parsed.durationMs, fallback) ?? fallback;\n\t\tif (formattedDuration === fallback) return fallback;\n\n\t\tconst [hours = \"00\", minutes = \"00\", seconds = \"00\"] = formattedDuration.split(\":\");\n\t\treturn `PT${hours}H${minutes}M${seconds}S`;\n\t}\n\n\tconst date = parsed.date;\n\treturn `PT${padDatePart(date.getHours())}H${padDatePart(date.getMinutes())}M${padDatePart(date.getSeconds())}S`;\n}\n"],"mappings":";;AAAA,SAAgB,EAAiB,GAAyB;CAEzD,OADA,GAAI,KAAS,OAAO,KAAU,YAAY,MAAU;AAErD;AAEA,SAAgB,EAAa,GAAyB;CAKrD,OAJK,IACD,OAAO,KAAU,WACb;EAAC;EAAQ;EAAK;CAAG,CAAC,CAAC,SAAS,EAAM,YAAY,CAAC,IAEhD,EAAQ,IAJI;AAKpB;;;ACAA,IAAM,oBAAoB,IAAI,QAAoD;AAKlF,SAAS,EAAY,GAAuB;CAC3C,OAAO,OAAO,CAAK,CAAC,CAAC,SAAS,GAAG,GAAG;AACrC;AAKA,SAAS,EAAc,GAAmE;CACzF,IAAI,OAAO,KAAiB,UAAU;EACrC,IAAM,IAAe,EAAkB,IAAI,CAAY;EACvD,IAAI,GAAc,OAAO;EAEzB,IAAM,IAAiB,EAAkB,CAAY;EAErD,OADA,EAAkB,IAAI,GAAc,CAAc,GAC3C;CACR;CAEA,IAAM,IAAS,EAAsB,CAAY;CACjD,IAAI,CAAC,GACJ,MAAU,MAAM,uBAAuB,EAAa,aAAa;CAElE,OAAO;AACR;AAKA,SAAS,EAAgB,GAAkC,GAAqC;CAC/F,OAAO,GAAS,YAAY,EAAO;AACpC;AAKA,SAAS,EACR,GACA,GACA,GACA,GACS;CAKT,OAJI,EAAO,SAAS,aACZ,EAAO,iBAAiB,EAAO,eAAe,EAAO,YAAY,CAAQ,IAAI,IAG9E,EAAO,eAAe,EAAO,MAAM,CAAS;AACpD;AAKA,SAAgB,EACf,GACA,IAA0C,EAA0B,MACpE,GACS;CACT,IAAM,IAAS,EAAc,CAAY,GACnC,IAAW,EAAgB,GAAQ,CAAO,GAC1C,IAAY,GAAS,aAAa,OAClC,IAAS,EAAe,CAAK;CAGnC,OADK,IACE,EAAkB,GAAQ,GAAQ,GAAU,CAAS,IADx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