@helpwave/hightide 0.1.45 → 0.1.47
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 +1 -1
- package/dist/index.d.mts +1990 -0
- package/dist/index.d.ts +1990 -113
- package/dist/index.js +1514 -1353
- package/dist/index.js.map +1 -1
- package/dist/{components/index.js → index.mjs} +728 -18
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -12
- package/dist/coloring/index.cjs +0 -85
- package/dist/coloring/index.cjs.map +0 -1
- package/dist/coloring/index.d.cts +0 -2
- package/dist/coloring/index.d.ts +0 -2
- package/dist/coloring/index.js +0 -48
- package/dist/coloring/index.js.map +0 -1
- package/dist/coloring/shading.cjs +0 -81
- package/dist/coloring/shading.cjs.map +0 -1
- package/dist/coloring/shading.d.cts +0 -5
- package/dist/coloring/shading.d.ts +0 -5
- package/dist/coloring/shading.js +0 -47
- package/dist/coloring/shading.js.map +0 -1
- package/dist/coloring/types.cjs +0 -30
- package/dist/coloring/types.cjs.map +0 -1
- package/dist/coloring/types.d.cts +0 -13
- package/dist/coloring/types.d.ts +0 -13
- package/dist/coloring/types.js +0 -6
- package/dist/coloring/types.js.map +0 -1
- package/dist/components/branding/HelpwaveBadge.cjs +0 -140
- package/dist/components/branding/HelpwaveBadge.cjs.map +0 -1
- package/dist/components/branding/HelpwaveBadge.d.cts +0 -13
- package/dist/components/branding/HelpwaveBadge.d.ts +0 -13
- package/dist/components/branding/HelpwaveBadge.js +0 -104
- package/dist/components/branding/HelpwaveBadge.js.map +0 -1
- package/dist/components/branding/index.cjs +0 -140
- package/dist/components/branding/index.cjs.map +0 -1
- package/dist/components/branding/index.d.cts +0 -3
- package/dist/components/branding/index.d.ts +0 -3
- package/dist/components/branding/index.js +0 -104
- package/dist/components/branding/index.js.map +0 -1
- package/dist/components/date/DatePicker.cjs +0 -1318
- package/dist/components/date/DatePicker.cjs.map +0 -1
- package/dist/components/date/DatePicker.d.cts +0 -26
- package/dist/components/date/DatePicker.d.ts +0 -26
- package/dist/components/date/DatePicker.js +0 -1283
- package/dist/components/date/DatePicker.js.map +0 -1
- package/dist/components/date/DayPicker.cjs +0 -261
- package/dist/components/date/DayPicker.cjs.map +0 -1
- package/dist/components/date/DayPicker.d.cts +0 -20
- package/dist/components/date/DayPicker.d.ts +0 -20
- package/dist/components/date/DayPicker.js +0 -224
- package/dist/components/date/DayPicker.js.map +0 -1
- package/dist/components/date/TimeDisplay.cjs +0 -638
- package/dist/components/date/TimeDisplay.cjs.map +0 -1
- package/dist/components/date/TimeDisplay.d.cts +0 -13
- package/dist/components/date/TimeDisplay.d.ts +0 -13
- package/dist/components/date/TimeDisplay.js +0 -612
- package/dist/components/date/TimeDisplay.js.map +0 -1
- package/dist/components/date/TimePicker.cjs +0 -237
- package/dist/components/date/TimePicker.cjs.map +0 -1
- package/dist/components/date/TimePicker.d.cts +0 -15
- package/dist/components/date/TimePicker.d.ts +0 -15
- package/dist/components/date/TimePicker.js +0 -202
- package/dist/components/date/TimePicker.js.map +0 -1
- package/dist/components/date/YearMonthPicker.cjs +0 -536
- package/dist/components/date/YearMonthPicker.cjs.map +0 -1
- package/dist/components/date/YearMonthPicker.d.cts +0 -15
- package/dist/components/date/YearMonthPicker.d.ts +0 -15
- package/dist/components/date/YearMonthPicker.js +0 -501
- package/dist/components/date/YearMonthPicker.js.map +0 -1
- package/dist/components/date/index.cjs +0 -1556
- package/dist/components/date/index.cjs.map +0 -1
- package/dist/components/date/index.d.cts +0 -7
- package/dist/components/date/index.d.ts +0 -7
- package/dist/components/date/index.js +0 -1512
- package/dist/components/date/index.js.map +0 -1
- package/dist/components/dialog/ConfirmDialog.cjs +0 -1165
- package/dist/components/dialog/ConfirmDialog.cjs.map +0 -1
- package/dist/components/dialog/ConfirmDialog.d.cts +0 -29
- package/dist/components/dialog/ConfirmDialog.d.ts +0 -29
- package/dist/components/dialog/ConfirmDialog.js +0 -1129
- package/dist/components/dialog/ConfirmDialog.js.map +0 -1
- package/dist/components/dialog/Dialog.cjs +0 -1108
- package/dist/components/dialog/Dialog.cjs.map +0 -1
- package/dist/components/dialog/Dialog.d.cts +0 -27
- package/dist/components/dialog/Dialog.d.ts +0 -27
- package/dist/components/dialog/Dialog.js +0 -1075
- package/dist/components/dialog/Dialog.js.map +0 -1
- package/dist/components/dialog/DiscardChangesDialog.cjs +0 -1192
- package/dist/components/dialog/DiscardChangesDialog.cjs.map +0 -1
- package/dist/components/dialog/DiscardChangesDialog.d.cts +0 -18
- package/dist/components/dialog/DiscardChangesDialog.d.ts +0 -18
- package/dist/components/dialog/DiscardChangesDialog.js +0 -1156
- package/dist/components/dialog/DiscardChangesDialog.js.map +0 -1
- package/dist/components/dialog/InputDialog.cjs +0 -1369
- package/dist/components/dialog/InputDialog.cjs.map +0 -1
- package/dist/components/dialog/InputDialog.d.cts +0 -17
- package/dist/components/dialog/InputDialog.d.ts +0 -17
- package/dist/components/dialog/InputDialog.js +0 -1333
- package/dist/components/dialog/InputDialog.js.map +0 -1
- package/dist/components/dialog/LanguageDialog.cjs +0 -2149
- package/dist/components/dialog/LanguageDialog.cjs.map +0 -1
- package/dist/components/dialog/LanguageDialog.d.cts +0 -16
- package/dist/components/dialog/LanguageDialog.d.ts +0 -16
- package/dist/components/dialog/LanguageDialog.js +0 -2124
- package/dist/components/dialog/LanguageDialog.js.map +0 -1
- package/dist/components/dialog/ThemeDialog.cjs +0 -2188
- package/dist/components/dialog/ThemeDialog.cjs.map +0 -1
- package/dist/components/dialog/ThemeDialog.d.cts +0 -16
- package/dist/components/dialog/ThemeDialog.d.ts +0 -16
- package/dist/components/dialog/ThemeDialog.js +0 -2163
- package/dist/components/dialog/ThemeDialog.js.map +0 -1
- package/dist/components/dialog/index.cjs +0 -2516
- package/dist/components/dialog/index.cjs.map +0 -1
- package/dist/components/dialog/index.d.cts +0 -11
- package/dist/components/dialog/index.d.ts +0 -11
- package/dist/components/dialog/index.js +0 -2486
- package/dist/components/dialog/index.js.map +0 -1
- package/dist/components/form/FormElementWrapper.cjs +0 -167
- package/dist/components/form/FormElementWrapper.cjs.map +0 -1
- package/dist/components/form/FormElementWrapper.d.cts +0 -35
- package/dist/components/form/FormElementWrapper.d.ts +0 -35
- package/dist/components/form/FormElementWrapper.js +0 -133
- package/dist/components/form/FormElementWrapper.js.map +0 -1
- package/dist/components/form/index.cjs +0 -169
- package/dist/components/form/index.cjs.map +0 -1
- package/dist/components/form/index.d.cts +0 -5
- package/dist/components/form/index.d.ts +0 -5
- package/dist/components/form/index.js +0 -133
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/icons-and-geometry/Avatar.cjs +0 -670
- package/dist/components/icons-and-geometry/Avatar.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Avatar.d.cts +0 -36
- package/dist/components/icons-and-geometry/Avatar.d.ts +0 -36
- package/dist/components/icons-and-geometry/Avatar.js +0 -663
- package/dist/components/icons-and-geometry/Avatar.js.map +0 -1
- package/dist/components/icons-and-geometry/Circle.cjs +0 -61
- package/dist/components/icons-and-geometry/Circle.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Circle.d.cts +0 -10
- package/dist/components/icons-and-geometry/Circle.d.ts +0 -10
- package/dist/components/icons-and-geometry/Circle.js +0 -27
- package/dist/components/icons-and-geometry/Circle.js.map +0 -1
- package/dist/components/icons-and-geometry/HelpwaveLogo.cjs +0 -98
- package/dist/components/icons-and-geometry/HelpwaveLogo.cjs.map +0 -1
- package/dist/components/icons-and-geometry/HelpwaveLogo.d.cts +0 -14
- package/dist/components/icons-and-geometry/HelpwaveLogo.d.ts +0 -14
- package/dist/components/icons-and-geometry/HelpwaveLogo.js +0 -74
- package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +0 -1
- package/dist/components/icons-and-geometry/Ring.cjs +0 -333
- package/dist/components/icons-and-geometry/Ring.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Ring.d.cts +0 -35
- package/dist/components/icons-and-geometry/Ring.d.ts +0 -35
- package/dist/components/icons-and-geometry/Ring.js +0 -296
- package/dist/components/icons-and-geometry/Ring.js.map +0 -1
- package/dist/components/icons-and-geometry/Tag.cjs +0 -2945
- package/dist/components/icons-and-geometry/Tag.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Tag.d.cts +0 -16
- package/dist/components/icons-and-geometry/Tag.d.ts +0 -16
- package/dist/components/icons-and-geometry/Tag.js +0 -2940
- package/dist/components/icons-and-geometry/Tag.js.map +0 -1
- package/dist/components/icons-and-geometry/index.cjs +0 -3950
- package/dist/components/icons-and-geometry/index.cjs.map +0 -1
- package/dist/components/icons-and-geometry/index.d.cts +0 -7
- package/dist/components/icons-and-geometry/index.d.ts +0 -7
- package/dist/components/icons-and-geometry/index.js +0 -3934
- package/dist/components/icons-and-geometry/index.js.map +0 -1
- package/dist/components/index.cjs +0 -15692
- package/dist/components/index.cjs.map +0 -1
- package/dist/components/index.d.cts +0 -78
- package/dist/components/index.d.ts +0 -78
- package/dist/components/index.js.map +0 -1
- package/dist/components/layout/Carousel.cjs +0 -1128
- package/dist/components/layout/Carousel.cjs.map +0 -1
- package/dist/components/layout/Carousel.d.cts +0 -35
- package/dist/components/layout/Carousel.d.ts +0 -35
- package/dist/components/layout/Carousel.js +0 -1103
- package/dist/components/layout/Carousel.js.map +0 -1
- package/dist/components/layout/Chip.cjs +0 -123
- package/dist/components/layout/Chip.cjs.map +0 -1
- package/dist/components/layout/Chip.d.cts +0 -31
- package/dist/components/layout/Chip.d.ts +0 -31
- package/dist/components/layout/Chip.js +0 -87
- package/dist/components/layout/Chip.js.map +0 -1
- package/dist/components/layout/DividerInserter.cjs +0 -59
- package/dist/components/layout/DividerInserter.cjs.map +0 -1
- package/dist/components/layout/DividerInserter.d.cts +0 -15
- package/dist/components/layout/DividerInserter.d.ts +0 -15
- package/dist/components/layout/DividerInserter.js +0 -25
- package/dist/components/layout/DividerInserter.js.map +0 -1
- package/dist/components/layout/Expandable.cjs +0 -171
- package/dist/components/layout/Expandable.cjs.map +0 -1
- package/dist/components/layout/Expandable.d.cts +0 -67
- package/dist/components/layout/Expandable.d.ts +0 -67
- package/dist/components/layout/Expandable.js +0 -135
- package/dist/components/layout/Expandable.js.map +0 -1
- package/dist/components/layout/FAQSection.cjs +0 -421
- package/dist/components/layout/FAQSection.cjs.map +0 -1
- package/dist/components/layout/FAQSection.d.cts +0 -26
- package/dist/components/layout/FAQSection.d.ts +0 -26
- package/dist/components/layout/FAQSection.js +0 -387
- package/dist/components/layout/FAQSection.js.map +0 -1
- package/dist/components/layout/FloatingContainer.cjs +0 -220
- package/dist/components/layout/FloatingContainer.cjs.map +0 -1
- package/dist/components/layout/FloatingContainer.d.cts +0 -38
- package/dist/components/layout/FloatingContainer.d.ts +0 -38
- package/dist/components/layout/FloatingContainer.js +0 -196
- package/dist/components/layout/FloatingContainer.js.map +0 -1
- package/dist/components/layout/ListBox.cjs +0 -339
- package/dist/components/layout/ListBox.cjs.map +0 -1
- package/dist/components/layout/ListBox.d.cts +0 -44
- package/dist/components/layout/ListBox.d.ts +0 -44
- package/dist/components/layout/ListBox.js +0 -300
- package/dist/components/layout/ListBox.js.map +0 -1
- package/dist/components/layout/MarkdownInterpreter.cjs +0 -260
- package/dist/components/layout/MarkdownInterpreter.cjs.map +0 -1
- package/dist/components/layout/MarkdownInterpreter.d.cts +0 -28
- package/dist/components/layout/MarkdownInterpreter.d.ts +0 -28
- package/dist/components/layout/MarkdownInterpreter.js +0 -235
- package/dist/components/layout/MarkdownInterpreter.js.map +0 -1
- package/dist/components/layout/ScrollArea.cjs +0 -1252
- package/dist/components/layout/ScrollArea.cjs.map +0 -1
- package/dist/components/layout/ScrollArea.d.cts +0 -15
- package/dist/components/layout/ScrollArea.d.ts +0 -15
- package/dist/components/layout/ScrollArea.js +0 -1216
- package/dist/components/layout/ScrollArea.js.map +0 -1
- package/dist/components/layout/TextImage.cjs +0 -657
- package/dist/components/layout/TextImage.cjs.map +0 -1
- package/dist/components/layout/TextImage.d.cts +0 -19
- package/dist/components/layout/TextImage.d.ts +0 -19
- package/dist/components/layout/TextImage.js +0 -623
- package/dist/components/layout/TextImage.js.map +0 -1
- package/dist/components/layout/VerticalDivider.cjs +0 -80
- package/dist/components/layout/VerticalDivider.cjs.map +0 -1
- package/dist/components/layout/VerticalDivider.d.cts +0 -15
- package/dist/components/layout/VerticalDivider.d.ts +0 -15
- package/dist/components/layout/VerticalDivider.js +0 -56
- package/dist/components/layout/VerticalDivider.js.map +0 -1
- package/dist/components/layout/index.cjs +0 -3434
- package/dist/components/layout/index.cjs.map +0 -1
- package/dist/components/layout/index.d.cts +0 -15
- package/dist/components/layout/index.d.ts +0 -15
- package/dist/components/layout/index.js +0 -3387
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/loading-states/ErrorComponent.cjs +0 -622
- package/dist/components/loading-states/ErrorComponent.cjs.map +0 -1
- package/dist/components/loading-states/ErrorComponent.d.cts +0 -12
- package/dist/components/loading-states/ErrorComponent.d.ts +0 -12
- package/dist/components/loading-states/ErrorComponent.js +0 -588
- package/dist/components/loading-states/ErrorComponent.js.map +0 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.cjs +0 -67
- package/dist/components/loading-states/LoadingAndErrorComponent.cjs.map +0 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.cts +0 -20
- package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +0 -20
- package/dist/components/loading-states/LoadingAndErrorComponent.js +0 -43
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +0 -1
- package/dist/components/loading-states/LoadingAnimation.cjs +0 -694
- package/dist/components/loading-states/LoadingAnimation.cjs.map +0 -1
- package/dist/components/loading-states/LoadingAnimation.d.cts +0 -12
- package/dist/components/loading-states/LoadingAnimation.d.ts +0 -12
- package/dist/components/loading-states/LoadingAnimation.js +0 -658
- package/dist/components/loading-states/LoadingAnimation.js.map +0 -1
- package/dist/components/loading-states/LoadingButton.cjs +0 -257
- package/dist/components/loading-states/LoadingButton.cjs.map +0 -1
- package/dist/components/loading-states/LoadingButton.d.cts +0 -10
- package/dist/components/loading-states/LoadingButton.d.ts +0 -10
- package/dist/components/loading-states/LoadingButton.js +0 -223
- package/dist/components/loading-states/LoadingButton.js.map +0 -1
- package/dist/components/loading-states/LoadingContainer.cjs +0 -34
- package/dist/components/loading-states/LoadingContainer.cjs.map +0 -1
- package/dist/components/loading-states/LoadingContainer.d.cts +0 -8
- package/dist/components/loading-states/LoadingContainer.d.ts +0 -8
- package/dist/components/loading-states/LoadingContainer.js +0 -10
- package/dist/components/loading-states/LoadingContainer.js.map +0 -1
- package/dist/components/loading-states/ProgressIndicator.cjs +0 -83
- package/dist/components/loading-states/ProgressIndicator.cjs.map +0 -1
- package/dist/components/loading-states/ProgressIndicator.d.cts +0 -24
- package/dist/components/loading-states/ProgressIndicator.d.ts +0 -24
- package/dist/components/loading-states/ProgressIndicator.js +0 -59
- package/dist/components/loading-states/ProgressIndicator.js.map +0 -1
- package/dist/components/loading-states/index.cjs +0 -966
- package/dist/components/loading-states/index.cjs.map +0 -1
- package/dist/components/loading-states/index.d.cts +0 -9
- package/dist/components/loading-states/index.d.ts +0 -9
- package/dist/components/loading-states/index.js +0 -925
- package/dist/components/loading-states/index.js.map +0 -1
- package/dist/components/navigation/BreadCrumb.cjs +0 -3516
- package/dist/components/navigation/BreadCrumb.cjs.map +0 -1
- package/dist/components/navigation/BreadCrumb.d.cts +0 -20
- package/dist/components/navigation/BreadCrumb.d.ts +0 -20
- package/dist/components/navigation/BreadCrumb.js +0 -3511
- package/dist/components/navigation/BreadCrumb.js.map +0 -1
- package/dist/components/navigation/Navigation.cjs +0 -4041
- package/dist/components/navigation/Navigation.cjs.map +0 -1
- package/dist/components/navigation/Navigation.d.cts +0 -21
- package/dist/components/navigation/Navigation.d.ts +0 -21
- package/dist/components/navigation/Navigation.js +0 -4035
- package/dist/components/navigation/Navigation.js.map +0 -1
- package/dist/components/navigation/Pagination.cjs +0 -1007
- package/dist/components/navigation/Pagination.cjs.map +0 -1
- package/dist/components/navigation/Pagination.d.cts +0 -16
- package/dist/components/navigation/Pagination.d.ts +0 -16
- package/dist/components/navigation/Pagination.js +0 -973
- package/dist/components/navigation/Pagination.js.map +0 -1
- package/dist/components/navigation/StepperBar.cjs +0 -903
- package/dist/components/navigation/StepperBar.cjs.map +0 -1
- package/dist/components/navigation/StepperBar.d.cts +0 -23
- package/dist/components/navigation/StepperBar.d.ts +0 -23
- package/dist/components/navigation/StepperBar.js +0 -868
- package/dist/components/navigation/StepperBar.js.map +0 -1
- package/dist/components/navigation/index.cjs +0 -5035
- package/dist/components/navigation/index.cjs.map +0 -1
- package/dist/components/navigation/index.d.cts +0 -6
- package/dist/components/navigation/index.d.ts +0 -6
- package/dist/components/navigation/index.js +0 -5023
- package/dist/components/navigation/index.js.map +0 -1
- package/dist/components/properties/CheckboxProperty.cjs +0 -1736
- package/dist/components/properties/CheckboxProperty.cjs.map +0 -1
- package/dist/components/properties/CheckboxProperty.d.cts +0 -14
- package/dist/components/properties/CheckboxProperty.d.ts +0 -14
- package/dist/components/properties/CheckboxProperty.js +0 -1702
- package/dist/components/properties/CheckboxProperty.js.map +0 -1
- package/dist/components/properties/DateProperty.cjs +0 -1119
- package/dist/components/properties/DateProperty.cjs.map +0 -1
- package/dist/components/properties/DateProperty.d.cts +0 -16
- package/dist/components/properties/DateProperty.d.ts +0 -16
- package/dist/components/properties/DateProperty.js +0 -1085
- package/dist/components/properties/DateProperty.js.map +0 -1
- package/dist/components/properties/MultiSelectProperty.cjs +0 -2058
- package/dist/components/properties/MultiSelectProperty.cjs.map +0 -1
- package/dist/components/properties/MultiSelectProperty.d.cts +0 -14
- package/dist/components/properties/MultiSelectProperty.d.ts +0 -14
- package/dist/components/properties/MultiSelectProperty.js +0 -2035
- package/dist/components/properties/MultiSelectProperty.js.map +0 -1
- package/dist/components/properties/NumberProperty.cjs +0 -1125
- package/dist/components/properties/NumberProperty.cjs.map +0 -1
- package/dist/components/properties/NumberProperty.d.cts +0 -16
- package/dist/components/properties/NumberProperty.d.ts +0 -16
- package/dist/components/properties/NumberProperty.js +0 -1091
- package/dist/components/properties/NumberProperty.js.map +0 -1
- package/dist/components/properties/PropertyBase.cjs +0 -875
- package/dist/components/properties/PropertyBase.cjs.map +0 -1
- package/dist/components/properties/PropertyBase.d.cts +0 -22
- package/dist/components/properties/PropertyBase.d.ts +0 -22
- package/dist/components/properties/PropertyBase.js +0 -841
- package/dist/components/properties/PropertyBase.js.map +0 -1
- package/dist/components/properties/SelectProperty.cjs +0 -2058
- package/dist/components/properties/SelectProperty.cjs.map +0 -1
- package/dist/components/properties/SelectProperty.d.cts +0 -16
- package/dist/components/properties/SelectProperty.d.ts +0 -16
- package/dist/components/properties/SelectProperty.js +0 -2035
- package/dist/components/properties/SelectProperty.js.map +0 -1
- package/dist/components/properties/TextProperty.cjs +0 -1033
- package/dist/components/properties/TextProperty.cjs.map +0 -1
- package/dist/components/properties/TextProperty.d.cts +0 -15
- package/dist/components/properties/TextProperty.d.ts +0 -15
- package/dist/components/properties/TextProperty.js +0 -999
- package/dist/components/properties/TextProperty.js.map +0 -1
- package/dist/components/properties/index.cjs +0 -3383
- package/dist/components/properties/index.cjs.map +0 -1
- package/dist/components/properties/index.d.cts +0 -9
- package/dist/components/properties/index.d.ts +0 -9
- package/dist/components/properties/index.js +0 -3352
- package/dist/components/properties/index.js.map +0 -1
- package/dist/components/table/FillerRowElement.cjs +0 -36
- package/dist/components/table/FillerRowElement.cjs.map +0 -1
- package/dist/components/table/FillerRowElement.d.cts +0 -8
- package/dist/components/table/FillerRowElement.d.ts +0 -8
- package/dist/components/table/FillerRowElement.js +0 -12
- package/dist/components/table/FillerRowElement.js.map +0 -1
- package/dist/components/table/Filter.cjs +0 -41
- package/dist/components/table/Filter.cjs.map +0 -1
- package/dist/components/table/Filter.d.cts +0 -5
- package/dist/components/table/Filter.d.ts +0 -5
- package/dist/components/table/Filter.js +0 -17
- package/dist/components/table/Filter.js.map +0 -1
- package/dist/components/table/Table.cjs +0 -2678
- package/dist/components/table/Table.cjs.map +0 -1
- package/dist/components/table/Table.d.cts +0 -42
- package/dist/components/table/Table.d.ts +0 -42
- package/dist/components/table/Table.js +0 -2649
- package/dist/components/table/Table.js.map +0 -1
- package/dist/components/table/TableCell.cjs +0 -37
- package/dist/components/table/TableCell.cjs.map +0 -1
- package/dist/components/table/TableCell.d.cts +0 -9
- package/dist/components/table/TableCell.d.ts +0 -9
- package/dist/components/table/TableCell.js +0 -13
- package/dist/components/table/TableCell.js.map +0 -1
- package/dist/components/table/TableFilterButton.cjs +0 -1269
- package/dist/components/table/TableFilterButton.cjs.map +0 -1
- package/dist/components/table/TableFilterButton.d.cts +0 -11
- package/dist/components/table/TableFilterButton.d.ts +0 -11
- package/dist/components/table/TableFilterButton.js +0 -1233
- package/dist/components/table/TableFilterButton.js.map +0 -1
- package/dist/components/table/TableSortButton.cjs +0 -206
- package/dist/components/table/TableSortButton.cjs.map +0 -1
- package/dist/components/table/TableSortButton.d.cts +0 -15
- package/dist/components/table/TableSortButton.d.ts +0 -15
- package/dist/components/table/TableSortButton.js +0 -172
- package/dist/components/table/TableSortButton.js.map +0 -1
- package/dist/components/table/index.cjs +0 -2690
- package/dist/components/table/index.cjs.map +0 -1
- package/dist/components/table/index.d.cts +0 -10
- package/dist/components/table/index.d.ts +0 -10
- package/dist/components/table/index.js +0 -2654
- package/dist/components/table/index.js.map +0 -1
- package/dist/components/user-action/Button.cjs +0 -308
- package/dist/components/user-action/Button.cjs.map +0 -1
- package/dist/components/user-action/Button.d.cts +0 -104
- package/dist/components/user-action/Button.d.ts +0 -104
- package/dist/components/user-action/Button.js +0 -268
- package/dist/components/user-action/Button.js.map +0 -1
- package/dist/components/user-action/Checkbox.cjs +0 -878
- package/dist/components/user-action/Checkbox.cjs.map +0 -1
- package/dist/components/user-action/Checkbox.d.cts +0 -25
- package/dist/components/user-action/Checkbox.d.ts +0 -25
- package/dist/components/user-action/Checkbox.js +0 -843
- package/dist/components/user-action/Checkbox.js.map +0 -1
- package/dist/components/user-action/CopyToClipboardWrapper.cjs +0 -695
- package/dist/components/user-action/CopyToClipboardWrapper.cjs.map +0 -1
- package/dist/components/user-action/CopyToClipboardWrapper.d.cts +0 -30
- package/dist/components/user-action/CopyToClipboardWrapper.d.ts +0 -30
- package/dist/components/user-action/CopyToClipboardWrapper.js +0 -671
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +0 -1
- package/dist/components/user-action/DateAndTimePicker.cjs +0 -1492
- package/dist/components/user-action/DateAndTimePicker.cjs.map +0 -1
- package/dist/components/user-action/DateAndTimePicker.d.cts +0 -25
- package/dist/components/user-action/DateAndTimePicker.d.ts +0 -25
- package/dist/components/user-action/DateAndTimePicker.js +0 -1458
- package/dist/components/user-action/DateAndTimePicker.js.map +0 -1
- package/dist/components/user-action/Label.cjs +0 -53
- package/dist/components/user-action/Label.cjs.map +0 -1
- package/dist/components/user-action/Label.d.cts +0 -14
- package/dist/components/user-action/Label.d.ts +0 -14
- package/dist/components/user-action/Label.js +0 -19
- package/dist/components/user-action/Label.js.map +0 -1
- package/dist/components/user-action/Menu.cjs +0 -282
- package/dist/components/user-action/Menu.cjs.map +0 -1
- package/dist/components/user-action/Menu.d.cts +0 -35
- package/dist/components/user-action/Menu.d.ts +0 -35
- package/dist/components/user-action/Menu.js +0 -247
- package/dist/components/user-action/Menu.js.map +0 -1
- package/dist/components/user-action/ScrollPicker.cjs +0 -301
- package/dist/components/user-action/ScrollPicker.cjs.map +0 -1
- package/dist/components/user-action/ScrollPicker.d.cts +0 -15
- package/dist/components/user-action/ScrollPicker.d.ts +0 -15
- package/dist/components/user-action/ScrollPicker.js +0 -267
- package/dist/components/user-action/ScrollPicker.js.map +0 -1
- package/dist/components/user-action/SearchBar.cjs +0 -956
- package/dist/components/user-action/SearchBar.cjs.map +0 -1
- package/dist/components/user-action/SearchBar.d.cts +0 -13
- package/dist/components/user-action/SearchBar.d.ts +0 -13
- package/dist/components/user-action/SearchBar.js +0 -920
- package/dist/components/user-action/SearchBar.js.map +0 -1
- package/dist/components/user-action/Textarea.cjs +0 -231
- package/dist/components/user-action/Textarea.cjs.map +0 -1
- package/dist/components/user-action/Textarea.d.cts +0 -41
- package/dist/components/user-action/Textarea.d.ts +0 -41
- package/dist/components/user-action/Textarea.js +0 -195
- package/dist/components/user-action/Textarea.js.map +0 -1
- package/dist/components/user-action/Tooltip.cjs +0 -139
- package/dist/components/user-action/Tooltip.cjs.map +0 -1
- package/dist/components/user-action/Tooltip.d.cts +0 -37
- package/dist/components/user-action/Tooltip.d.ts +0 -37
- package/dist/components/user-action/Tooltip.js +0 -113
- package/dist/components/user-action/Tooltip.js.map +0 -1
- package/dist/components/user-action/index.cjs +0 -4564
- package/dist/components/user-action/index.cjs.map +0 -1
- package/dist/components/user-action/index.d.cts +0 -26
- package/dist/components/user-action/index.d.ts +0 -26
- package/dist/components/user-action/index.js +0 -4503
- package/dist/components/user-action/index.js.map +0 -1
- package/dist/components/user-action/input/Input.cjs +0 -260
- package/dist/components/user-action/input/Input.cjs.map +0 -1
- package/dist/components/user-action/input/Input.d.cts +0 -37
- package/dist/components/user-action/input/Input.d.ts +0 -37
- package/dist/components/user-action/input/Input.js +0 -225
- package/dist/components/user-action/input/Input.js.map +0 -1
- package/dist/components/user-action/input/InsideLabelInput.cjs +0 -312
- package/dist/components/user-action/input/InsideLabelInput.cjs.map +0 -1
- package/dist/components/user-action/input/InsideLabelInput.d.cts +0 -20
- package/dist/components/user-action/input/InsideLabelInput.d.ts +0 -20
- package/dist/components/user-action/input/InsideLabelInput.js +0 -277
- package/dist/components/user-action/input/InsideLabelInput.js.map +0 -1
- package/dist/components/user-action/input/ToggleableInput.cjs +0 -315
- package/dist/components/user-action/input/ToggleableInput.cjs.map +0 -1
- package/dist/components/user-action/input/ToggleableInput.d.cts +0 -22
- package/dist/components/user-action/input/ToggleableInput.d.ts +0 -22
- package/dist/components/user-action/input/ToggleableInput.js +0 -280
- package/dist/components/user-action/input/ToggleableInput.js.map +0 -1
- package/dist/components/user-action/input/index.cjs +0 -403
- package/dist/components/user-action/input/index.cjs.map +0 -1
- package/dist/components/user-action/input/index.d.cts +0 -6
- package/dist/components/user-action/input/index.d.ts +0 -6
- package/dist/components/user-action/input/index.js +0 -362
- package/dist/components/user-action/input/index.js.map +0 -1
- package/dist/components/user-action/select/Select.cjs +0 -1970
- package/dist/components/user-action/select/Select.cjs.map +0 -1
- package/dist/components/user-action/select/Select.d.cts +0 -104
- package/dist/components/user-action/select/Select.d.ts +0 -104
- package/dist/components/user-action/select/Select.js +0 -1937
- package/dist/components/user-action/select/Select.js.map +0 -1
- package/dist/components/user-action/select/index.cjs +0 -1972
- package/dist/components/user-action/select/index.cjs.map +0 -1
- package/dist/components/user-action/select/index.d.cts +0 -4
- package/dist/components/user-action/select/index.d.ts +0 -4
- package/dist/components/user-action/select/index.js +0 -1937
- package/dist/components/user-action/select/index.js.map +0 -1
- package/dist/components/utils/FocusTrap.cjs +0 -252
- package/dist/components/utils/FocusTrap.cjs.map +0 -1
- package/dist/components/utils/FocusTrap.d.cts +0 -28
- package/dist/components/utils/FocusTrap.d.ts +0 -28
- package/dist/components/utils/FocusTrap.js +0 -229
- package/dist/components/utils/FocusTrap.js.map +0 -1
- package/dist/components/utils/Transition.cjs +0 -74
- package/dist/components/utils/Transition.cjs.map +0 -1
- package/dist/components/utils/Transition.d.cts +0 -26
- package/dist/components/utils/Transition.d.ts +0 -26
- package/dist/components/utils/Transition.js +0 -50
- package/dist/components/utils/Transition.js.map +0 -1
- package/dist/components/utils/index.cjs +0 -302
- package/dist/components/utils/index.cjs.map +0 -1
- package/dist/components/utils/index.d.cts +0 -4
- package/dist/components/utils/index.d.ts +0 -4
- package/dist/components/utils/index.js +0 -275
- package/dist/components/utils/index.js.map +0 -1
- package/dist/hooks/focus/index.cjs +0 -379
- package/dist/hooks/focus/index.cjs.map +0 -1
- package/dist/hooks/focus/index.d.cts +0 -6
- package/dist/hooks/focus/index.d.ts +0 -6
- package/dist/hooks/focus/index.js +0 -339
- package/dist/hooks/focus/index.js.map +0 -1
- package/dist/hooks/focus/useFocusGuards.cjs +0 -74
- package/dist/hooks/focus/useFocusGuards.cjs.map +0 -1
- package/dist/hooks/focus/useFocusGuards.d.cts +0 -3
- package/dist/hooks/focus/useFocusGuards.d.ts +0 -3
- package/dist/hooks/focus/useFocusGuards.js +0 -50
- package/dist/hooks/focus/useFocusGuards.js.map +0 -1
- package/dist/hooks/focus/useFocusManagement.cjs +0 -84
- package/dist/hooks/focus/useFocusManagement.cjs.map +0 -1
- package/dist/hooks/focus/useFocusManagement.d.cts +0 -9
- package/dist/hooks/focus/useFocusManagement.d.ts +0 -9
- package/dist/hooks/focus/useFocusManagement.js +0 -60
- package/dist/hooks/focus/useFocusManagement.js.map +0 -1
- package/dist/hooks/focus/useFocusOnceVisible.cjs +0 -60
- package/dist/hooks/focus/useFocusOnceVisible.cjs.map +0 -1
- package/dist/hooks/focus/useFocusOnceVisible.d.cts +0 -5
- package/dist/hooks/focus/useFocusOnceVisible.d.ts +0 -5
- package/dist/hooks/focus/useFocusOnceVisible.js +0 -26
- package/dist/hooks/focus/useFocusOnceVisible.js.map +0 -1
- package/dist/hooks/focus/useFocusTrap.cjs +0 -233
- package/dist/hooks/focus/useFocusTrap.cjs.map +0 -1
- package/dist/hooks/focus/useFocusTrap.d.cts +0 -16
- package/dist/hooks/focus/useFocusTrap.d.ts +0 -16
- package/dist/hooks/focus/useFocusTrap.js +0 -210
- package/dist/hooks/focus/useFocusTrap.js.map +0 -1
- package/dist/hooks/focus/useIsMounted.cjs +0 -43
- package/dist/hooks/focus/useIsMounted.cjs.map +0 -1
- package/dist/hooks/focus/useIsMounted.d.cts +0 -3
- package/dist/hooks/focus/useIsMounted.d.ts +0 -3
- package/dist/hooks/focus/useIsMounted.js +0 -20
- package/dist/hooks/focus/useIsMounted.js.map +0 -1
- package/dist/hooks/index.cjs +0 -1530
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.d.cts +0 -18
- package/dist/hooks/index.d.ts +0 -18
- package/dist/hooks/index.js +0 -1477
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useDelay.cjs +0 -67
- package/dist/hooks/useDelay.cjs.map +0 -1
- package/dist/hooks/useDelay.d.cts +0 -12
- package/dist/hooks/useDelay.d.ts +0 -12
- package/dist/hooks/useDelay.js +0 -43
- package/dist/hooks/useDelay.js.map +0 -1
- package/dist/hooks/useFloatingElement.cjs +0 -162
- package/dist/hooks/useFloatingElement.cjs.map +0 -1
- package/dist/hooks/useFloatingElement.d.cts +0 -22
- package/dist/hooks/useFloatingElement.d.ts +0 -22
- package/dist/hooks/useFloatingElement.js +0 -139
- package/dist/hooks/useFloatingElement.js.map +0 -1
- package/dist/hooks/useHoverState.cjs +0 -71
- package/dist/hooks/useHoverState.cjs.map +0 -1
- package/dist/hooks/useHoverState.d.cts +0 -42
- package/dist/hooks/useHoverState.d.ts +0 -42
- package/dist/hooks/useHoverState.js +0 -47
- package/dist/hooks/useHoverState.js.map +0 -1
- package/dist/hooks/useLocalStorage.cjs +0 -97
- package/dist/hooks/useLocalStorage.cjs.map +0 -1
- package/dist/hooks/useLocalStorage.d.cts +0 -17
- package/dist/hooks/useLocalStorage.d.ts +0 -17
- package/dist/hooks/useLocalStorage.js +0 -74
- package/dist/hooks/useLocalStorage.js.map +0 -1
- package/dist/hooks/useLogOnce.cjs +0 -53
- package/dist/hooks/useLogOnce.cjs.map +0 -1
- package/dist/hooks/useLogOnce.d.cts +0 -7
- package/dist/hooks/useLogOnce.d.ts +0 -7
- package/dist/hooks/useLogOnce.js +0 -29
- package/dist/hooks/useLogOnce.js.map +0 -1
- package/dist/hooks/useOutsideClick.cjs +0 -47
- package/dist/hooks/useOutsideClick.cjs.map +0 -1
- package/dist/hooks/useOutsideClick.d.cts +0 -5
- package/dist/hooks/useOutsideClick.d.ts +0 -5
- package/dist/hooks/useOutsideClick.js +0 -23
- package/dist/hooks/useOutsideClick.js.map +0 -1
- package/dist/hooks/useOverwritableState.cjs +0 -49
- package/dist/hooks/useOverwritableState.cjs.map +0 -1
- package/dist/hooks/useOverwritableState.d.cts +0 -5
- package/dist/hooks/useOverwritableState.d.ts +0 -5
- package/dist/hooks/useOverwritableState.js +0 -25
- package/dist/hooks/useOverwritableState.js.map +0 -1
- package/dist/hooks/usePopoverPosition.cjs +0 -81
- package/dist/hooks/usePopoverPosition.cjs.map +0 -1
- package/dist/hooks/usePopoverPosition.d.cts +0 -15
- package/dist/hooks/usePopoverPosition.d.ts +0 -15
- package/dist/hooks/usePopoverPosition.js +0 -57
- package/dist/hooks/usePopoverPosition.js.map +0 -1
- package/dist/hooks/useRerender.cjs +0 -33
- package/dist/hooks/useRerender.cjs.map +0 -1
- package/dist/hooks/useRerender.d.cts +0 -5
- package/dist/hooks/useRerender.d.ts +0 -5
- package/dist/hooks/useRerender.js +0 -9
- package/dist/hooks/useRerender.js.map +0 -1
- package/dist/hooks/useResizeCallbackWrapper.cjs +0 -38
- package/dist/hooks/useResizeCallbackWrapper.cjs.map +0 -1
- package/dist/hooks/useResizeCallbackWrapper.d.cts +0 -11
- package/dist/hooks/useResizeCallbackWrapper.d.ts +0 -11
- package/dist/hooks/useResizeCallbackWrapper.js +0 -14
- package/dist/hooks/useResizeCallbackWrapper.js.map +0 -1
- package/dist/hooks/useSearch.cjs +0 -95
- package/dist/hooks/useSearch.cjs.map +0 -1
- package/dist/hooks/useSearch.d.cts +0 -22
- package/dist/hooks/useSearch.d.ts +0 -22
- package/dist/hooks/useSearch.js +0 -71
- package/dist/hooks/useSearch.js.map +0 -1
- package/dist/hooks/useValidators.cjs +0 -687
- package/dist/hooks/useValidators.cjs.map +0 -1
- package/dist/hooks/useValidators.d.cts +0 -16
- package/dist/hooks/useValidators.d.ts +0 -16
- package/dist/hooks/useValidators.js +0 -660
- package/dist/hooks/useValidators.js.map +0 -1
- package/dist/i18n/LocaleProvider.cjs +0 -202
- package/dist/i18n/LocaleProvider.cjs.map +0 -1
- package/dist/i18n/LocaleProvider.d.cts +0 -23
- package/dist/i18n/LocaleProvider.d.ts +0 -23
- package/dist/i18n/LocaleProvider.js +0 -175
- package/dist/i18n/LocaleProvider.js.map +0 -1
- package/dist/i18n/index.cjs +0 -761
- package/dist/i18n/index.cjs.map +0 -1
- package/dist/i18n/index.d.cts +0 -8
- package/dist/i18n/index.d.ts +0 -8
- package/dist/i18n/index.js +0 -727
- package/dist/i18n/index.js.map +0 -1
- package/dist/i18n/translations.cjs +0 -507
- package/dist/i18n/translations.cjs.map +0 -1
- package/dist/i18n/translations.d.cts +0 -189
- package/dist/i18n/translations.d.ts +0 -189
- package/dist/i18n/translations.js +0 -482
- package/dist/i18n/translations.js.map +0 -1
- package/dist/i18n/useHightideTranslation.cjs +0 -618
- package/dist/i18n/useHightideTranslation.cjs.map +0 -1
- package/dist/i18n/useHightideTranslation.d.cts +0 -21
- package/dist/i18n/useHightideTranslation.d.ts +0 -21
- package/dist/i18n/useHightideTranslation.js +0 -591
- package/dist/i18n/useHightideTranslation.js.map +0 -1
- package/dist/i18n/util.cjs +0 -49
- package/dist/i18n/util.cjs.map +0 -1
- package/dist/i18n/util.d.cts +0 -15
- package/dist/i18n/util.d.ts +0 -15
- package/dist/i18n/util.js +0 -23
- package/dist/i18n/util.js.map +0 -1
- package/dist/index.cjs +0 -16470
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -113
- package/dist/storybook/helper.cjs +0 -61
- package/dist/storybook/helper.cjs.map +0 -1
- package/dist/storybook/helper.d.cts +0 -17
- package/dist/storybook/helper.d.ts +0 -17
- package/dist/storybook/helper.js +0 -37
- package/dist/storybook/helper.js.map +0 -1
- package/dist/theming/index.cjs +0 -190
- package/dist/theming/index.cjs.map +0 -1
- package/dist/theming/index.d.cts +0 -3
- package/dist/theming/index.d.ts +0 -3
- package/dist/theming/index.js +0 -161
- package/dist/theming/index.js.map +0 -1
- package/dist/theming/useTheme.cjs +0 -188
- package/dist/theming/useTheme.cjs.map +0 -1
- package/dist/theming/useTheme.d.cts +0 -26
- package/dist/theming/useTheme.d.ts +0 -26
- package/dist/theming/useTheme.js +0 -161
- package/dist/theming/useTheme.js.map +0 -1
- package/dist/utils/array.cjs +0 -172
- package/dist/utils/array.cjs.map +0 -1
- package/dist/utils/array.d.cts +0 -34
- package/dist/utils/array.d.ts +0 -34
- package/dist/utils/array.js +0 -142
- package/dist/utils/array.js.map +0 -1
- package/dist/utils/bagFunctions.cjs +0 -38
- package/dist/utils/bagFunctions.cjs.map +0 -1
- package/dist/utils/bagFunctions.d.cts +0 -15
- package/dist/utils/bagFunctions.d.ts +0 -15
- package/dist/utils/bagFunctions.js +0 -14
- package/dist/utils/bagFunctions.js.map +0 -1
- package/dist/utils/builder.cjs +0 -33
- package/dist/utils/builder.cjs.map +0 -1
- package/dist/utils/builder.d.cts +0 -8
- package/dist/utils/builder.d.ts +0 -8
- package/dist/utils/builder.js +0 -9
- package/dist/utils/builder.js.map +0 -1
- package/dist/utils/date.cjs +0 -193
- package/dist/utils/date.cjs.map +0 -1
- package/dist/utils/date.d.cts +0 -30
- package/dist/utils/date.d.ts +0 -30
- package/dist/utils/date.js +0 -156
- package/dist/utils/date.js.map +0 -1
- package/dist/utils/easeFunctions.cjs +0 -63
- package/dist/utils/easeFunctions.cjs.map +0 -1
- package/dist/utils/easeFunctions.d.cts +0 -11
- package/dist/utils/easeFunctions.d.ts +0 -11
- package/dist/utils/easeFunctions.js +0 -37
- package/dist/utils/easeFunctions.js.map +0 -1
- package/dist/utils/emailValidation.cjs +0 -32
- package/dist/utils/emailValidation.cjs.map +0 -1
- package/dist/utils/emailValidation.d.cts +0 -3
- package/dist/utils/emailValidation.d.ts +0 -3
- package/dist/utils/emailValidation.js +0 -8
- package/dist/utils/emailValidation.js.map +0 -1
- package/dist/utils/index.cjs +0 -562
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -16
- package/dist/utils/index.d.ts +0 -16
- package/dist/utils/index.js +0 -502
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/loopingArray.cjs +0 -96
- package/dist/utils/loopingArray.cjs.map +0 -1
- package/dist/utils/loopingArray.d.cts +0 -25
- package/dist/utils/loopingArray.d.ts +0 -25
- package/dist/utils/loopingArray.js +0 -72
- package/dist/utils/loopingArray.js.map +0 -1
- package/dist/utils/match.cjs +0 -32
- package/dist/utils/match.cjs.map +0 -1
- package/dist/utils/match.d.cts +0 -3
- package/dist/utils/match.d.ts +0 -3
- package/dist/utils/match.js +0 -8
- package/dist/utils/match.js.map +0 -1
- package/dist/utils/math.cjs +0 -33
- package/dist/utils/math.cjs.map +0 -1
- package/dist/utils/math.d.cts +0 -3
- package/dist/utils/math.d.ts +0 -3
- package/dist/utils/math.js +0 -9
- package/dist/utils/math.js.map +0 -1
- package/dist/utils/noop.cjs +0 -30
- package/dist/utils/noop.cjs.map +0 -1
- package/dist/utils/noop.d.cts +0 -3
- package/dist/utils/noop.d.ts +0 -3
- package/dist/utils/noop.js +0 -6
- package/dist/utils/noop.js.map +0 -1
- package/dist/utils/resolveSetState.cjs +0 -32
- package/dist/utils/resolveSetState.cjs.map +0 -1
- package/dist/utils/resolveSetState.d.cts +0 -5
- package/dist/utils/resolveSetState.d.ts +0 -5
- package/dist/utils/resolveSetState.js +0 -8
- package/dist/utils/resolveSetState.js.map +0 -1
- package/dist/utils/simpleSearch.cjs +0 -59
- package/dist/utils/simpleSearch.cjs.map +0 -1
- package/dist/utils/simpleSearch.d.cts +0 -50
- package/dist/utils/simpleSearch.d.ts +0 -50
- package/dist/utils/simpleSearch.js +0 -32
- package/dist/utils/simpleSearch.js.map +0 -1
- package/dist/utils/storage.cjs +0 -63
- package/dist/utils/storage.cjs.map +0 -1
- package/dist/utils/storage.d.cts +0 -16
- package/dist/utils/storage.d.ts +0 -16
- package/dist/utils/storage.js +0 -38
- package/dist/utils/storage.js.map +0 -1
- package/dist/utils/typing.cjs +0 -18
- package/dist/utils/typing.cjs.map +0 -1
- package/dist/utils/typing.d.cts +0 -8
- package/dist/utils/typing.d.ts +0 -8
- package/dist/utils/typing.js +0 -1
- package/dist/utils/typing.js.map +0 -1
- package/dist/utils/writeToClipboard.cjs +0 -33
- package/dist/utils/writeToClipboard.cjs.map +0 -1
- package/dist/utils/writeToClipboard.d.cts +0 -3
- package/dist/utils/writeToClipboard.d.ts +0 -3
- package/dist/utils/writeToClipboard.js +0 -10
- package/dist/utils/writeToClipboard.js.map +0 -1
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/layout/MarkdownInterpreter.tsx
|
|
20
|
-
var MarkdownInterpreter_exports = {};
|
|
21
|
-
__export(MarkdownInterpreter_exports, {
|
|
22
|
-
ASTNodeInterpreter: () => ASTNodeInterpreter,
|
|
23
|
-
MarkdownInterpreter: () => MarkdownInterpreter
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(MarkdownInterpreter_exports);
|
|
26
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
-
var astNodeInserterType = ["helpwave", "newline"];
|
|
28
|
-
var ASTNodeInterpreter = ({
|
|
29
|
-
node,
|
|
30
|
-
isRoot = false,
|
|
31
|
-
className = ""
|
|
32
|
-
}) => {
|
|
33
|
-
switch (node.type) {
|
|
34
|
-
case "newline":
|
|
35
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {});
|
|
36
|
-
case "text":
|
|
37
|
-
return isRoot ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className, children: node.text }) : node.text;
|
|
38
|
-
case "helpwave":
|
|
39
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-bold font-space no-underline", children: "helpwave" });
|
|
40
|
-
case "none":
|
|
41
|
-
return isRoot ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className, children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
-
ASTNodeInterpreter,
|
|
43
|
-
{
|
|
44
|
-
node: value
|
|
45
|
-
},
|
|
46
|
-
index
|
|
47
|
-
)) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ASTNodeInterpreter, { node: value }, index)) });
|
|
48
|
-
case "bold":
|
|
49
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ASTNodeInterpreter, { node: value }, index)) });
|
|
50
|
-
case "italic":
|
|
51
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ASTNodeInterpreter, { node: value }, index)) });
|
|
52
|
-
case "underline":
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("u", { children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ASTNodeInterpreter, { node: value }, index)) });
|
|
54
|
-
case "font-space":
|
|
55
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-space", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
56
|
-
ASTNodeInterpreter,
|
|
57
|
-
{
|
|
58
|
-
node: value
|
|
59
|
-
},
|
|
60
|
-
index
|
|
61
|
-
)) });
|
|
62
|
-
case "primary":
|
|
63
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-primary", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
-
ASTNodeInterpreter,
|
|
65
|
-
{
|
|
66
|
-
node: value
|
|
67
|
-
},
|
|
68
|
-
index
|
|
69
|
-
)) });
|
|
70
|
-
case "secondary":
|
|
71
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-secondary", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
72
|
-
ASTNodeInterpreter,
|
|
73
|
-
{
|
|
74
|
-
node: value
|
|
75
|
-
},
|
|
76
|
-
index
|
|
77
|
-
)) });
|
|
78
|
-
case "warn":
|
|
79
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-warning", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
-
ASTNodeInterpreter,
|
|
81
|
-
{
|
|
82
|
-
node: value
|
|
83
|
-
},
|
|
84
|
-
index
|
|
85
|
-
)) });
|
|
86
|
-
case "positive":
|
|
87
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-positive", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
-
ASTNodeInterpreter,
|
|
89
|
-
{
|
|
90
|
-
node: value
|
|
91
|
-
},
|
|
92
|
-
index
|
|
93
|
-
)) });
|
|
94
|
-
case "negative":
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-negative", children: node.children.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
-
ASTNodeInterpreter,
|
|
97
|
-
{
|
|
98
|
-
node: value
|
|
99
|
-
},
|
|
100
|
-
index
|
|
101
|
-
)) });
|
|
102
|
-
default:
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
var modifierIdentifierMapping = [
|
|
107
|
-
{ id: "i", name: "italic" },
|
|
108
|
-
{ id: "b", name: "bold" },
|
|
109
|
-
{ id: "u", name: "underline" },
|
|
110
|
-
{ id: "space", name: "font-space" },
|
|
111
|
-
{ id: "primary", name: "primary" },
|
|
112
|
-
{ id: "secondary", name: "secondary" },
|
|
113
|
-
{ id: "warn", name: "warn" },
|
|
114
|
-
{ id: "positive", name: "positive" },
|
|
115
|
-
{ id: "negative", name: "negative" }
|
|
116
|
-
];
|
|
117
|
-
var inserterIdentifierMapping = [
|
|
118
|
-
{ id: "helpwave", name: "helpwave" },
|
|
119
|
-
{ id: "newline", name: "newline" }
|
|
120
|
-
];
|
|
121
|
-
var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
|
|
122
|
-
let start = text.indexOf(commandStart);
|
|
123
|
-
const children = [];
|
|
124
|
-
while (text !== "") {
|
|
125
|
-
if (start === -1) {
|
|
126
|
-
children.push({
|
|
127
|
-
type: "text",
|
|
128
|
-
text
|
|
129
|
-
});
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
children.push(parseMarkdown(text.substring(0, start)));
|
|
133
|
-
text = text.substring(start);
|
|
134
|
-
if (text.length <= 1) {
|
|
135
|
-
children.push({
|
|
136
|
-
type: "text",
|
|
137
|
-
text
|
|
138
|
-
});
|
|
139
|
-
text = "";
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
const simpleReplace = [commandStart, open, close];
|
|
143
|
-
if (simpleReplace.some((value) => text[1] === value)) {
|
|
144
|
-
children.push({
|
|
145
|
-
type: "text",
|
|
146
|
-
text: simpleReplace.find((value) => text[1] === value)
|
|
147
|
-
});
|
|
148
|
-
text = text.substring(2);
|
|
149
|
-
start = text.indexOf(commandStart);
|
|
150
|
-
continue;
|
|
151
|
-
}
|
|
152
|
-
const inserter = inserterIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
|
|
153
|
-
if (inserter) {
|
|
154
|
-
children.push({
|
|
155
|
-
type: inserter.name
|
|
156
|
-
});
|
|
157
|
-
text = text.substring(inserter.id.length + 1);
|
|
158
|
-
start = text.indexOf(commandStart);
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
const modifier = modifierIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
|
|
162
|
-
if (modifier) {
|
|
163
|
-
if (text[modifier.id.length + 1] !== open) {
|
|
164
|
-
children.push({
|
|
165
|
-
type: "text",
|
|
166
|
-
text: text.substring(0, modifier.id.length + 1)
|
|
167
|
-
});
|
|
168
|
-
text = text.substring(modifier.id.length + 2);
|
|
169
|
-
start = text.indexOf(commandStart);
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
let closing = -1;
|
|
173
|
-
let index = modifier.id.length + 2;
|
|
174
|
-
let counter = 1;
|
|
175
|
-
let escaping = false;
|
|
176
|
-
while (index < text.length) {
|
|
177
|
-
if (text[index] === open && !escaping) {
|
|
178
|
-
counter++;
|
|
179
|
-
}
|
|
180
|
-
if (text[index] === close && !escaping) {
|
|
181
|
-
counter--;
|
|
182
|
-
if (counter === 0) {
|
|
183
|
-
closing = index;
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
escaping = text[index] === commandStart;
|
|
188
|
-
index++;
|
|
189
|
-
}
|
|
190
|
-
if (closing !== -1) {
|
|
191
|
-
children.push({
|
|
192
|
-
type: modifier.name,
|
|
193
|
-
children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]
|
|
194
|
-
});
|
|
195
|
-
text = text.substring(closing + 1);
|
|
196
|
-
start = text.indexOf(commandStart);
|
|
197
|
-
continue;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
children.push({
|
|
201
|
-
type: "text",
|
|
202
|
-
text: text[0]
|
|
203
|
-
});
|
|
204
|
-
text = text.substring(1);
|
|
205
|
-
start = text.indexOf(commandStart);
|
|
206
|
-
}
|
|
207
|
-
return {
|
|
208
|
-
type: "none",
|
|
209
|
-
children
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
var optimizeTree = (node) => {
|
|
213
|
-
if (node.type === "text") {
|
|
214
|
-
return !node.text ? void 0 : node;
|
|
215
|
-
}
|
|
216
|
-
if (astNodeInserterType.some((value) => value === node.type)) {
|
|
217
|
-
return node;
|
|
218
|
-
}
|
|
219
|
-
const currentNode = node;
|
|
220
|
-
if (currentNode.children.length === 0) {
|
|
221
|
-
return void 0;
|
|
222
|
-
}
|
|
223
|
-
let children = [];
|
|
224
|
-
for (let i = 0; i < currentNode.children.length; i++) {
|
|
225
|
-
const child = optimizeTree(currentNode.children[i]);
|
|
226
|
-
if (!child) {
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
if (child.type === "none") {
|
|
230
|
-
children.push(...child.children);
|
|
231
|
-
} else {
|
|
232
|
-
children.push(child);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
currentNode.children = children;
|
|
236
|
-
children = [];
|
|
237
|
-
for (let i = 0; i < currentNode.children.length; i++) {
|
|
238
|
-
const child = currentNode.children[i];
|
|
239
|
-
if (child) {
|
|
240
|
-
if (child.type === "text" && children[children.length - 1]?.type === "text") {
|
|
241
|
-
children[children.length - 1].text += child.text;
|
|
242
|
-
} else {
|
|
243
|
-
children.push(child);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
currentNode.children = children;
|
|
248
|
-
return currentNode;
|
|
249
|
-
};
|
|
250
|
-
var MarkdownInterpreter = ({ text, className }) => {
|
|
251
|
-
const tree = parseMarkdown(text);
|
|
252
|
-
const optimizedTree = optimizeTree(tree);
|
|
253
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ASTNodeInterpreter, { node: optimizedTree, isRoot: true, className });
|
|
254
|
-
};
|
|
255
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
256
|
-
0 && (module.exports = {
|
|
257
|
-
ASTNodeInterpreter,
|
|
258
|
-
MarkdownInterpreter
|
|
259
|
-
});
|
|
260
|
-
//# sourceMappingURL=MarkdownInterpreter.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layout/MarkdownInterpreter.tsx"],"sourcesContent":["type ASTNodeModifierType =\n 'none'\n | 'italic'\n | 'bold'\n | 'underline'\n | 'font-space'\n | 'primary'\n | 'secondary'\n | 'warn'\n | 'positive'\n | 'negative'\n\nconst astNodeInserterType = ['helpwave', 'newline'] as const\ntype ASTNodeInserterType = typeof astNodeInserterType[number]\ntype ASTNodeDefaultType = 'text'\n\ntype ASTNode = {\n type: ASTNodeModifierType,\n children: ASTNode[],\n} | {\n type: ASTNodeInserterType,\n} | {\n type: ASTNodeDefaultType,\n text: string,\n}\n\nexport type ASTNodeInterpreterProps = {\n node: ASTNode,\n isRoot?: boolean,\n className?: string,\n}\nexport const ASTNodeInterpreter = ({\n node,\n isRoot = false,\n className = '',\n }: ASTNodeInterpreterProps) => {\n switch (node.type) {\n case 'newline':\n return <br/>\n case 'text':\n return isRoot ? <span className={className}>{node.text}</span> : node.text\n case 'helpwave':\n return (<span className=\"font-bold font-space no-underline\">helpwave</span>)\n case 'none':\n return isRoot ? (\n <span className={className}>{node.children.map((value, index) => (\n <ASTNodeInterpreter key={index}\n node={value}/>\n ))}</span>\n ) :\n <>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</>\n case 'bold':\n return <b>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</b>\n case 'italic':\n return <i>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</i>\n case 'underline':\n return (<u>{node.children.map((value, index) => (<ASTNodeInterpreter key={index} node={value}/>))}</u>)\n case 'font-space':\n return (\n <span className=\"font-space\">{node.children.map((value, index) => (\n <ASTNodeInterpreter key={index}\n node={value}/>\n ))}</span>\n )\n case 'primary':\n return (\n <span className=\"text-primary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'secondary':\n return (\n <span className=\"text-secondary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'warn':\n return (\n <span className=\"text-warning\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'positive':\n return (\n <span className=\"text-positive\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'negative':\n return (\n <span className=\"text-negative\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n default:\n return null\n }\n}\n\nconst modifierIdentifierMapping = [\n { id: 'i', name: 'italic' },\n { id: 'b', name: 'bold' },\n { id: 'u', name: 'underline' },\n { id: 'space', name: 'font-space' },\n { id: 'primary', name: 'primary' },\n { id: 'secondary', name: 'secondary' },\n { id: 'warn', name: 'warn' },\n { id: 'positive', name: 'positive' },\n { id: 'negative', name: 'negative' },\n] as const\n\nconst inserterIdentifierMapping = [\n { id: 'helpwave', name: 'helpwave' },\n { id: 'newline', name: 'newline' }\n] as const\nconst parseMarkdown = (\n text: string,\n commandStart: string = '\\\\',\n open: string = '{',\n close: string = '}'\n): ASTNode => {\n let start = text.indexOf(commandStart)\n const children: ASTNode[] = []\n\n // parse the text step by step\n while (text !== '') {\n if (start === -1) {\n children.push({\n type: 'text',\n text\n })\n break\n }\n children.push(parseMarkdown(text.substring(0, start)))\n text = text.substring(start)\n if (text.length <= 1) {\n children.push({\n type: 'text',\n text\n })\n text = ''\n continue\n }\n const simpleReplace = [commandStart, open, close]\n if (simpleReplace.some(value => text[1] === value)) {\n children.push({\n type: 'text',\n text: simpleReplace.find(value => text[1] === value)!\n })\n text = text.substring(2)\n start = text.indexOf(commandStart)\n continue\n }\n const inserter = inserterIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (inserter) {\n children.push({\n type: inserter.name,\n })\n text = text.substring(inserter.id.length + 1)\n start = text.indexOf(commandStart)\n continue\n }\n const modifier = modifierIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (modifier) {\n // check brackets\n if (text[modifier.id.length + 1] !== open) {\n children.push({\n type: 'text',\n text: text.substring(0, modifier.id.length + 1)\n })\n text = text.substring(modifier.id.length + 2)\n start = text.indexOf(commandStart)\n continue\n }\n let closing = -1\n let index = modifier.id.length + 2\n let counter = 1\n let escaping = false\n while (index < text.length) {\n if (text[index] === open && !escaping) {\n counter++\n }\n if (text[index] === close && !escaping) {\n counter--\n if (counter === 0) {\n closing = index\n break\n }\n }\n escaping = text[index] === commandStart\n index++\n }\n\n if (closing !== -1) {\n children.push({\n type: modifier.name,\n children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]\n })\n text = text.substring(closing + 1)\n start = text.indexOf(commandStart)\n continue\n }\n }\n // nothing could be applied to command start\n children.push({\n type: 'text',\n text: text[0]!\n })\n text = text.substring(1)\n start = text.indexOf(commandStart)\n }\n\n return {\n type: 'none',\n children\n }\n}\n\nconst optimizeTree = (node: ASTNode) => {\n if (node.type === 'text') {\n return !node.text ? undefined : node\n }\n if (astNodeInserterType.some(value => value === node.type)) {\n return node\n }\n\n const currentNode = node as\n { type: ASTNodeModifierType, children: ASTNode[] }\n\n if (currentNode.children.length === 0) {\n return undefined\n }\n\n let children: ASTNode[] = []\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = optimizeTree(currentNode.children[i]!)\n if (!child) {\n continue\n }\n if (child.type === 'none') {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n currentNode.children = children\n children = []\n\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = currentNode.children[i]!\n if (child) {\n if (child.type === 'text' && children[children.length - 1]?.type === 'text') {\n (children[children.length - 1]! as { type: ASTNodeDefaultType, text: string }).text += child.text\n } else {\n children.push(child)\n }\n }\n }\n currentNode.children = children\n return currentNode\n}\n\nexport type MarkdownInterpreterProps = {\n text: string,\n className?: string,\n}\n\nexport const MarkdownInterpreter = ({ text, className }: MarkdownInterpreterProps) => {\n const tree = parseMarkdown(text)\n const optimizedTree = optimizeTree(tree)!\n return <ASTNodeInterpreter node={optimizedTree} isRoot={true} className={className}/>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCa;AA1Bb,IAAM,sBAAsB,CAAC,YAAY,SAAS;AAmB3C,IAAM,qBAAqB,CAAC;AAAA,EACE;AAAA,EACA,SAAS;AAAA,EACT,YAAY;AACd,MAA+B;AAChE,UAAQ,KAAK,MAAM;AAAA,IACjB,KAAK;AACH,aAAO,4CAAC,QAAE;AAAA,IACZ,KAAK;AACH,aAAO,SAAS,4CAAC,UAAK,WAAuB,eAAK,MAAK,IAAU,KAAK;AAAA,IACxE,KAAK;AACH,aAAQ,4CAAC,UAAK,WAAU,qCAAoC,sBAAQ;AAAA,IACtE,KAAK;AACH,aAAO,SACH,4CAAC,UAAK,WAAuB,eAAK,SAAS,IAAI,CAAC,OAAO,UACrD;AAAA,QAAC;AAAA;AAAA,UACmB,MAAM;AAAA;AAAA,QADD;AAAA,MACO,CACjC,GAAE,IAEL,2EAAG,eAAK,SAAS,IAAI,CAAC,OAAO,UAAU,4CAAC,sBAA+B,MAAM,SAAb,KAAmB,CAAE,GAAE;AAAA,IAC3F,KAAK;AACH,aAAO,4CAAC,OAAG,eAAK,SAAS,IAAI,CAAC,OAAO,UAAU,4CAAC,sBAA+B,MAAM,SAAb,KAAmB,CAAE,GAAE;AAAA,IACjG,KAAK;AACH,aAAO,4CAAC,OAAG,eAAK,SAAS,IAAI,CAAC,OAAO,UAAU,4CAAC,sBAA+B,MAAM,SAAb,K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B,CAAC,EAAE,MAAM,UAAU,MAAgC;AACpF,QAAM,OAAO,cAAc,IAAI;AAC/B,QAAM,gBAAgB,aAAa,IAAI;AACvC,SAAO,4CAAC,sBAAmB,MAAM,eAAe,QAAQ,MAAM,WAAqB;AACrF;","names":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type ASTNodeModifierType = 'none' | 'italic' | 'bold' | 'underline' | 'font-space' | 'primary' | 'secondary' | 'warn' | 'positive' | 'negative';
|
|
4
|
-
declare const astNodeInserterType: readonly ["helpwave", "newline"];
|
|
5
|
-
type ASTNodeInserterType = typeof astNodeInserterType[number];
|
|
6
|
-
type ASTNodeDefaultType = 'text';
|
|
7
|
-
type ASTNode = {
|
|
8
|
-
type: ASTNodeModifierType;
|
|
9
|
-
children: ASTNode[];
|
|
10
|
-
} | {
|
|
11
|
-
type: ASTNodeInserterType;
|
|
12
|
-
} | {
|
|
13
|
-
type: ASTNodeDefaultType;
|
|
14
|
-
text: string;
|
|
15
|
-
};
|
|
16
|
-
type ASTNodeInterpreterProps = {
|
|
17
|
-
node: ASTNode;
|
|
18
|
-
isRoot?: boolean;
|
|
19
|
-
className?: string;
|
|
20
|
-
};
|
|
21
|
-
declare const ASTNodeInterpreter: ({ node, isRoot, className, }: ASTNodeInterpreterProps) => string | react_jsx_runtime.JSX.Element;
|
|
22
|
-
type MarkdownInterpreterProps = {
|
|
23
|
-
text: string;
|
|
24
|
-
className?: string;
|
|
25
|
-
};
|
|
26
|
-
declare const MarkdownInterpreter: ({ text, className }: MarkdownInterpreterProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { ASTNodeInterpreter, type ASTNodeInterpreterProps, MarkdownInterpreter, type MarkdownInterpreterProps };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type ASTNodeModifierType = 'none' | 'italic' | 'bold' | 'underline' | 'font-space' | 'primary' | 'secondary' | 'warn' | 'positive' | 'negative';
|
|
4
|
-
declare const astNodeInserterType: readonly ["helpwave", "newline"];
|
|
5
|
-
type ASTNodeInserterType = typeof astNodeInserterType[number];
|
|
6
|
-
type ASTNodeDefaultType = 'text';
|
|
7
|
-
type ASTNode = {
|
|
8
|
-
type: ASTNodeModifierType;
|
|
9
|
-
children: ASTNode[];
|
|
10
|
-
} | {
|
|
11
|
-
type: ASTNodeInserterType;
|
|
12
|
-
} | {
|
|
13
|
-
type: ASTNodeDefaultType;
|
|
14
|
-
text: string;
|
|
15
|
-
};
|
|
16
|
-
type ASTNodeInterpreterProps = {
|
|
17
|
-
node: ASTNode;
|
|
18
|
-
isRoot?: boolean;
|
|
19
|
-
className?: string;
|
|
20
|
-
};
|
|
21
|
-
declare const ASTNodeInterpreter: ({ node, isRoot, className, }: ASTNodeInterpreterProps) => string | react_jsx_runtime.JSX.Element;
|
|
22
|
-
type MarkdownInterpreterProps = {
|
|
23
|
-
text: string;
|
|
24
|
-
className?: string;
|
|
25
|
-
};
|
|
26
|
-
declare const MarkdownInterpreter: ({ text, className }: MarkdownInterpreterProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { ASTNodeInterpreter, type ASTNodeInterpreterProps, MarkdownInterpreter, type MarkdownInterpreterProps };
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
// src/components/layout/MarkdownInterpreter.tsx
|
|
2
|
-
import { Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
var astNodeInserterType = ["helpwave", "newline"];
|
|
4
|
-
var ASTNodeInterpreter = ({
|
|
5
|
-
node,
|
|
6
|
-
isRoot = false,
|
|
7
|
-
className = ""
|
|
8
|
-
}) => {
|
|
9
|
-
switch (node.type) {
|
|
10
|
-
case "newline":
|
|
11
|
-
return /* @__PURE__ */ jsx("br", {});
|
|
12
|
-
case "text":
|
|
13
|
-
return isRoot ? /* @__PURE__ */ jsx("span", { className, children: node.text }) : node.text;
|
|
14
|
-
case "helpwave":
|
|
15
|
-
return /* @__PURE__ */ jsx("span", { className: "font-bold font-space no-underline", children: "helpwave" });
|
|
16
|
-
case "none":
|
|
17
|
-
return isRoot ? /* @__PURE__ */ jsx("span", { className, children: node.children.map((value, index) => /* @__PURE__ */ jsx(
|
|
18
|
-
ASTNodeInterpreter,
|
|
19
|
-
{
|
|
20
|
-
node: value
|
|
21
|
-
},
|
|
22
|
-
index
|
|
23
|
-
)) }) : /* @__PURE__ */ jsx(Fragment, { children: node.children.map((value, index) => /* @__PURE__ */ jsx(ASTNodeInterpreter, { node: value }, index)) });
|
|
24
|
-
case "bold":
|
|
25
|
-
return /* @__PURE__ */ jsx("b", { children: node.children.map((value, index) => /* @__PURE__ */ jsx(ASTNodeInterpreter, { node: value }, index)) });
|
|
26
|
-
case "italic":
|
|
27
|
-
return /* @__PURE__ */ jsx("i", { children: node.children.map((value, index) => /* @__PURE__ */ jsx(ASTNodeInterpreter, { node: value }, index)) });
|
|
28
|
-
case "underline":
|
|
29
|
-
return /* @__PURE__ */ jsx("u", { children: node.children.map((value, index) => /* @__PURE__ */ jsx(ASTNodeInterpreter, { node: value }, index)) });
|
|
30
|
-
case "font-space":
|
|
31
|
-
return /* @__PURE__ */ jsx("span", { className: "font-space", children: node.children.map((value, index) => /* @__PURE__ */ jsx(
|
|
32
|
-
ASTNodeInterpreter,
|
|
33
|
-
{
|
|
34
|
-
node: value
|
|
35
|
-
},
|
|
36
|
-
index
|
|
37
|
-
)) });
|
|
38
|
-
case "primary":
|
|
39
|
-
return /* @__PURE__ */ jsx("span", { className: "text-primary", children: node.children.map((value, index) => /* @__PURE__ */ jsx(
|
|
40
|
-
ASTNodeInterpreter,
|
|
41
|
-
{
|
|
42
|
-
node: value
|
|
43
|
-
},
|
|
44
|
-
index
|
|
45
|
-
)) });
|
|
46
|
-
case "secondary":
|
|
47
|
-
return /* @__PURE__ */ jsx("span", { className: "text-secondary", children: node.children.map((value, index) => /* @__PURE__ */ jsx(
|
|
48
|
-
ASTNodeInterpreter,
|
|
49
|
-
{
|
|
50
|
-
node: value
|
|
51
|
-
},
|
|
52
|
-
index
|
|
53
|
-
)) });
|
|
54
|
-
case "warn":
|
|
55
|
-
return /* @__PURE__ */ jsx("span", { className: "text-warning", children: node.children.map((value, index) => /* @__PURE__ */ jsx(
|
|
56
|
-
ASTNodeInterpreter,
|
|
57
|
-
{
|
|
58
|
-
node: value
|
|
59
|
-
},
|
|
60
|
-
index
|
|
61
|
-
)) });
|
|
62
|
-
case "positive":
|
|
63
|
-
return /* @__PURE__ */ jsx("span", { className: "text-positive", children: node.children.map((value, index) => /* @__PURE__ */ jsx(
|
|
64
|
-
ASTNodeInterpreter,
|
|
65
|
-
{
|
|
66
|
-
node: value
|
|
67
|
-
},
|
|
68
|
-
index
|
|
69
|
-
)) });
|
|
70
|
-
case "negative":
|
|
71
|
-
return /* @__PURE__ */ jsx("span", { className: "text-negative", children: node.children.map((value, index) => /* @__PURE__ */ jsx(
|
|
72
|
-
ASTNodeInterpreter,
|
|
73
|
-
{
|
|
74
|
-
node: value
|
|
75
|
-
},
|
|
76
|
-
index
|
|
77
|
-
)) });
|
|
78
|
-
default:
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
var modifierIdentifierMapping = [
|
|
83
|
-
{ id: "i", name: "italic" },
|
|
84
|
-
{ id: "b", name: "bold" },
|
|
85
|
-
{ id: "u", name: "underline" },
|
|
86
|
-
{ id: "space", name: "font-space" },
|
|
87
|
-
{ id: "primary", name: "primary" },
|
|
88
|
-
{ id: "secondary", name: "secondary" },
|
|
89
|
-
{ id: "warn", name: "warn" },
|
|
90
|
-
{ id: "positive", name: "positive" },
|
|
91
|
-
{ id: "negative", name: "negative" }
|
|
92
|
-
];
|
|
93
|
-
var inserterIdentifierMapping = [
|
|
94
|
-
{ id: "helpwave", name: "helpwave" },
|
|
95
|
-
{ id: "newline", name: "newline" }
|
|
96
|
-
];
|
|
97
|
-
var parseMarkdown = (text, commandStart = "\\", open = "{", close = "}") => {
|
|
98
|
-
let start = text.indexOf(commandStart);
|
|
99
|
-
const children = [];
|
|
100
|
-
while (text !== "") {
|
|
101
|
-
if (start === -1) {
|
|
102
|
-
children.push({
|
|
103
|
-
type: "text",
|
|
104
|
-
text
|
|
105
|
-
});
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
children.push(parseMarkdown(text.substring(0, start)));
|
|
109
|
-
text = text.substring(start);
|
|
110
|
-
if (text.length <= 1) {
|
|
111
|
-
children.push({
|
|
112
|
-
type: "text",
|
|
113
|
-
text
|
|
114
|
-
});
|
|
115
|
-
text = "";
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
const simpleReplace = [commandStart, open, close];
|
|
119
|
-
if (simpleReplace.some((value) => text[1] === value)) {
|
|
120
|
-
children.push({
|
|
121
|
-
type: "text",
|
|
122
|
-
text: simpleReplace.find((value) => text[1] === value)
|
|
123
|
-
});
|
|
124
|
-
text = text.substring(2);
|
|
125
|
-
start = text.indexOf(commandStart);
|
|
126
|
-
continue;
|
|
127
|
-
}
|
|
128
|
-
const inserter = inserterIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
|
|
129
|
-
if (inserter) {
|
|
130
|
-
children.push({
|
|
131
|
-
type: inserter.name
|
|
132
|
-
});
|
|
133
|
-
text = text.substring(inserter.id.length + 1);
|
|
134
|
-
start = text.indexOf(commandStart);
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
const modifier = modifierIdentifierMapping.find((value) => text.substring(1).startsWith(value.id));
|
|
138
|
-
if (modifier) {
|
|
139
|
-
if (text[modifier.id.length + 1] !== open) {
|
|
140
|
-
children.push({
|
|
141
|
-
type: "text",
|
|
142
|
-
text: text.substring(0, modifier.id.length + 1)
|
|
143
|
-
});
|
|
144
|
-
text = text.substring(modifier.id.length + 2);
|
|
145
|
-
start = text.indexOf(commandStart);
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
let closing = -1;
|
|
149
|
-
let index = modifier.id.length + 2;
|
|
150
|
-
let counter = 1;
|
|
151
|
-
let escaping = false;
|
|
152
|
-
while (index < text.length) {
|
|
153
|
-
if (text[index] === open && !escaping) {
|
|
154
|
-
counter++;
|
|
155
|
-
}
|
|
156
|
-
if (text[index] === close && !escaping) {
|
|
157
|
-
counter--;
|
|
158
|
-
if (counter === 0) {
|
|
159
|
-
closing = index;
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
escaping = text[index] === commandStart;
|
|
164
|
-
index++;
|
|
165
|
-
}
|
|
166
|
-
if (closing !== -1) {
|
|
167
|
-
children.push({
|
|
168
|
-
type: modifier.name,
|
|
169
|
-
children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]
|
|
170
|
-
});
|
|
171
|
-
text = text.substring(closing + 1);
|
|
172
|
-
start = text.indexOf(commandStart);
|
|
173
|
-
continue;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
children.push({
|
|
177
|
-
type: "text",
|
|
178
|
-
text: text[0]
|
|
179
|
-
});
|
|
180
|
-
text = text.substring(1);
|
|
181
|
-
start = text.indexOf(commandStart);
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
type: "none",
|
|
185
|
-
children
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
var optimizeTree = (node) => {
|
|
189
|
-
if (node.type === "text") {
|
|
190
|
-
return !node.text ? void 0 : node;
|
|
191
|
-
}
|
|
192
|
-
if (astNodeInserterType.some((value) => value === node.type)) {
|
|
193
|
-
return node;
|
|
194
|
-
}
|
|
195
|
-
const currentNode = node;
|
|
196
|
-
if (currentNode.children.length === 0) {
|
|
197
|
-
return void 0;
|
|
198
|
-
}
|
|
199
|
-
let children = [];
|
|
200
|
-
for (let i = 0; i < currentNode.children.length; i++) {
|
|
201
|
-
const child = optimizeTree(currentNode.children[i]);
|
|
202
|
-
if (!child) {
|
|
203
|
-
continue;
|
|
204
|
-
}
|
|
205
|
-
if (child.type === "none") {
|
|
206
|
-
children.push(...child.children);
|
|
207
|
-
} else {
|
|
208
|
-
children.push(child);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
currentNode.children = children;
|
|
212
|
-
children = [];
|
|
213
|
-
for (let i = 0; i < currentNode.children.length; i++) {
|
|
214
|
-
const child = currentNode.children[i];
|
|
215
|
-
if (child) {
|
|
216
|
-
if (child.type === "text" && children[children.length - 1]?.type === "text") {
|
|
217
|
-
children[children.length - 1].text += child.text;
|
|
218
|
-
} else {
|
|
219
|
-
children.push(child);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
currentNode.children = children;
|
|
224
|
-
return currentNode;
|
|
225
|
-
};
|
|
226
|
-
var MarkdownInterpreter = ({ text, className }) => {
|
|
227
|
-
const tree = parseMarkdown(text);
|
|
228
|
-
const optimizedTree = optimizeTree(tree);
|
|
229
|
-
return /* @__PURE__ */ jsx(ASTNodeInterpreter, { node: optimizedTree, isRoot: true, className });
|
|
230
|
-
};
|
|
231
|
-
export {
|
|
232
|
-
ASTNodeInterpreter,
|
|
233
|
-
MarkdownInterpreter
|
|
234
|
-
};
|
|
235
|
-
//# sourceMappingURL=MarkdownInterpreter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layout/MarkdownInterpreter.tsx"],"sourcesContent":["type ASTNodeModifierType =\n 'none'\n | 'italic'\n | 'bold'\n | 'underline'\n | 'font-space'\n | 'primary'\n | 'secondary'\n | 'warn'\n | 'positive'\n | 'negative'\n\nconst astNodeInserterType = ['helpwave', 'newline'] as const\ntype ASTNodeInserterType = typeof astNodeInserterType[number]\ntype ASTNodeDefaultType = 'text'\n\ntype ASTNode = {\n type: ASTNodeModifierType,\n children: ASTNode[],\n} | {\n type: ASTNodeInserterType,\n} | {\n type: ASTNodeDefaultType,\n text: string,\n}\n\nexport type ASTNodeInterpreterProps = {\n node: ASTNode,\n isRoot?: boolean,\n className?: string,\n}\nexport const ASTNodeInterpreter = ({\n node,\n isRoot = false,\n className = '',\n }: ASTNodeInterpreterProps) => {\n switch (node.type) {\n case 'newline':\n return <br/>\n case 'text':\n return isRoot ? <span className={className}>{node.text}</span> : node.text\n case 'helpwave':\n return (<span className=\"font-bold font-space no-underline\">helpwave</span>)\n case 'none':\n return isRoot ? (\n <span className={className}>{node.children.map((value, index) => (\n <ASTNodeInterpreter key={index}\n node={value}/>\n ))}</span>\n ) :\n <>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</>\n case 'bold':\n return <b>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</b>\n case 'italic':\n return <i>{node.children.map((value, index) => <ASTNodeInterpreter key={index} node={value}/>)}</i>\n case 'underline':\n return (<u>{node.children.map((value, index) => (<ASTNodeInterpreter key={index} node={value}/>))}</u>)\n case 'font-space':\n return (\n <span className=\"font-space\">{node.children.map((value, index) => (\n <ASTNodeInterpreter key={index}\n node={value}/>\n ))}</span>\n )\n case 'primary':\n return (\n <span className=\"text-primary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'secondary':\n return (\n <span className=\"text-secondary\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'warn':\n return (\n <span className=\"text-warning\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'positive':\n return (\n <span className=\"text-positive\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n case 'negative':\n return (\n <span className=\"text-negative\">{node.children.map((value, index) => (\n <ASTNodeInterpreter\n key={index} node={value}/>\n ))}</span>\n )\n default:\n return null\n }\n}\n\nconst modifierIdentifierMapping = [\n { id: 'i', name: 'italic' },\n { id: 'b', name: 'bold' },\n { id: 'u', name: 'underline' },\n { id: 'space', name: 'font-space' },\n { id: 'primary', name: 'primary' },\n { id: 'secondary', name: 'secondary' },\n { id: 'warn', name: 'warn' },\n { id: 'positive', name: 'positive' },\n { id: 'negative', name: 'negative' },\n] as const\n\nconst inserterIdentifierMapping = [\n { id: 'helpwave', name: 'helpwave' },\n { id: 'newline', name: 'newline' }\n] as const\nconst parseMarkdown = (\n text: string,\n commandStart: string = '\\\\',\n open: string = '{',\n close: string = '}'\n): ASTNode => {\n let start = text.indexOf(commandStart)\n const children: ASTNode[] = []\n\n // parse the text step by step\n while (text !== '') {\n if (start === -1) {\n children.push({\n type: 'text',\n text\n })\n break\n }\n children.push(parseMarkdown(text.substring(0, start)))\n text = text.substring(start)\n if (text.length <= 1) {\n children.push({\n type: 'text',\n text\n })\n text = ''\n continue\n }\n const simpleReplace = [commandStart, open, close]\n if (simpleReplace.some(value => text[1] === value)) {\n children.push({\n type: 'text',\n text: simpleReplace.find(value => text[1] === value)!\n })\n text = text.substring(2)\n start = text.indexOf(commandStart)\n continue\n }\n const inserter = inserterIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (inserter) {\n children.push({\n type: inserter.name,\n })\n text = text.substring(inserter.id.length + 1)\n start = text.indexOf(commandStart)\n continue\n }\n const modifier = modifierIdentifierMapping.find(value => text.substring(1).startsWith(value.id))\n if (modifier) {\n // check brackets\n if (text[modifier.id.length + 1] !== open) {\n children.push({\n type: 'text',\n text: text.substring(0, modifier.id.length + 1)\n })\n text = text.substring(modifier.id.length + 2)\n start = text.indexOf(commandStart)\n continue\n }\n let closing = -1\n let index = modifier.id.length + 2\n let counter = 1\n let escaping = false\n while (index < text.length) {\n if (text[index] === open && !escaping) {\n counter++\n }\n if (text[index] === close && !escaping) {\n counter--\n if (counter === 0) {\n closing = index\n break\n }\n }\n escaping = text[index] === commandStart\n index++\n }\n\n if (closing !== -1) {\n children.push({\n type: modifier.name,\n children: [parseMarkdown(text.substring(modifier.id.length + 2, closing))]\n })\n text = text.substring(closing + 1)\n start = text.indexOf(commandStart)\n continue\n }\n }\n // nothing could be applied to command start\n children.push({\n type: 'text',\n text: text[0]!\n })\n text = text.substring(1)\n start = text.indexOf(commandStart)\n }\n\n return {\n type: 'none',\n children\n }\n}\n\nconst optimizeTree = (node: ASTNode) => {\n if (node.type === 'text') {\n return !node.text ? undefined : node\n }\n if (astNodeInserterType.some(value => value === node.type)) {\n return node\n }\n\n const currentNode = node as\n { type: ASTNodeModifierType, children: ASTNode[] }\n\n if (currentNode.children.length === 0) {\n return undefined\n }\n\n let children: ASTNode[] = []\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = optimizeTree(currentNode.children[i]!)\n if (!child) {\n continue\n }\n if (child.type === 'none') {\n children.push(...child.children)\n } else {\n children.push(child)\n }\n }\n\n currentNode.children = children\n children = []\n\n for (let i = 0; i < currentNode.children.length; i++) {\n const child = currentNode.children[i]!\n if (child) {\n if (child.type === 'text' && children[children.length - 1]?.type === 'text') {\n (children[children.length - 1]! as { type: ASTNodeDefaultType, text: string }).text += child.text\n } else {\n children.push(child)\n }\n }\n }\n currentNode.children = children\n return currentNode\n}\n\nexport type MarkdownInterpreterProps = {\n text: string,\n className?: string,\n}\n\nexport const MarkdownInterpreter = ({ text, className }: MarkdownInterpreterProps) => {\n const tree = parseMarkdown(text)\n const optimizedTree = optimizeTree(tree)!\n return <ASTNodeInterpreter node={optimizedTree} isRoot={true} className={className}/>\n}\n"],"mappings":";AAsCa,SAYL,UAZK;AA1Bb,IAAM,sBAAsB,CAAC,YAAY,SAAS;AAmB3C,IAAM,qBAAqB,CAAC;AAAA,EACE;AAAA,EACA,SAAS;AAAA,EACT,YAAY;AACd,MAA+B;AAChE,UAAQ,KAAK,MAAM;AAAA,IACjB,KAAK;AACH,aAAO,oBAAC,QAAE;AAAA,IACZ,KAAK;AACH,aAAO,SAAS,oBAAC,UAAK,WAAuB,eAAK,MAAK,IAAU,KAAK;AAAA,IACxE,KAAK;AACH,aAAQ,oBAAC,UAAK,WAAU,qCAAo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