summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /intl/icu_capi/js/package
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu_capi/js/package')
-rw-r--r--intl/icu_capi/js/package/Makefile24
-rw-r--r--intl/icu_capi/js/package/bench/all.mjs2
-rw-r--r--intl/icu_capi/js/package/bench/fixed-decimal-format.mjs28
-rw-r--r--intl/icu_capi/js/package/bench/fixed-decimal.mjs34
-rw-r--r--intl/icu_capi/js/package/diplomat.config.js7
-rw-r--r--intl/icu_capi/js/package/docs/.gitignore1
-rw-r--r--intl/icu_capi/js/package/docs/Makefile20
-rw-r--r--intl/icu_capi/js/package/docs/make.bat35
-rw-r--r--intl/icu_capi/js/package/docs/source/bidi_ffi.rst177
-rw-r--r--intl/icu_capi/js/package/docs/source/calendar_ffi.rst60
-rw-r--r--intl/icu_capi/js/package/docs/source/casemap_ffi.rst182
-rw-r--r--intl/icu_capi/js/package/docs/source/collator_ffi.rst97
-rw-r--r--intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst143
-rw-r--r--intl/icu_capi/js/package/docs/source/common_ffi.rst7
-rw-r--r--intl/icu_capi/js/package/docs/source/conf.py60
-rw-r--r--intl/icu_capi/js/package/docs/source/data_struct_ffi.rst20
-rw-r--r--intl/icu_capi/js/package/docs/source/date_ffi.rst234
-rw-r--r--intl/icu_capi/js/package/docs/source/datetime_ffi.rst337
-rw-r--r--intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst172
-rw-r--r--intl/icu_capi/js/package/docs/source/decimal_ffi.rst35
-rw-r--r--intl/icu_capi/js/package/docs/source/displaynames_ffi.rst75
-rw-r--r--intl/icu_capi/js/package/docs/source/errors_ffi.rst11
-rw-r--r--intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst103
-rw-r--r--intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst247
-rw-r--r--intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst35
-rw-r--r--intl/icu_capi/js/package/docs/source/index.rst54
-rw-r--r--intl/icu_capi/js/package/docs/source/list_ffi.rst65
-rw-r--r--intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst41
-rw-r--r--intl/icu_capi/js/package/docs/source/locale_ffi.rst128
-rw-r--r--intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst72
-rw-r--r--intl/icu_capi/js/package/docs/source/logging_ffi.rst21
-rw-r--r--intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst16
-rw-r--r--intl/icu_capi/js/package/docs/source/normalizer_ffi.rst76
-rw-r--r--intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst87
-rw-r--r--intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst84
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst27
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst159
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_names_ffi.rst102
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst380
-rw-r--r--intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst62
-rw-r--r--intl/icu_capi/js/package/docs/source/provider_ffi.rst86
-rw-r--r--intl/icu_capi/js/package/docs/source/script_ffi.rst105
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst77
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst139
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst77
-rw-r--r--intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst142
-rw-r--r--intl/icu_capi/js/package/docs/source/time_ffi.rst51
-rw-r--r--intl/icu_capi/js/package/docs/source/timezone_ffi.rst246
-rw-r--r--intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst112
-rw-r--r--intl/icu_capi/js/package/docs/source/week_ffi.rst49
-rw-r--r--intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst73
-rw-r--r--intl/icu_capi/js/package/index.js1
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIterator.js28
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js10
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts102
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js66
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts28
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidi.d.ts82
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidi.js65
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts14
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiDirection.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts37
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiInfo.js37
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts67
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js75
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCalendar.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js43
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts32
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js39
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts39
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts134
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCaseMapper.js173
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts66
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts137
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js184
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts163
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js90
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts523
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js1177
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollator.d.ts50
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollator.js77
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts22
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts25
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js29
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js81
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts293
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js347
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts100
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataProvider.js138
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDataStruct.js50
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDate.d.ts156
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDate.js161
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts67
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateFormatter.js112
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateLength.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts212
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTime.js191
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js75
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts12
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposed.js9
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js81
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts22
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XError.d.ts186
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XError.js176
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts272
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js235
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts43
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js72
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts24
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts24
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts43
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js74
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts34
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js56
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js79
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts131
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDate.js104
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts199
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js138
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts11
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js32
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts12
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js12
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts94
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js149
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XList.d.ts34
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XList.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts47
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListFormatter.js89
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListLength.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XListLength.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocale.d.ts159
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocale.js268
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts40
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts49
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js65
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js60
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js61
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts14
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js15
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js26
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts18
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts15
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts40
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js65
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js22
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLogger.d.ts23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XLogger.js25
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XOrdering.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategories.js13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts28
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralCategory.js29
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralOperands.js38
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts50
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPluralRules.js68
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts98
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js185
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts29
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js57
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts36
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js42
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts54
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts44
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js35
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTime.d.ts62
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTime.js68
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts53
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js93
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts19
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeLength.js23
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts115
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js199
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts32
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js61
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js21
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts13
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTrailingCase.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts15
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XTransformResult.js17
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts82
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js135
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts46
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js48
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts11
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekOf.js10
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts16
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js20
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts33
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js30
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts70
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js87
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts59
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js98
-rw-r--r--intl/icu_capi/js/package/lib/diplomat-runtime.d.ts20
-rw-r--r--intl/icu_capi/js/package/lib/diplomat-runtime.js121
-rw-r--r--intl/icu_capi/js/package/lib/diplomat-wasm.mjs44
-rw-r--r--intl/icu_capi/js/package/lib/index.d.ts124
-rw-r--r--intl/icu_capi/js/package/lib/index.js124
-rw-r--r--intl/icu_capi/js/package/package-lock.json2948
-rw-r--r--intl/icu_capi/js/package/package.json39
-rw-r--r--intl/icu_capi/js/package/test/data-providers.mjs19
-rw-r--r--intl/icu_capi/js/package/test/fixed-decimal-format.mjs32
-rw-r--r--intl/icu_capi/js/package/test/fixed-decimal.mjs27
308 files changed, 22455 insertions, 0 deletions
diff --git a/intl/icu_capi/js/package/Makefile b/intl/icu_capi/js/package/Makefile
new file mode 100644
index 0000000000..4fb31f252b
--- /dev/null
+++ b/intl/icu_capi/js/package/Makefile
@@ -0,0 +1,24 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+.DEFAULT_GOAL := target/wasm32-unknown-unknown/release/icu_capi_cdylib.wasm
+FORCE:
+
+ICU4X_NIGHTLY_TOOLCHAIN ?= "nightly-2022-12-26"
+
+# 100 KiB, working around a bug in older rustc
+# https://github.com/unicode-org/icu4x/issues/2753
+WASM_STACK_SIZE := 100000
+
+target/wasm32-unknown-unknown/release/icu_capi_cdylib.wasm: FORCE
+ rustup toolchain install ${ICU4X_NIGHTLY_TOOLCHAIN}
+ rustup component add rust-src --toolchain ${ICU4X_NIGHTLY_TOOLCHAIN}
+ RUSTFLAGS="-Cpanic=abort -Copt-level=s -C link-args=-zstack-size=${WASM_STACK_SIZE} -Clto -Cembed-bitcode" \
+ CARGO_TARGET_DIR="target" \
+ cargo +${ICU4X_NIGHTLY_TOOLCHAIN} build \
+ -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort \
+ --target wasm32-unknown-unknown \
+ --release \
+ -p icu_capi_cdylib \
+ --features buffer_provider
diff --git a/intl/icu_capi/js/package/bench/all.mjs b/intl/icu_capi/js/package/bench/all.mjs
new file mode 100644
index 0000000000..76586772d4
--- /dev/null
+++ b/intl/icu_capi/js/package/bench/all.mjs
@@ -0,0 +1,2 @@
+import "./fixed-decimal.mjs";
+import "./fixed-decimal-format.mjs";
diff --git a/intl/icu_capi/js/package/bench/fixed-decimal-format.mjs b/intl/icu_capi/js/package/bench/fixed-decimal-format.mjs
new file mode 100644
index 0000000000..ac3b29203f
--- /dev/null
+++ b/intl/icu_capi/js/package/bench/fixed-decimal-format.mjs
@@ -0,0 +1,28 @@
+import Benchmark from 'benchmark';
+
+import { ICU4XFixedDecimal, ICU4XLocale, ICU4XFixedDecimalFormatter, ICU4XDataProvider, ICU4XFixedDecimalGroupingStrategy } from "../index.js"
+
+const locale = ICU4XLocale.create_from_string("bn");
+const dataProvider = ICU4XDataProvider.create_compiled();
+
+let suite = new Benchmark.Suite();
+
+suite = suite.add("ICU4XFixedDecimalFormatter.create", () => {
+ (ICU4XFixedDecimalFormatter.create(locale, dataProvider, {})).underlying > 0;
+});
+
+const format = ICU4XFixedDecimalFormatter.create_with_grouping_strategy(dataProvider, locale, ICU4XFixedDecimalGroupingStrategy.Auto);
+const decimal = ICU4XFixedDecimal.create_from_i64(BigInt(1234));
+decimal.multiply_pow10(-2);
+
+suite = suite.add("ICU4XFixedDecimalFormatter.format", () => {
+ format.format(decimal);
+});
+
+suite
+ .on('cycle', (event) => {
+ console.log(String(event.target));
+ console.log('μs/it:', event.target.stats.mean * 1000 * 1000);
+ console.log();
+ })
+ .run({ "async": false });
diff --git a/intl/icu_capi/js/package/bench/fixed-decimal.mjs b/intl/icu_capi/js/package/bench/fixed-decimal.mjs
new file mode 100644
index 0000000000..12256e180d
--- /dev/null
+++ b/intl/icu_capi/js/package/bench/fixed-decimal.mjs
@@ -0,0 +1,34 @@
+import Benchmark from 'benchmark';
+
+import { ICU4XFixedDecimal } from "../index.js"
+
+let suite = new Benchmark.Suite();
+
+suite = suite.add("ICU4XFixedDecimal.create_from_i64", () => {
+ (ICU4XFixedDecimal.create_from_i64(BigInt(1234))).underlying > 0;
+});
+
+const decimal = ICU4XFixedDecimal.create_from_i64(BigInt(1234));
+decimal.multiply_pow10(-2);
+
+suite = suite.add("ICU4XFixedDecimal.to_string", () => {
+ decimal.to_string();
+});
+
+suite = suite.add("ICU4XFixedDecimal.multiply_pow10", () => {
+ decimal.multiply_pow10(2);
+ decimal.multiply_pow10(-2);
+});
+
+suite = suite.add("ICU4XFixedDecimal.set_sign", () => {
+ decimal.set_sign("Negative");
+ decimal.set_sign("None");
+});
+
+suite
+ .on('cycle', (event) => {
+ console.log(String(event.target));
+ console.log('μs/it:', event.target.stats.mean * 1000 * 1000);
+ console.log();
+ })
+ .run({ "async": false });
diff --git a/intl/icu_capi/js/package/diplomat.config.js b/intl/icu_capi/js/package/diplomat.config.js
new file mode 100644
index 0000000000..6f2cf83c74
--- /dev/null
+++ b/intl/icu_capi/js/package/diplomat.config.js
@@ -0,0 +1,7 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+export default {
+ wasm_path: new URL('target/wasm32-unknown-unknown/release/icu_capi_cdylib.wasm', import.meta.url),
+};
diff --git a/intl/icu_capi/js/package/docs/.gitignore b/intl/icu_capi/js/package/docs/.gitignore
new file mode 100644
index 0000000000..c795b054e5
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/.gitignore
@@ -0,0 +1 @@
+build \ No newline at end of file
diff --git a/intl/icu_capi/js/package/docs/Makefile b/intl/icu_capi/js/package/docs/Makefile
new file mode 100644
index 0000000000..d0c3cbf102
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/Makefile
@@ -0,0 +1,20 @@
+# Minimal makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line, and also
+# from the environment for the first two.
+SPHINXOPTS ?=
+SPHINXBUILD ?= sphinx-build
+SOURCEDIR = source
+BUILDDIR = build
+
+# Put it first so that "make" without argument is like "make help".
+help:
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+.PHONY: help Makefile
+
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
diff --git a/intl/icu_capi/js/package/docs/make.bat b/intl/icu_capi/js/package/docs/make.bat
new file mode 100644
index 0000000000..747ffb7b30
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/make.bat
@@ -0,0 +1,35 @@
+@ECHO OFF
+
+pushd %~dp0
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set SOURCEDIR=source
+set BUILDDIR=build
+
+%SPHINXBUILD% >NUL 2>NUL
+if errorlevel 9009 (
+ echo.
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+ echo.installed, then set the SPHINXBUILD environment variable to point
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
+ echo.may add the Sphinx directory to PATH.
+ echo.
+ echo.If you don't have Sphinx installed, grab it from
+ echo.https://www.sphinx-doc.org/
+ exit /b 1
+)
+
+if "%1" == "" goto help
+
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+goto end
+
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
+
+:end
+popd
diff --git a/intl/icu_capi/js/package/docs/source/bidi_ffi.rst b/intl/icu_capi/js/package/docs/source/bidi_ffi.rst
new file mode 100644
index 0000000000..783fe70baa
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/bidi_ffi.rst
@@ -0,0 +1,177 @@
+``bidi::ffi``
+=============
+
+.. js:class:: ICU4XBidi
+
+ An ICU4X Bidi object, containing loaded bidi data
+
+ See the `Rust documentation for BidiClassAdapter <https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Creates a new :js:class:`ICU4XBidi` from locale data.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new>`__ for more information.
+
+
+ .. js:method:: for_text(text, default_level)
+
+ Use the data loaded in this object to process a string and calculate bidi information
+
+ Takes in a Level for the default level, if it is an invalid value it will default to LTR
+
+ See the `Rust documentation for new_with_data_source <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.new_with_data_source>`__ for more information.
+
+
+ .. js:method:: reorder_visual(levels)
+
+ Utility function for producing reorderings given a list of levels
+
+ Produces a map saying which visual index maps to which source index.
+
+ The levels array must not have values greater than 126 (this is the Bidi maximum explicit depth plus one). Failure to follow this invariant may lead to incorrect results, but is still safe.
+
+ See the `Rust documentation for reorder_visual <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.reorder_visual>`__ for more information.
+
+ - Note: ``levels`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:function:: level_is_rtl(level)
+
+ Check if a Level returned by level_at is an RTL level.
+
+ Invalid levels (numbers greater than 125) will be assumed LTR
+
+ See the `Rust documentation for is_rtl <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_rtl>`__ for more information.
+
+
+ .. js:function:: level_is_ltr(level)
+
+ Check if a Level returned by level_at is an LTR level.
+
+ Invalid levels (numbers greater than 125) will be assumed LTR
+
+ See the `Rust documentation for is_ltr <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_ltr>`__ for more information.
+
+
+ .. js:function:: level_rtl()
+
+ Get a basic RTL Level value
+
+ See the `Rust documentation for rtl <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.rtl>`__ for more information.
+
+
+ .. js:function:: level_ltr()
+
+ Get a simple LTR Level value
+
+ See the `Rust documentation for ltr <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.ltr>`__ for more information.
+
+
+.. js:class:: ICU4XBidiDirection
+
+.. js:class:: ICU4XBidiInfo
+
+ An object containing bidi information for a given string, produced by ``for_text()`` on ``ICU4XBidi``
+
+ See the `Rust documentation for BidiInfo <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html>`__ for more information.
+
+
+ .. js:method:: paragraph_count()
+
+ The number of paragraphs contained here
+
+
+ .. js:method:: paragraph_at(n)
+
+ Get the nth paragraph, returning ``None`` if out of bounds
+
+
+ .. js:method:: size()
+
+ The number of bytes in this full text
+
+
+ .. js:method:: level_at(pos)
+
+ Get the BIDI level at a particular byte index in the full text. This integer is conceptually a ``unicode_bidi::Level``, and can be further inspected using the static methods on ICU4XBidi.
+
+ Returns 0 (equivalent to ``Level::ltr()``) on error
+
+
+.. js:class:: ICU4XBidiParagraph
+
+ Bidi information for a single processed paragraph
+
+
+ .. js:method:: set_paragraph_in_text(n)
+
+ Given a paragraph index ``n`` within the surrounding text, this sets this object to the paragraph at that index. Returns ``ICU4XError::OutOfBoundsError`` when out of bounds.
+
+ This is equivalent to calling ``paragraph_at()`` on ``ICU4XBidiInfo`` but doesn't create a new object
+
+
+ .. js:method:: direction()
+
+ The primary direction of this paragraph
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+ .. js:method:: size()
+
+ The number of bytes in this paragraph
+
+ See the `Rust documentation for len <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.ParagraphInfo.html#method.len>`__ for more information.
+
+
+ .. js:method:: range_start()
+
+ The start index of this paragraph within the source text
+
+
+ .. js:method:: range_end()
+
+ The end index of this paragraph within the source text
+
+
+ .. js:method:: reorder_line(range_start, range_end)
+
+ Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+ .. js:method:: level_at(pos)
+
+ Get the BIDI level at a particular byte index in this paragraph. This integer is conceptually a ``unicode_bidi::Level``, and can be further inspected using the static methods on ICU4XBidi.
+
+ Returns 0 (equivalent to ``Level::ltr()``) on error
+
+ See the `Rust documentation for level_at <https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at>`__ for more information.
+
+
+.. js:class:: ICU4XReorderedIndexMap
+
+ Thin wrapper around a vector that maps visual indices to source indices
+
+ ``map[visualIndex] = sourceIndex``
+
+ Produced by ``reorder_visual()`` on :js:class:`ICU4XBidi`.
+
+
+ .. js:method:: as_slice()
+
+ Get this as a slice/array of indices
+
+
+ .. js:method:: len()
+
+ The length of this map
+
+
+ .. js:method:: get(index)
+
+ Get element at ``index``. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use ``len()`` to avoid out-of-bounds)
+
diff --git a/intl/icu_capi/js/package/docs/source/calendar_ffi.rst b/intl/icu_capi/js/package/docs/source/calendar_ffi.rst
new file mode 100644
index 0000000000..7d787c0479
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/calendar_ffi.rst
@@ -0,0 +1,60 @@
+``calendar::ffi``
+=================
+
+.. js:class:: ICU4XAnyCalendarKind
+
+ The various calendar types currently supported by :js:class:`ICU4XCalendar`
+
+ See the `Rust documentation for AnyCalendarKind <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html>`__ for more information.
+
+
+ .. js:function:: get_for_locale(locale)
+
+ Read the calendar type off of the -u-ca- extension on a locale.
+
+ Errors if there is no calendar on the locale or if the locale's calendar is not known or supported.
+
+ See the `Rust documentation for get_for_locale <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.get_for_locale>`__ for more information.
+
+
+ .. js:function:: get_for_bcp47(s)
+
+ Obtain the calendar type given a BCP-47 -u-ca- extension string.
+
+ Errors if the calendar is not known or supported.
+
+ See the `Rust documentation for get_for_bcp47_value <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.get_for_bcp47_value>`__ for more information.
+
+
+ .. js:method:: bcp47()
+
+ Obtain the string suitable for use in the -u-ca- extension in a BCP47 locale.
+
+ See the `Rust documentation for as_bcp47_string <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html#method.as_bcp47_string>`__ for more information.
+
+
+.. js:class:: ICU4XCalendar
+
+ See the `Rust documentation for AnyCalendar <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html>`__ for more information.
+
+
+ .. js:function:: create_for_locale(provider, locale)
+
+ Creates a new :js:class:`ICU4XCalendar` from the specified date and time.
+
+ See the `Rust documentation for new_for_locale <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale>`__ for more information.
+
+
+ .. js:function:: create_for_kind(provider, kind)
+
+ Creates a new :js:class:`ICU4XCalendar` from the specified date and time.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new>`__ for more information.
+
+
+ .. js:method:: kind()
+
+ Returns the kind of this calendar
+
+ See the `Rust documentation for kind <https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.kind>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/casemap_ffi.rst b/intl/icu_capi/js/package/docs/source/casemap_ffi.rst
new file mode 100644
index 0000000000..7af7654d11
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/casemap_ffi.rst
@@ -0,0 +1,182 @@
+``casemap::ffi``
+================
+
+.. js:class:: ICU4XCaseMapCloser
+
+ See the `Rust documentation for CaseMapCloser <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCaseMapper instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new>`__ for more information.
+
+
+ .. js:method:: add_case_closure_to(c, builder)
+
+ Adds all simple case mappings and the full case folding for ``c`` to ``builder``. Also adds special case closure mappings.
+
+ See the `Rust documentation for add_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_case_closure_to>`__ for more information.
+
+
+ .. js:method:: add_string_case_closure_to(s, builder)
+
+ Finds all characters and strings which may casemap to ``s`` as their full case folding string and adds them to the set.
+
+ Returns true if the string was found
+
+ See the `Rust documentation for add_string_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_string_case_closure_to>`__ for more information.
+
+
+.. js:class:: ICU4XCaseMapper
+
+ See the `Rust documentation for CaseMapper <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCaseMapper instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new>`__ for more information.
+
+
+ .. js:method:: lowercase(s, locale)
+
+ Returns the full lowercase mapping of the given string
+
+ See the `Rust documentation for lowercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase>`__ for more information.
+
+
+ .. js:method:: uppercase(s, locale)
+
+ Returns the full uppercase mapping of the given string
+
+ See the `Rust documentation for uppercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase>`__ for more information.
+
+
+ .. js:method:: titlecase_segment_with_only_case_data_v1(s, locale, options)
+
+ Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment_with_only_case_data <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data>`__ for more information.
+
+
+ .. js:method:: fold(s)
+
+ Case-folds the characters in the given string
+
+ See the `Rust documentation for fold <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold>`__ for more information.
+
+
+ .. js:method:: fold_turkic(s)
+
+ Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.
+
+ See the `Rust documentation for fold_turkic <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic>`__ for more information.
+
+
+ .. js:method:: add_case_closure_to(c, builder)
+
+ Adds all simple case mappings and the full case folding for ``c`` to ``builder``. Also adds special case closure mappings.
+
+ In other words, this adds all characters that this casemaps to, as well as all characters that may casemap to this one.
+
+ Note that since ICU4XCodePointSetBuilder does not contain strings, this will ignore string mappings.
+
+ Identical to the similarly named method on ``ICU4XCaseMapCloser``, use that if you plan on using string case closure mappings too.
+
+ See the `Rust documentation for add_case_closure_to <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.add_case_closure_to>`__ for more information.
+
+
+ .. js:method:: simple_lowercase(ch)
+
+ Returns the simple lowercase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::lowercase``.
+
+ See the `Rust documentation for simple_lowercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_lowercase>`__ for more information.
+
+
+ .. js:method:: simple_uppercase(ch)
+
+ Returns the simple uppercase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::uppercase``.
+
+ See the `Rust documentation for simple_uppercase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_uppercase>`__ for more information.
+
+
+ .. js:method:: simple_titlecase(ch)
+
+ Returns the simple titlecase mapping of the given character.
+
+ This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use ``ICU4XCaseMapper::titlecase_segment``.
+
+ See the `Rust documentation for simple_titlecase <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_titlecase>`__ for more information.
+
+
+ .. js:method:: simple_fold(ch)
+
+ Returns the simple casefolding of the given character.
+
+ This function only implements simple folding. For full folding, use ``ICU4XCaseMapper::fold``.
+
+ See the `Rust documentation for simple_fold <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold>`__ for more information.
+
+
+ .. js:method:: simple_fold_turkic(ch)
+
+ Returns the simple casefolding of the given character in the Turkic locale
+
+ This function only implements simple folding. For full folding, use ``ICU4XCaseMapper::fold_turkic``.
+
+ See the `Rust documentation for simple_fold_turkic <https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold_turkic>`__ for more information.
+
+
+.. js:class:: ICU4XLeadingAdjustment
+
+ See the `Rust documentation for LeadingAdjustment <https://docs.rs/icu/latest/icu/casemap/titlecase/enum.LeadingAdjustment.html>`__ for more information.
+
+
+.. js:class:: ICU4XTitlecaseMapper
+
+ See the `Rust documentation for TitlecaseMapper <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ``ICU4XTitlecaseMapper`` instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new>`__ for more information.
+
+
+ .. js:method:: titlecase_segment_v1(s, locale, options)
+
+ Returns the full titlecase mapping of the given string
+
+ The ``v1`` refers to the version of the options struct, which may change as we add more options
+
+ See the `Rust documentation for titlecase_segment <https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment>`__ for more information.
+
+
+.. js:class:: ICU4XTitlecaseOptionsV1
+
+ See the `Rust documentation for TitlecaseOptions <https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html>`__ for more information.
+
+
+ .. js:attribute:: leading_adjustment
+
+ .. js:attribute:: trailing_case
+
+ .. js:function:: default_options()
+
+ See the `Rust documentation for default <https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html#method.default>`__ for more information.
+
+
+.. js:class:: ICU4XTrailingCase
+
+ See the `Rust documentation for TrailingCase <https://docs.rs/icu/latest/icu/casemap/titlecase/enum.TrailingCase.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/collator_ffi.rst b/intl/icu_capi/js/package/docs/source/collator_ffi.rst
new file mode 100644
index 0000000000..2127d2713d
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/collator_ffi.rst
@@ -0,0 +1,97 @@
+``collator::ffi``
+=================
+
+.. js:class:: ICU4XCollator
+
+ See the `Rust documentation for Collator <https://docs.rs/icu/latest/icu/collator/struct.Collator.html>`__ for more information.
+
+
+ .. js:function:: create_v1(provider, locale, options)
+
+ Construct a new Collator instance.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: compare(left, right)
+
+ Compare potentially ill-formed UTF-8 strings.
+
+ Ill-formed input is compared as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
+
+ See the `Rust documentation for compare_utf8 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8>`__ for more information.
+
+
+ .. js:method:: compare_valid_utf8(left, right)
+
+ Compare guaranteed well-formed UTF-8 strings.
+
+ Note: In C++, passing ill-formed UTF-8 strings is undefined behavior (and may be memory-unsafe to do so, too).
+
+ See the `Rust documentation for compare <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare>`__ for more information.
+
+
+ .. js:method:: compare_utf16(left, right)
+
+ Compare potentially ill-formed UTF-16 strings, with unpaired surrogates compared as REPLACEMENT CHARACTER.
+
+ See the `Rust documentation for compare_utf16 <https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16>`__ for more information.
+
+ - Note: ``left`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+ - Note: ``right`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+.. js:class:: ICU4XCollatorAlternateHandling
+
+ See the `Rust documentation for AlternateHandling <https://docs.rs/icu/latest/icu/collator/enum.AlternateHandling.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorBackwardSecondLevel
+
+ See the `Rust documentation for BackwardSecondLevel <https://docs.rs/icu/latest/icu/collator/enum.BackwardSecondLevel.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorCaseFirst
+
+ See the `Rust documentation for CaseFirst <https://docs.rs/icu/latest/icu/collator/enum.CaseFirst.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorCaseLevel
+
+ See the `Rust documentation for CaseLevel <https://docs.rs/icu/latest/icu/collator/enum.CaseLevel.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorMaxVariable
+
+ See the `Rust documentation for MaxVariable <https://docs.rs/icu/latest/icu/collator/enum.MaxVariable.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorNumeric
+
+ See the `Rust documentation for Numeric <https://docs.rs/icu/latest/icu/collator/enum.Numeric.html>`__ for more information.
+
+
+.. js:class:: ICU4XCollatorOptionsV1
+
+ See the `Rust documentation for CollatorOptions <https://docs.rs/icu/latest/icu/collator/struct.CollatorOptions.html>`__ for more information.
+
+
+ .. js:attribute:: strength
+
+ .. js:attribute:: alternate_handling
+
+ .. js:attribute:: case_first
+
+ .. js:attribute:: max_variable
+
+ .. js:attribute:: case_level
+
+ .. js:attribute:: numeric
+
+ .. js:attribute:: backward_second_level
+
+.. js:class:: ICU4XCollatorStrength
+
+ See the `Rust documentation for Strength <https://docs.rs/icu/latest/icu/collator/enum.Strength.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst b/intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst
new file mode 100644
index 0000000000..464ffbd6f0
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/collections_sets_ffi.rst
@@ -0,0 +1,143 @@
+``collections_sets::ffi``
+=========================
+
+.. js:class:: ICU4XCodePointSetBuilder
+
+ See the `Rust documentation for CodePointInversionListBuilder <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html>`__ for more information.
+
+
+ .. js:function:: create()
+
+ Make a new set builder containing nothing
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.new>`__ for more information.
+
+
+ .. js:method:: build()
+
+ Build this into a set
+
+ This object is repopulated with an empty builder
+
+ See the `Rust documentation for build <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.build>`__ for more information.
+
+
+ .. js:method:: complement()
+
+ Complements this set
+
+ (Elements in this set are removed and vice versa)
+
+ See the `Rust documentation for complement <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement>`__ for more information.
+
+
+ .. js:method:: is_empty()
+
+ Returns whether this set is empty
+
+ See the `Rust documentation for is_empty <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.is_empty>`__ for more information.
+
+
+ .. js:method:: add_char(ch)
+
+ Add a single character to the set
+
+ See the `Rust documentation for add_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_char>`__ for more information.
+
+
+ .. js:method:: add_u32(ch)
+
+ Add a single u32 value to the set
+
+ See the `Rust documentation for add_u32 <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_u32>`__ for more information.
+
+
+ .. js:method:: add_inclusive_range(start, end)
+
+ Add an inclusive range of characters to the set
+
+ See the `Rust documentation for add_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range>`__ for more information.
+
+
+ .. js:method:: add_inclusive_range_u32(start, end)
+
+ Add an inclusive range of u32s to the set
+
+ See the `Rust documentation for add_range_u32 <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range_u32>`__ for more information.
+
+
+ .. js:method:: add_set(data)
+
+ Add all elements that belong to the provided set to the set
+
+ See the `Rust documentation for add_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_set>`__ for more information.
+
+
+ .. js:method:: remove_char(ch)
+
+ Remove a single character to the set
+
+ See the `Rust documentation for remove_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_char>`__ for more information.
+
+
+ .. js:method:: remove_inclusive_range(start, end)
+
+ Remove an inclusive range of characters from the set
+
+ See the `Rust documentation for remove_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_range>`__ for more information.
+
+
+ .. js:method:: remove_set(data)
+
+ Remove all elements that belong to the provided set from the set
+
+ See the `Rust documentation for remove_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_set>`__ for more information.
+
+
+ .. js:method:: retain_char(ch)
+
+ Removes all elements from the set except a single character
+
+ See the `Rust documentation for retain_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_char>`__ for more information.
+
+
+ .. js:method:: retain_inclusive_range(start, end)
+
+ Removes all elements from the set except an inclusive range of characters f
+
+ See the `Rust documentation for retain_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_range>`__ for more information.
+
+
+ .. js:method:: retain_set(data)
+
+ Removes all elements from the set except all elements in the provided set
+
+ See the `Rust documentation for retain_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_set>`__ for more information.
+
+
+ .. js:method:: complement_char(ch)
+
+ Complement a single character to the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_char <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_char>`__ for more information.
+
+
+ .. js:method:: complement_inclusive_range(start, end)
+
+ Complement an inclusive range of characters from the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_range <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_range>`__ for more information.
+
+
+ .. js:method:: complement_set(data)
+
+ Complement all elements that belong to the provided set from the set
+
+ (Characters which are in this set are removed and vice versa)
+
+ See the `Rust documentation for complement_set <https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_set>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/common_ffi.rst b/intl/icu_capi/js/package/docs/source/common_ffi.rst
new file mode 100644
index 0000000000..aa630c3c42
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/common_ffi.rst
@@ -0,0 +1,7 @@
+``common::ffi``
+===============
+
+.. js:class:: ICU4XOrdering
+
+ See the `Rust documentation for Ordering <https://docs.rs/core/latest/core/cmp/enum.Ordering.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/conf.py b/intl/icu_capi/js/package/docs/source/conf.py
new file mode 100644
index 0000000000..6571e77e46
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/conf.py
@@ -0,0 +1,60 @@
+# This file is part of ICU4X. For terms of use, please see the file
+# called LICENSE at the top level of the ICU4X source tree
+# (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+# Configuration file for the Sphinx documentation builder.
+#
+# This file only contains a selection of the most common options. For a full
+# list see the documentation:
+# https://www.sphinx-doc.org/en/master/usage/configuration.html
+
+# -- Path setup --------------------------------------------------------------
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#
+# import os
+# import sys
+# sys.path.insert(0, os.path.abspath('.'))
+
+
+# -- Project information -----------------------------------------------------
+
+project = 'ICU4X'
+copyright = '2022, The ICU4X Developers'
+author = 'The ICU4X Developers'
+
+
+# -- General configuration ---------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = []
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+# This pattern also affects html_static_path and html_extra_path.
+exclude_patterns = []
+
+
+# -- Options for HTML output -------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. See the documentation for
+# a list of builtin themes.
+#
+html_theme = 'sphinx_rtd_theme'
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = []
+
+html_theme_options = {
+ 'navigation_depth': 4,
+}
diff --git a/intl/icu_capi/js/package/docs/source/data_struct_ffi.rst b/intl/icu_capi/js/package/docs/source/data_struct_ffi.rst
new file mode 100644
index 0000000000..ad9e71f821
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/data_struct_ffi.rst
@@ -0,0 +1,20 @@
+``data_struct::ffi``
+====================
+
+.. js:class:: ICU4XDataStruct
+
+ A generic data struct to be used by ICU4X
+
+ This can be used to construct a StructDataProvider.
+
+
+ .. js:function:: create_decimal_symbols_v1(plus_sign_prefix, plus_sign_suffix, minus_sign_prefix, minus_sign_suffix, decimal_separator, grouping_separator, primary_group_size, secondary_group_size, min_group_size, digits)
+
+ Construct a new DecimalSymbolsV1 data struct.
+
+ C++ users: All string arguments must be valid UTF8
+
+ See the `Rust documentation for DecimalSymbolsV1 <https://docs.rs/icu/latest/icu/decimal/provider/struct.DecimalSymbolsV1.html>`__ for more information.
+
+ - Note: ``digits`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/date_ffi.rst b/intl/icu_capi/js/package/docs/source/date_ffi.rst
new file mode 100644
index 0000000000..ef3936bdd9
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/date_ffi.rst
@@ -0,0 +1,234 @@
+``date::ffi``
+=============
+
+.. js:class:: ICU4XDate
+
+ An ICU4X Date object capable of containing a date and time for any calendar.
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html>`__ for more information.
+
+
+ .. js:function:: create_from_iso_in_calendar(year, month, day, calendar)
+
+ Creates a new :js:class:`ICU4XDate` representing the ISO date and time given but in a given calendar
+
+ See the `Rust documentation for new_from_iso <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso>`__ for more information.
+
+
+ .. js:function:: create_from_codes_in_calendar(era_code, year, month_code, day, calendar)
+
+ Creates a new :js:class:`ICU4XDate` from the given codes, which are interpreted in the given calendar system
+
+ See the `Rust documentation for try_new_from_codes <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this date to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: to_iso()
+
+ Converts this date to ISO
+
+ See the `Rust documentation for to_iso <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_iso>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: ordinal_month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: month_code()
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year_in_era()
+
+ Returns the year number in the current era for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: era()
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/struct.Date.html#method.year>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/types/struct.Era.html>`__
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+ .. js:method:: calendar()
+
+ Returns the :js:class:`ICU4XCalendar` object backing this date
+
+ See the `Rust documentation for calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar>`__ for more information.
+
+
+.. js:class:: ICU4XIsoDate
+
+ An ICU4X Date object capable of containing a ISO-8601 date
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html>`__ for more information.
+
+
+ .. js:function:: create(year, month, day)
+
+ Creates a new :js:class:`ICU4XIsoDate` from the specified date and time.
+
+ See the `Rust documentation for try_new_iso_date <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date>`__ for more information.
+
+
+ .. js:function:: create_for_unix_epoch()
+
+ Creates a new :js:class:`ICU4XIsoDate` representing January 1, 1970.
+
+ See the `Rust documentation for unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.unix_epoch>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this date to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: to_any()
+
+ See the `Rust documentation for to_any <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_any>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year()
+
+ Returns the year number for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: is_in_leap_year()
+
+ Returns if the year is a leap year for this date
+
+ See the `Rust documentation for is_in_leap_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year>`__ for more information.
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+.. js:class:: ICU4XIsoWeekday
diff --git a/intl/icu_capi/js/package/docs/source/datetime_ffi.rst b/intl/icu_capi/js/package/docs/source/datetime_ffi.rst
new file mode 100644
index 0000000000..f1fc88d41b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/datetime_ffi.rst
@@ -0,0 +1,337 @@
+``datetime::ffi``
+=================
+
+.. js:class:: ICU4XDateTime
+
+ An ICU4X DateTime object capable of containing a date and time for any calendar.
+
+ See the `Rust documentation for DateTime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html>`__ for more information.
+
+
+ .. js:function:: create_from_iso_in_calendar(year, month, day, hour, minute, second, nanosecond, calendar)
+
+ Creates a new :js:class:`ICU4XDateTime` representing the ISO date and time given but in a given calendar
+
+ See the `Rust documentation for new_from_iso <https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso>`__ for more information.
+
+
+ .. js:function:: create_from_codes_in_calendar(era_code, year, month_code, day, hour, minute, second, nanosecond, calendar)
+
+ Creates a new :js:class:`ICU4XDateTime` from the given codes, which are interpreted in the given calendar system
+
+ See the `Rust documentation for try_new_from_codes <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes>`__ for more information.
+
+
+ .. js:function:: create_from_date_and_time(date, time)
+
+ Creates a new :js:class:`ICU4XDateTime` from an :js:class:`ICU4XDate` and :js:class:`ICU4XTime` object
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new>`__ for more information.
+
+
+ .. js:method:: date()
+
+ Gets a copy of the date contained in this object
+
+ See the `Rust documentation for date <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date>`__ for more information.
+
+
+ .. js:method:: time()
+
+ Gets the time contained in this object
+
+ See the `Rust documentation for time <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time>`__ for more information.
+
+
+ .. js:method:: to_iso()
+
+ Converts this date to ISO
+
+ See the `Rust documentation for to_iso <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_iso>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this datetime to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: hour()
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. js:method:: minute()
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. js:method:: second()
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. js:method:: nanosecond()
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: ordinal_month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: month_code()
+
+ Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year_in_era()
+
+ Returns the year number in the current era for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: era()
+
+ Returns the era for this date,
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
+
+ .. js:method:: calendar()
+
+ Returns the :js:class:`ICU4XCalendar` object backing this date
+
+ See the `Rust documentation for calendar <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar>`__ for more information.
+
+
+.. js:class:: ICU4XIsoDateTime
+
+ An ICU4X DateTime object capable of containing a ISO-8601 date and time.
+
+ See the `Rust documentation for DateTime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html>`__ for more information.
+
+
+ .. js:function:: create(year, month, day, hour, minute, second, nanosecond)
+
+ Creates a new :js:class:`ICU4XIsoDateTime` from the specified date and time.
+
+ See the `Rust documentation for try_new_iso_datetime <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime>`__ for more information.
+
+
+ .. js:function:: crate_from_date_and_time(date, time)
+
+ Creates a new :js:class:`ICU4XIsoDateTime` from an :js:class:`ICU4XIsoDate` and :js:class:`ICU4XTime` object
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_from_minutes_since_local_unix_epoch(minutes)
+
+ Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ See the `Rust documentation for from_minutes_since_local_unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.from_minutes_since_local_unix_epoch>`__ for more information.
+
+
+ .. js:method:: date()
+
+ Gets the date contained in this object
+
+ See the `Rust documentation for date <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date>`__ for more information.
+
+
+ .. js:method:: time()
+
+ Gets the time contained in this object
+
+ See the `Rust documentation for time <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time>`__ for more information.
+
+
+ .. js:method:: to_any()
+
+ Converts this to an :js:class:`ICU4XDateTime` capable of being mixed with dates of other calendars
+
+ See the `Rust documentation for to_any <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_any>`__ for more information.
+
+
+ .. js:method:: minutes_since_local_unix_epoch()
+
+ Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ See the `Rust documentation for minutes_since_local_unix_epoch <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.minutes_since_local_unix_epoch>`__ for more information.
+
+
+ .. js:method:: to_calendar(calendar)
+
+ Convert this datetime to one in a different calendar
+
+ See the `Rust documentation for to_calendar <https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar>`__ for more information.
+
+
+ .. js:method:: hour()
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. js:method:: minute()
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. js:method:: second()
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. js:method:: nanosecond()
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
+
+ .. js:method:: day_of_month()
+
+ Returns the 1-indexed day in the month for this date
+
+ See the `Rust documentation for day_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month>`__ for more information.
+
+
+ .. js:method:: day_of_week()
+
+ Returns the day in the week for this day
+
+ See the `Rust documentation for day_of_week <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week>`__ for more information.
+
+
+ .. js:method:: week_of_month(first_weekday)
+
+ Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ ``first_weekday`` can be obtained via ``first_weekday()`` on :js:class:`ICU4XWeekCalculator`
+
+ See the `Rust documentation for week_of_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month>`__ for more information.
+
+
+ .. js:method:: week_of_year(calculator)
+
+ Returns the week number in this year, using week data
+
+ See the `Rust documentation for week_of_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year>`__ for more information.
+
+
+ .. js:method:: month()
+
+ Returns 1-indexed number of the month of this date in its year
+
+ See the `Rust documentation for month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month>`__ for more information.
+
+
+ .. js:method:: year()
+
+ Returns the year number for this date
+
+ See the `Rust documentation for year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year>`__ for more information.
+
+
+ .. js:method:: is_in_leap_year()
+
+ Returns whether this date is in a leap year
+
+ See the `Rust documentation for is_in_leap_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year>`__ for more information.
+
+
+ .. js:method:: months_in_year()
+
+ Returns the number of months in the year represented by this date
+
+ See the `Rust documentation for months_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year>`__ for more information.
+
+
+ .. js:method:: days_in_month()
+
+ Returns the number of days in the month represented by this date
+
+ See the `Rust documentation for days_in_month <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month>`__ for more information.
+
+
+ .. js:method:: days_in_year()
+
+ Returns the number of days in the year represented by this date
+
+ See the `Rust documentation for days_in_year <https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst b/intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst
new file mode 100644
index 0000000000..d9c6dce10f
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/datetime_formatter_ffi.rst
@@ -0,0 +1,172 @@
+``datetime_formatter::ffi``
+===========================
+
+.. js:class:: ICU4XDateFormatter
+
+ An ICU4X DateFormatter object capable of formatting a :js:class:`ICU4XDate` as a string, using some calendar specified at runtime in the locale.
+
+ See the `Rust documentation for DateFormatter <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_length(provider, locale, date_length)
+
+ Creates a new :js:class:`ICU4XDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. js:method:: format_date(value)
+
+ Formats a :js:class:`ICU4XDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_date(value)
+
+ Formats a :js:class:`ICU4XIsoDate` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_datetime(value)
+
+ Formats a :js:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XDateLength
+
+ See the `Rust documentation for Date <https://docs.rs/icu/latest/icu/datetime/options/length/enum.Date.html>`__ for more information.
+
+
+.. js:class:: ICU4XDateTimeFormatter
+
+ An ICU4X DateFormatter object capable of formatting a :js:class:`ICU4XDateTime` as a string, using some calendar specified at runtime in the locale.
+
+ See the `Rust documentation for DateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XDateTimeFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_datetime(value)
+
+ Formats a :js:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ Will convert to this formatter's calendar first
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XGregorianDateFormatter
+
+ An ICU4X TypedDateFormatter object capable of formatting a :js:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.
+
+ See the `Rust documentation for TypedDateFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_length(provider, locale, length)
+
+ Creates a new :js:class:`ICU4XGregorianDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. js:method:: format_iso_date(value)
+
+ Formats a :js:class:`ICU4XIsoDate` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XGregorianDateTimeFormatter
+
+ An ICU4X TypedDateTimeFormatter object capable of formatting a :js:class:`ICU4XIsoDateTime` as a string, using the Gregorian Calendar.
+
+ See the `Rust documentation for TypedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XGregorianDateFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XTimeFormatter
+
+ An ICU4X TimeFormatter object capable of formatting an :js:class:`ICU4XTime` type (and others) as a string
+
+ See the `Rust documentation for TimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_length(provider, locale, length)
+
+ Creates a new :js:class:`ICU4XTimeFormatter` from locale data.
+
+ See the `Rust documentation for try_new_with_length <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.try_new_with_length>`__ for more information.
+
+
+ .. js:method:: format_time(value)
+
+ Formats a :js:class:`ICU4XTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_datetime(value)
+
+ Formats a :js:class:`ICU4XDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime(value)
+
+ Formats a :js:class:`ICU4XIsoDateTime` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XTimeLength
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/datetime/options/length/enum.Time.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/decimal_ffi.rst b/intl/icu_capi/js/package/docs/source/decimal_ffi.rst
new file mode 100644
index 0000000000..98fef76f5a
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/decimal_ffi.rst
@@ -0,0 +1,35 @@
+``decimal::ffi``
+================
+
+.. js:class:: ICU4XFixedDecimalFormatter
+
+ An ICU4X Fixed Decimal Format object, capable of formatting a :js:class:`ICU4XFixedDecimal` as a string.
+
+ See the `Rust documentation for FixedDecimalFormatter <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_grouping_strategy(provider, locale, grouping_strategy)
+
+ Creates a new :js:class:`ICU4XFixedDecimalFormatter` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_with_decimal_symbols_v1(data_struct, grouping_strategy)
+
+ Creates a new :js:class:`ICU4XFixedDecimalFormatter` from preconstructed locale data in the form of an :js:class:`ICU4XDataStruct` constructed from ``ICU4XDataStruct::create_decimal_symbols()``.
+
+ The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed. Passing a consumed struct to this method will return an error.
+
+
+ .. js:method:: format(value)
+
+ Formats a :js:class:`ICU4XFixedDecimal` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XFixedDecimalGroupingStrategy
+
+ See the `Rust documentation for GroupingStrategy <https://docs.rs/icu/latest/icu/decimal/options/enum.GroupingStrategy.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/displaynames_ffi.rst b/intl/icu_capi/js/package/docs/source/displaynames_ffi.rst
new file mode 100644
index 0000000000..97002eef7e
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/displaynames_ffi.rst
@@ -0,0 +1,75 @@
+``displaynames::ffi``
+=====================
+
+.. js:class:: ICU4XDisplayNamesFallback
+
+ See the `Rust documentation for Fallback <https://docs.rs/icu/latest/icu/displaynames/options/enum.Fallback.html>`__ for more information.
+
+
+.. js:class:: ICU4XDisplayNamesOptionsV1
+
+ See the `Rust documentation for DisplayNamesOptions <https://docs.rs/icu/latest/icu/displaynames/options/struct.DisplayNamesOptions.html>`__ for more information.
+
+
+ .. js:attribute:: style
+
+ The optional formatting style to use for display name.
+
+
+ .. js:attribute:: fallback
+
+ The fallback return when the system does not have the requested display name, defaults to "code".
+
+
+ .. js:attribute:: language_display
+
+ The language display kind, defaults to "dialect".
+
+
+.. js:class:: ICU4XDisplayNamesStyle
+
+ See the `Rust documentation for Style <https://docs.rs/icu/latest/icu/displaynames/options/enum.Style.html>`__ for more information.
+
+
+.. js:class:: ICU4XLanguageDisplay
+
+ See the `Rust documentation for LanguageDisplay <https://docs.rs/icu/latest/icu/displaynames/options/enum.LanguageDisplay.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleDisplayNamesFormatter
+
+ See the `Rust documentation for LocaleDisplayNamesFormatter <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html>`__ for more information.
+
+
+ .. js:function:: create(provider, locale, options)
+
+ Creates a new ``LocaleDisplayNamesFormatter`` from locale data and an options bag.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: of(locale)
+
+ Returns the locale-specific display name of a locale.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of>`__ for more information.
+
+
+.. js:class:: ICU4XRegionDisplayNames
+
+ See the `Rust documentation for RegionDisplayNames <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html>`__ for more information.
+
+
+ .. js:function:: create(provider, locale)
+
+ Creates a new ``RegionDisplayNames`` from locale data and an options bag.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: of(region)
+
+ Returns the locale specific display name of a region. Note that the funtion returns an empty string in case the display name for a given region code is not found.
+
+ See the `Rust documentation for of <https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/errors_ffi.rst b/intl/icu_capi/js/package/docs/source/errors_ffi.rst
new file mode 100644
index 0000000000..c05b848844
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/errors_ffi.rst
@@ -0,0 +1,11 @@
+``errors::ffi``
+===============
+
+.. js:class:: ICU4XError
+
+ A common enum for errors that ICU4X may return, organized by API
+
+ The error names are stable and can be checked against as strings in the JS API
+
+ Additional information: `1 <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FixedDecimalError.html>`__, `2 <https://docs.rs/icu/latest/icu/calendar/enum.CalendarError.html>`__, `3 <https://docs.rs/icu/latest/icu/collator/enum.CollatorError.html>`__, `4 <https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html>`__, `5 <https://docs.rs/icu/latest/icu/decimal/enum.DecimalError.html>`__, `6 <https://docs.rs/icu/latest/icu/list/enum.ListError.html>`__, `7 <https://docs.rs/icu/latest/icu/locid/enum.ParserError.html>`__, `8 <https://docs.rs/icu/latest/icu/locid_transform/enum.LocaleTransformError.html>`__, `9 <https://docs.rs/icu/latest/icu/normalizer/enum.NormalizerError.html>`__, `10 <https://docs.rs/icu/latest/icu/plurals/enum.PluralsError.html>`__, `11 <https://docs.rs/icu/latest/icu/properties/enum.PropertiesError.html>`__, `12 <https://docs.rs/icu/latest/icu/provider/struct.DataError.html>`__, `13 <https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html>`__, `14 <https://docs.rs/icu/latest/icu/segmenter/enum.SegmenterError.html>`__, `15 <https://docs.rs/icu/latest/icu/timezone/enum.TimeZoneError.html>`__
+
diff --git a/intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst b/intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst
new file mode 100644
index 0000000000..e3bd0ae2bb
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/fallbacker_ffi.rst
@@ -0,0 +1,103 @@
+``fallbacker::ffi``
+===================
+
+.. js:class:: ICU4XLocaleFallbackConfig
+
+ Collection of configurations for the ICU4X fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbackConfig <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackConfig.html>`__ for more information.
+
+
+ .. js:attribute:: priority
+
+ Choice of priority mode.
+
+
+ .. js:attribute:: extension_key
+
+ An empty string is considered ``None``.
+
+
+ .. js:attribute:: fallback_supplement
+
+ Fallback supplement data key to customize fallback rules.
+
+
+.. js:class:: ICU4XLocaleFallbackIterator
+
+ An iterator over the locale under fallback.
+
+ See the `Rust documentation for LocaleFallbackIterator <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html>`__ for more information.
+
+
+ .. js:method:: get()
+
+ Gets a snapshot of the current state of the locale.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.get>`__ for more information.
+
+
+ .. js:method:: step()
+
+ Performs one step of the fallback algorithm, mutating the locale.
+
+ See the `Rust documentation for step <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbackPriority
+
+ Priority mode for the ICU4X fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbackPriority <https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackPriority.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbackSupplement
+
+ What additional data is required to load when performing fallback.
+
+ See the `Rust documentation for LocaleFallbackSupplement <https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackSupplement.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbacker
+
+ An object that runs the ICU4X locale fallback algorithm.
+
+ See the `Rust documentation for LocaleFallbacker <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Creates a new ``ICU4XLocaleFallbacker`` from a data provider.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_without_data()
+
+ Creates a new ``ICU4XLocaleFallbacker`` without data for limited functionality.
+
+ See the `Rust documentation for new_without_data <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data>`__ for more information.
+
+
+ .. js:method:: for_config(config)
+
+ Associates this ``ICU4XLocaleFallbacker`` with configuration options.
+
+ See the `Rust documentation for for_config <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleFallbackerWithConfig
+
+ An object that runs the ICU4X locale fallback algorithm with specific configurations.
+
+ See the `Rust documentation for LocaleFallbacker <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html>`__ for more information.
+
+ See the `Rust documentation for LocaleFallbackerWithConfig <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackerWithConfig.html>`__ for more information.
+
+
+ .. js:method:: fallback_for_locale(locale)
+
+ Creates an iterator from a locale with each step of fallback.
+
+ See the `Rust documentation for fallback_for <https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst b/intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst
new file mode 100644
index 0000000000..354705dc5c
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/fixed_decimal_ffi.rst
@@ -0,0 +1,247 @@
+``fixed_decimal::ffi``
+======================
+
+.. js:class:: ICU4XFixedDecimal
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_i32(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_u32(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_i64(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_u64(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer.
+
+ See the `Rust documentation for FixedDecimal <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_integer_precision(f)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an integer-valued float
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_lower_magnitude(f, magnitude)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an float, with a given power of 10 for the lower magnitude
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_significant_digits(f, digits)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an float, for a given number of significant digits
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_f64_with_floating_precision(f)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from an float, with enough digits to recover the original floating point in IEEE 754 without needing trailing zeros
+
+ See the `Rust documentation for try_from_f64 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64>`__ for more information.
+
+ See the `Rust documentation for FloatPrecision <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(v)
+
+ Construct an :js:class:`ICU4XFixedDecimal` from a string.
+
+ See the `Rust documentation for from_str <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str>`__ for more information.
+
+
+ .. js:method:: digit_at(magnitude)
+
+ See the `Rust documentation for digit_at <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.digit_at>`__ for more information.
+
+
+ .. js:method:: magnitude_start()
+
+ See the `Rust documentation for magnitude_range <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range>`__ for more information.
+
+
+ .. js:method:: magnitude_end()
+
+ See the `Rust documentation for magnitude_range <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range>`__ for more information.
+
+
+ .. js:method:: nonzero_magnitude_start()
+
+ See the `Rust documentation for nonzero_magnitude_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_start>`__ for more information.
+
+
+ .. js:method:: nonzero_magnitude_end()
+
+ See the `Rust documentation for nonzero_magnitude_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_end>`__ for more information.
+
+
+ .. js:method:: is_zero()
+
+ See the `Rust documentation for is_zero <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.is_zero>`__ for more information.
+
+
+ .. js:method:: multiply_pow10(power)
+
+ Multiply the :js:class:`ICU4XFixedDecimal` by a given power of ten.
+
+ See the `Rust documentation for multiply_pow10 <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.multiply_pow10>`__ for more information.
+
+
+ .. js:method:: sign()
+
+ See the `Rust documentation for sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.sign>`__ for more information.
+
+
+ .. js:method:: set_sign(sign)
+
+ Set the sign of the :js:class:`ICU4XFixedDecimal`.
+
+ See the `Rust documentation for set_sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_sign>`__ for more information.
+
+
+ .. js:method:: apply_sign_display(sign_display)
+
+ See the `Rust documentation for apply_sign_display <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.apply_sign_display>`__ for more information.
+
+
+ .. js:method:: trim_start()
+
+ See the `Rust documentation for trim_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_start>`__ for more information.
+
+
+ .. js:method:: trim_end()
+
+ See the `Rust documentation for trim_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_end>`__ for more information.
+
+
+ .. js:method:: pad_start(position)
+
+ Zero-pad the :js:class:`ICU4XFixedDecimal` on the left to a particular position
+
+ See the `Rust documentation for pad_start <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_start>`__ for more information.
+
+
+ .. js:method:: pad_end(position)
+
+ Zero-pad the :js:class:`ICU4XFixedDecimal` on the right to a particular position
+
+ See the `Rust documentation for pad_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_end>`__ for more information.
+
+
+ .. js:method:: set_max_position(position)
+
+ Truncate the :js:class:`ICU4XFixedDecimal` on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")
+
+ See the `Rust documentation for set_max_position <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_max_position>`__ for more information.
+
+
+ .. js:method:: trunc(position)
+
+ See the `Rust documentation for trunc <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trunc>`__ for more information.
+
+
+ .. js:method:: half_trunc(position)
+
+ See the `Rust documentation for half_trunc <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_trunc>`__ for more information.
+
+
+ .. js:method:: expand(position)
+
+ See the `Rust documentation for expand <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.expand>`__ for more information.
+
+
+ .. js:method:: half_expand(position)
+
+ See the `Rust documentation for half_expand <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_expand>`__ for more information.
+
+
+ .. js:method:: ceil(position)
+
+ See the `Rust documentation for ceil <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.ceil>`__ for more information.
+
+
+ .. js:method:: half_ceil(position)
+
+ See the `Rust documentation for half_ceil <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_ceil>`__ for more information.
+
+
+ .. js:method:: floor(position)
+
+ See the `Rust documentation for floor <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.floor>`__ for more information.
+
+
+ .. js:method:: half_floor(position)
+
+ See the `Rust documentation for half_floor <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_floor>`__ for more information.
+
+
+ .. js:method:: half_even(position)
+
+ See the `Rust documentation for half_even <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_even>`__ for more information.
+
+
+ .. js:method:: concatenate_end(other)
+
+ Concatenates ``other`` to the end of ``self``.
+
+ If successful, ``other`` will be set to 0 and a successful status is returned.
+
+ If not successful, ``other`` will be unchanged and an error is returned.
+
+ See the `Rust documentation for concatenate_end <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.concatenate_end>`__ for more information.
+
+
+ .. js:method:: to_string()
+
+ Format the :js:class:`ICU4XFixedDecimal` as a string.
+
+ See the `Rust documentation for write_to <https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to>`__ for more information.
+
+
+.. js:class:: ICU4XFixedDecimalSign
+
+ The sign of a FixedDecimal, as shown in formatting.
+
+ See the `Rust documentation for Sign <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.Sign.html>`__ for more information.
+
+
+.. js:class:: ICU4XFixedDecimalSignDisplay
+
+ ECMA-402 compatible sign display preference.
+
+ See the `Rust documentation for SignDisplay <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.SignDisplay.html>`__ for more information.
+
+
+.. js:class:: ICU4XRoundingIncrement
+
+ Increment used in a rounding operation.
+
+ See the `Rust documentation for RoundingIncrement <https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.RoundingIncrement.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst b/intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst
new file mode 100644
index 0000000000..e9151aa50a
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/iana_bcp47_mapper_ffi.rst
@@ -0,0 +1,35 @@
+``iana_bcp47_mapper::ffi``
+==========================
+
+.. js:class:: ICU4XBcp47ToIanaMapper
+
+ An object capable of mapping from a BCP-47 time zone ID to an IANA ID.
+
+ See the `Rust documentation for IanaBcp47RoundTripMapper <https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html#method.new>`__ for more information.
+
+
+ .. js:method:: get(value)
+
+ Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+
+ See the `Rust documentation for bcp47_to_iana <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana>`__ for more information.
+
+
+.. js:class:: ICU4XIanaToBcp47Mapper
+
+ An object capable of mapping from an IANA time zone ID to a BCP-47 ID.
+
+ This can be used via ``try_set_iana_time_zone_id()`` on ```ICU4XCustomTimeZone`` <crate::timezone::ffi::ICU4XCustomTimeZone>`__.
+
+ See the `Rust documentation for IanaToBcp47Mapper <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html#method.new>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/index.rst b/intl/icu_capi/js/package/docs/source/index.rst
new file mode 100644
index 0000000000..57e246325f
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/index.rst
@@ -0,0 +1,54 @@
+Documentation
+=============
+
+.. toctree::
+ :maxdepth: 3
+ :caption: Modules:
+
+ bidi_ffi
+ calendar_ffi
+ casemap_ffi
+ collator_ffi
+ collections_sets_ffi
+ common_ffi
+ data_struct_ffi
+ date_ffi
+ datetime_ffi
+ datetime_formatter_ffi
+ decimal_ffi
+ displaynames_ffi
+ errors_ffi
+ fallbacker_ffi
+ fixed_decimal_ffi
+ iana_bcp47_mapper_ffi
+ list_ffi
+ locale_ffi
+ locale_directionality_ffi
+ locid_transform_ffi
+ logging_ffi
+ metazone_calculator_ffi
+ normalizer_ffi
+ normalizer_properties_ffi
+ pluralrules_ffi
+ properties_iter_ffi
+ properties_maps_ffi
+ properties_names_ffi
+ properties_sets_ffi
+ properties_unisets_ffi
+ provider_ffi
+ script_ffi
+ segmenter_grapheme_ffi
+ segmenter_line_ffi
+ segmenter_sentence_ffi
+ segmenter_word_ffi
+ time_ffi
+ timezone_ffi
+ timezone_formatter_ffi
+ week_ffi
+ zoned_formatter_ffi
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`search`
diff --git a/intl/icu_capi/js/package/docs/source/list_ffi.rst b/intl/icu_capi/js/package/docs/source/list_ffi.rst
new file mode 100644
index 0000000000..2d78d7ad52
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/list_ffi.rst
@@ -0,0 +1,65 @@
+``list::ffi``
+=============
+
+.. js:class:: ICU4XList
+
+ A list of strings
+
+
+ .. js:function:: create()
+
+ Create a new list of strings
+
+
+ .. js:function:: create_with_capacity(capacity)
+
+ Create a new list of strings with preallocated space to hold at least ``capacity`` elements
+
+
+ .. js:method:: push(val)
+
+ Push a string to the list
+
+ For C++ users, potentially invalid UTF8 will be handled via REPLACEMENT CHARACTERs
+
+
+ .. js:method:: len()
+
+ The number of elements in this list
+
+
+.. js:class:: ICU4XListFormatter
+
+ See the `Rust documentation for ListFormatter <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_and_with_length(provider, locale, length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_and_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length>`__ for more information.
+
+
+ .. js:function:: create_or_with_length(provider, locale, length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_or_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length>`__ for more information.
+
+
+ .. js:function:: create_unit_with_length(provider, locale, length)
+
+ Construct a new ICU4XListFormatter instance for And patterns
+
+ See the `Rust documentation for try_new_unit_with_length <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length>`__ for more information.
+
+
+ .. js:method:: format(list)
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XListLength
+
+ See the `Rust documentation for ListLength <https://docs.rs/icu/latest/icu/list/enum.ListLength.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst b/intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst
new file mode 100644
index 0000000000..546a899102
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/locale_directionality_ffi.rst
@@ -0,0 +1,41 @@
+``locale_directionality::ffi``
+==============================
+
+.. js:class:: ICU4XLocaleDirection
+
+ See the `Rust documentation for Direction <https://docs.rs/icu/latest/icu/locid_transform/enum.Direction.html>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleDirectionality
+
+ See the `Rust documentation for LocaleDirectionality <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XLocaleDirectionality instance
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_with_expander(provider, expander)
+
+ Construct a new ICU4XLocaleDirectionality instance with a custom expander
+
+ See the `Rust documentation for new_with_expander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new_with_expander>`__ for more information.
+
+
+ .. js:method:: get(locale)
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.get>`__ for more information.
+
+
+ .. js:method:: is_left_to_right(locale)
+
+ See the `Rust documentation for is_left_to_right <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_left_to_right>`__ for more information.
+
+
+ .. js:method:: is_right_to_left(locale)
+
+ See the `Rust documentation for is_right_to_left <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_right_to_left>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/locale_ffi.rst b/intl/icu_capi/js/package/docs/source/locale_ffi.rst
new file mode 100644
index 0000000000..8c78097946
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/locale_ffi.rst
@@ -0,0 +1,128 @@
+``locale::ffi``
+===============
+
+.. js:class:: ICU4XLocale
+
+ An ICU4X Locale, capable of representing strings like ``"en-US"``.
+
+ See the `Rust documentation for Locale <https://docs.rs/icu/latest/icu/locid/struct.Locale.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(name)
+
+ Construct an :js:class:`ICU4XLocale` from an locale identifier.
+
+ This will run the complete locale parsing algorithm. If code size and performance are critical and the locale is of a known shape (such as ``aa-BB``) use ``create_und``, ``set_language``, ``set_script``, and ``set_region``.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:function:: create_und()
+
+ Construct a default undefined :js:class:`ICU4XLocale` "und".
+
+ See the `Rust documentation for UND <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#associatedconstant.UND>`__ for more information.
+
+
+ .. js:method:: clone()
+
+ Clones the :js:class:`ICU4XLocale`.
+
+ See the `Rust documentation for Locale <https://docs.rs/icu/latest/icu/locid/struct.Locale.html>`__ for more information.
+
+
+ .. js:method:: basename()
+
+ Write a string representation of the ``LanguageIdentifier`` part of :js:class:`ICU4XLocale` to ``write``.
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: get_unicode_extension(bytes)
+
+ Write a string representation of the unicode extension to ``write``
+
+ See the `Rust documentation for extensions <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions>`__ for more information.
+
+
+ .. js:method:: language()
+
+ Write a string representation of :js:class:`ICU4XLocale` language to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: set_language(bytes)
+
+ Set the language part of the :js:class:`ICU4XLocale`.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:method:: region()
+
+ Write a string representation of :js:class:`ICU4XLocale` region to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: set_region(bytes)
+
+ Set the region part of the :js:class:`ICU4XLocale`.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:method:: script()
+
+ Write a string representation of :js:class:`ICU4XLocale` script to ``write``
+
+ See the `Rust documentation for id <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id>`__ for more information.
+
+
+ .. js:method:: set_script(bytes)
+
+ Set the script part of the :js:class:`ICU4XLocale`. Pass an empty string to remove the script.
+
+ See the `Rust documentation for try_from_bytes <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes>`__ for more information.
+
+
+ .. js:function:: canonicalize(bytes)
+
+ Best effort locale canonicalizer that doesn't need any data
+
+ Use ICU4XLocaleCanonicalizer for better control and functionality
+
+ See the `Rust documentation for canonicalize <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize>`__ for more information.
+
+
+ .. js:method:: to_string()
+
+ Write a string representation of :js:class:`ICU4XLocale` to ``write``
+
+ See the `Rust documentation for write_to <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to>`__ for more information.
+
+
+ .. js:method:: normalizing_eq(other)
+
+ See the `Rust documentation for normalizing_eq <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.normalizing_eq>`__ for more information.
+
+
+ .. js:method:: strict_cmp(other)
+
+ See the `Rust documentation for strict_cmp <https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.strict_cmp>`__ for more information.
+
+
+ .. js:function:: create_en()
+
+ Deprecated
+
+ Use `create_from_string("en").
+
+
+ .. js:function:: create_bn()
+
+ Deprecated
+
+ Use `create_from_string("bn").
+
diff --git a/intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst b/intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst
new file mode 100644
index 0000000000..27e3fff083
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/locid_transform_ffi.rst
@@ -0,0 +1,72 @@
+``locid_transform::ffi``
+========================
+
+.. js:class:: ICU4XLocaleCanonicalizer
+
+ A locale canonicalizer.
+
+ See the `Rust documentation for LocaleCanonicalizer <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Create a new :js:class:`ICU4XLocaleCanonicalizer`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_extended(provider)
+
+ Create a new :js:class:`ICU4XLocaleCanonicalizer` with extended data.
+
+ See the `Rust documentation for new_with_expander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new_with_expander>`__ for more information.
+
+
+ .. js:method:: canonicalize(locale)
+
+ FFI version of ``LocaleCanonicalizer::canonicalize()``.
+
+ See the `Rust documentation for canonicalize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.canonicalize>`__ for more information.
+
+
+.. js:class:: ICU4XLocaleExpander
+
+ A locale expander.
+
+ See the `Rust documentation for LocaleExpander <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Create a new :js:class:`ICU4XLocaleExpander`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new>`__ for more information.
+
+
+ .. js:function:: create_extended(provider)
+
+ Create a new :js:class:`ICU4XLocaleExpander` with extended data.
+
+ See the `Rust documentation for new_extended <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new_extended>`__ for more information.
+
+
+ .. js:method:: maximize(locale)
+
+ FFI version of ``LocaleExpander::maximize()``.
+
+ See the `Rust documentation for maximize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.maximize>`__ for more information.
+
+
+ .. js:method:: minimize(locale)
+
+ FFI version of ``LocaleExpander::minimize()``.
+
+ See the `Rust documentation for minimize <https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.minimize>`__ for more information.
+
+
+.. js:class:: ICU4XTransformResult
+
+ FFI version of ``TransformResult``.
+
+ See the `Rust documentation for TransformResult <https://docs.rs/icu/latest/icu/locid_transform/enum.TransformResult.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/logging_ffi.rst b/intl/icu_capi/js/package/docs/source/logging_ffi.rst
new file mode 100644
index 0000000000..450acc128b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/logging_ffi.rst
@@ -0,0 +1,21 @@
+``logging::ffi``
+================
+
+.. js:class:: ICU4XLogger
+
+ An object allowing control over the logging used
+
+
+ .. js:function:: init_simple_logger()
+
+ Initialize the logger using ``simple_logger``
+
+ Requires the ``simple_logger`` Cargo feature.
+
+ Returns ``false`` if there was already a logger set.
+
+
+ .. js:function:: init_console_logger()
+
+ Deprecated: since ICU4X 1.4, this now happens automatically if the ``log`` feature is enabled.
+
diff --git a/intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst b/intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst
new file mode 100644
index 0000000000..e7704b8a85
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/metazone_calculator_ffi.rst
@@ -0,0 +1,16 @@
+``metazone_calculator::ffi``
+============================
+
+.. js:class:: ICU4XMetazoneCalculator
+
+ An object capable of computing the metazone from a timezone.
+
+ This can be used via ``maybe_calculate_metazone()`` on ```ICU4XCustomTimeZone`` <crate::timezone::ffi::ICU4XCustomTimeZone>`__.
+
+ See the `Rust documentation for MetazoneCalculator <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/normalizer_ffi.rst b/intl/icu_capi/js/package/docs/source/normalizer_ffi.rst
new file mode 100644
index 0000000000..08e0889a0b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/normalizer_ffi.rst
@@ -0,0 +1,76 @@
+``normalizer::ffi``
+===================
+
+.. js:class:: ICU4XComposingNormalizer
+
+ See the `Rust documentation for ComposingNormalizer <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html>`__ for more information.
+
+
+ .. js:function:: create_nfc(provider)
+
+ Construct a new ICU4XComposingNormalizer instance for NFC
+
+ See the `Rust documentation for new_nfc <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc>`__ for more information.
+
+
+ .. js:function:: create_nfkc(provider)
+
+ Construct a new ICU4XComposingNormalizer instance for NFKC
+
+ See the `Rust documentation for new_nfkc <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc>`__ for more information.
+
+
+ .. js:method:: normalize(s)
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. js:method:: is_normalized(s)
+
+ Check if a (potentially ill-formed) UTF8 string is normalized
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for is_normalized_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.is_normalized_utf8>`__ for more information.
+
+
+.. js:class:: ICU4XDecomposingNormalizer
+
+ See the `Rust documentation for DecomposingNormalizer <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html>`__ for more information.
+
+
+ .. js:function:: create_nfd(provider)
+
+ Construct a new ICU4XDecomposingNormalizer instance for NFC
+
+ See the `Rust documentation for new_nfd <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd>`__ for more information.
+
+
+ .. js:function:: create_nfkd(provider)
+
+ Construct a new ICU4XDecomposingNormalizer instance for NFKC
+
+ See the `Rust documentation for new_nfkd <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd>`__ for more information.
+
+
+ .. js:method:: normalize(s)
+
+ Normalize a (potentially ill-formed) UTF8 string
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for normalize_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8>`__ for more information.
+
+
+ .. js:method:: is_normalized(s)
+
+ Check if a (potentially ill-formed) UTF8 string is normalized
+
+ Errors are mapped to REPLACEMENT CHARACTER
+
+ See the `Rust documentation for is_normalized_utf8 <https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.is_normalized_utf8>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst b/intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst
new file mode 100644
index 0000000000..b8b0a0265f
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/normalizer_properties_ffi.rst
@@ -0,0 +1,87 @@
+``normalizer_properties::ffi``
+==============================
+
+.. js:class:: ICU4XCanonicalCombiningClassMap
+
+ Lookup of the Canonical_Combining_Class Unicode property
+
+ See the `Rust documentation for CanonicalCombiningClassMap <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCanonicalCombiningClassMap instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new>`__ for more information.
+
+
+ .. js:method:: get(ch)
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html>`__
+
+
+ .. js:method:: get32(ch)
+
+ See the `Rust documentation for get32 <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get32>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html>`__
+
+
+.. js:class:: ICU4XCanonicalComposition
+
+ The raw canonical composition operation.
+
+ Callers should generally use ICU4XComposingNormalizer unless they specifically need raw composition operations
+
+ See the `Rust documentation for CanonicalComposition <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCanonicalComposition instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new>`__ for more information.
+
+
+ .. js:method:: compose(starter, second)
+
+ Performs canonical composition (including Hangul) on a pair of characters or returns NUL if these characters don’t compose. Composition exclusions are taken into account.
+
+ See the `Rust documentation for compose <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.compose>`__ for more information.
+
+
+.. js:class:: ICU4XCanonicalDecomposition
+
+ The raw (non-recursive) canonical decomposition operation.
+
+ Callers should generally use ICU4XDecomposingNormalizer unless they specifically need raw composition operations
+
+ See the `Rust documentation for CanonicalDecomposition <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct a new ICU4XCanonicalDecomposition instance for NFC
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new>`__ for more information.
+
+
+ .. js:method:: decompose(c)
+
+ Performs non-recursive canonical decomposition (including for Hangul).
+
+ See the `Rust documentation for decompose <https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.decompose>`__ for more information.
+
+
+.. js:class:: ICU4XDecomposed
+
+ The outcome of non-recursive canonical decomposition of a character. ``second`` will be NUL when the decomposition expands to a single character (which may or may not be the original one)
+
+ See the `Rust documentation for Decomposed <https://docs.rs/icu/latest/icu/normalizer/properties/enum.Decomposed.html>`__ for more information.
+
+
+ .. js:attribute:: first
+
+ .. js:attribute:: second
diff --git a/intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst b/intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst
new file mode 100644
index 0000000000..ca29ec47e0
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/pluralrules_ffi.rst
@@ -0,0 +1,84 @@
+``pluralrules::ffi``
+====================
+
+.. js:class:: ICU4XPluralCategories
+
+ FFI version of ``PluralRules::categories()`` data.
+
+
+ .. js:attribute:: zero
+
+ .. js:attribute:: one
+
+ .. js:attribute:: two
+
+ .. js:attribute:: few
+
+ .. js:attribute:: many
+
+ .. js:attribute:: other
+
+.. js:class:: ICU4XPluralCategory
+
+ FFI version of ``PluralCategory``.
+
+ See the `Rust documentation for PluralCategory <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html>`__ for more information.
+
+
+ .. js:function:: get_for_cldr_string(s)
+
+ Construct from a string in the format `specified in TR35 <https://unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules>`__
+
+ See the `Rust documentation for get_for_cldr_string <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html#method.get_for_cldr_string>`__ for more information.
+
+ See the `Rust documentation for get_for_cldr_bytes <https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html#method.get_for_cldr_bytes>`__ for more information.
+
+
+.. js:class:: ICU4XPluralOperands
+
+ FFI version of ``PluralOperands``.
+
+ See the `Rust documentation for PluralOperands <https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(s)
+
+ Construct for a given string representing a number
+
+ See the `Rust documentation for from_str <https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str>`__ for more information.
+
+
+.. js:class:: ICU4XPluralRules
+
+ FFI version of ``PluralRules``.
+
+ See the `Rust documentation for PluralRules <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html>`__ for more information.
+
+
+ .. js:function:: create_cardinal(provider, locale)
+
+ Construct an :js:class:`ICU4XPluralRules` for the given locale, for cardinal numbers
+
+ See the `Rust documentation for try_new_cardinal <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal>`__ for more information.
+
+
+ .. js:function:: create_ordinal(provider, locale)
+
+ Construct an :js:class:`ICU4XPluralRules` for the given locale, for ordinal numbers
+
+ See the `Rust documentation for try_new_ordinal <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal>`__ for more information.
+
+
+ .. js:method:: category_for(op)
+
+ Get the category for a given number represented as operands
+
+ See the `Rust documentation for category_for <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.category_for>`__ for more information.
+
+
+ .. js:method:: categories()
+
+ Get all of the categories needed in the current locale
+
+ See the `Rust documentation for categories <https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.categories>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst
new file mode 100644
index 0000000000..ee195fdf47
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_iter_ffi.rst
@@ -0,0 +1,27 @@
+``properties_iter::ffi``
+========================
+
+.. js:class:: CodePointRangeIterator
+
+ An iterator over code point ranges, produced by ``ICU4XCodePointSetData`` or one of the ``ICU4XCodePointMapData`` types
+
+
+ .. js:method:: next()
+
+ Advance the iterator by one and return the next range.
+
+ If the iterator is out of items, ``done`` will be true
+
+
+.. js:class:: CodePointRangeIteratorResult
+
+ Result of a single iteration of :js:class:`CodePointRangeIterator`. Logically can be considered to be an ``Option<RangeInclusive<u32>>``,
+
+ ``start`` and ``end`` represent an inclusive range of code points start, end, and ``done`` will be true if the iterator has already finished. The last contentful iteration will NOT produce a range done=true, in other words ``start`` and ``end`` are useful values if and only if ``done=false``.
+
+
+ .. js:attribute:: start
+
+ .. js:attribute:: end
+
+ .. js:attribute:: done
diff --git a/intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst
new file mode 100644
index 0000000000..8fc7c1625b
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_maps_ffi.rst
@@ -0,0 +1,159 @@
+``properties_maps::ffi``
+========================
+
+.. js:class:: ICU4XCodePointMapData16
+
+ An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ For properties whose values fit into 16 bits.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapData <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapDataBorrowed <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get(cp)
+
+ Gets the value for a code point.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get>`__ for more information.
+
+
+ .. js:method:: get32(cp)
+
+ Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+
+
+ .. js:method:: iter_ranges_for_value(value)
+
+ Produces an iterator over ranges of code points that map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_value_complemented(value)
+
+ Produces an iterator over ranges of code points that do not map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value_complemented <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented>`__ for more information.
+
+
+ .. js:method:: get_set_for_value(value)
+
+ Gets a :js:class:`ICU4XCodePointSetData` representing all entries in this map that map to the given value
+
+ See the `Rust documentation for get_set_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value>`__ for more information.
+
+
+ .. js:function:: load_script(provider)
+
+ See the `Rust documentation for script <https://docs.rs/icu/latest/icu/properties/maps/fn.script.html>`__ for more information.
+
+
+.. js:class:: ICU4XCodePointMapData8
+
+ An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ For properties whose values fit into 8 bits.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapData <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointMapDataBorrowed <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get(cp)
+
+ Gets the value for a code point.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get>`__ for more information.
+
+
+ .. js:method:: get32(cp)
+
+ Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+
+
+ .. js:function:: general_category_to_mask(gc)
+
+ Converts a general category to its corresponding mask value
+
+ Nonexistant general categories will map to the empty mask
+
+ See the `Rust documentation for GeneralCategoryGroup <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_value(value)
+
+ Produces an iterator over ranges of code points that map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_value_complemented(value)
+
+ Produces an iterator over ranges of code points that do not map to ``value``
+
+ See the `Rust documentation for iter_ranges_for_value_complemented <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_mask(mask)
+
+ Given a mask value (the nth bit marks property value = n), produce an iterator over ranges of code points whose property values are contained in the mask.
+
+ The main mask property supported is that for General_Category, which can be obtained via ``general_category_to_mask()`` or by using ``ICU4XGeneralCategoryNameToMaskMapper``
+
+ Should only be used on maps for properties with values less than 32 (like Generak_Category), other maps will have unpredictable results
+
+ See the `Rust documentation for iter_ranges_for_group <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_group>`__ for more information.
+
+
+ .. js:method:: get_set_for_value(value)
+
+ Gets a :js:class:`ICU4XCodePointSetData` representing all entries in this map that map to the given value
+
+ See the `Rust documentation for get_set_for_value <https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value>`__ for more information.
+
+
+ .. js:function:: load_general_category(provider)
+
+ See the `Rust documentation for general_category <https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html>`__ for more information.
+
+
+ .. js:function:: load_bidi_class(provider)
+
+ See the `Rust documentation for bidi_class <https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html>`__ for more information.
+
+
+ .. js:function:: load_east_asian_width(provider)
+
+ See the `Rust documentation for east_asian_width <https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html>`__ for more information.
+
+
+ .. js:function:: load_indic_syllabic_category(provider)
+
+ See the `Rust documentation for indic_syllabic_category <https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html>`__ for more information.
+
+
+ .. js:function:: load_line_break(provider)
+
+ See the `Rust documentation for line_break <https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html>`__ for more information.
+
+
+ .. js:function:: try_grapheme_cluster_break(provider)
+
+ See the `Rust documentation for grapheme_cluster_break <https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html>`__ for more information.
+
+
+ .. js:function:: load_word_break(provider)
+
+ See the `Rust documentation for word_break <https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html>`__ for more information.
+
+
+ .. js:function:: load_sentence_break(provider)
+
+ See the `Rust documentation for sentence_break <https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_names_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_names_ffi.rst
new file mode 100644
index 0000000000..b500224c46
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_names_ffi.rst
@@ -0,0 +1,102 @@
+``properties_names::ffi``
+=========================
+
+.. js:class:: ICU4XGeneralCategoryNameToMaskMapper
+
+ A type capable of looking up General Category mask values from a string name.
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper>`__ for more information.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapper <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html>`__ for more information.
+
+
+ .. js:method:: get_strict(name)
+
+ Get the mask value matching the given name, using strict matching
+
+ Returns 0 if the name is unknown for this property
+
+
+ .. js:method:: get_loose(name)
+
+ Get the mask value matching the given name, using loose matching
+
+ Returns 0 if the name is unknown for this property
+
+
+ .. js:function:: load(provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+.. js:class:: ICU4XPropertyValueNameToEnumMapper
+
+ A type capable of looking up a property value from a string name.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapper <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html>`__ for more information.
+
+ See the `Rust documentation for PropertyValueNameToEnumMapperBorrowed <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get_strict(name)
+
+ Get the property value matching the given name, using strict matching
+
+ Returns -1 if the name is unknown for this property
+
+ See the `Rust documentation for get_strict <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_strict>`__ for more information.
+
+
+ .. js:method:: get_loose(name)
+
+ Get the property value matching the given name, using loose matching
+
+ Returns -1 if the name is unknown for this property
+
+ See the `Rust documentation for get_loose <https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_loose>`__ for more information.
+
+
+ .. js:function:: load_general_category(provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_bidi_class(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_east_asian_width(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_indic_syllabic_category(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_line_break(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_grapheme_cluster_break(provider)
+
+ See the `Rust documentation for get_name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.get_name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_word_break(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_sentence_break(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper>`__ for more information.
+
+
+ .. js:function:: load_script(provider)
+
+ See the `Rust documentation for name_to_enum_mapper <https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst
new file mode 100644
index 0000000000..5238ce0b41
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_sets_ffi.rst
@@ -0,0 +1,380 @@
+``properties_sets::ffi``
+========================
+
+.. js:class:: ICU4XCodePointSetData
+
+ An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for CodePointSetData <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetData.html>`__ for more information.
+
+ See the `Rust documentation for CodePointSetDataBorrowed <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: contains(cp)
+
+ Checks whether the code point is in the set.
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.contains>`__ for more information.
+
+
+ .. js:method:: contains32(cp)
+
+ Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+
+
+ .. js:method:: iter_ranges()
+
+ Produces an iterator over ranges of code points contained in this set
+
+ See the `Rust documentation for iter_ranges <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges>`__ for more information.
+
+
+ .. js:method:: iter_ranges_complemented()
+
+ Produces an iterator over ranges of code points not contained in this set
+
+ See the `Rust documentation for iter_ranges_complemented <https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges_complemented>`__ for more information.
+
+
+ .. js:function:: load_for_general_category_group(provider, group)
+
+ which is a mask with the same format as the ``U_GC_XX_MASK`` mask in ICU4C
+
+ See the `Rust documentation for for_general_category_group <https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html>`__ for more information.
+
+
+ .. js:function:: load_ascii_hex_digit(provider)
+
+ See the `Rust documentation for ascii_hex_digit <https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html>`__ for more information.
+
+
+ .. js:function:: load_alnum(provider)
+
+ See the `Rust documentation for alnum <https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html>`__ for more information.
+
+
+ .. js:function:: load_alphabetic(provider)
+
+ See the `Rust documentation for alphabetic <https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html>`__ for more information.
+
+
+ .. js:function:: load_bidi_control(provider)
+
+ See the `Rust documentation for bidi_control <https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html>`__ for more information.
+
+
+ .. js:function:: load_bidi_mirrored(provider)
+
+ See the `Rust documentation for bidi_mirrored <https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html>`__ for more information.
+
+
+ .. js:function:: load_blank(provider)
+
+ See the `Rust documentation for blank <https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html>`__ for more information.
+
+
+ .. js:function:: load_cased(provider)
+
+ See the `Rust documentation for cased <https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html>`__ for more information.
+
+
+ .. js:function:: load_case_ignorable(provider)
+
+ See the `Rust documentation for case_ignorable <https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html>`__ for more information.
+
+
+ .. js:function:: load_full_composition_exclusion(provider)
+
+ See the `Rust documentation for full_composition_exclusion <https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_casefolded(provider)
+
+ See the `Rust documentation for changes_when_casefolded <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_casemapped(provider)
+
+ See the `Rust documentation for changes_when_casemapped <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_nfkc_casefolded(provider)
+
+ See the `Rust documentation for changes_when_nfkc_casefolded <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_lowercased(provider)
+
+ See the `Rust documentation for changes_when_lowercased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_titlecased(provider)
+
+ See the `Rust documentation for changes_when_titlecased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html>`__ for more information.
+
+
+ .. js:function:: load_changes_when_uppercased(provider)
+
+ See the `Rust documentation for changes_when_uppercased <https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html>`__ for more information.
+
+
+ .. js:function:: load_dash(provider)
+
+ See the `Rust documentation for dash <https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html>`__ for more information.
+
+
+ .. js:function:: load_deprecated(provider)
+
+ See the `Rust documentation for deprecated <https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html>`__ for more information.
+
+
+ .. js:function:: load_default_ignorable_code_point(provider)
+
+ See the `Rust documentation for default_ignorable_code_point <https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html>`__ for more information.
+
+
+ .. js:function:: load_diacritic(provider)
+
+ See the `Rust documentation for diacritic <https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_modifier_base(provider)
+
+ See the `Rust documentation for emoji_modifier_base <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_component(provider)
+
+ See the `Rust documentation for emoji_component <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_modifier(provider)
+
+ See the `Rust documentation for emoji_modifier <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html>`__ for more information.
+
+
+ .. js:function:: load_emoji(provider)
+
+ See the `Rust documentation for emoji <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html>`__ for more information.
+
+
+ .. js:function:: load_emoji_presentation(provider)
+
+ See the `Rust documentation for emoji_presentation <https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html>`__ for more information.
+
+
+ .. js:function:: load_extender(provider)
+
+ See the `Rust documentation for extender <https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html>`__ for more information.
+
+
+ .. js:function:: load_extended_pictographic(provider)
+
+ See the `Rust documentation for extended_pictographic <https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html>`__ for more information.
+
+
+ .. js:function:: load_graph(provider)
+
+ See the `Rust documentation for graph <https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html>`__ for more information.
+
+
+ .. js:function:: load_grapheme_base(provider)
+
+ See the `Rust documentation for grapheme_base <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html>`__ for more information.
+
+
+ .. js:function:: load_grapheme_extend(provider)
+
+ See the `Rust documentation for grapheme_extend <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html>`__ for more information.
+
+
+ .. js:function:: load_grapheme_link(provider)
+
+ See the `Rust documentation for grapheme_link <https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html>`__ for more information.
+
+
+ .. js:function:: load_hex_digit(provider)
+
+ See the `Rust documentation for hex_digit <https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html>`__ for more information.
+
+
+ .. js:function:: load_hyphen(provider)
+
+ See the `Rust documentation for hyphen <https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html>`__ for more information.
+
+
+ .. js:function:: load_id_continue(provider)
+
+ See the `Rust documentation for id_continue <https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html>`__ for more information.
+
+
+ .. js:function:: load_ideographic(provider)
+
+ See the `Rust documentation for ideographic <https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html>`__ for more information.
+
+
+ .. js:function:: load_id_start(provider)
+
+ See the `Rust documentation for id_start <https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html>`__ for more information.
+
+
+ .. js:function:: load_ids_binary_operator(provider)
+
+ See the `Rust documentation for ids_binary_operator <https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html>`__ for more information.
+
+
+ .. js:function:: load_ids_trinary_operator(provider)
+
+ See the `Rust documentation for ids_trinary_operator <https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html>`__ for more information.
+
+
+ .. js:function:: load_join_control(provider)
+
+ See the `Rust documentation for join_control <https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html>`__ for more information.
+
+
+ .. js:function:: load_logical_order_exception(provider)
+
+ See the `Rust documentation for logical_order_exception <https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html>`__ for more information.
+
+
+ .. js:function:: load_lowercase(provider)
+
+ See the `Rust documentation for lowercase <https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html>`__ for more information.
+
+
+ .. js:function:: load_math(provider)
+
+ See the `Rust documentation for math <https://docs.rs/icu/latest/icu/properties/sets/fn.math.html>`__ for more information.
+
+
+ .. js:function:: load_noncharacter_code_point(provider)
+
+ See the `Rust documentation for noncharacter_code_point <https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html>`__ for more information.
+
+
+ .. js:function:: load_nfc_inert(provider)
+
+ See the `Rust documentation for nfc_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html>`__ for more information.
+
+
+ .. js:function:: load_nfd_inert(provider)
+
+ See the `Rust documentation for nfd_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html>`__ for more information.
+
+
+ .. js:function:: load_nfkc_inert(provider)
+
+ See the `Rust documentation for nfkc_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html>`__ for more information.
+
+
+ .. js:function:: load_nfkd_inert(provider)
+
+ See the `Rust documentation for nfkd_inert <https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html>`__ for more information.
+
+
+ .. js:function:: load_pattern_syntax(provider)
+
+ See the `Rust documentation for pattern_syntax <https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html>`__ for more information.
+
+
+ .. js:function:: load_pattern_white_space(provider)
+
+ See the `Rust documentation for pattern_white_space <https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html>`__ for more information.
+
+
+ .. js:function:: load_prepended_concatenation_mark(provider)
+
+ See the `Rust documentation for prepended_concatenation_mark <https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html>`__ for more information.
+
+
+ .. js:function:: load_print(provider)
+
+ See the `Rust documentation for print <https://docs.rs/icu/latest/icu/properties/sets/fn.print.html>`__ for more information.
+
+
+ .. js:function:: load_quotation_mark(provider)
+
+ See the `Rust documentation for quotation_mark <https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html>`__ for more information.
+
+
+ .. js:function:: load_radical(provider)
+
+ See the `Rust documentation for radical <https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html>`__ for more information.
+
+
+ .. js:function:: load_regional_indicator(provider)
+
+ See the `Rust documentation for regional_indicator <https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html>`__ for more information.
+
+
+ .. js:function:: load_soft_dotted(provider)
+
+ See the `Rust documentation for soft_dotted <https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html>`__ for more information.
+
+
+ .. js:function:: load_segment_starter(provider)
+
+ See the `Rust documentation for segment_starter <https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html>`__ for more information.
+
+
+ .. js:function:: load_case_sensitive(provider)
+
+ See the `Rust documentation for case_sensitive <https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html>`__ for more information.
+
+
+ .. js:function:: load_sentence_terminal(provider)
+
+ See the `Rust documentation for sentence_terminal <https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html>`__ for more information.
+
+
+ .. js:function:: load_terminal_punctuation(provider)
+
+ See the `Rust documentation for terminal_punctuation <https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html>`__ for more information.
+
+
+ .. js:function:: load_unified_ideograph(provider)
+
+ See the `Rust documentation for unified_ideograph <https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html>`__ for more information.
+
+
+ .. js:function:: load_uppercase(provider)
+
+ See the `Rust documentation for uppercase <https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html>`__ for more information.
+
+
+ .. js:function:: load_variation_selector(provider)
+
+ See the `Rust documentation for variation_selector <https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html>`__ for more information.
+
+
+ .. js:function:: load_white_space(provider)
+
+ See the `Rust documentation for white_space <https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html>`__ for more information.
+
+
+ .. js:function:: load_xdigit(provider)
+
+ See the `Rust documentation for xdigit <https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html>`__ for more information.
+
+
+ .. js:function:: load_xid_continue(provider)
+
+ See the `Rust documentation for xid_continue <https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html>`__ for more information.
+
+
+ .. js:function:: load_xid_start(provider)
+
+ See the `Rust documentation for xid_start <https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html>`__ for more information.
+
+
+ .. js:function:: load_for_ecma262(provider, property_name)
+
+ Loads data for a property specified as a string as long as it is one of the `ECMA-262 binary properties <https://tc39.es/ecma262/#table-binary-unicode-properties>`__ (not including Any, ASCII, and Assigned pseudoproperties).
+
+ Returns ``ICU4XError::PropertyUnexpectedPropertyNameError`` in case the string does not match any property in the list
+
+ See the `Rust documentation for for_ecma262 <https://docs.rs/icu/latest/icu/properties/sets/fn.for_ecma262.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst b/intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst
new file mode 100644
index 0000000000..235ef21756
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/properties_unisets_ffi.rst
@@ -0,0 +1,62 @@
+``properties_unisets::ffi``
+===========================
+
+.. js:class:: ICU4XUnicodeSetData
+
+ An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ See the `Rust documentation for properties <https://docs.rs/icu/latest/icu/properties/index.html>`__ for more information.
+
+ See the `Rust documentation for UnicodeSetData <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetData.html>`__ for more information.
+
+ See the `Rust documentation for UnicodeSetDataBorrowed <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html>`__ for more information.
+
+
+ .. js:method:: contains(s)
+
+ Checks whether the string is in the set.
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains>`__ for more information.
+
+
+ .. js:method:: contains_char(cp)
+
+ Checks whether the code point is in the set.
+
+ See the `Rust documentation for contains_char <https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains_char>`__ for more information.
+
+
+ .. js:method:: contains32(cp)
+
+ Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+
+
+ .. js:function:: load_basic_emoji(provider)
+
+ See the `Rust documentation for basic_emoji <https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_main(provider, locale)
+
+ See the `Rust documentation for exemplars_main <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_auxiliary(provider, locale)
+
+ See the `Rust documentation for exemplars_auxiliary <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_punctuation(provider, locale)
+
+ See the `Rust documentation for exemplars_punctuation <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_numbers(provider, locale)
+
+ See the `Rust documentation for exemplars_numbers <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html>`__ for more information.
+
+
+ .. js:function:: load_exemplars_index(provider, locale)
+
+ See the `Rust documentation for exemplars_index <https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/provider_ffi.rst b/intl/icu_capi/js/package/docs/source/provider_ffi.rst
new file mode 100644
index 0000000000..50c7d5e717
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/provider_ffi.rst
@@ -0,0 +1,86 @@
+``provider::ffi``
+=================
+
+.. js:class:: ICU4XDataProvider
+
+ An ICU4X data provider, capable of loading ICU4X data keys from some source.
+
+ See the `Rust documentation for icu_provider <https://docs.rs/icu_provider/latest/icu_provider/index.html>`__ for more information.
+
+
+ .. js:function:: create_compiled()
+
+ Constructs an :js:class:`ICU4XDataProvider` that uses compiled data.
+
+ Requires the ``compiled_data`` feature.
+
+ This provider cannot be modified or combined with other providers, so ``enable_fallback``, ``enabled_fallback_with``, ``fork_by_locale``, and ``fork_by_key`` will return ``Err``s.
+
+
+ .. js:function:: create_fs(path)
+
+ Constructs an ``FsDataProvider`` and returns it as an :js:class:`ICU4XDataProvider`. Requires the ``provider_fs`` Cargo feature. Not supported in WASM.
+
+ See the `Rust documentation for FsDataProvider <https://docs.rs/icu_provider_fs/latest/icu_provider_fs/struct.FsDataProvider.html>`__ for more information.
+
+
+ .. js:function:: create_test()
+
+ Deprecated
+
+ Use ``create_compiled()``.
+
+
+ .. js:function:: create_from_byte_slice(blob)
+
+ Constructs a ``BlobDataProvider`` and returns it as an :js:class:`ICU4XDataProvider`.
+
+ See the `Rust documentation for BlobDataProvider <https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html>`__ for more information.
+
+ - Note: ``blob`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+ - Warning: This method leaks memory. The parameter `blob` will not be freed as it is required to live for the duration of the program.
+
+
+ .. js:function:: create_empty()
+
+ Constructs an empty :js:class:`ICU4XDataProvider`.
+
+ See the `Rust documentation for EmptyDataProvider <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/empty/struct.EmptyDataProvider.html>`__ for more information.
+
+
+ .. js:method:: fork_by_key(other)
+
+ Creates a provider that tries the current provider and then, if the current provider doesn't support the data key, another provider ``other``.
+
+ This takes ownership of the ``other`` provider, leaving an empty provider in its place.
+
+ The providers must be the same type (Any or Buffer). This condition is satisfied if both providers originate from the same constructor, such as ``create_from_byte_slice`` or ``create_fs``. If the condition is not upheld, a runtime error occurs.
+
+ See the `Rust documentation for ForkByKeyProvider <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByKeyProvider.html>`__ for more information.
+
+
+ .. js:method:: fork_by_locale(other)
+
+ Same as ``fork_by_key`` but forks by locale instead of key.
+
+ See the `Rust documentation for MissingLocalePredicate <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html>`__ for more information.
+
+
+ .. js:method:: enable_locale_fallback()
+
+ Enables locale fallbacking for data requests made to this provider.
+
+ Note that the test provider (from ``create_test``) already has fallbacking enabled.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html>`__
+
+
+ .. js:method:: enable_locale_fallback_with(fallbacker)
+
+ See the `Rust documentation for new_with_fallbacker <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html>`__
+
diff --git a/intl/icu_capi/js/package/docs/source/script_ffi.rst b/intl/icu_capi/js/package/docs/source/script_ffi.rst
new file mode 100644
index 0000000000..23a94bdb19
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/script_ffi.rst
@@ -0,0 +1,105 @@
+``script::ffi``
+===============
+
+.. js:class:: ICU4XScriptExtensionsSet
+
+ An object that represents the Script_Extensions property for a single character
+
+ See the `Rust documentation for ScriptExtensionsSet <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html>`__ for more information.
+
+
+ .. js:method:: contains(script)
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for contains <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.contains>`__ for more information.
+
+
+ .. js:method:: count()
+
+ Get the number of scripts contained in here
+
+ See the `Rust documentation for iter <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter>`__ for more information.
+
+
+ .. js:method:: script_at(index)
+
+ Get script at index, returning an error if out of bounds
+
+ See the `Rust documentation for iter <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter>`__ for more information.
+
+
+.. js:class:: ICU4XScriptWithExtensions
+
+ An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
+
+ See the `Rust documentation for ScriptWithExtensions <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ See the `Rust documentation for script_with_extensions <https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html>`__ for more information.
+
+
+ .. js:method:: get_script_val(code_point)
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val>`__ for more information.
+
+
+ .. js:method:: has_script(code_point, script)
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for has_script <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script>`__ for more information.
+
+
+ .. js:method:: as_borrowed()
+
+ Borrow this object for a slightly faster variant with more operations
+
+ See the `Rust documentation for as_borrowed <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed>`__ for more information.
+
+
+ .. js:method:: iter_ranges_for_script(script)
+
+ Get a list of ranges of code points that contain this script in their Script_Extensions values
+
+ See the `Rust documentation for get_script_extensions_ranges <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges>`__ for more information.
+
+
+.. js:class:: ICU4XScriptWithExtensionsBorrowed
+
+ A slightly faster ICU4XScriptWithExtensions object
+
+ See the `Rust documentation for ScriptWithExtensionsBorrowed <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html>`__ for more information.
+
+
+ .. js:method:: get_script_val(code_point)
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val>`__ for more information.
+
+
+ .. js:method:: get_script_extensions_val(code_point)
+
+ Get the Script property value for a code point
+
+ See the `Rust documentation for get_script_extensions_val <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_val>`__ for more information.
+
+
+ .. js:method:: has_script(code_point, script)
+
+ Check if the Script_Extensions property of the given code point covers the given script
+
+ See the `Rust documentation for has_script <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script>`__ for more information.
+
+
+ .. js:method:: get_script_extensions_set(script)
+
+ Build the CodePointSetData corresponding to a codepoints matching a particular script in their Script_Extensions
+
+ See the `Rust documentation for get_script_extensions_set <https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_set>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst
new file mode 100644
index 0000000000..be0fd9192e
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_grapheme_ffi.rst
@@ -0,0 +1,77 @@
+``segmenter_grapheme::ffi``
+===========================
+
+.. js:class:: ICU4XGraphemeClusterBreakIteratorLatin1
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XGraphemeClusterBreakIteratorUtf16
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XGraphemeClusterBreakIteratorUtf8
+
+ See the `Rust documentation for GraphemeClusterBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XGraphemeClusterSegmenter
+
+ An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints in strings.
+
+ See the `Rust documentation for GraphemeClusterSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct an :js:class:`ICU4XGraphemeClusterSegmenter`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst
new file mode 100644
index 0000000000..9a991deb83
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_line_ffi.rst
@@ -0,0 +1,139 @@
+``segmenter_line::ffi``
+=======================
+
+.. js:class:: ICU4XLineBreakIteratorLatin1
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorLatin1.html>`__
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakIteratorUtf16
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorUtf16.html>`__
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakIteratorUtf8
+
+ See the `Rust documentation for LineBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorPotentiallyIllFormedUtf8.html>`__
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakOptionsV1
+
+ See the `Rust documentation for LineBreakOptions <https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakOptions.html>`__ for more information.
+
+
+ .. js:attribute:: strictness
+
+ .. js:attribute:: word_option
+
+ .. js:attribute:: ja_zh
+
+.. js:class:: ICU4XLineBreakStrictness
+
+ See the `Rust documentation for LineBreakStrictness <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakStrictness.html>`__ for more information.
+
+
+.. js:class:: ICU4XLineBreakWordOption
+
+ See the `Rust documentation for LineBreakWordOption <https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakWordOption.html>`__ for more information.
+
+
+.. js:class:: ICU4XLineSegmenter
+
+ An ICU4X line-break segmenter, capable of finding breakpoints in strings.
+
+ See the `Rust documentation for LineSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create_auto(provider)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with default options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto>`__ for more information.
+
+
+ .. js:function:: create_lstm(provider)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with default options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_lstm <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm>`__ for more information.
+
+
+ .. js:function:: create_dictionary(provider)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with default options and dictionary payload data for Burmese, Khmer, Lao, and Thai..
+
+ See the `Rust documentation for new_dictionary <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary>`__ for more information.
+
+
+ .. js:function:: create_auto_with_options_v1(provider, options)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with custom options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options>`__ for more information.
+
+
+ .. js:function:: create_lstm_with_options_v1(provider, options)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with custom options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_lstm_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options>`__ for more information.
+
+
+ .. js:function:: create_dictionary_with_options_v1(provider, options)
+
+ Construct a :js:class:`ICU4XLineSegmenter` with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_dictionary_with_options <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst
new file mode 100644
index 0000000000..b1f15a2868
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_sentence_ffi.rst
@@ -0,0 +1,77 @@
+``segmenter_sentence::ffi``
+===========================
+
+.. js:class:: ICU4XSentenceBreakIteratorLatin1
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XSentenceBreakIteratorUtf16
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XSentenceBreakIteratorUtf8
+
+ See the `Rust documentation for SentenceBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next>`__ for more information.
+
+
+.. js:class:: ICU4XSentenceSegmenter
+
+ An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
+
+ See the `Rust documentation for SentenceSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create(provider)
+
+ Construct an :js:class:`ICU4XSentenceSegmenter`.
+
+ See the `Rust documentation for new <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst b/intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst
new file mode 100644
index 0000000000..913ef3479e
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/segmenter_word_ffi.rst
@@ -0,0 +1,142 @@
+``segmenter_word::ffi``
+=======================
+
+.. js:class:: ICU4XSegmenterWordType
+
+ See the `Rust documentation for WordType <https://docs.rs/icu/latest/icu/segmenter/enum.WordType.html>`__ for more information.
+
+
+.. js:class:: ICU4XWordBreakIteratorLatin1
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. js:method:: word_type()
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. js:method:: is_word_like()
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. js:class:: ICU4XWordBreakIteratorUtf16
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. js:method:: word_type()
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. js:method:: is_word_like()
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. js:class:: ICU4XWordBreakIteratorUtf8
+
+ See the `Rust documentation for WordBreakIterator <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html>`__ for more information.
+
+
+ .. js:method:: next()
+
+ Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ See the `Rust documentation for next <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next>`__ for more information.
+
+
+ .. js:method:: word_type()
+
+ Return the status value of break boundary.
+
+ See the `Rust documentation for word_type <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type>`__ for more information.
+
+
+ .. js:method:: is_word_like()
+
+ Return true when break boundary is word-like such as letter/number/CJK
+
+ See the `Rust documentation for is_word_like <https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like>`__ for more information.
+
+
+.. js:class:: ICU4XWordSegmenter
+
+ An ICU4X word-break segmenter, capable of finding word breakpoints in strings.
+
+ See the `Rust documentation for WordSegmenter <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html>`__ for more information.
+
+
+ .. js:function:: create_auto(provider)
+
+ Construct an :js:class:`ICU4XWordSegmenter` with automatically selecting the best available LSTM or dictionary payload data.
+
+ Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_auto <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto>`__ for more information.
+
+
+ .. js:function:: create_lstm(provider)
+
+ Construct an :js:class:`ICU4XWordSegmenter` with LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ Warning: :js:class:`ICU4XWordSegmenter` created by this function doesn't handle Chinese or Japanese.
+
+ See the `Rust documentation for new_lstm <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm>`__ for more information.
+
+
+ .. js:function:: create_dictionary(provider)
+
+ Construct an :js:class:`ICU4XWordSegmenter` with dictionary payload data for Chinese, Japanese, Burmese, Khmer, Lao, and Thai.
+
+ See the `Rust documentation for new_dictionary <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary>`__ for more information.
+
+
+ .. js:method:: segment_utf8(input)
+
+ Segments a (potentially ill-formed) UTF-8 string.
+
+ See the `Rust documentation for segment_utf8 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf8>`__ for more information.
+
+
+ .. js:method:: segment_utf16(input)
+
+ Segments a UTF-16 string.
+
+ See the `Rust documentation for segment_utf16 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf16>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
+
+ .. js:method:: segment_latin1(input)
+
+ Segments a Latin-1 string.
+
+ See the `Rust documentation for segment_latin1 <https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1>`__ for more information.
+
+ - Note: ``input`` should be an ArrayBuffer or TypedArray corresponding to the slice type expected by Rust.
+
diff --git a/intl/icu_capi/js/package/docs/source/time_ffi.rst b/intl/icu_capi/js/package/docs/source/time_ffi.rst
new file mode 100644
index 0000000000..dff1373031
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/time_ffi.rst
@@ -0,0 +1,51 @@
+``time::ffi``
+=============
+
+.. js:class:: ICU4XTime
+
+ An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. js:function:: create(hour, minute, second, nanosecond)
+
+ Creates a new :js:class:`ICU4XTime` given field values
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. js:function:: create_midnight()
+
+ Creates a new :js:class:`ICU4XTime` representing midnight (00:00.000).
+
+ See the `Rust documentation for Time <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html>`__ for more information.
+
+
+ .. js:method:: hour()
+
+ Returns the hour in this time
+
+ See the `Rust documentation for hour <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour>`__ for more information.
+
+
+ .. js:method:: minute()
+
+ Returns the minute in this time
+
+ See the `Rust documentation for minute <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute>`__ for more information.
+
+
+ .. js:method:: second()
+
+ Returns the second in this time
+
+ See the `Rust documentation for second <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second>`__ for more information.
+
+
+ .. js:method:: nanosecond()
+
+ Returns the nanosecond in this time
+
+ See the `Rust documentation for nanosecond <https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/timezone_ffi.rst b/intl/icu_capi/js/package/docs/source/timezone_ffi.rst
new file mode 100644
index 0000000000..aaad8de786
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/timezone_ffi.rst
@@ -0,0 +1,246 @@
+``timezone::ffi``
+=================
+
+.. js:class:: ICU4XCustomTimeZone
+
+ See the `Rust documentation for CustomTimeZone <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html>`__ for more information.
+
+
+ .. js:function:: create_from_string(s)
+
+ Creates a time zone from an offset string.
+
+ See the `Rust documentation for from_str <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str>`__ for more information.
+
+
+ .. js:function:: create_empty()
+
+ Creates a time zone with no information.
+
+ See the `Rust documentation for new_empty <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.new_empty>`__ for more information.
+
+
+ .. js:function:: create_utc()
+
+ Creates a time zone for UTC.
+
+ See the `Rust documentation for utc <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.utc>`__ for more information.
+
+
+ .. js:method:: try_set_gmt_offset_seconds(offset_seconds)
+
+ Sets the ``gmt_offset`` field from offset seconds.
+
+ Errors if the offset seconds are out of range.
+
+ See the `Rust documentation for try_from_offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.try_from_offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. js:method:: clear_gmt_offset()
+
+ Clears the ``gmt_offset`` field.
+
+ See the `Rust documentation for offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. js:method:: gmt_offset_seconds()
+
+ Returns the value of the ``gmt_offset`` field as offset seconds.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for offset_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html>`__
+
+
+ .. js:method:: is_gmt_offset_positive()
+
+ Returns whether the ``gmt_offset`` field is positive.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for is_positive <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_positive>`__ for more information.
+
+
+ .. js:method:: is_gmt_offset_zero()
+
+ Returns whether the ``gmt_offset`` field is zero.
+
+ Errors if the ``gmt_offset`` field is empty (which is not the same as zero).
+
+ See the `Rust documentation for is_zero <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_zero>`__ for more information.
+
+
+ .. js:method:: gmt_offset_has_minutes()
+
+ Returns whether the ``gmt_offset`` field has nonzero minutes.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for has_minutes <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_minutes>`__ for more information.
+
+
+ .. js:method:: gmt_offset_has_seconds()
+
+ Returns whether the ``gmt_offset`` field has nonzero seconds.
+
+ Errors if the ``gmt_offset`` field is empty.
+
+ See the `Rust documentation for has_seconds <https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_seconds>`__ for more information.
+
+
+ .. js:method:: try_set_time_zone_id(id)
+
+ Sets the ``time_zone_id`` field from a BCP-47 string.
+
+ Errors if the string is not a valid BCP-47 time zone ID.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. js:method:: try_set_iana_time_zone_id(mapper, id)
+
+ Sets the ``time_zone_id`` field from an IANA string by looking up the corresponding BCP-47 string.
+
+ Errors if the string is not a valid BCP-47 time zone ID.
+
+ See the `Rust documentation for get <https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47MapperBorrowed.html#method.get>`__ for more information.
+
+
+ .. js:method:: clear_time_zone_id()
+
+ Clears the ``time_zone_id`` field.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. js:method:: time_zone_id()
+
+ Writes the value of the ``time_zone_id`` field as a string.
+
+ Errors if the ``time_zone_id`` field is empty.
+
+ See the `Rust documentation for time_zone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html>`__
+
+
+ .. js:method:: try_set_metazone_id(id)
+
+ Sets the ``metazone_id`` field from a string.
+
+ Errors if the string is not a valid BCP-47 metazone ID.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. js:method:: clear_metazone_id()
+
+ Clears the ``metazone_id`` field.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. js:method:: metazone_id()
+
+ Writes the value of the ``metazone_id`` field as a string.
+
+ Errors if the ``metazone_id`` field is empty.
+
+ See the `Rust documentation for metazone_id <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html>`__
+
+
+ .. js:method:: try_set_zone_variant(id)
+
+ Sets the ``zone_variant`` field from a string.
+
+ Errors if the string is not a valid zone variant.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. js:method:: clear_zone_variant()
+
+ Clears the ``zone_variant`` field.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. js:method:: zone_variant()
+
+ Writes the value of the ``zone_variant`` field as a string.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for zone_variant <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html>`__
+
+
+ .. js:method:: set_standard_time()
+
+ Sets the ``zone_variant`` field to standard time.
+
+ See the `Rust documentation for standard <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: set_daylight_time()
+
+ Sets the ``zone_variant`` field to daylight time.
+
+ See the `Rust documentation for daylight <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: is_standard_time()
+
+ Returns whether the ``zone_variant`` field is standard time.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for standard <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: is_daylight_time()
+
+ Returns whether the ``zone_variant`` field is daylight time.
+
+ Errors if the ``zone_variant`` field is empty.
+
+ See the `Rust documentation for daylight <https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant>`__
+
+
+ .. js:method:: maybe_calculate_metazone(metazone_calculator, local_datetime)
+
+ Sets the metazone based on the time zone and the local timestamp.
+
+ See the `Rust documentation for maybe_calculate_metazone <https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.maybe_calculate_metazone>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.compute_metazone_from_time_zone>`__
+
diff --git a/intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst b/intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst
new file mode 100644
index 0000000000..434cf7c162
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/timezone_formatter_ffi.rst
@@ -0,0 +1,112 @@
+``timezone_formatter::ffi``
+===========================
+
+.. js:class:: ICU4XIsoTimeZoneFormat
+
+ See the `Rust documentation for IsoFormat <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoFormat.html>`__ for more information.
+
+
+.. js:class:: ICU4XIsoTimeZoneMinuteDisplay
+
+ See the `Rust documentation for IsoMinutes <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoMinutes.html>`__ for more information.
+
+
+.. js:class:: ICU4XIsoTimeZoneOptions
+
+ .. js:attribute:: format
+
+ .. js:attribute:: minutes
+
+ .. js:attribute:: seconds
+
+.. js:class:: ICU4XIsoTimeZoneSecondDisplay
+
+ See the `Rust documentation for IsoSeconds <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoSeconds.html>`__ for more information.
+
+
+.. js:class:: ICU4XTimeZoneFormatter
+
+ An ICU4X TimeZoneFormatter object capable of formatting an :js:class:`ICU4XCustomTimeZone` type (and others) as a string
+
+ See the `Rust documentation for TimeZoneFormatter <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_localized_gmt_fallback(provider, locale)
+
+ Creates a new :js:class:`ICU4XTimeZoneFormatter` from locale data.
+
+ Uses localized GMT as the fallback format.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__
+
+
+ .. js:function:: create_with_iso_8601_fallback(provider, locale, options)
+
+ Creates a new :js:class:`ICU4XTimeZoneFormatter` from locale data.
+
+ Uses ISO-8601 as the fallback format.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new>`__ for more information.
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html>`__
+
+
+ .. js:method:: load_generic_non_location_long(provider)
+
+ Loads generic non-location long format. Example: "Pacific Time"
+
+ See the `Rust documentation for include_generic_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_long>`__ for more information.
+
+
+ .. js:method:: load_generic_non_location_short(provider)
+
+ Loads generic non-location short format. Example: "PT"
+
+ See the `Rust documentation for include_generic_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_short>`__ for more information.
+
+
+ .. js:method:: load_specific_non_location_long(provider)
+
+ Loads specific non-location long format. Example: "Pacific Standard Time"
+
+ See the `Rust documentation for include_specific_non_location_long <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_long>`__ for more information.
+
+
+ .. js:method:: load_specific_non_location_short(provider)
+
+ Loads specific non-location short format. Example: "PST"
+
+ See the `Rust documentation for include_specific_non_location_short <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_short>`__ for more information.
+
+
+ .. js:method:: load_generic_location_format(provider)
+
+ Loads generic location format. Example: "Los Angeles Time"
+
+ See the `Rust documentation for include_generic_location_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_location_format>`__ for more information.
+
+
+ .. js:method:: include_localized_gmt_format()
+
+ Loads localized GMT format. Example: "GMT-07:00"
+
+ See the `Rust documentation for include_localized_gmt_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_localized_gmt_format>`__ for more information.
+
+
+ .. js:method:: load_iso_8601_format(options)
+
+ Loads ISO-8601 format. Example: "-07:00"
+
+ See the `Rust documentation for include_iso_8601_format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_iso_8601_format>`__ for more information.
+
+
+ .. js:method:: format_custom_time_zone(value)
+
+ Formats a :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format>`__ for more information.
+
+ See the `Rust documentation for format_to_string <https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/week_ffi.rst b/intl/icu_capi/js/package/docs/source/week_ffi.rst
new file mode 100644
index 0000000000..3bb2f146e8
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/week_ffi.rst
@@ -0,0 +1,49 @@
+``week::ffi``
+=============
+
+.. js:class:: ICU4XWeekCalculator
+
+ A Week calculator, useful to be passed in to ``week_of_year()`` on Date and DateTime types
+
+ See the `Rust documentation for WeekCalculator <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html>`__ for more information.
+
+
+ .. js:function:: create(provider, locale)
+
+ Creates a new :js:class:`ICU4XWeekCalculator` from locale data.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_from_first_day_of_week_and_min_week_days(first_weekday, min_week_days)
+
+ Additional information: `1 <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday>`__, `2 <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days>`__
+
+
+ .. js:method:: first_weekday()
+
+ Returns the weekday that starts the week for this object's locale
+
+ See the `Rust documentation for first_weekday <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday>`__ for more information.
+
+
+ .. js:method:: min_week_days()
+
+ The minimum number of days overlapping a year required for a week to be considered part of that year
+
+ See the `Rust documentation for min_week_days <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days>`__ for more information.
+
+
+.. js:class:: ICU4XWeekOf
+
+ See the `Rust documentation for WeekOf <https://docs.rs/icu/latest/icu/calendar/week/struct.WeekOf.html>`__ for more information.
+
+
+ .. js:attribute:: week
+
+ .. js:attribute:: unit
+
+.. js:class:: ICU4XWeekRelativeUnit
+
+ See the `Rust documentation for RelativeUnit <https://docs.rs/icu/latest/icu/calendar/week/enum.RelativeUnit.html>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst b/intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst
new file mode 100644
index 0000000000..ad0790047a
--- /dev/null
+++ b/intl/icu_capi/js/package/docs/source/zoned_formatter_ffi.rst
@@ -0,0 +1,73 @@
+``zoned_formatter::ffi``
+========================
+
+.. js:class:: ICU4XGregorianZonedDateTimeFormatter
+
+ An object capable of formatting a date time with time zone to a string.
+
+ See the `Rust documentation for TypedZonedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XGregorianZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses default options for the time zone.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_with_lengths_and_iso_8601_time_zone_fallback(provider, locale, date_length, time_length, zone_options)
+
+ Creates a new :js:class:`ICU4XGregorianZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime_with_custom_time_zone(datetime, time_zone)
+
+ Formats a :js:class:`ICU4XIsoDateTime` and :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+.. js:class:: ICU4XZonedDateTimeFormatter
+
+ An object capable of formatting a date time with time zone to a string.
+
+ See the `Rust documentation for ZonedDateTimeFormatter <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html>`__ for more information.
+
+
+ .. js:function:: create_with_lengths(provider, locale, date_length, time_length)
+
+ Creates a new :js:class:`ICU4XZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses default options for the time zone.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:function:: create_with_lengths_and_iso_8601_time_zone_fallback(provider, locale, date_length, time_length, zone_options)
+
+ Creates a new :js:class:`ICU4XZonedDateTimeFormatter` from locale data.
+
+ This function has ``date_length`` and ``time_length`` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ See the `Rust documentation for try_new <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new>`__ for more information.
+
+
+ .. js:method:: format_datetime_with_custom_time_zone(datetime, time_zone)
+
+ Formats a :js:class:`ICU4XDateTime` and :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
+
+ .. js:method:: format_iso_datetime_with_custom_time_zone(datetime, time_zone)
+
+ Formats a :js:class:`ICU4XIsoDateTime` and :js:class:`ICU4XCustomTimeZone` to a string.
+
+ See the `Rust documentation for format <https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format>`__ for more information.
+
diff --git a/intl/icu_capi/js/package/index.js b/intl/icu_capi/js/package/index.js
new file mode 100644
index 0000000000..4eb60931a4
--- /dev/null
+++ b/intl/icu_capi/js/package/index.js
@@ -0,0 +1 @@
+export * from './lib/index.js'
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts b/intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts
new file mode 100644
index 0000000000..25d3076bc8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIterator.d.ts
@@ -0,0 +1,16 @@
+import { CodePointRangeIteratorResult } from "./CodePointRangeIteratorResult";
+
+/**
+
+ * An iterator over code point ranges, produced by `ICU4XCodePointSetData` or one of the `ICU4XCodePointMapData` types
+ */
+export class CodePointRangeIterator {
+
+ /**
+
+ * Advance the iterator by one and return the next range.
+
+ * If the iterator is out of items, `done` will be true
+ */
+ next(): CodePointRangeIteratorResult;
+}
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIterator.js b/intl/icu_capi/js/package/lib/CodePointRangeIterator.js
new file mode 100644
index 0000000000..7fe654a93d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIterator.js
@@ -0,0 +1,28 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIteratorResult } from "./CodePointRangeIteratorResult.js"
+
+const CodePointRangeIterator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.CodePointRangeIterator_destroy(underlying);
+});
+
+export class CodePointRangeIterator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ CodePointRangeIterator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.CodePointRangeIterator_next(diplomat_receive_buffer, this.underlying);
+ const out = new CodePointRangeIteratorResult(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts
new file mode 100644
index 0000000000..bcc72a65a6
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.d.ts
@@ -0,0 +1,13 @@
+import { u32 } from "./diplomat-runtime"
+
+/**
+
+ * Result of a single iteration of {@link CodePointRangeIterator `CodePointRangeIterator`}. Logically can be considered to be an `Option<RangeInclusive<u32>>`,
+
+ * `start` and `end` represent an inclusive range of code points start, end, and `done` will be true if the iterator has already finished. The last contentful iteration will NOT produce a range done=true, in other words `start` and `end` are useful values if and only if `done=false`.
+ */
+export class CodePointRangeIteratorResult {
+ start: u32;
+ end: u32;
+ done: boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js
new file mode 100644
index 0000000000..f544e085fa
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/CodePointRangeIteratorResult.js
@@ -0,0 +1,10 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export class CodePointRangeIteratorResult {
+ constructor(underlying) {
+ this.start = (new Uint32Array(wasm.memory.buffer, underlying, 1))[0];
+ this.end = (new Uint32Array(wasm.memory.buffer, underlying + 4, 1))[0];
+ this.done = (new Uint8Array(wasm.memory.buffer, underlying + 8, 1))[0] == 1;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts
new file mode 100644
index 0000000000..dad3e5fc59
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.d.ts
@@ -0,0 +1,102 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * The various calendar types currently supported by {@link ICU4XCalendar `ICU4XCalendar`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendarKind.html Rust documentation for `AnyCalendarKind`} for more information.
+ */
+export enum ICU4XAnyCalendarKind {
+ /**
+
+ * The kind of an Iso calendar
+ */
+ Iso = 'Iso',
+ /**
+
+ * The kind of a Gregorian calendar
+ */
+ Gregorian = 'Gregorian',
+ /**
+
+ * The kind of a Buddhist calendar
+ */
+ Buddhist = 'Buddhist',
+ /**
+
+ * The kind of a Japanese calendar with modern eras
+ */
+ Japanese = 'Japanese',
+ /**
+
+ * The kind of a Japanese calendar with modern and historic eras
+ */
+ JapaneseExtended = 'JapaneseExtended',
+ /**
+
+ * The kind of an Ethiopian calendar, with Amete Mihret era
+ */
+ Ethiopian = 'Ethiopian',
+ /**
+
+ * The kind of an Ethiopian calendar, with Amete Alem era
+ */
+ EthiopianAmeteAlem = 'EthiopianAmeteAlem',
+ /**
+
+ * The kind of a Indian calendar
+ */
+ Indian = 'Indian',
+ /**
+
+ * The kind of a Coptic calendar
+ */
+ Coptic = 'Coptic',
+ /**
+
+ * The kind of a Dangi calendar
+ */
+ Dangi = 'Dangi',
+ /**
+
+ * The kind of a Chinese calendar
+ */
+ Chinese = 'Chinese',
+ /**
+
+ * The kind of a Hebrew calendar
+ */
+ Hebrew = 'Hebrew',
+ /**
+
+ * The kind of a Islamic civil calendar
+ */
+ IslamicCivil = 'IslamicCivil',
+ /**
+
+ * The kind of a Islamic observational calendar
+ */
+ IslamicObservational = 'IslamicObservational',
+ /**
+
+ * The kind of a Islamic tabular calendar
+ */
+ IslamicTabular = 'IslamicTabular',
+ /**
+
+ * The kind of a Islamic Umm al-Qura calendar
+ */
+ IslamicUmmAlQura = 'IslamicUmmAlQura',
+ /**
+
+ * The kind of a Persian calendar
+ */
+ Persian = 'Persian',
+ /**
+
+ * The kind of a Roc calendar
+ */
+ Roc = 'Roc',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js
new file mode 100644
index 0000000000..64cd2d608b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XAnyCalendarKind.js
@@ -0,0 +1,66 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+export const ICU4XAnyCalendarKind_js_to_rust = {
+ "Iso": 0,
+ "Gregorian": 1,
+ "Buddhist": 2,
+ "Japanese": 3,
+ "JapaneseExtended": 4,
+ "Ethiopian": 5,
+ "EthiopianAmeteAlem": 6,
+ "Indian": 7,
+ "Coptic": 8,
+ "Dangi": 9,
+ "Chinese": 10,
+ "Hebrew": 11,
+ "IslamicCivil": 12,
+ "IslamicObservational": 13,
+ "IslamicTabular": 14,
+ "IslamicUmmAlQura": 15,
+ "Persian": 16,
+ "Roc": 17,
+};
+
+export const ICU4XAnyCalendarKind_rust_to_js = {
+ [0]: "Iso",
+ [1]: "Gregorian",
+ [2]: "Buddhist",
+ [3]: "Japanese",
+ [4]: "JapaneseExtended",
+ [5]: "Ethiopian",
+ [6]: "EthiopianAmeteAlem",
+ [7]: "Indian",
+ [8]: "Coptic",
+ [9]: "Dangi",
+ [10]: "Chinese",
+ [11]: "Hebrew",
+ [12]: "IslamicCivil",
+ [13]: "IslamicObservational",
+ [14]: "IslamicTabular",
+ [15]: "IslamicUmmAlQura",
+ [16]: "Persian",
+ [17]: "Roc",
+};
+
+export const ICU4XAnyCalendarKind = {
+ "Iso": "Iso",
+ "Gregorian": "Gregorian",
+ "Buddhist": "Buddhist",
+ "Japanese": "Japanese",
+ "JapaneseExtended": "JapaneseExtended",
+ "Ethiopian": "Ethiopian",
+ "EthiopianAmeteAlem": "EthiopianAmeteAlem",
+ "Indian": "Indian",
+ "Coptic": "Coptic",
+ "Dangi": "Dangi",
+ "Chinese": "Chinese",
+ "Hebrew": "Hebrew",
+ "IslamicCivil": "IslamicCivil",
+ "IslamicObservational": "IslamicObservational",
+ "IslamicTabular": "IslamicTabular",
+ "IslamicUmmAlQura": "IslamicUmmAlQura",
+ "Persian": "Persian",
+ "Roc": "Roc",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts
new file mode 100644
index 0000000000..17eb632b74
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.d.ts
@@ -0,0 +1,28 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An object capable of mapping from a BCP-47 time zone ID to an IANA ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html Rust documentation for `IanaBcp47RoundTripMapper`} for more information.
+ */
+export class ICU4XBcp47ToIanaMapper {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaBcp47RoundTripMapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XBcp47ToIanaMapper | never;
+
+ /**
+
+ * Writes out the canonical IANA time zone ID corresponding to the given BCP-47 ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.IanaBcp47RoundTripMapper.html#method.bcp47_to_iana Rust documentation for `bcp47_to_iana`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ get(value: string): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js
new file mode 100644
index 0000000000..bca64227b9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBcp47ToIanaMapper.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XBcp47ToIanaMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBcp47ToIanaMapper_destroy(underlying);
+});
+
+export class ICU4XBcp47ToIanaMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBcp47ToIanaMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBcp47ToIanaMapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XBcp47ToIanaMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get(arg_value) {
+ const buf_arg_value = diplomatRuntime.DiplomatBuf.str(wasm, arg_value);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBcp47ToIanaMapper_get(diplomat_receive_buffer, this.underlying, buf_arg_value.ptr, buf_arg_value.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_value.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidi.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidi.d.ts
new file mode 100644
index 0000000000..96806c7479
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidi.d.ts
@@ -0,0 +1,82 @@
+import { u8 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XBidiInfo } from "./ICU4XBidiInfo";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XReorderedIndexMap } from "./ICU4XReorderedIndexMap";
+
+/**
+
+ * An ICU4X Bidi object, containing loaded bidi data
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html Rust documentation for `BidiClassAdapter`} for more information.
+ */
+export class ICU4XBidi {
+
+ /**
+
+ * Creates a new {@link ICU4XBidi `ICU4XBidi`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/bidi/struct.BidiClassAdapter.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XBidi | never;
+
+ /**
+
+ * Use the data loaded in this object to process a string and calculate bidi information
+
+ * Takes in a Level for the default level, if it is an invalid value it will default to LTR
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.new_with_data_source Rust documentation for `new_with_data_source`} for more information.
+ */
+ for_text(text: string, default_level: u8): ICU4XBidiInfo;
+
+ /**
+
+ * Utility function for producing reorderings given a list of levels
+
+ * Produces a map saying which visual index maps to which source index.
+
+ * The levels array must not have values greater than 126 (this is the Bidi maximum explicit depth plus one). Failure to follow this invariant may lead to incorrect results, but is still safe.
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html#method.reorder_visual Rust documentation for `reorder_visual`} for more information.
+ */
+ reorder_visual(levels: Uint8Array): ICU4XReorderedIndexMap;
+
+ /**
+
+ * Check if a Level returned by level_at is an RTL level.
+
+ * Invalid levels (numbers greater than 125) will be assumed LTR
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_rtl Rust documentation for `is_rtl`} for more information.
+ */
+ static level_is_rtl(level: u8): boolean;
+
+ /**
+
+ * Check if a Level returned by level_at is an LTR level.
+
+ * Invalid levels (numbers greater than 125) will be assumed LTR
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.is_ltr Rust documentation for `is_ltr`} for more information.
+ */
+ static level_is_ltr(level: u8): boolean;
+
+ /**
+
+ * Get a basic RTL Level value
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.rtl Rust documentation for `rtl`} for more information.
+ */
+ static level_rtl(): u8;
+
+ /**
+
+ * Get a simple LTR Level value
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Level.html#method.ltr Rust documentation for `ltr`} for more information.
+ */
+ static level_ltr(): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidi.js b/intl/icu_capi/js/package/lib/ICU4XBidi.js
new file mode 100644
index 0000000000..18676b8874
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidi.js
@@ -0,0 +1,65 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XBidiInfo } from "./ICU4XBidiInfo.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XReorderedIndexMap } from "./ICU4XReorderedIndexMap.js"
+
+const ICU4XBidi_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBidi_destroy(underlying);
+});
+
+export class ICU4XBidi {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBidi_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBidi_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XBidi(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ for_text(arg_text, arg_default_level) {
+ const buf_arg_text = diplomatRuntime.DiplomatBuf.str(wasm, arg_text);
+ return new ICU4XBidiInfo(wasm.ICU4XBidi_for_text(this.underlying, buf_arg_text.ptr, buf_arg_text.size, arg_default_level), true, [buf_arg_text]);
+ }
+
+ reorder_visual(arg_levels) {
+ const buf_arg_levels = diplomatRuntime.DiplomatBuf.slice(wasm, arg_levels, 1);
+ const diplomat_out = new ICU4XReorderedIndexMap(wasm.ICU4XBidi_reorder_visual(this.underlying, buf_arg_levels.ptr, buf_arg_levels.size), true, []);
+ buf_arg_levels.free();
+ return diplomat_out;
+ }
+
+ static level_is_rtl(arg_level) {
+ return wasm.ICU4XBidi_level_is_rtl(arg_level);
+ }
+
+ static level_is_ltr(arg_level) {
+ return wasm.ICU4XBidi_level_is_ltr(arg_level);
+ }
+
+ static level_rtl() {
+ return wasm.ICU4XBidi_level_rtl();
+ }
+
+ static level_ltr() {
+ return wasm.ICU4XBidi_level_ltr();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts
new file mode 100644
index 0000000000..2c406601d6
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.d.ts
@@ -0,0 +1,14 @@
+
+/**
+ */
+export enum ICU4XBidiDirection {
+ /**
+ */
+ Ltr = 'Ltr',
+ /**
+ */
+ Rtl = 'Rtl',
+ /**
+ */
+ Mixed = 'Mixed',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiDirection.js b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.js
new file mode 100644
index 0000000000..6e68a91598
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiDirection.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XBidiDirection_js_to_rust = {
+ "Ltr": 0,
+ "Rtl": 1,
+ "Mixed": 2,
+};
+
+export const ICU4XBidiDirection_rust_to_js = {
+ [0]: "Ltr",
+ [1]: "Rtl",
+ [2]: "Mixed",
+};
+
+export const ICU4XBidiDirection = {
+ "Ltr": "Ltr",
+ "Rtl": "Rtl",
+ "Mixed": "Mixed",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts
new file mode 100644
index 0000000000..bdbb3f43ef
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.d.ts
@@ -0,0 +1,37 @@
+import { u8, usize } from "./diplomat-runtime"
+import { ICU4XBidiParagraph } from "./ICU4XBidiParagraph";
+
+/**
+
+ * An object containing bidi information for a given string, produced by `for_text()` on `ICU4XBidi`
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.BidiInfo.html Rust documentation for `BidiInfo`} for more information.
+ */
+export class ICU4XBidiInfo {
+
+ /**
+
+ * The number of paragraphs contained here
+ */
+ paragraph_count(): usize;
+
+ /**
+
+ * Get the nth paragraph, returning `None` if out of bounds
+ */
+ paragraph_at(n: usize): ICU4XBidiParagraph | undefined;
+
+ /**
+
+ * The number of bytes in this full text
+ */
+ size(): usize;
+
+ /**
+
+ * Get the BIDI level at a particular byte index in the full text. This integer is conceptually a `unicode_bidi::Level`, and can be further inspected using the static methods on ICU4XBidi.
+
+ * Returns 0 (equivalent to `Level::ltr()`) on error
+ */
+ level_at(pos: usize): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiInfo.js b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.js
new file mode 100644
index 0000000000..dcdc78390f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiInfo.js
@@ -0,0 +1,37 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XBidiParagraph } from "./ICU4XBidiParagraph.js"
+
+const ICU4XBidiInfo_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBidiInfo_destroy(underlying);
+});
+
+export class ICU4XBidiInfo {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBidiInfo_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ paragraph_count() {
+ return wasm.ICU4XBidiInfo_paragraph_count(this.underlying);
+ }
+
+ paragraph_at(arg_n) {
+ return (() => {
+ const option_ptr = wasm.ICU4XBidiInfo_paragraph_at(this.underlying, arg_n);
+ return (option_ptr == 0) ? null : new ICU4XBidiParagraph(option_ptr, true, [this]);
+ })();
+ }
+
+ size() {
+ return wasm.ICU4XBidiInfo_size(this.underlying);
+ }
+
+ level_at(arg_pos) {
+ return wasm.ICU4XBidiInfo_level_at(this.underlying, arg_pos);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts
new file mode 100644
index 0000000000..94d29baa42
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.d.ts
@@ -0,0 +1,67 @@
+import { u8, usize } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XBidiDirection } from "./ICU4XBidiDirection";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * Bidi information for a single processed paragraph
+ */
+export class ICU4XBidiParagraph {
+
+ /**
+
+ * Given a paragraph index `n` within the surrounding text, this sets this object to the paragraph at that index. Returns `ICU4XError::OutOfBoundsError` when out of bounds.
+
+ * This is equivalent to calling `paragraph_at()` on `ICU4XBidiInfo` but doesn't create a new object
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_paragraph_in_text(n: usize): void | never;
+
+ /**
+
+ * The primary direction of this paragraph
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at Rust documentation for `level_at`} for more information.
+ */
+ direction(): ICU4XBidiDirection;
+
+ /**
+
+ * The number of bytes in this paragraph
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.ParagraphInfo.html#method.len Rust documentation for `len`} for more information.
+ */
+ size(): usize;
+
+ /**
+
+ * The start index of this paragraph within the source text
+ */
+ range_start(): usize;
+
+ /**
+
+ * The end index of this paragraph within the source text
+ */
+ range_end(): usize;
+
+ /**
+
+ * Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at Rust documentation for `level_at`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ reorder_line(range_start: usize, range_end: usize): string | never;
+
+ /**
+
+ * Get the BIDI level at a particular byte index in this paragraph. This integer is conceptually a `unicode_bidi::Level`, and can be further inspected using the static methods on ICU4XBidi.
+
+ * Returns 0 (equivalent to `Level::ltr()`) on error
+
+ * See the {@link https://docs.rs/unicode_bidi/latest/unicode_bidi/struct.Paragraph.html#method.level_at Rust documentation for `level_at`} for more information.
+ */
+ level_at(pos: usize): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js
new file mode 100644
index 0000000000..2037650134
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XBidiParagraph.js
@@ -0,0 +1,75 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XBidiDirection_js_to_rust, ICU4XBidiDirection_rust_to_js } from "./ICU4XBidiDirection.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XBidiParagraph_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XBidiParagraph_destroy(underlying);
+});
+
+export class ICU4XBidiParagraph {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XBidiParagraph_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ set_paragraph_in_text(arg_n) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBidiParagraph_set_paragraph_in_text(diplomat_receive_buffer, this.underlying, arg_n);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ direction() {
+ return ICU4XBidiDirection_rust_to_js[wasm.ICU4XBidiParagraph_direction(this.underlying)];
+ }
+
+ size() {
+ return wasm.ICU4XBidiParagraph_size(this.underlying);
+ }
+
+ range_start() {
+ return wasm.ICU4XBidiParagraph_range_start(this.underlying);
+ }
+
+ range_end() {
+ return wasm.ICU4XBidiParagraph_range_end(this.underlying);
+ }
+
+ reorder_line(arg_range_start, arg_range_end) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XBidiParagraph_reorder_line(diplomat_receive_buffer, this.underlying, arg_range_start, arg_range_end, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ level_at(arg_pos) {
+ return wasm.ICU4XBidiParagraph_level_at(this.underlying, arg_pos);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts b/intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts
new file mode 100644
index 0000000000..e1662c9cad
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCalendar.d.ts
@@ -0,0 +1,38 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XAnyCalendarKind } from "./ICU4XAnyCalendarKind";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html Rust documentation for `AnyCalendar`} for more information.
+ */
+export class ICU4XCalendar {
+
+ /**
+
+ * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new_for_locale Rust documentation for `new_for_locale`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_for_locale(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XCalendar | never;
+
+ /**
+
+ * Creates a new {@link ICU4XCalendar `ICU4XCalendar`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_for_kind(provider: ICU4XDataProvider, kind: ICU4XAnyCalendarKind): ICU4XCalendar | never;
+
+ /**
+
+ * Returns the kind of this calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/enum.AnyCalendar.html#method.kind Rust documentation for `kind`} for more information.
+ */
+ kind(): ICU4XAnyCalendarKind;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCalendar.js b/intl/icu_capi/js/package/lib/ICU4XCalendar.js
new file mode 100644
index 0000000000..03c5f882b8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCalendar.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XAnyCalendarKind_js_to_rust, ICU4XAnyCalendarKind_rust_to_js } from "./ICU4XAnyCalendarKind.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCalendar_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCalendar_destroy(underlying);
+});
+
+export class ICU4XCalendar {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCalendar_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_for_locale(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCalendar_create_for_locale(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCalendar(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_for_kind(arg_provider, arg_kind) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCalendar_create_for_kind(diplomat_receive_buffer, arg_provider.underlying, ICU4XAnyCalendarKind_js_to_rust[arg_kind]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCalendar(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ kind() {
+ return ICU4XAnyCalendarKind_rust_to_js[wasm.ICU4XCalendar_kind(this.underlying)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts
new file mode 100644
index 0000000000..ffe64f3541
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.d.ts
@@ -0,0 +1,38 @@
+import { u8, u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * Lookup of the Canonical_Combining_Class Unicode property
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html Rust documentation for `CanonicalCombiningClassMap`} for more information.
+ */
+export class ICU4XCanonicalCombiningClassMap {
+
+ /**
+
+ * Construct a new ICU4XCanonicalCombiningClassMap instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCanonicalCombiningClassMap | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get Rust documentation for `get`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html 1}
+ */
+ get(ch: char): u8;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalCombiningClassMap.html#method.get32 Rust documentation for `get32`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/properties/properties/struct.CanonicalCombiningClass.html 1}
+ */
+ get32(ch: u32): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js
new file mode 100644
index 0000000000..9bdb959134
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalCombiningClassMap.js
@@ -0,0 +1,43 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCanonicalCombiningClassMap_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCanonicalCombiningClassMap_destroy(underlying);
+});
+
+export class ICU4XCanonicalCombiningClassMap {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCanonicalCombiningClassMap_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCanonicalCombiningClassMap_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCanonicalCombiningClassMap(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get(arg_ch) {
+ return wasm.ICU4XCanonicalCombiningClassMap_get(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ get32(arg_ch) {
+ return wasm.ICU4XCanonicalCombiningClassMap_get32(this.underlying, arg_ch);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts
new file mode 100644
index 0000000000..1459a47f7d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.d.ts
@@ -0,0 +1,32 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * The raw canonical composition operation.
+
+ * Callers should generally use ICU4XComposingNormalizer unless they specifically need raw composition operations
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html Rust documentation for `CanonicalComposition`} for more information.
+ */
+export class ICU4XCanonicalComposition {
+
+ /**
+
+ * Construct a new ICU4XCanonicalComposition instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCanonicalComposition | never;
+
+ /**
+
+ * Performs canonical composition (including Hangul) on a pair of characters or returns NUL if these characters don’t compose. Composition exclusions are taken into account.
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalComposition.html#method.compose Rust documentation for `compose`} for more information.
+ */
+ compose(starter: char, second: char): char;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js
new file mode 100644
index 0000000000..ae217cafe9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalComposition.js
@@ -0,0 +1,39 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCanonicalComposition_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCanonicalComposition_destroy(underlying);
+});
+
+export class ICU4XCanonicalComposition {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCanonicalComposition_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCanonicalComposition_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCanonicalComposition(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ compose(arg_starter, arg_second) {
+ return wasm.ICU4XCanonicalComposition_compose(this.underlying, diplomatRuntime.extractCodePoint(arg_starter, 'arg_starter'), diplomatRuntime.extractCodePoint(arg_second, 'arg_second'));
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts
new file mode 100644
index 0000000000..debadba0ab
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.d.ts
@@ -0,0 +1,33 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDecomposed } from "./ICU4XDecomposed";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * The raw (non-recursive) canonical decomposition operation.
+
+ * Callers should generally use ICU4XDecomposingNormalizer unless they specifically need raw composition operations
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html Rust documentation for `CanonicalDecomposition`} for more information.
+ */
+export class ICU4XCanonicalDecomposition {
+
+ /**
+
+ * Construct a new ICU4XCanonicalDecomposition instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCanonicalDecomposition | never;
+
+ /**
+
+ * Performs non-recursive canonical decomposition (including for Hangul).
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/struct.CanonicalDecomposition.html#method.decompose Rust documentation for `decompose`} for more information.
+ */
+ decompose(c: char): ICU4XDecomposed;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js
new file mode 100644
index 0000000000..249a09d540
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCanonicalDecomposition.js
@@ -0,0 +1,46 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDecomposed } from "./ICU4XDecomposed.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCanonicalDecomposition_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCanonicalDecomposition_destroy(underlying);
+});
+
+export class ICU4XCanonicalDecomposition {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCanonicalDecomposition_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCanonicalDecomposition_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCanonicalDecomposition(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ decompose(arg_c) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(8, 4);
+ wasm.ICU4XCanonicalDecomposition_decompose(diplomat_receive_buffer, this.underlying, diplomatRuntime.extractCodePoint(arg_c, 'arg_c'));
+ const out = new ICU4XDecomposed(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 8, 4);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts
new file mode 100644
index 0000000000..61af474e1f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.d.ts
@@ -0,0 +1,39 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCodePointSetBuilder } from "./ICU4XCodePointSetBuilder";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html Rust documentation for `CaseMapCloser`} for more information.
+ */
+export class ICU4XCaseMapCloser {
+
+ /**
+
+ * Construct a new ICU4XCaseMapper instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCaseMapCloser | never;
+
+ /**
+
+ * Adds all simple case mappings and the full case folding for `c` to `builder`. Also adds special case closure mappings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_case_closure_to Rust documentation for `add_case_closure_to`} for more information.
+ */
+ add_case_closure_to(c: char, builder: ICU4XCodePointSetBuilder): void;
+
+ /**
+
+ * Finds all characters and strings which may casemap to `s` as their full case folding string and adds them to the set.
+
+ * Returns true if the string was found
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapCloser.html#method.add_string_case_closure_to Rust documentation for `add_string_case_closure_to`} for more information.
+ */
+ add_string_case_closure_to(s: string, builder: ICU4XCodePointSetBuilder): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js
new file mode 100644
index 0000000000..1d908278be
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapCloser.js
@@ -0,0 +1,46 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCaseMapCloser_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCaseMapCloser_destroy(underlying);
+});
+
+export class ICU4XCaseMapCloser {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCaseMapCloser_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapCloser_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCaseMapCloser(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ add_case_closure_to(arg_c, arg_builder) {
+ wasm.ICU4XCaseMapCloser_add_case_closure_to(this.underlying, diplomatRuntime.extractCodePoint(arg_c, 'arg_c'), arg_builder.underlying);
+ }
+
+ add_string_case_closure_to(arg_s, arg_builder) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XCaseMapCloser_add_string_case_closure_to(this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_builder.underlying);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts
new file mode 100644
index 0000000000..eb472c809b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.d.ts
@@ -0,0 +1,134 @@
+import { char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCodePointSetBuilder } from "./ICU4XCodePointSetBuilder";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTitlecaseOptionsV1 } from "./ICU4XTitlecaseOptionsV1";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html Rust documentation for `CaseMapper`} for more information.
+ */
+export class ICU4XCaseMapper {
+
+ /**
+
+ * Construct a new ICU4XCaseMapper instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XCaseMapper | never;
+
+ /**
+
+ * Returns the full lowercase mapping of the given string
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.lowercase Rust documentation for `lowercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ lowercase(s: string, locale: ICU4XLocale): string | never;
+
+ /**
+
+ * Returns the full uppercase mapping of the given string
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.uppercase Rust documentation for `uppercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ uppercase(s: string, locale: ICU4XLocale): string | never;
+
+ /**
+
+ * Returns the full titlecase mapping of the given string, performing head adjustment without loading additional data. (if head adjustment is enabled in the options)
+
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.titlecase_segment_with_only_case_data Rust documentation for `titlecase_segment_with_only_case_data`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ titlecase_segment_with_only_case_data_v1(s: string, locale: ICU4XLocale, options: ICU4XTitlecaseOptionsV1): string | never;
+
+ /**
+
+ * Case-folds the characters in the given string
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold Rust documentation for `fold`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fold(s: string): string | never;
+
+ /**
+
+ * Case-folds the characters in the given string using Turkic (T) mappings for dotted/dotless I.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.fold_turkic Rust documentation for `fold_turkic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fold_turkic(s: string): string | never;
+
+ /**
+
+ * Adds all simple case mappings and the full case folding for `c` to `builder`. Also adds special case closure mappings.
+
+ * In other words, this adds all characters that this casemaps to, as well as all characters that may casemap to this one.
+
+ * Note that since ICU4XCodePointSetBuilder does not contain strings, this will ignore string mappings.
+
+ * Identical to the similarly named method on `ICU4XCaseMapCloser`, use that if you plan on using string case closure mappings too.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.add_case_closure_to Rust documentation for `add_case_closure_to`} for more information.
+ */
+ add_case_closure_to(c: char, builder: ICU4XCodePointSetBuilder): void;
+
+ /**
+
+ * Returns the simple lowercase mapping of the given character.
+
+ * This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use `ICU4XCaseMapper::lowercase`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_lowercase Rust documentation for `simple_lowercase`} for more information.
+ */
+ simple_lowercase(ch: char): char;
+
+ /**
+
+ * Returns the simple uppercase mapping of the given character.
+
+ * This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use `ICU4XCaseMapper::uppercase`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_uppercase Rust documentation for `simple_uppercase`} for more information.
+ */
+ simple_uppercase(ch: char): char;
+
+ /**
+
+ * Returns the simple titlecase mapping of the given character.
+
+ * This function only implements simple and common mappings. Full mappings, which can map one char to a string, are not included. For full mappings, use `ICU4XCaseMapper::titlecase_segment`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_titlecase Rust documentation for `simple_titlecase`} for more information.
+ */
+ simple_titlecase(ch: char): char;
+
+ /**
+
+ * Returns the simple casefolding of the given character.
+
+ * This function only implements simple folding. For full folding, use `ICU4XCaseMapper::fold`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold Rust documentation for `simple_fold`} for more information.
+ */
+ simple_fold(ch: char): char;
+
+ /**
+
+ * Returns the simple casefolding of the given character in the Turkic locale
+
+ * This function only implements simple folding. For full folding, use `ICU4XCaseMapper::fold_turkic`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.CaseMapper.html#method.simple_fold_turkic Rust documentation for `simple_fold_turkic`} for more information.
+ */
+ simple_fold_turkic(ch: char): char;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCaseMapper.js b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.js
new file mode 100644
index 0000000000..b6bf60bdda
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCaseMapper.js
@@ -0,0 +1,173 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.js"
+import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.js"
+
+const ICU4XCaseMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCaseMapper_destroy(underlying);
+});
+
+export class ICU4XCaseMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCaseMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCaseMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ lowercase(arg_s, arg_locale) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_lowercase(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ uppercase(arg_s, arg_locale) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_uppercase(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ titlecase_segment_with_only_case_data_v1(arg_s, arg_locale, arg_options) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const field_leading_adjustment_arg_options = arg_options["leading_adjustment"];
+ const field_trailing_case_arg_options = arg_options["trailing_case"];
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_titlecase_segment_with_only_case_data_v1(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, ICU4XLeadingAdjustment_js_to_rust[field_leading_adjustment_arg_options], ICU4XTrailingCase_js_to_rust[field_trailing_case_arg_options], writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ fold(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_fold(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ fold_turkic(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCaseMapper_fold_turkic(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ add_case_closure_to(arg_c, arg_builder) {
+ wasm.ICU4XCaseMapper_add_case_closure_to(this.underlying, diplomatRuntime.extractCodePoint(arg_c, 'arg_c'), arg_builder.underlying);
+ }
+
+ simple_lowercase(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_lowercase(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_uppercase(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_uppercase(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_titlecase(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_titlecase(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_fold(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_fold(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ simple_fold_turkic(arg_ch) {
+ return wasm.ICU4XCaseMapper_simple_fold_turkic(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts
new file mode 100644
index 0000000000..2f6f39fa81
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.d.ts
@@ -0,0 +1,66 @@
+import { u16, u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ * For properties whose values fit into 16 bits.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html Rust documentation for `CodePointMapData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html Rust documentation for `CodePointMapDataBorrowed`} for more information.
+ */
+export class ICU4XCodePointMapData16 {
+
+ /**
+
+ * Gets the value for a code point.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(cp: char): u16;
+
+ /**
+
+ * Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ */
+ get32(cp: u32): u16;
+
+ /**
+
+ * Produces an iterator over ranges of code points that map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value Rust documentation for `iter_ranges_for_value`} for more information.
+ */
+ iter_ranges_for_value(value: u16): CodePointRangeIterator;
+
+ /**
+
+ * Produces an iterator over ranges of code points that do not map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented Rust documentation for `iter_ranges_for_value_complemented`} for more information.
+ */
+ iter_ranges_for_value_complemented(value: u16): CodePointRangeIterator;
+
+ /**
+
+ * Gets a {@link ICU4XCodePointSetData `ICU4XCodePointSetData`} representing all entries in this map that map to the given value
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value Rust documentation for `get_set_for_value`} for more information.
+ */
+ get_set_for_value(value: u16): ICU4XCodePointSetData;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.script.html Rust documentation for `script`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_script(provider: ICU4XDataProvider): ICU4XCodePointMapData16 | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js
new file mode 100644
index 0000000000..cbdb61da45
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData16.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCodePointMapData16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointMapData16_destroy(underlying);
+});
+
+export class ICU4XCodePointMapData16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointMapData16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get(arg_cp) {
+ return wasm.ICU4XCodePointMapData16_get(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ get32(arg_cp) {
+ return wasm.ICU4XCodePointMapData16_get32(this.underlying, arg_cp);
+ }
+
+ iter_ranges_for_value(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData16_iter_ranges_for_value(this.underlying, arg_value), true, [this]);
+ }
+
+ iter_ranges_for_value_complemented(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData16_iter_ranges_for_value_complemented(this.underlying, arg_value), true, [this]);
+ }
+
+ get_set_for_value(arg_value) {
+ return new ICU4XCodePointSetData(wasm.ICU4XCodePointMapData16_get_set_for_value(this.underlying, arg_value), true, []);
+ }
+
+ static load_script(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData16_load_script(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData16(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts
new file mode 100644
index 0000000000..700695044e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.d.ts
@@ -0,0 +1,137 @@
+import { u8, u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property.
+
+ * For properties whose values fit into 8 bits.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html Rust documentation for `CodePointMapData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html Rust documentation for `CodePointMapDataBorrowed`} for more information.
+ */
+export class ICU4XCodePointMapData8 {
+
+ /**
+
+ * Gets the value for a code point.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(cp: char): u8;
+
+ /**
+
+ * Gets the value for a code point (specified as a 32 bit integer, in UTF-32)
+ */
+ get32(cp: u32): u8;
+
+ /**
+
+ * Converts a general category to its corresponding mask value
+
+ * Nonexistant general categories will map to the empty mask
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html Rust documentation for `GeneralCategoryGroup`} for more information.
+ */
+ static general_category_to_mask(gc: u8): u32;
+
+ /**
+
+ * Produces an iterator over ranges of code points that map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value Rust documentation for `iter_ranges_for_value`} for more information.
+ */
+ iter_ranges_for_value(value: u8): CodePointRangeIterator;
+
+ /**
+
+ * Produces an iterator over ranges of code points that do not map to `value`
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented Rust documentation for `iter_ranges_for_value_complemented`} for more information.
+ */
+ iter_ranges_for_value_complemented(value: u8): CodePointRangeIterator;
+
+ /**
+
+ * Given a mask value (the nth bit marks property value = n), produce an iterator over ranges of code points whose property values are contained in the mask.
+
+ * The main mask property supported is that for General_Category, which can be obtained via `general_category_to_mask()` or by using `ICU4XGeneralCategoryNameToMaskMapper`
+
+ * Should only be used on maps for properties with values less than 32 (like Generak_Category), other maps will have unpredictable results
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_group Rust documentation for `iter_ranges_for_group`} for more information.
+ */
+ iter_ranges_for_mask(mask: u32): CodePointRangeIterator;
+
+ /**
+
+ * Gets a {@link ICU4XCodePointSetData `ICU4XCodePointSetData`} representing all entries in this map that map to the given value
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value Rust documentation for `get_set_for_value`} for more information.
+ */
+ get_set_for_value(value: u8): ICU4XCodePointSetData;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.general_category.html Rust documentation for `general_category`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_general_category(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.bidi_class.html Rust documentation for `bidi_class`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_class(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.east_asian_width.html Rust documentation for `east_asian_width`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_east_asian_width(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.indic_syllabic_category.html Rust documentation for `indic_syllabic_category`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_indic_syllabic_category(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.line_break.html Rust documentation for `line_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_line_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.grapheme_cluster_break.html Rust documentation for `grapheme_cluster_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static try_grapheme_cluster_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.word_break.html Rust documentation for `word_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_word_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.sentence_break.html Rust documentation for `sentence_break`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_sentence_break(provider: ICU4XDataProvider): ICU4XCodePointMapData8 | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js
new file mode 100644
index 0000000000..4af999f4be
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointMapData8.js
@@ -0,0 +1,184 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCodePointMapData8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointMapData8_destroy(underlying);
+});
+
+export class ICU4XCodePointMapData8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointMapData8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get(arg_cp) {
+ return wasm.ICU4XCodePointMapData8_get(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ get32(arg_cp) {
+ return wasm.ICU4XCodePointMapData8_get32(this.underlying, arg_cp);
+ }
+
+ static general_category_to_mask(arg_gc) {
+ return wasm.ICU4XCodePointMapData8_general_category_to_mask(arg_gc);
+ }
+
+ iter_ranges_for_value(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData8_iter_ranges_for_value(this.underlying, arg_value), true, [this]);
+ }
+
+ iter_ranges_for_value_complemented(arg_value) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData8_iter_ranges_for_value_complemented(this.underlying, arg_value), true, [this]);
+ }
+
+ iter_ranges_for_mask(arg_mask) {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointMapData8_iter_ranges_for_mask(this.underlying, arg_mask), true, [this]);
+ }
+
+ get_set_for_value(arg_value) {
+ return new ICU4XCodePointSetData(wasm.ICU4XCodePointMapData8_get_set_for_value(this.underlying, arg_value), true, []);
+ }
+
+ static load_general_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_general_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_class(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_bidi_class(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_east_asian_width(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_east_asian_width(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_indic_syllabic_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_indic_syllabic_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_line_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_line_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static try_grapheme_cluster_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_try_grapheme_cluster_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_word_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_word_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_sentence_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointMapData8_load_sentence_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointMapData8(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts
new file mode 100644
index 0000000000..16dd9c829c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.d.ts
@@ -0,0 +1,163 @@
+import { u32, char } from "./diplomat-runtime"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html Rust documentation for `CodePointInversionListBuilder`} for more information.
+ */
+export class ICU4XCodePointSetBuilder {
+
+ /**
+
+ * Make a new set builder containing nothing
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.new Rust documentation for `new`} for more information.
+ */
+ static create(): ICU4XCodePointSetBuilder;
+
+ /**
+
+ * Build this into a set
+
+ * This object is repopulated with an empty builder
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.build Rust documentation for `build`} for more information.
+ */
+ build(): ICU4XCodePointSetData;
+
+ /**
+
+ * Complements this set
+
+ * (Elements in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement Rust documentation for `complement`} for more information.
+ */
+ complement(): void;
+
+ /**
+
+ * Returns whether this set is empty
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.is_empty Rust documentation for `is_empty`} for more information.
+ */
+ is_empty(): boolean;
+
+ /**
+
+ * Add a single character to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_char Rust documentation for `add_char`} for more information.
+ */
+ add_char(ch: char): void;
+
+ /**
+
+ * Add a single u32 value to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_u32 Rust documentation for `add_u32`} for more information.
+ */
+ add_u32(ch: u32): void;
+
+ /**
+
+ * Add an inclusive range of characters to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range Rust documentation for `add_range`} for more information.
+ */
+ add_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Add an inclusive range of u32s to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_range_u32 Rust documentation for `add_range_u32`} for more information.
+ */
+ add_inclusive_range_u32(start: u32, end: u32): void;
+
+ /**
+
+ * Add all elements that belong to the provided set to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.add_set Rust documentation for `add_set`} for more information.
+ */
+ add_set(data: ICU4XCodePointSetData): void;
+
+ /**
+
+ * Remove a single character to the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_char Rust documentation for `remove_char`} for more information.
+ */
+ remove_char(ch: char): void;
+
+ /**
+
+ * Remove an inclusive range of characters from the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_range Rust documentation for `remove_range`} for more information.
+ */
+ remove_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Remove all elements that belong to the provided set from the set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.remove_set Rust documentation for `remove_set`} for more information.
+ */
+ remove_set(data: ICU4XCodePointSetData): void;
+
+ /**
+
+ * Removes all elements from the set except a single character
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_char Rust documentation for `retain_char`} for more information.
+ */
+ retain_char(ch: char): void;
+
+ /**
+
+ * Removes all elements from the set except an inclusive range of characters f
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_range Rust documentation for `retain_range`} for more information.
+ */
+ retain_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Removes all elements from the set except all elements in the provided set
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.retain_set Rust documentation for `retain_set`} for more information.
+ */
+ retain_set(data: ICU4XCodePointSetData): void;
+
+ /**
+
+ * Complement a single character to the set
+
+ * (Characters which are in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_char Rust documentation for `complement_char`} for more information.
+ */
+ complement_char(ch: char): void;
+
+ /**
+
+ * Complement an inclusive range of characters from the set
+
+ * (Characters which are in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_range Rust documentation for `complement_range`} for more information.
+ */
+ complement_inclusive_range(start: char, end: char): void;
+
+ /**
+
+ * Complement all elements that belong to the provided set from the set
+
+ * (Characters which are in this set are removed and vice versa)
+
+ * See the {@link https://docs.rs/icu/latest/icu/collections/codepointinvlist/struct.CodePointInversionListBuilder.html#method.complement_set Rust documentation for `complement_set`} for more information.
+ */
+ complement_set(data: ICU4XCodePointSetData): void;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js
new file mode 100644
index 0000000000..0b4f7a1751
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetBuilder.js
@@ -0,0 +1,90 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+
+const ICU4XCodePointSetBuilder_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointSetBuilder_destroy(underlying);
+});
+
+export class ICU4XCodePointSetBuilder {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointSetBuilder_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create() {
+ return new ICU4XCodePointSetBuilder(wasm.ICU4XCodePointSetBuilder_create(), true, []);
+ }
+
+ build() {
+ return new ICU4XCodePointSetData(wasm.ICU4XCodePointSetBuilder_build(this.underlying), true, []);
+ }
+
+ complement() {
+ wasm.ICU4XCodePointSetBuilder_complement(this.underlying);
+ }
+
+ is_empty() {
+ return wasm.ICU4XCodePointSetBuilder_is_empty(this.underlying);
+ }
+
+ add_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_add_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ add_u32(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_add_u32(this.underlying, arg_ch);
+ }
+
+ add_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_add_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ add_inclusive_range_u32(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_add_inclusive_range_u32(this.underlying, arg_start, arg_end);
+ }
+
+ add_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_add_set(this.underlying, arg_data.underlying);
+ }
+
+ remove_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_remove_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ remove_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_remove_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ remove_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_remove_set(this.underlying, arg_data.underlying);
+ }
+
+ retain_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_retain_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ retain_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_retain_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ retain_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_retain_set(this.underlying, arg_data.underlying);
+ }
+
+ complement_char(arg_ch) {
+ wasm.ICU4XCodePointSetBuilder_complement_char(this.underlying, diplomatRuntime.extractCodePoint(arg_ch, 'arg_ch'));
+ }
+
+ complement_inclusive_range(arg_start, arg_end) {
+ wasm.ICU4XCodePointSetBuilder_complement_inclusive_range(this.underlying, diplomatRuntime.extractCodePoint(arg_start, 'arg_start'), diplomatRuntime.extractCodePoint(arg_end, 'arg_end'));
+ }
+
+ complement_set(arg_data) {
+ wasm.ICU4XCodePointSetBuilder_complement_set(this.underlying, arg_data.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts
new file mode 100644
index 0000000000..38e9818426
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.d.ts
@@ -0,0 +1,523 @@
+import { u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetData.html Rust documentation for `CodePointSetData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html Rust documentation for `CodePointSetDataBorrowed`} for more information.
+ */
+export class ICU4XCodePointSetData {
+
+ /**
+
+ * Checks whether the code point is in the set.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.contains Rust documentation for `contains`} for more information.
+ */
+ contains(cp: char): boolean;
+
+ /**
+
+ * Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ */
+ contains32(cp: u32): boolean;
+
+ /**
+
+ * Produces an iterator over ranges of code points contained in this set
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges Rust documentation for `iter_ranges`} for more information.
+ */
+ iter_ranges(): CodePointRangeIterator;
+
+ /**
+
+ * Produces an iterator over ranges of code points not contained in this set
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.CodePointSetDataBorrowed.html#method.iter_ranges_complemented Rust documentation for `iter_ranges_complemented`} for more information.
+ */
+ iter_ranges_complemented(): CodePointRangeIterator;
+
+ /**
+
+ * which is a mask with the same format as the `U_GC_XX_MASK` mask in ICU4C
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.for_general_category_group.html Rust documentation for `for_general_category_group`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_for_general_category_group(provider: ICU4XDataProvider, group: u32): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ascii_hex_digit.html Rust documentation for `ascii_hex_digit`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ascii_hex_digit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.alnum.html Rust documentation for `alnum`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_alnum(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.alphabetic.html Rust documentation for `alphabetic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_alphabetic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_control.html Rust documentation for `bidi_control`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_control(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.bidi_mirrored.html Rust documentation for `bidi_mirrored`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_mirrored(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.blank.html Rust documentation for `blank`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_blank(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.cased.html Rust documentation for `cased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_cased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.case_ignorable.html Rust documentation for `case_ignorable`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_case_ignorable(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.full_composition_exclusion.html Rust documentation for `full_composition_exclusion`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_full_composition_exclusion(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casefolded.html Rust documentation for `changes_when_casefolded`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_casefolded(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_casemapped.html Rust documentation for `changes_when_casemapped`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_casemapped(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_nfkc_casefolded.html Rust documentation for `changes_when_nfkc_casefolded`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_nfkc_casefolded(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_lowercased.html Rust documentation for `changes_when_lowercased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_lowercased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_titlecased.html Rust documentation for `changes_when_titlecased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_titlecased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.changes_when_uppercased.html Rust documentation for `changes_when_uppercased`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_changes_when_uppercased(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.dash.html Rust documentation for `dash`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_dash(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.deprecated.html Rust documentation for `deprecated`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_deprecated(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.default_ignorable_code_point.html Rust documentation for `default_ignorable_code_point`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_default_ignorable_code_point(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.diacritic.html Rust documentation for `diacritic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_diacritic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier_base.html Rust documentation for `emoji_modifier_base`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_modifier_base(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_component.html Rust documentation for `emoji_component`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_component(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_modifier.html Rust documentation for `emoji_modifier`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_modifier(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji.html Rust documentation for `emoji`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.emoji_presentation.html Rust documentation for `emoji_presentation`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_emoji_presentation(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.extender.html Rust documentation for `extender`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_extender(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.extended_pictographic.html Rust documentation for `extended_pictographic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_extended_pictographic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.graph.html Rust documentation for `graph`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_graph(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_base.html Rust documentation for `grapheme_base`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_base(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_extend.html Rust documentation for `grapheme_extend`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_extend(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.grapheme_link.html Rust documentation for `grapheme_link`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_link(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.hex_digit.html Rust documentation for `hex_digit`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_hex_digit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.hyphen.html Rust documentation for `hyphen`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_hyphen(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.id_continue.html Rust documentation for `id_continue`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_id_continue(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ideographic.html Rust documentation for `ideographic`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ideographic(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.id_start.html Rust documentation for `id_start`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_id_start(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ids_binary_operator.html Rust documentation for `ids_binary_operator`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ids_binary_operator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.ids_trinary_operator.html Rust documentation for `ids_trinary_operator`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_ids_trinary_operator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.join_control.html Rust documentation for `join_control`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_join_control(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.logical_order_exception.html Rust documentation for `logical_order_exception`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_logical_order_exception(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.lowercase.html Rust documentation for `lowercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_lowercase(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.math.html Rust documentation for `math`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_math(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.noncharacter_code_point.html Rust documentation for `noncharacter_code_point`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_noncharacter_code_point(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfc_inert.html Rust documentation for `nfc_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfc_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfd_inert.html Rust documentation for `nfd_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfd_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfkc_inert.html Rust documentation for `nfkc_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfkc_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.nfkd_inert.html Rust documentation for `nfkd_inert`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_nfkd_inert(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_syntax.html Rust documentation for `pattern_syntax`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_pattern_syntax(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.pattern_white_space.html Rust documentation for `pattern_white_space`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_pattern_white_space(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.prepended_concatenation_mark.html Rust documentation for `prepended_concatenation_mark`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_prepended_concatenation_mark(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.print.html Rust documentation for `print`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_print(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.quotation_mark.html Rust documentation for `quotation_mark`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_quotation_mark(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.radical.html Rust documentation for `radical`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_radical(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.regional_indicator.html Rust documentation for `regional_indicator`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_regional_indicator(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.soft_dotted.html Rust documentation for `soft_dotted`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_soft_dotted(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.segment_starter.html Rust documentation for `segment_starter`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_segment_starter(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.case_sensitive.html Rust documentation for `case_sensitive`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_case_sensitive(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.sentence_terminal.html Rust documentation for `sentence_terminal`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_sentence_terminal(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.terminal_punctuation.html Rust documentation for `terminal_punctuation`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_terminal_punctuation(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.unified_ideograph.html Rust documentation for `unified_ideograph`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_unified_ideograph(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.uppercase.html Rust documentation for `uppercase`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_uppercase(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.variation_selector.html Rust documentation for `variation_selector`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_variation_selector(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.white_space.html Rust documentation for `white_space`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_white_space(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xdigit.html Rust documentation for `xdigit`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_xdigit(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xid_continue.html Rust documentation for `xid_continue`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_xid_continue(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.xid_start.html Rust documentation for `xid_start`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_xid_start(provider: ICU4XDataProvider): ICU4XCodePointSetData | never;
+
+ /**
+
+ * Loads data for a property specified as a string as long as it is one of the {@link https://tc39.es/ecma262/#table-binary-unicode-properties ECMA-262 binary properties} (not including Any, ASCII, and Assigned pseudoproperties).
+
+ * Returns `ICU4XError::PropertyUnexpectedPropertyNameError` in case the string does not match any property in the list
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.for_ecma262.html Rust documentation for `for_ecma262`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_for_ecma262(provider: ICU4XDataProvider, property_name: string): ICU4XCodePointSetData | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js
new file mode 100644
index 0000000000..55a1605d4e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCodePointSetData.js
@@ -0,0 +1,1177 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCodePointSetData_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCodePointSetData_destroy(underlying);
+});
+
+export class ICU4XCodePointSetData {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCodePointSetData_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ contains(arg_cp) {
+ return wasm.ICU4XCodePointSetData_contains(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ contains32(arg_cp) {
+ return wasm.ICU4XCodePointSetData_contains32(this.underlying, arg_cp);
+ }
+
+ iter_ranges() {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointSetData_iter_ranges(this.underlying), true, [this]);
+ }
+
+ iter_ranges_complemented() {
+ return new CodePointRangeIterator(wasm.ICU4XCodePointSetData_iter_ranges_complemented(this.underlying), true, [this]);
+ }
+
+ static load_for_general_category_group(arg_provider, arg_group) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_for_general_category_group(diplomat_receive_buffer, arg_provider.underlying, arg_group);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ascii_hex_digit(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ascii_hex_digit(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_alnum(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_alnum(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_alphabetic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_alphabetic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_control(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_bidi_control(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_mirrored(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_bidi_mirrored(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_blank(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_blank(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_cased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_cased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_case_ignorable(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_case_ignorable(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_full_composition_exclusion(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_full_composition_exclusion(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_casefolded(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_casefolded(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_casemapped(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_casemapped(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_nfkc_casefolded(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_nfkc_casefolded(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_lowercased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_lowercased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_titlecased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_titlecased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_changes_when_uppercased(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_changes_when_uppercased(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_dash(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_dash(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_deprecated(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_deprecated(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_default_ignorable_code_point(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_default_ignorable_code_point(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_diacritic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_diacritic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_modifier_base(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_modifier_base(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_component(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_component(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_modifier(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_modifier(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_emoji_presentation(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_emoji_presentation(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_extender(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_extender(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_extended_pictographic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_extended_pictographic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_graph(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_graph(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_base(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_grapheme_base(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_extend(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_grapheme_extend(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_link(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_grapheme_link(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_hex_digit(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_hex_digit(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_hyphen(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_hyphen(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_id_continue(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_id_continue(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ideographic(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ideographic(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_id_start(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_id_start(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ids_binary_operator(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ids_binary_operator(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_ids_trinary_operator(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_ids_trinary_operator(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_join_control(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_join_control(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_logical_order_exception(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_logical_order_exception(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_lowercase(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_lowercase(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_math(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_math(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_noncharacter_code_point(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_noncharacter_code_point(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfc_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfc_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfd_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfd_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfkc_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfkc_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_nfkd_inert(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_nfkd_inert(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_pattern_syntax(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_pattern_syntax(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_pattern_white_space(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_pattern_white_space(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_prepended_concatenation_mark(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_prepended_concatenation_mark(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_print(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_print(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_quotation_mark(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_quotation_mark(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_radical(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_radical(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_regional_indicator(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_regional_indicator(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_soft_dotted(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_soft_dotted(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_segment_starter(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_segment_starter(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_case_sensitive(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_case_sensitive(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_sentence_terminal(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_sentence_terminal(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_terminal_punctuation(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_terminal_punctuation(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_unified_ideograph(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_unified_ideograph(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_uppercase(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_uppercase(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_variation_selector(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_variation_selector(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_white_space(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_white_space(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_xdigit(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_xdigit(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_xid_continue(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_xid_continue(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_xid_start(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_xid_start(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_for_ecma262(arg_provider, arg_property_name) {
+ const buf_arg_property_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_property_name);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCodePointSetData_load_for_ecma262(diplomat_receive_buffer, arg_provider.underlying, buf_arg_property_name.ptr, buf_arg_property_name.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCodePointSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_property_name.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollator.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollator.d.ts
new file mode 100644
index 0000000000..92e572493c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollator.d.ts
@@ -0,0 +1,50 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCollatorOptionsV1 } from "./ICU4XCollatorOptionsV1";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XOrdering } from "./ICU4XOrdering";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html Rust documentation for `Collator`} for more information.
+ */
+export class ICU4XCollator {
+
+ /**
+
+ * Construct a new Collator instance.
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_v1(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XCollatorOptionsV1): ICU4XCollator | never;
+
+ /**
+
+ * Compare potentially ill-formed UTF-8 strings.
+
+ * Ill-formed input is compared as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf8 Rust documentation for `compare_utf8`} for more information.
+ */
+ compare(left: string, right: string): ICU4XOrdering;
+
+ /**
+
+ * Compare guaranteed well-formed UTF-8 strings.
+
+ * Note: In C++, passing ill-formed UTF-8 strings is undefined behavior (and may be memory-unsafe to do so, too).
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare Rust documentation for `compare`} for more information.
+ */
+ compare_valid_utf8(left: string, right: string): ICU4XOrdering;
+
+ /**
+
+ * Compare potentially ill-formed UTF-16 strings, with unpaired surrogates compared as REPLACEMENT CHARACTER.
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.Collator.html#method.compare_utf16 Rust documentation for `compare_utf16`} for more information.
+ */
+ compare_utf16(left: Uint16Array, right: Uint16Array): ICU4XOrdering;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollator.js b/intl/icu_capi/js/package/lib/ICU4XCollator.js
new file mode 100644
index 0000000000..5fc796cbd2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollator.js
@@ -0,0 +1,77 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCollatorAlternateHandling_js_to_rust, ICU4XCollatorAlternateHandling_rust_to_js } from "./ICU4XCollatorAlternateHandling.js"
+import { ICU4XCollatorBackwardSecondLevel_js_to_rust, ICU4XCollatorBackwardSecondLevel_rust_to_js } from "./ICU4XCollatorBackwardSecondLevel.js"
+import { ICU4XCollatorCaseFirst_js_to_rust, ICU4XCollatorCaseFirst_rust_to_js } from "./ICU4XCollatorCaseFirst.js"
+import { ICU4XCollatorCaseLevel_js_to_rust, ICU4XCollatorCaseLevel_rust_to_js } from "./ICU4XCollatorCaseLevel.js"
+import { ICU4XCollatorMaxVariable_js_to_rust, ICU4XCollatorMaxVariable_rust_to_js } from "./ICU4XCollatorMaxVariable.js"
+import { ICU4XCollatorNumeric_js_to_rust, ICU4XCollatorNumeric_rust_to_js } from "./ICU4XCollatorNumeric.js"
+import { ICU4XCollatorStrength_js_to_rust, ICU4XCollatorStrength_rust_to_js } from "./ICU4XCollatorStrength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XOrdering_js_to_rust, ICU4XOrdering_rust_to_js } from "./ICU4XOrdering.js"
+
+const ICU4XCollator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCollator_destroy(underlying);
+});
+
+export class ICU4XCollator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCollator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_v1(arg_provider, arg_locale, arg_options) {
+ const field_strength_arg_options = arg_options["strength"];
+ const field_alternate_handling_arg_options = arg_options["alternate_handling"];
+ const field_case_first_arg_options = arg_options["case_first"];
+ const field_max_variable_arg_options = arg_options["max_variable"];
+ const field_case_level_arg_options = arg_options["case_level"];
+ const field_numeric_arg_options = arg_options["numeric"];
+ const field_backward_second_level_arg_options = arg_options["backward_second_level"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCollator_create_v1(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XCollatorStrength_js_to_rust[field_strength_arg_options], ICU4XCollatorAlternateHandling_js_to_rust[field_alternate_handling_arg_options], ICU4XCollatorCaseFirst_js_to_rust[field_case_first_arg_options], ICU4XCollatorMaxVariable_js_to_rust[field_max_variable_arg_options], ICU4XCollatorCaseLevel_js_to_rust[field_case_level_arg_options], ICU4XCollatorNumeric_js_to_rust[field_numeric_arg_options], ICU4XCollatorBackwardSecondLevel_js_to_rust[field_backward_second_level_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCollator(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ compare(arg_left, arg_right) {
+ const buf_arg_left = diplomatRuntime.DiplomatBuf.str(wasm, arg_left);
+ const buf_arg_right = diplomatRuntime.DiplomatBuf.str(wasm, arg_right);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XCollator_compare(this.underlying, buf_arg_left.ptr, buf_arg_left.size, buf_arg_right.ptr, buf_arg_right.size)];
+ buf_arg_left.free();
+ buf_arg_right.free();
+ return diplomat_out;
+ }
+
+ compare_valid_utf8(arg_left, arg_right) {
+ const buf_arg_left = diplomatRuntime.DiplomatBuf.str(wasm, arg_left);
+ const buf_arg_right = diplomatRuntime.DiplomatBuf.str(wasm, arg_right);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XCollator_compare_valid_utf8(this.underlying, buf_arg_left.ptr, buf_arg_left.size, buf_arg_right.ptr, buf_arg_right.size)];
+ buf_arg_left.free();
+ buf_arg_right.free();
+ return diplomat_out;
+ }
+
+ compare_utf16(arg_left, arg_right) {
+ const buf_arg_left = diplomatRuntime.DiplomatBuf.slice(wasm, arg_left, 2);
+ const buf_arg_right = diplomatRuntime.DiplomatBuf.slice(wasm, arg_right, 2);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XCollator_compare_utf16(this.underlying, buf_arg_left.ptr, buf_arg_left.size, buf_arg_right.ptr, buf_arg_right.size)];
+ buf_arg_left.free();
+ buf_arg_right.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts
new file mode 100644
index 0000000000..9e84343353
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.AlternateHandling.html Rust documentation for `AlternateHandling`} for more information.
+ */
+export enum ICU4XCollatorAlternateHandling {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ NonIgnorable = 'NonIgnorable',
+ /**
+ */
+ Shifted = 'Shifted',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js
new file mode 100644
index 0000000000..5046750815
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorAlternateHandling.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorAlternateHandling_js_to_rust = {
+ "Auto": 0,
+ "NonIgnorable": 1,
+ "Shifted": 2,
+};
+
+export const ICU4XCollatorAlternateHandling_rust_to_js = {
+ [0]: "Auto",
+ [1]: "NonIgnorable",
+ [2]: "Shifted",
+};
+
+export const ICU4XCollatorAlternateHandling = {
+ "Auto": "Auto",
+ "NonIgnorable": "NonIgnorable",
+ "Shifted": "Shifted",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts
new file mode 100644
index 0000000000..6dc06e7e2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.BackwardSecondLevel.html Rust documentation for `BackwardSecondLevel`} for more information.
+ */
+export enum ICU4XCollatorBackwardSecondLevel {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ On = 'On',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js
new file mode 100644
index 0000000000..825b3d200c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorBackwardSecondLevel.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorBackwardSecondLevel_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "On": 2,
+};
+
+export const ICU4XCollatorBackwardSecondLevel_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "On",
+};
+
+export const ICU4XCollatorBackwardSecondLevel = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "On": "On",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts
new file mode 100644
index 0000000000..f72b75cfec
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.CaseFirst.html Rust documentation for `CaseFirst`} for more information.
+ */
+export enum ICU4XCollatorCaseFirst {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ LowerFirst = 'LowerFirst',
+ /**
+ */
+ UpperFirst = 'UpperFirst',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js
new file mode 100644
index 0000000000..b5c11fb4e8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseFirst.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorCaseFirst_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "LowerFirst": 2,
+ "UpperFirst": 3,
+};
+
+export const ICU4XCollatorCaseFirst_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "LowerFirst",
+ [3]: "UpperFirst",
+};
+
+export const ICU4XCollatorCaseFirst = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "LowerFirst": "LowerFirst",
+ "UpperFirst": "UpperFirst",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts
new file mode 100644
index 0000000000..3825eaeae0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.CaseLevel.html Rust documentation for `CaseLevel`} for more information.
+ */
+export enum ICU4XCollatorCaseLevel {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ On = 'On',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js
new file mode 100644
index 0000000000..aa0f747389
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorCaseLevel.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorCaseLevel_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "On": 2,
+};
+
+export const ICU4XCollatorCaseLevel_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "On",
+};
+
+export const ICU4XCollatorCaseLevel = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "On": "On",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts
new file mode 100644
index 0000000000..2605bbc450
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.d.ts
@@ -0,0 +1,22 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.MaxVariable.html Rust documentation for `MaxVariable`} for more information.
+ */
+export enum ICU4XCollatorMaxVariable {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Space = 'Space',
+ /**
+ */
+ Punctuation = 'Punctuation',
+ /**
+ */
+ Symbol = 'Symbol',
+ /**
+ */
+ Currency = 'Currency',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js
new file mode 100644
index 0000000000..6964c4812d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorMaxVariable.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorMaxVariable_js_to_rust = {
+ "Auto": 0,
+ "Space": 1,
+ "Punctuation": 2,
+ "Symbol": 3,
+ "Currency": 4,
+};
+
+export const ICU4XCollatorMaxVariable_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Space",
+ [2]: "Punctuation",
+ [3]: "Symbol",
+ [4]: "Currency",
+};
+
+export const ICU4XCollatorMaxVariable = {
+ "Auto": "Auto",
+ "Space": "Space",
+ "Punctuation": "Punctuation",
+ "Symbol": "Symbol",
+ "Currency": "Currency",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts
new file mode 100644
index 0000000000..884c71d62b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.Numeric.html Rust documentation for `Numeric`} for more information.
+ */
+export enum ICU4XCollatorNumeric {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Off = 'Off',
+ /**
+ */
+ On = 'On',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js
new file mode 100644
index 0000000000..8a5e5e1f58
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorNumeric.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorNumeric_js_to_rust = {
+ "Auto": 0,
+ "Off": 1,
+ "On": 2,
+};
+
+export const ICU4XCollatorNumeric_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Off",
+ [2]: "On",
+};
+
+export const ICU4XCollatorNumeric = {
+ "Auto": "Auto",
+ "Off": "Off",
+ "On": "On",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts
new file mode 100644
index 0000000000..3306764cd4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.d.ts
@@ -0,0 +1,21 @@
+import { ICU4XCollatorAlternateHandling } from "./ICU4XCollatorAlternateHandling";
+import { ICU4XCollatorBackwardSecondLevel } from "./ICU4XCollatorBackwardSecondLevel";
+import { ICU4XCollatorCaseFirst } from "./ICU4XCollatorCaseFirst";
+import { ICU4XCollatorCaseLevel } from "./ICU4XCollatorCaseLevel";
+import { ICU4XCollatorMaxVariable } from "./ICU4XCollatorMaxVariable";
+import { ICU4XCollatorNumeric } from "./ICU4XCollatorNumeric";
+import { ICU4XCollatorStrength } from "./ICU4XCollatorStrength";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/struct.CollatorOptions.html Rust documentation for `CollatorOptions`} for more information.
+ */
+export class ICU4XCollatorOptionsV1 {
+ strength: ICU4XCollatorStrength;
+ alternate_handling: ICU4XCollatorAlternateHandling;
+ case_first: ICU4XCollatorCaseFirst;
+ max_variable: ICU4XCollatorMaxVariable;
+ case_level: ICU4XCollatorCaseLevel;
+ numeric: ICU4XCollatorNumeric;
+ backward_second_level: ICU4XCollatorBackwardSecondLevel;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js
new file mode 100644
index 0000000000..5be95f5955
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorOptionsV1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCollatorAlternateHandling_js_to_rust, ICU4XCollatorAlternateHandling_rust_to_js } from "./ICU4XCollatorAlternateHandling.js"
+import { ICU4XCollatorBackwardSecondLevel_js_to_rust, ICU4XCollatorBackwardSecondLevel_rust_to_js } from "./ICU4XCollatorBackwardSecondLevel.js"
+import { ICU4XCollatorCaseFirst_js_to_rust, ICU4XCollatorCaseFirst_rust_to_js } from "./ICU4XCollatorCaseFirst.js"
+import { ICU4XCollatorCaseLevel_js_to_rust, ICU4XCollatorCaseLevel_rust_to_js } from "./ICU4XCollatorCaseLevel.js"
+import { ICU4XCollatorMaxVariable_js_to_rust, ICU4XCollatorMaxVariable_rust_to_js } from "./ICU4XCollatorMaxVariable.js"
+import { ICU4XCollatorNumeric_js_to_rust, ICU4XCollatorNumeric_rust_to_js } from "./ICU4XCollatorNumeric.js"
+import { ICU4XCollatorStrength_js_to_rust, ICU4XCollatorStrength_rust_to_js } from "./ICU4XCollatorStrength.js"
+
+export class ICU4XCollatorOptionsV1 {
+ constructor(underlying) {
+ this.strength = ICU4XCollatorStrength_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.alternate_handling = ICU4XCollatorAlternateHandling_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.case_first = ICU4XCollatorCaseFirst_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 8)];
+ this.max_variable = ICU4XCollatorMaxVariable_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 12)];
+ this.case_level = ICU4XCollatorCaseLevel_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 16)];
+ this.numeric = ICU4XCollatorNumeric_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 20)];
+ this.backward_second_level = ICU4XCollatorBackwardSecondLevel_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 24)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts
new file mode 100644
index 0000000000..2f1ff28a60
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.d.ts
@@ -0,0 +1,25 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/collator/enum.Strength.html Rust documentation for `Strength`} for more information.
+ */
+export enum ICU4XCollatorStrength {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Primary = 'Primary',
+ /**
+ */
+ Secondary = 'Secondary',
+ /**
+ */
+ Tertiary = 'Tertiary',
+ /**
+ */
+ Quaternary = 'Quaternary',
+ /**
+ */
+ Identical = 'Identical',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js
new file mode 100644
index 0000000000..4a8ca99fd2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCollatorStrength.js
@@ -0,0 +1,29 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XCollatorStrength_js_to_rust = {
+ "Auto": 0,
+ "Primary": 1,
+ "Secondary": 2,
+ "Tertiary": 3,
+ "Quaternary": 4,
+ "Identical": 5,
+};
+
+export const ICU4XCollatorStrength_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Primary",
+ [2]: "Secondary",
+ [3]: "Tertiary",
+ [4]: "Quaternary",
+ [5]: "Identical",
+};
+
+export const ICU4XCollatorStrength = {
+ "Auto": "Auto",
+ "Primary": "Primary",
+ "Secondary": "Secondary",
+ "Tertiary": "Tertiary",
+ "Quaternary": "Quaternary",
+ "Identical": "Identical",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts
new file mode 100644
index 0000000000..7417e6257b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html Rust documentation for `ComposingNormalizer`} for more information.
+ */
+export class ICU4XComposingNormalizer {
+
+ /**
+
+ * Construct a new ICU4XComposingNormalizer instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfc Rust documentation for `new_nfc`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfc(provider: ICU4XDataProvider): ICU4XComposingNormalizer | never;
+
+ /**
+
+ * Construct a new ICU4XComposingNormalizer instance for NFKC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.new_nfkc Rust documentation for `new_nfkc`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfkc(provider: ICU4XDataProvider): ICU4XComposingNormalizer | never;
+
+ /**
+
+ * Normalize a (potentially ill-formed) UTF8 string
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.normalize_utf8 Rust documentation for `normalize_utf8`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ normalize(s: string): string | never;
+
+ /**
+
+ * Check if a (potentially ill-formed) UTF8 string is normalized
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.ComposingNormalizer.html#method.is_normalized_utf8 Rust documentation for `is_normalized_utf8`} for more information.
+ */
+ is_normalized(s: string): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js
new file mode 100644
index 0000000000..8793316b7a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XComposingNormalizer.js
@@ -0,0 +1,81 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XComposingNormalizer_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XComposingNormalizer_destroy(underlying);
+});
+
+export class ICU4XComposingNormalizer {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XComposingNormalizer_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_nfc(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XComposingNormalizer_create_nfc(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XComposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_nfkc(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XComposingNormalizer_create_nfkc(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XComposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ normalize(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XComposingNormalizer_normalize(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ is_normalized(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XComposingNormalizer_is_normalized(this.underlying, buf_arg_s.ptr, buf_arg_s.size);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts
new file mode 100644
index 0000000000..290f7881ad
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.d.ts
@@ -0,0 +1,293 @@
+import { i32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIanaToBcp47Mapper } from "./ICU4XIanaToBcp47Mapper";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XMetazoneCalculator } from "./ICU4XMetazoneCalculator";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html Rust documentation for `CustomTimeZone`} for more information.
+ */
+export class ICU4XCustomTimeZone {
+
+ /**
+
+ * Creates a time zone from an offset string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.from_str Rust documentation for `from_str`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(s: string): ICU4XCustomTimeZone | never;
+
+ /**
+
+ * Creates a time zone with no information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.new_empty Rust documentation for `new_empty`} for more information.
+ */
+ static create_empty(): ICU4XCustomTimeZone;
+
+ /**
+
+ * Creates a time zone for UTC.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.utc Rust documentation for `utc`} for more information.
+ */
+ static create_utc(): ICU4XCustomTimeZone;
+
+ /**
+
+ * Sets the `gmt_offset` field from offset seconds.
+
+ * Errors if the offset seconds are out of range.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.try_from_offset_seconds Rust documentation for `try_from_offset_seconds`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_gmt_offset_seconds(offset_seconds: i32): void | never;
+
+ /**
+
+ * Clears the `gmt_offset` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds Rust documentation for `offset_seconds`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html 1}
+ */
+ clear_gmt_offset(): void;
+
+ /**
+
+ * Returns the value of the `gmt_offset` field as offset seconds.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.offset_seconds Rust documentation for `offset_seconds`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ gmt_offset_seconds(): i32 | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field is positive.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_positive Rust documentation for `is_positive`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_gmt_offset_positive(): boolean | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field is zero.
+
+ * Errors if the `gmt_offset` field is empty (which is not the same as zero).
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.is_zero Rust documentation for `is_zero`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_gmt_offset_zero(): boolean | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field has nonzero minutes.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_minutes Rust documentation for `has_minutes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ gmt_offset_has_minutes(): boolean | never;
+
+ /**
+
+ * Returns whether the `gmt_offset` field has nonzero seconds.
+
+ * Errors if the `gmt_offset` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.GmtOffset.html#method.has_seconds Rust documentation for `has_seconds`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ gmt_offset_has_seconds(): boolean | never;
+
+ /**
+
+ * Sets the `time_zone_id` field from a BCP-47 string.
+
+ * Errors if the string is not a valid BCP-47 time zone ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id Rust documentation for `time_zone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_time_zone_id(id: string): void | never;
+
+ /**
+
+ * Sets the `time_zone_id` field from an IANA string by looking up the corresponding BCP-47 string.
+
+ * Errors if the string is not a valid BCP-47 time zone ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47MapperBorrowed.html#method.get Rust documentation for `get`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_iana_time_zone_id(mapper: ICU4XIanaToBcp47Mapper, id: string): void | never;
+
+ /**
+
+ * Clears the `time_zone_id` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id Rust documentation for `time_zone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html 1}
+ */
+ clear_time_zone_id(): void;
+
+ /**
+
+ * Writes the value of the `time_zone_id` field as a string.
+
+ * Errors if the `time_zone_id` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.time_zone_id Rust documentation for `time_zone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneBcp47Id.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ time_zone_id(): string | never;
+
+ /**
+
+ * Sets the `metazone_id` field from a string.
+
+ * Errors if the string is not a valid BCP-47 metazone ID.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id Rust documentation for `metazone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_metazone_id(id: string): void | never;
+
+ /**
+
+ * Clears the `metazone_id` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id Rust documentation for `metazone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html 1}
+ */
+ clear_metazone_id(): void;
+
+ /**
+
+ * Writes the value of the `metazone_id` field as a string.
+
+ * Errors if the `metazone_id` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.metazone_id Rust documentation for `metazone_id`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneId.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ metazone_id(): string | never;
+
+ /**
+
+ * Sets the `zone_variant` field from a string.
+
+ * Errors if the string is not a valid zone variant.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant Rust documentation for `zone_variant`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ try_set_zone_variant(id: string): void | never;
+
+ /**
+
+ * Clears the `zone_variant` field.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant Rust documentation for `zone_variant`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html 1}
+ */
+ clear_zone_variant(): void;
+
+ /**
+
+ * Writes the value of the `zone_variant` field as a string.
+
+ * Errors if the `zone_variant` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant Rust documentation for `zone_variant`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ zone_variant(): string | never;
+
+ /**
+
+ * Sets the `zone_variant` field to standard time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard Rust documentation for `standard`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ */
+ set_standard_time(): void;
+
+ /**
+
+ * Sets the `zone_variant` field to daylight time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight Rust documentation for `daylight`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ */
+ set_daylight_time(): void;
+
+ /**
+
+ * Returns whether the `zone_variant` field is standard time.
+
+ * Errors if the `zone_variant` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.standard Rust documentation for `standard`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_standard_time(): boolean | never;
+
+ /**
+
+ * Returns whether the `zone_variant` field is daylight time.
+
+ * Errors if the `zone_variant` field is empty.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.ZoneVariant.html#method.daylight Rust documentation for `daylight`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#structfield.zone_variant 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ is_daylight_time(): boolean | never;
+
+ /**
+
+ * Sets the metazone based on the time zone and the local timestamp.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.CustomTimeZone.html#method.maybe_calculate_metazone Rust documentation for `maybe_calculate_metazone`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.compute_metazone_from_time_zone 1}
+ */
+ maybe_calculate_metazone(metazone_calculator: ICU4XMetazoneCalculator, local_datetime: ICU4XIsoDateTime): void;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js
new file mode 100644
index 0000000000..615f0b2ea8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XCustomTimeZone.js
@@ -0,0 +1,347 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XCustomTimeZone_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XCustomTimeZone_destroy(underlying);
+});
+
+export class ICU4XCustomTimeZone {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XCustomTimeZone_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_string(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_create_from_string(diplomat_receive_buffer, buf_arg_s.ptr, buf_arg_s.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XCustomTimeZone(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ static create_empty() {
+ return new ICU4XCustomTimeZone(wasm.ICU4XCustomTimeZone_create_empty(), true, []);
+ }
+
+ static create_utc() {
+ return new ICU4XCustomTimeZone(wasm.ICU4XCustomTimeZone_create_utc(), true, []);
+ }
+
+ try_set_gmt_offset_seconds(arg_offset_seconds) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_gmt_offset_seconds(diplomat_receive_buffer, this.underlying, arg_offset_seconds);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ clear_gmt_offset() {
+ wasm.ICU4XCustomTimeZone_clear_gmt_offset(this.underlying);
+ }
+
+ gmt_offset_seconds() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_gmt_offset_seconds(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Int32Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ is_gmt_offset_positive() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_gmt_offset_positive(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ is_gmt_offset_zero() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_gmt_offset_zero(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ gmt_offset_has_minutes() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_gmt_offset_has_minutes(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ gmt_offset_has_seconds() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_gmt_offset_has_seconds(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ try_set_time_zone_id(arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_time_zone_id(diplomat_receive_buffer, this.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ try_set_iana_time_zone_id(arg_mapper, arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_iana_time_zone_id(diplomat_receive_buffer, this.underlying, arg_mapper.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ clear_time_zone_id() {
+ wasm.ICU4XCustomTimeZone_clear_time_zone_id(this.underlying);
+ }
+
+ time_zone_id() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_time_zone_id(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ try_set_metazone_id(arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_metazone_id(diplomat_receive_buffer, this.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ clear_metazone_id() {
+ wasm.ICU4XCustomTimeZone_clear_metazone_id(this.underlying);
+ }
+
+ metazone_id() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_metazone_id(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ try_set_zone_variant(arg_id) {
+ const buf_arg_id = diplomatRuntime.DiplomatBuf.str(wasm, arg_id);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_try_set_zone_variant(diplomat_receive_buffer, this.underlying, buf_arg_id.ptr, buf_arg_id.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_id.free();
+ return diplomat_out;
+ }
+
+ clear_zone_variant() {
+ wasm.ICU4XCustomTimeZone_clear_zone_variant(this.underlying);
+ }
+
+ zone_variant() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_zone_variant(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_standard_time() {
+ wasm.ICU4XCustomTimeZone_set_standard_time(this.underlying);
+ }
+
+ set_daylight_time() {
+ wasm.ICU4XCustomTimeZone_set_daylight_time(this.underlying);
+ }
+
+ is_standard_time() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_standard_time(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ is_daylight_time() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XCustomTimeZone_is_daylight_time(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = (new Uint8Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0] == 1;
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ maybe_calculate_metazone(arg_metazone_calculator, arg_local_datetime) {
+ wasm.ICU4XCustomTimeZone_maybe_calculate_metazone(this.underlying, arg_metazone_calculator.underlying, arg_local_datetime.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts b/intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts
new file mode 100644
index 0000000000..88bc5902da
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataProvider.d.ts
@@ -0,0 +1,100 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocaleFallbacker } from "./ICU4XLocaleFallbacker";
+
+/**
+
+ * An ICU4X data provider, capable of loading ICU4X data keys from some source.
+
+ * See the {@link https://docs.rs/icu_provider/latest/icu_provider/index.html Rust documentation for `icu_provider`} for more information.
+ */
+export class ICU4XDataProvider {
+
+ /**
+
+ * Constructs an {@link ICU4XDataProvider `ICU4XDataProvider`} that uses compiled data.
+
+ * Requires the `compiled_data` feature.
+
+ * This provider cannot be modified or combined with other providers, so `enable_fallback`, `enabled_fallback_with`, `fork_by_locale`, and `fork_by_key` will return `Err`s.
+ */
+ static create_compiled(): ICU4XDataProvider;
+
+ /**
+
+ * Constructs an `FsDataProvider` and returns it as an {@link ICU4XDataProvider `ICU4XDataProvider`}. Requires the `provider_fs` Cargo feature. Not supported in WASM.
+
+ * See the {@link https://docs.rs/icu_provider_fs/latest/icu_provider_fs/struct.FsDataProvider.html Rust documentation for `FsDataProvider`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_fs(path: string): ICU4XDataProvider | never;
+
+ /**
+
+ * Deprecated
+
+ * Use `create_compiled()`.
+ */
+ static create_test(): ICU4XDataProvider;
+
+ /**
+
+ * Constructs a `BlobDataProvider` and returns it as an {@link ICU4XDataProvider `ICU4XDataProvider`}.
+
+ * See the {@link https://docs.rs/icu_provider_blob/latest/icu_provider_blob/struct.BlobDataProvider.html Rust documentation for `BlobDataProvider`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_byte_slice(blob: Uint8Array): ICU4XDataProvider | never;
+
+ /**
+
+ * Constructs an empty {@link ICU4XDataProvider `ICU4XDataProvider`}.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/empty/struct.EmptyDataProvider.html Rust documentation for `EmptyDataProvider`} for more information.
+ */
+ static create_empty(): ICU4XDataProvider;
+
+ /**
+
+ * Creates a provider that tries the current provider and then, if the current provider doesn't support the data key, another provider `other`.
+
+ * This takes ownership of the `other` provider, leaving an empty provider in its place.
+
+ * The providers must be the same type (Any or Buffer). This condition is satisfied if both providers originate from the same constructor, such as `create_from_byte_slice` or `create_fs`. If the condition is not upheld, a runtime error occurs.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/type.ForkByKeyProvider.html Rust documentation for `ForkByKeyProvider`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fork_by_key(other: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Same as `fork_by_key` but forks by locale instead of key.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fork/predicates/struct.MissingLocalePredicate.html Rust documentation for `MissingLocalePredicate`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ fork_by_locale(other: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Enables locale fallbacking for data requests made to this provider.
+
+ * Note that the test provider (from `create_test`) already has fallbacking enabled.
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.try_new Rust documentation for `try_new`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ enable_locale_fallback(): void | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html#method.new_with_fallbacker Rust documentation for `new_with_fallbacker`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu_provider_adapters/latest/icu_provider_adapters/fallback/struct.LocaleFallbackProvider.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ enable_locale_fallback_with(fallbacker: ICU4XLocaleFallbacker): void | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataProvider.js b/intl/icu_capi/js/package/lib/ICU4XDataProvider.js
new file mode 100644
index 0000000000..93341c6d6f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataProvider.js
@@ -0,0 +1,138 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDataProvider_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDataProvider_destroy(underlying);
+});
+
+export class ICU4XDataProvider {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDataProvider_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_compiled() {
+ return new ICU4XDataProvider(wasm.ICU4XDataProvider_create_compiled(), true, []);
+ }
+
+ static create_fs(arg_path) {
+ const buf_arg_path = diplomatRuntime.DiplomatBuf.str(wasm, arg_path);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_create_fs(diplomat_receive_buffer, buf_arg_path.ptr, buf_arg_path.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDataProvider(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_path.free();
+ return diplomat_out;
+ }
+
+ static create_test() {
+ return new ICU4XDataProvider(wasm.ICU4XDataProvider_create_test(), true, []);
+ }
+
+ static create_from_byte_slice(arg_blob) {
+ const buf_arg_blob = diplomatRuntime.DiplomatBuf.slice(wasm, arg_blob, 1);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_create_from_byte_slice(diplomat_receive_buffer, buf_arg_blob.ptr, buf_arg_blob.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDataProvider(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_blob.leak();
+ return diplomat_out;
+ }
+
+ static create_empty() {
+ return new ICU4XDataProvider(wasm.ICU4XDataProvider_create_empty(), true, []);
+ }
+
+ fork_by_key(arg_other) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_fork_by_key(diplomat_receive_buffer, this.underlying, arg_other.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ fork_by_locale(arg_other) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_fork_by_locale(diplomat_receive_buffer, this.underlying, arg_other.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ enable_locale_fallback() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_enable_locale_fallback(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ enable_locale_fallback_with(arg_fallbacker) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataProvider_enable_locale_fallback_with(diplomat_receive_buffer, this.underlying, arg_fallbacker.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts b/intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts
new file mode 100644
index 0000000000..8d2464f40e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataStruct.d.ts
@@ -0,0 +1,23 @@
+import { u8 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * A generic data struct to be used by ICU4X
+
+ * This can be used to construct a StructDataProvider.
+ */
+export class ICU4XDataStruct {
+
+ /**
+
+ * Construct a new DecimalSymbolsV1 data struct.
+
+ * C++ users: All string arguments must be valid UTF8
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/provider/struct.DecimalSymbolsV1.html Rust documentation for `DecimalSymbolsV1`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_decimal_symbols_v1(plus_sign_prefix: string, plus_sign_suffix: string, minus_sign_prefix: string, minus_sign_suffix: string, decimal_separator: string, grouping_separator: string, primary_group_size: u8, secondary_group_size: u8, min_group_size: u8, digits: Uint32Array): ICU4XDataStruct | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDataStruct.js b/intl/icu_capi/js/package/lib/ICU4XDataStruct.js
new file mode 100644
index 0000000000..22bc10d69b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDataStruct.js
@@ -0,0 +1,50 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDataStruct_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDataStruct_destroy(underlying);
+});
+
+export class ICU4XDataStruct {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDataStruct_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_decimal_symbols_v1(arg_plus_sign_prefix, arg_plus_sign_suffix, arg_minus_sign_prefix, arg_minus_sign_suffix, arg_decimal_separator, arg_grouping_separator, arg_primary_group_size, arg_secondary_group_size, arg_min_group_size, arg_digits) {
+ const buf_arg_plus_sign_prefix = diplomatRuntime.DiplomatBuf.str(wasm, arg_plus_sign_prefix);
+ const buf_arg_plus_sign_suffix = diplomatRuntime.DiplomatBuf.str(wasm, arg_plus_sign_suffix);
+ const buf_arg_minus_sign_prefix = diplomatRuntime.DiplomatBuf.str(wasm, arg_minus_sign_prefix);
+ const buf_arg_minus_sign_suffix = diplomatRuntime.DiplomatBuf.str(wasm, arg_minus_sign_suffix);
+ const buf_arg_decimal_separator = diplomatRuntime.DiplomatBuf.str(wasm, arg_decimal_separator);
+ const buf_arg_grouping_separator = diplomatRuntime.DiplomatBuf.str(wasm, arg_grouping_separator);
+ const buf_arg_digits = diplomatRuntime.DiplomatBuf.slice(wasm, arg_digits, 4);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDataStruct_create_decimal_symbols_v1(diplomat_receive_buffer, buf_arg_plus_sign_prefix.ptr, buf_arg_plus_sign_prefix.size, buf_arg_plus_sign_suffix.ptr, buf_arg_plus_sign_suffix.size, buf_arg_minus_sign_prefix.ptr, buf_arg_minus_sign_prefix.size, buf_arg_minus_sign_suffix.ptr, buf_arg_minus_sign_suffix.size, buf_arg_decimal_separator.ptr, buf_arg_decimal_separator.size, buf_arg_grouping_separator.ptr, buf_arg_grouping_separator.size, arg_primary_group_size, arg_secondary_group_size, arg_min_group_size, buf_arg_digits.ptr, buf_arg_digits.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDataStruct(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_plus_sign_prefix.free();
+ buf_arg_plus_sign_suffix.free();
+ buf_arg_minus_sign_prefix.free();
+ buf_arg_minus_sign_suffix.free();
+ buf_arg_decimal_separator.free();
+ buf_arg_grouping_separator.free();
+ buf_arg_digits.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDate.d.ts b/intl/icu_capi/js/package/lib/ICU4XDate.d.ts
new file mode 100644
index 0000000000..10c752d139
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDate.d.ts
@@ -0,0 +1,156 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X Date object capable of containing a date and time for any calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html Rust documentation for `Date`} for more information.
+ */
+export class ICU4XDate {
+
+ /**
+
+ * Creates a new {@link ICU4XDate `ICU4XDate`} representing the ISO date and time given but in a given calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.new_from_iso Rust documentation for `new_from_iso`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_iso_in_calendar(year: i32, month: u8, day: u8, calendar: ICU4XCalendar): ICU4XDate | never;
+
+ /**
+
+ * Creates a new {@link ICU4XDate `ICU4XDate`} from the given codes, which are interpreted in the given calendar system
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_from_codes Rust documentation for `try_new_from_codes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_codes_in_calendar(era_code: string, year: i32, month_code: string, day: u8, calendar: ICU4XCalendar): ICU4XDate | never;
+
+ /**
+
+ * Convert this date to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDate;
+
+ /**
+
+ * Converts this date to ISO
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_iso Rust documentation for `to_iso`} for more information.
+ */
+ to_iso(): ICU4XIsoDate;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ ordinal_month(): u32;
+
+ /**
+
+ * Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ month_code(): string | never;
+
+ /**
+
+ * Returns the year number in the current era for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year_in_era(): i32;
+
+ /**
+
+ * Returns the era for this date,
+
+ * See the {@link https://docs.rs/icu/latest/icu/struct.Date.html#method.year Rust documentation for `year`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/types/struct.Era.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ era(): string | never;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+
+ /**
+
+ * Returns the {@link ICU4XCalendar `ICU4XCalendar`} object backing this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar Rust documentation for `calendar`} for more information.
+ */
+ calendar(): ICU4XCalendar;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDate.js b/intl/icu_capi/js/package/lib/ICU4XDate.js
new file mode 100644
index 0000000000..de7b646eb0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDate.js
@@ -0,0 +1,161 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCalendar } from "./ICU4XCalendar.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoDate } from "./ICU4XIsoDate.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XDate_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDate_destroy(underlying);
+});
+
+export class ICU4XDate {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDate_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_iso_in_calendar(arg_year, arg_month, arg_day, arg_calendar) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_create_from_iso_in_calendar(diplomat_receive_buffer, arg_year, arg_month, arg_day, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDate(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_codes_in_calendar(arg_era_code, arg_year, arg_month_code, arg_day, arg_calendar) {
+ const buf_arg_era_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_era_code);
+ const buf_arg_month_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_month_code);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_create_from_codes_in_calendar(diplomat_receive_buffer, buf_arg_era_code.ptr, buf_arg_era_code.size, arg_year, buf_arg_month_code.ptr, buf_arg_month_code.size, arg_day, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDate(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_era_code.free();
+ buf_arg_month_code.free();
+ return diplomat_out;
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDate(wasm.ICU4XDate_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ to_iso() {
+ return new ICU4XIsoDate(wasm.ICU4XDate_to_iso(this.underlying), true, []);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XDate_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XDate_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XDate_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XDate_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ ordinal_month() {
+ return wasm.ICU4XDate_ordinal_month(this.underlying);
+ }
+
+ month_code() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_month_code(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ year_in_era() {
+ return wasm.ICU4XDate_year_in_era(this.underlying);
+ }
+
+ era() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDate_era(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ months_in_year() {
+ return wasm.ICU4XDate_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XDate_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XDate_days_in_year(this.underlying);
+ }
+
+ calendar() {
+ return new ICU4XCalendar(wasm.ICU4XDate_calendar(this.underlying), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts
new file mode 100644
index 0000000000..eb2dbb2c39
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.d.ts
@@ -0,0 +1,67 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDate } from "./ICU4XDate";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X DateFormatter object capable of formatting a {@link ICU4XDate `ICU4XDate`} as a string, using some calendar specified at runtime in the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html Rust documentation for `DateFormatter`} for more information.
+ */
+export class ICU4XDateFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XDateFormatter `ICU4XDateFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.try_new_with_length Rust documentation for `try_new_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength): ICU4XDateFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XDate `ICU4XDate`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_date(value: ICU4XDate): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDate `ICU4XIsoDate`} to a string.
+
+ * Will convert to this formatter's calendar first
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_date(value: ICU4XIsoDate): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime(value: ICU4XDateTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * Will convert to this formatter's calendar first
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateFormatter.js b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.js
new file mode 100644
index 0000000000..d48003362d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateFormatter.js
@@ -0,0 +1,112 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDateFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDateFormatter_destroy(underlying);
+});
+
+export class ICU4XDateFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDateFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_length(arg_provider, arg_locale, arg_date_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_create_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_date(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_date(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_date(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_iso_date(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts
new file mode 100644
index 0000000000..1229c2ce09
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateLength.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/options/length/enum.Date.html Rust documentation for `Date`} for more information.
+ */
+export enum ICU4XDateLength {
+ /**
+ */
+ Full = 'Full',
+ /**
+ */
+ Long = 'Long',
+ /**
+ */
+ Medium = 'Medium',
+ /**
+ */
+ Short = 'Short',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateLength.js b/intl/icu_capi/js/package/lib/ICU4XDateLength.js
new file mode 100644
index 0000000000..bca6c2d8b8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateLength.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XDateLength_js_to_rust = {
+ "Full": 0,
+ "Long": 1,
+ "Medium": 2,
+ "Short": 3,
+};
+
+export const ICU4XDateLength_rust_to_js = {
+ [0]: "Full",
+ [1]: "Long",
+ [2]: "Medium",
+ [3]: "Short",
+};
+
+export const ICU4XDateLength = {
+ "Full": "Full",
+ "Long": "Long",
+ "Medium": "Medium",
+ "Short": "Short",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts
new file mode 100644
index 0000000000..c930558206
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTime.d.ts
@@ -0,0 +1,212 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XDate } from "./ICU4XDate";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XTime } from "./ICU4XTime";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X DateTime object capable of containing a date and time for any calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html Rust documentation for `DateTime`} for more information.
+ */
+export class ICU4XDateTime {
+
+ /**
+
+ * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} representing the ISO date and time given but in a given calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/struct.DateTime.html#method.new_from_iso Rust documentation for `new_from_iso`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_iso_in_calendar(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32, calendar: ICU4XCalendar): ICU4XDateTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} from the given codes, which are interpreted in the given calendar system
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_from_codes Rust documentation for `try_new_from_codes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_codes_in_calendar(era_code: string, year: i32, month_code: string, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32, calendar: ICU4XCalendar): ICU4XDateTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XDateTime `ICU4XDateTime`} from an {@link ICU4XDate `ICU4XDate`} and {@link ICU4XTime `ICU4XTime`} object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new Rust documentation for `new`} for more information.
+ */
+ static create_from_date_and_time(date: ICU4XDate, time: ICU4XTime): ICU4XDateTime;
+
+ /**
+
+ * Gets a copy of the date contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date Rust documentation for `date`} for more information.
+ */
+ date(): ICU4XDate;
+
+ /**
+
+ * Gets the time contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time Rust documentation for `time`} for more information.
+ */
+ time(): ICU4XTime;
+
+ /**
+
+ * Converts this date to ISO
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_iso Rust documentation for `to_iso`} for more information.
+ */
+ to_iso(): ICU4XIsoDateTime;
+
+ /**
+
+ * Convert this datetime to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDateTime;
+
+ /**
+
+ * Returns the hour in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour Rust documentation for `hour`} for more information.
+ */
+ hour(): u8;
+
+ /**
+
+ * Returns the minute in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute Rust documentation for `minute`} for more information.
+ */
+ minute(): u8;
+
+ /**
+
+ * Returns the second in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second Rust documentation for `second`} for more information.
+ */
+ second(): u8;
+
+ /**
+
+ * Returns the nanosecond in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond Rust documentation for `nanosecond`} for more information.
+ */
+ nanosecond(): u32;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * Note that for lunar calendars this may not lead to the same month having the same ordinal month across years; use month_code if you care about month identity.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ ordinal_month(): u32;
+
+ /**
+
+ * Returns the month code for this date. Typically something like "M01", "M02", but can be more complicated for lunar calendars.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ month_code(): string | never;
+
+ /**
+
+ * Returns the year number in the current era for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year_in_era(): i32;
+
+ /**
+
+ * Returns the era for this date,
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ era(): string | never;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+
+ /**
+
+ * Returns the {@link ICU4XCalendar `ICU4XCalendar`} object backing this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.calendar Rust documentation for `calendar`} for more information.
+ */
+ calendar(): ICU4XCalendar;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTime.js b/intl/icu_capi/js/package/lib/ICU4XDateTime.js
new file mode 100644
index 0000000000..3d0d3d910f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTime.js
@@ -0,0 +1,191 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCalendar } from "./ICU4XCalendar.js"
+import { ICU4XDate } from "./ICU4XDate.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XTime } from "./ICU4XTime.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XDateTime_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDateTime_destroy(underlying);
+});
+
+export class ICU4XDateTime {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDateTime_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_iso_in_calendar(arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_create_from_iso_in_calendar(diplomat_receive_buffer, arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_codes_in_calendar(arg_era_code, arg_year, arg_month_code, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar) {
+ const buf_arg_era_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_era_code);
+ const buf_arg_month_code = diplomatRuntime.DiplomatBuf.str(wasm, arg_month_code);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_create_from_codes_in_calendar(diplomat_receive_buffer, buf_arg_era_code.ptr, buf_arg_era_code.size, arg_year, buf_arg_month_code.ptr, buf_arg_month_code.size, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond, arg_calendar.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_era_code.free();
+ buf_arg_month_code.free();
+ return diplomat_out;
+ }
+
+ static create_from_date_and_time(arg_date, arg_time) {
+ return new ICU4XDateTime(wasm.ICU4XDateTime_create_from_date_and_time(arg_date.underlying, arg_time.underlying), true, []);
+ }
+
+ date() {
+ return new ICU4XDate(wasm.ICU4XDateTime_date(this.underlying), true, []);
+ }
+
+ time() {
+ return new ICU4XTime(wasm.ICU4XDateTime_time(this.underlying), true, []);
+ }
+
+ to_iso() {
+ return new ICU4XIsoDateTime(wasm.ICU4XDateTime_to_iso(this.underlying), true, []);
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDateTime(wasm.ICU4XDateTime_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ hour() {
+ return wasm.ICU4XDateTime_hour(this.underlying);
+ }
+
+ minute() {
+ return wasm.ICU4XDateTime_minute(this.underlying);
+ }
+
+ second() {
+ return wasm.ICU4XDateTime_second(this.underlying);
+ }
+
+ nanosecond() {
+ return wasm.ICU4XDateTime_nanosecond(this.underlying);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XDateTime_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XDateTime_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XDateTime_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XDateTime_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ ordinal_month() {
+ return wasm.ICU4XDateTime_ordinal_month(this.underlying);
+ }
+
+ month_code() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_month_code(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ year_in_era() {
+ return wasm.ICU4XDateTime_year_in_era(this.underlying);
+ }
+
+ era() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTime_era(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ months_in_year() {
+ return wasm.ICU4XDateTime_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XDateTime_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XDateTime_days_in_year(this.underlying);
+ }
+
+ calendar() {
+ return new ICU4XCalendar(wasm.ICU4XDateTime_calendar(this.underlying), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..579f5bfe8c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.d.ts
@@ -0,0 +1,46 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An ICU4X DateFormatter object capable of formatting a {@link ICU4XDateTime `ICU4XDateTime`} as a string, using some calendar specified at runtime in the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html Rust documentation for `DateTimeFormatter`} for more information.
+ */
+export class ICU4XDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XDateTimeFormatter `ICU4XDateTimeFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime(value: ICU4XDateTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * Will convert to this formatter's calendar first
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.DateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js
new file mode 100644
index 0000000000..83bbbae72f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDateTimeFormatter.js
@@ -0,0 +1,75 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTimeFormatter_format_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDateTimeFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts b/intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts
new file mode 100644
index 0000000000..a95e7cbde8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposed.d.ts
@@ -0,0 +1,12 @@
+import { char } from "./diplomat-runtime"
+
+/**
+
+ * The outcome of non-recursive canonical decomposition of a character. `second` will be NUL when the decomposition expands to a single character (which may or may not be the original one)
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/properties/enum.Decomposed.html Rust documentation for `Decomposed`} for more information.
+ */
+export class ICU4XDecomposed {
+ first: char;
+ second: char;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposed.js b/intl/icu_capi/js/package/lib/ICU4XDecomposed.js
new file mode 100644
index 0000000000..8f5e80f5e4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposed.js
@@ -0,0 +1,9 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export class ICU4XDecomposed {
+ constructor(underlying) {
+ this.first = String.fromCharCode((new Uint32Array(wasm.memory.buffer, underlying, 1))[0]);
+ this.second = String.fromCharCode((new Uint32Array(wasm.memory.buffer, underlying + 4, 1))[0]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts
new file mode 100644
index 0000000000..d95fcc5273
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html Rust documentation for `DecomposingNormalizer`} for more information.
+ */
+export class ICU4XDecomposingNormalizer {
+
+ /**
+
+ * Construct a new ICU4XDecomposingNormalizer instance for NFC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfd Rust documentation for `new_nfd`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfd(provider: ICU4XDataProvider): ICU4XDecomposingNormalizer | never;
+
+ /**
+
+ * Construct a new ICU4XDecomposingNormalizer instance for NFKC
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.new_nfkd Rust documentation for `new_nfkd`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_nfkd(provider: ICU4XDataProvider): ICU4XDecomposingNormalizer | never;
+
+ /**
+
+ * Normalize a (potentially ill-formed) UTF8 string
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.normalize_utf8 Rust documentation for `normalize_utf8`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ normalize(s: string): string | never;
+
+ /**
+
+ * Check if a (potentially ill-formed) UTF8 string is normalized
+
+ * Errors are mapped to REPLACEMENT CHARACTER
+
+ * See the {@link https://docs.rs/icu/latest/icu/normalizer/struct.DecomposingNormalizer.html#method.is_normalized_utf8 Rust documentation for `is_normalized_utf8`} for more information.
+ */
+ is_normalized(s: string): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js
new file mode 100644
index 0000000000..e1357dbb2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDecomposingNormalizer.js
@@ -0,0 +1,81 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XDecomposingNormalizer_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XDecomposingNormalizer_destroy(underlying);
+});
+
+export class ICU4XDecomposingNormalizer {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XDecomposingNormalizer_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_nfd(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDecomposingNormalizer_create_nfd(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDecomposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_nfkd(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDecomposingNormalizer_create_nfkd(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XDecomposingNormalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ normalize(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XDecomposingNormalizer_normalize(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ is_normalized(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XDecomposingNormalizer_is_normalized(this.underlying, buf_arg_s.ptr, buf_arg_s.size);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts
new file mode 100644
index 0000000000..46f8452fb1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/enum.Fallback.html Rust documentation for `Fallback`} for more information.
+ */
+export enum ICU4XDisplayNamesFallback {
+ /**
+ */
+ Code = 'Code',
+ /**
+ */
+ None = 'None',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js
new file mode 100644
index 0000000000..aa7dc2d43f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesFallback.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XDisplayNamesFallback_js_to_rust = {
+ "Code": 0,
+ "None": 1,
+};
+
+export const ICU4XDisplayNamesFallback_rust_to_js = {
+ [0]: "Code",
+ [1]: "None",
+};
+
+export const ICU4XDisplayNamesFallback = {
+ "Code": "Code",
+ "None": "None",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts
new file mode 100644
index 0000000000..2f964d3439
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.d.ts
@@ -0,0 +1,13 @@
+import { ICU4XDisplayNamesFallback } from "./ICU4XDisplayNamesFallback";
+import { ICU4XDisplayNamesStyle } from "./ICU4XDisplayNamesStyle";
+import { ICU4XLanguageDisplay } from "./ICU4XLanguageDisplay";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/struct.DisplayNamesOptions.html Rust documentation for `DisplayNamesOptions`} for more information.
+ */
+export class ICU4XDisplayNamesOptionsV1 {
+ style: ICU4XDisplayNamesStyle;
+ fallback: ICU4XDisplayNamesFallback;
+ language_display: ICU4XLanguageDisplay;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js
new file mode 100644
index 0000000000..eeaa0100b3
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesOptionsV1.js
@@ -0,0 +1,13 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDisplayNamesFallback_js_to_rust, ICU4XDisplayNamesFallback_rust_to_js } from "./ICU4XDisplayNamesFallback.js"
+import { ICU4XDisplayNamesStyle_js_to_rust, ICU4XDisplayNamesStyle_rust_to_js } from "./ICU4XDisplayNamesStyle.js"
+import { ICU4XLanguageDisplay_js_to_rust, ICU4XLanguageDisplay_rust_to_js } from "./ICU4XLanguageDisplay.js"
+
+export class ICU4XDisplayNamesOptionsV1 {
+ constructor(underlying) {
+ this.style = ICU4XDisplayNamesStyle_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.fallback = ICU4XDisplayNamesFallback_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.language_display = ICU4XLanguageDisplay_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 8)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts
new file mode 100644
index 0000000000..5f92c6e961
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.d.ts
@@ -0,0 +1,22 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/enum.Style.html Rust documentation for `Style`} for more information.
+ */
+export enum ICU4XDisplayNamesStyle {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Narrow = 'Narrow',
+ /**
+ */
+ Short = 'Short',
+ /**
+ */
+ Long = 'Long',
+ /**
+ */
+ Menu = 'Menu',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js
new file mode 100644
index 0000000000..9bb3464229
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XDisplayNamesStyle.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XDisplayNamesStyle_js_to_rust = {
+ "Auto": 0,
+ "Narrow": 1,
+ "Short": 2,
+ "Long": 3,
+ "Menu": 4,
+};
+
+export const ICU4XDisplayNamesStyle_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Narrow",
+ [2]: "Short",
+ [3]: "Long",
+ [4]: "Menu",
+};
+
+export const ICU4XDisplayNamesStyle = {
+ "Auto": "Auto",
+ "Narrow": "Narrow",
+ "Short": "Short",
+ "Long": "Long",
+ "Menu": "Menu",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XError.d.ts b/intl/icu_capi/js/package/lib/ICU4XError.d.ts
new file mode 100644
index 0000000000..882c7c6c55
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XError.d.ts
@@ -0,0 +1,186 @@
+
+/**
+
+ * A common enum for errors that ICU4X may return, organized by API
+
+ * The error names are stable and can be checked against as strings in the JS API
+
+ * Additional information: {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FixedDecimalError.html 1}, {@link https://docs.rs/icu/latest/icu/calendar/enum.CalendarError.html 2}, {@link https://docs.rs/icu/latest/icu/collator/enum.CollatorError.html 3}, {@link https://docs.rs/icu/latest/icu/datetime/enum.DateTimeError.html 4}, {@link https://docs.rs/icu/latest/icu/decimal/enum.DecimalError.html 5}, {@link https://docs.rs/icu/latest/icu/list/enum.ListError.html 6}, {@link https://docs.rs/icu/latest/icu/locid/enum.ParserError.html 7}, {@link https://docs.rs/icu/latest/icu/locid_transform/enum.LocaleTransformError.html 8}, {@link https://docs.rs/icu/latest/icu/normalizer/enum.NormalizerError.html 9}, {@link https://docs.rs/icu/latest/icu/plurals/enum.PluralsError.html 10}, {@link https://docs.rs/icu/latest/icu/properties/enum.PropertiesError.html 11}, {@link https://docs.rs/icu/latest/icu/provider/struct.DataError.html 12}, {@link https://docs.rs/icu/latest/icu/provider/enum.DataErrorKind.html 13}, {@link https://docs.rs/icu/latest/icu/segmenter/enum.SegmenterError.html 14}, {@link https://docs.rs/icu/latest/icu/timezone/enum.TimeZoneError.html 15}
+ */
+export enum ICU4XError {
+ /**
+
+ * The error is not currently categorized as ICU4XError. Please file a bug
+ */
+ UnknownError = 'UnknownError',
+ /**
+
+ * An error arising from writing to a string Typically found when not enough space is allocated Most APIs that return a string may return this error
+ */
+ WriteableError = 'WriteableError',
+ /**
+ */
+ OutOfBoundsError = 'OutOfBoundsError',
+ /**
+ */
+ DataMissingDataKeyError = 'DataMissingDataKeyError',
+ /**
+ */
+ DataMissingVariantError = 'DataMissingVariantError',
+ /**
+ */
+ DataMissingLocaleError = 'DataMissingLocaleError',
+ /**
+ */
+ DataNeedsVariantError = 'DataNeedsVariantError',
+ /**
+ */
+ DataNeedsLocaleError = 'DataNeedsLocaleError',
+ /**
+ */
+ DataExtraneousLocaleError = 'DataExtraneousLocaleError',
+ /**
+ */
+ DataFilteredResourceError = 'DataFilteredResourceError',
+ /**
+ */
+ DataMismatchedTypeError = 'DataMismatchedTypeError',
+ /**
+ */
+ DataMissingPayloadError = 'DataMissingPayloadError',
+ /**
+ */
+ DataInvalidStateError = 'DataInvalidStateError',
+ /**
+ */
+ DataCustomError = 'DataCustomError',
+ /**
+ */
+ DataIoError = 'DataIoError',
+ /**
+ */
+ DataUnavailableBufferFormatError = 'DataUnavailableBufferFormatError',
+ /**
+ */
+ DataMismatchedAnyBufferError = 'DataMismatchedAnyBufferError',
+ /**
+
+ * The subtag being requested was not set
+ */
+ LocaleUndefinedSubtagError = 'LocaleUndefinedSubtagError',
+ /**
+
+ * The locale or subtag string failed to parse
+ */
+ LocaleParserLanguageError = 'LocaleParserLanguageError',
+ /**
+ */
+ LocaleParserSubtagError = 'LocaleParserSubtagError',
+ /**
+ */
+ LocaleParserExtensionError = 'LocaleParserExtensionError',
+ /**
+
+ * Attempted to construct an invalid data struct
+ */
+ DataStructValidityError = 'DataStructValidityError',
+ /**
+ */
+ PropertyUnknownScriptIdError = 'PropertyUnknownScriptIdError',
+ /**
+ */
+ PropertyUnknownGeneralCategoryGroupError = 'PropertyUnknownGeneralCategoryGroupError',
+ /**
+ */
+ PropertyUnexpectedPropertyNameError = 'PropertyUnexpectedPropertyNameError',
+ /**
+ */
+ FixedDecimalLimitError = 'FixedDecimalLimitError',
+ /**
+ */
+ FixedDecimalSyntaxError = 'FixedDecimalSyntaxError',
+ /**
+ */
+ PluralsParserError = 'PluralsParserError',
+ /**
+ */
+ CalendarParseError = 'CalendarParseError',
+ /**
+ */
+ CalendarOverflowError = 'CalendarOverflowError',
+ /**
+ */
+ CalendarUnderflowError = 'CalendarUnderflowError',
+ /**
+ */
+ CalendarOutOfRangeError = 'CalendarOutOfRangeError',
+ /**
+ */
+ CalendarUnknownEraError = 'CalendarUnknownEraError',
+ /**
+ */
+ CalendarUnknownMonthCodeError = 'CalendarUnknownMonthCodeError',
+ /**
+ */
+ CalendarMissingInputError = 'CalendarMissingInputError',
+ /**
+ */
+ CalendarUnknownKindError = 'CalendarUnknownKindError',
+ /**
+ */
+ CalendarMissingError = 'CalendarMissingError',
+ /**
+ */
+ DateTimePatternError = 'DateTimePatternError',
+ /**
+ */
+ DateTimeMissingInputFieldError = 'DateTimeMissingInputFieldError',
+ /**
+ */
+ DateTimeSkeletonError = 'DateTimeSkeletonError',
+ /**
+ */
+ DateTimeUnsupportedFieldError = 'DateTimeUnsupportedFieldError',
+ /**
+ */
+ DateTimeUnsupportedOptionsError = 'DateTimeUnsupportedOptionsError',
+ /**
+ */
+ DateTimeMissingWeekdaySymbolError = 'DateTimeMissingWeekdaySymbolError',
+ /**
+ */
+ DateTimeMissingMonthSymbolError = 'DateTimeMissingMonthSymbolError',
+ /**
+ */
+ DateTimeFixedDecimalError = 'DateTimeFixedDecimalError',
+ /**
+ */
+ DateTimeMismatchedCalendarError = 'DateTimeMismatchedCalendarError',
+ /**
+ */
+ TinyStrTooLargeError = 'TinyStrTooLargeError',
+ /**
+ */
+ TinyStrContainsNullError = 'TinyStrContainsNullError',
+ /**
+ */
+ TinyStrNonAsciiError = 'TinyStrNonAsciiError',
+ /**
+ */
+ TimeZoneOffsetOutOfBoundsError = 'TimeZoneOffsetOutOfBoundsError',
+ /**
+ */
+ TimeZoneInvalidOffsetError = 'TimeZoneInvalidOffsetError',
+ /**
+ */
+ TimeZoneMissingInputError = 'TimeZoneMissingInputError',
+ /**
+ */
+ TimeZoneInvalidIdError = 'TimeZoneInvalidIdError',
+ /**
+ */
+ NormalizerFutureExtensionError = 'NormalizerFutureExtensionError',
+ /**
+ */
+ NormalizerValidationError = 'NormalizerValidationError',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XError.js b/intl/icu_capi/js/package/lib/ICU4XError.js
new file mode 100644
index 0000000000..af57602310
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XError.js
@@ -0,0 +1,176 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XError_js_to_rust = {
+ "UnknownError": 0,
+ "WriteableError": 1,
+ "OutOfBoundsError": 2,
+ "DataMissingDataKeyError": 256,
+ "DataMissingVariantError": 257,
+ "DataMissingLocaleError": 258,
+ "DataNeedsVariantError": 259,
+ "DataNeedsLocaleError": 260,
+ "DataExtraneousLocaleError": 261,
+ "DataFilteredResourceError": 262,
+ "DataMismatchedTypeError": 263,
+ "DataMissingPayloadError": 264,
+ "DataInvalidStateError": 265,
+ "DataCustomError": 266,
+ "DataIoError": 267,
+ "DataUnavailableBufferFormatError": 268,
+ "DataMismatchedAnyBufferError": 269,
+ "LocaleUndefinedSubtagError": 512,
+ "LocaleParserLanguageError": 513,
+ "LocaleParserSubtagError": 514,
+ "LocaleParserExtensionError": 515,
+ "DataStructValidityError": 768,
+ "PropertyUnknownScriptIdError": 1024,
+ "PropertyUnknownGeneralCategoryGroupError": 1025,
+ "PropertyUnexpectedPropertyNameError": 1026,
+ "FixedDecimalLimitError": 1280,
+ "FixedDecimalSyntaxError": 1281,
+ "PluralsParserError": 1536,
+ "CalendarParseError": 1792,
+ "CalendarOverflowError": 1793,
+ "CalendarUnderflowError": 1794,
+ "CalendarOutOfRangeError": 1795,
+ "CalendarUnknownEraError": 1796,
+ "CalendarUnknownMonthCodeError": 1797,
+ "CalendarMissingInputError": 1798,
+ "CalendarUnknownKindError": 1799,
+ "CalendarMissingError": 1800,
+ "DateTimePatternError": 2048,
+ "DateTimeMissingInputFieldError": 2049,
+ "DateTimeSkeletonError": 2050,
+ "DateTimeUnsupportedFieldError": 2051,
+ "DateTimeUnsupportedOptionsError": 2052,
+ "DateTimeMissingWeekdaySymbolError": 2053,
+ "DateTimeMissingMonthSymbolError": 2054,
+ "DateTimeFixedDecimalError": 2055,
+ "DateTimeMismatchedCalendarError": 2056,
+ "TinyStrTooLargeError": 2304,
+ "TinyStrContainsNullError": 2305,
+ "TinyStrNonAsciiError": 2306,
+ "TimeZoneOffsetOutOfBoundsError": 2560,
+ "TimeZoneInvalidOffsetError": 2561,
+ "TimeZoneMissingInputError": 2562,
+ "TimeZoneInvalidIdError": 2563,
+ "NormalizerFutureExtensionError": 2816,
+ "NormalizerValidationError": 2817,
+};
+
+export const ICU4XError_rust_to_js = {
+ [0]: "UnknownError",
+ [1]: "WriteableError",
+ [2]: "OutOfBoundsError",
+ [256]: "DataMissingDataKeyError",
+ [257]: "DataMissingVariantError",
+ [258]: "DataMissingLocaleError",
+ [259]: "DataNeedsVariantError",
+ [260]: "DataNeedsLocaleError",
+ [261]: "DataExtraneousLocaleError",
+ [262]: "DataFilteredResourceError",
+ [263]: "DataMismatchedTypeError",
+ [264]: "DataMissingPayloadError",
+ [265]: "DataInvalidStateError",
+ [266]: "DataCustomError",
+ [267]: "DataIoError",
+ [268]: "DataUnavailableBufferFormatError",
+ [269]: "DataMismatchedAnyBufferError",
+ [512]: "LocaleUndefinedSubtagError",
+ [513]: "LocaleParserLanguageError",
+ [514]: "LocaleParserSubtagError",
+ [515]: "LocaleParserExtensionError",
+ [768]: "DataStructValidityError",
+ [1024]: "PropertyUnknownScriptIdError",
+ [1025]: "PropertyUnknownGeneralCategoryGroupError",
+ [1026]: "PropertyUnexpectedPropertyNameError",
+ [1280]: "FixedDecimalLimitError",
+ [1281]: "FixedDecimalSyntaxError",
+ [1536]: "PluralsParserError",
+ [1792]: "CalendarParseError",
+ [1793]: "CalendarOverflowError",
+ [1794]: "CalendarUnderflowError",
+ [1795]: "CalendarOutOfRangeError",
+ [1796]: "CalendarUnknownEraError",
+ [1797]: "CalendarUnknownMonthCodeError",
+ [1798]: "CalendarMissingInputError",
+ [1799]: "CalendarUnknownKindError",
+ [1800]: "CalendarMissingError",
+ [2048]: "DateTimePatternError",
+ [2049]: "DateTimeMissingInputFieldError",
+ [2050]: "DateTimeSkeletonError",
+ [2051]: "DateTimeUnsupportedFieldError",
+ [2052]: "DateTimeUnsupportedOptionsError",
+ [2053]: "DateTimeMissingWeekdaySymbolError",
+ [2054]: "DateTimeMissingMonthSymbolError",
+ [2055]: "DateTimeFixedDecimalError",
+ [2056]: "DateTimeMismatchedCalendarError",
+ [2304]: "TinyStrTooLargeError",
+ [2305]: "TinyStrContainsNullError",
+ [2306]: "TinyStrNonAsciiError",
+ [2560]: "TimeZoneOffsetOutOfBoundsError",
+ [2561]: "TimeZoneInvalidOffsetError",
+ [2562]: "TimeZoneMissingInputError",
+ [2563]: "TimeZoneInvalidIdError",
+ [2816]: "NormalizerFutureExtensionError",
+ [2817]: "NormalizerValidationError",
+};
+
+export const ICU4XError = {
+ "UnknownError": "UnknownError",
+ "WriteableError": "WriteableError",
+ "OutOfBoundsError": "OutOfBoundsError",
+ "DataMissingDataKeyError": "DataMissingDataKeyError",
+ "DataMissingVariantError": "DataMissingVariantError",
+ "DataMissingLocaleError": "DataMissingLocaleError",
+ "DataNeedsVariantError": "DataNeedsVariantError",
+ "DataNeedsLocaleError": "DataNeedsLocaleError",
+ "DataExtraneousLocaleError": "DataExtraneousLocaleError",
+ "DataFilteredResourceError": "DataFilteredResourceError",
+ "DataMismatchedTypeError": "DataMismatchedTypeError",
+ "DataMissingPayloadError": "DataMissingPayloadError",
+ "DataInvalidStateError": "DataInvalidStateError",
+ "DataCustomError": "DataCustomError",
+ "DataIoError": "DataIoError",
+ "DataUnavailableBufferFormatError": "DataUnavailableBufferFormatError",
+ "DataMismatchedAnyBufferError": "DataMismatchedAnyBufferError",
+ "LocaleUndefinedSubtagError": "LocaleUndefinedSubtagError",
+ "LocaleParserLanguageError": "LocaleParserLanguageError",
+ "LocaleParserSubtagError": "LocaleParserSubtagError",
+ "LocaleParserExtensionError": "LocaleParserExtensionError",
+ "DataStructValidityError": "DataStructValidityError",
+ "PropertyUnknownScriptIdError": "PropertyUnknownScriptIdError",
+ "PropertyUnknownGeneralCategoryGroupError": "PropertyUnknownGeneralCategoryGroupError",
+ "PropertyUnexpectedPropertyNameError": "PropertyUnexpectedPropertyNameError",
+ "FixedDecimalLimitError": "FixedDecimalLimitError",
+ "FixedDecimalSyntaxError": "FixedDecimalSyntaxError",
+ "PluralsParserError": "PluralsParserError",
+ "CalendarParseError": "CalendarParseError",
+ "CalendarOverflowError": "CalendarOverflowError",
+ "CalendarUnderflowError": "CalendarUnderflowError",
+ "CalendarOutOfRangeError": "CalendarOutOfRangeError",
+ "CalendarUnknownEraError": "CalendarUnknownEraError",
+ "CalendarUnknownMonthCodeError": "CalendarUnknownMonthCodeError",
+ "CalendarMissingInputError": "CalendarMissingInputError",
+ "CalendarUnknownKindError": "CalendarUnknownKindError",
+ "CalendarMissingError": "CalendarMissingError",
+ "DateTimePatternError": "DateTimePatternError",
+ "DateTimeMissingInputFieldError": "DateTimeMissingInputFieldError",
+ "DateTimeSkeletonError": "DateTimeSkeletonError",
+ "DateTimeUnsupportedFieldError": "DateTimeUnsupportedFieldError",
+ "DateTimeUnsupportedOptionsError": "DateTimeUnsupportedOptionsError",
+ "DateTimeMissingWeekdaySymbolError": "DateTimeMissingWeekdaySymbolError",
+ "DateTimeMissingMonthSymbolError": "DateTimeMissingMonthSymbolError",
+ "DateTimeFixedDecimalError": "DateTimeFixedDecimalError",
+ "DateTimeMismatchedCalendarError": "DateTimeMismatchedCalendarError",
+ "TinyStrTooLargeError": "TinyStrTooLargeError",
+ "TinyStrContainsNullError": "TinyStrContainsNullError",
+ "TinyStrNonAsciiError": "TinyStrNonAsciiError",
+ "TimeZoneOffsetOutOfBoundsError": "TimeZoneOffsetOutOfBoundsError",
+ "TimeZoneInvalidOffsetError": "TimeZoneInvalidOffsetError",
+ "TimeZoneMissingInputError": "TimeZoneMissingInputError",
+ "TimeZoneInvalidIdError": "TimeZoneInvalidIdError",
+ "NormalizerFutureExtensionError": "NormalizerFutureExtensionError",
+ "NormalizerValidationError": "NormalizerValidationError",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts
new file mode 100644
index 0000000000..dfa978cbfd
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.d.ts
@@ -0,0 +1,272 @@
+import { u8, i16, i32, u32, i64, u64, f64 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XFixedDecimalSign } from "./ICU4XFixedDecimalSign";
+import { ICU4XFixedDecimalSignDisplay } from "./ICU4XFixedDecimalSignDisplay";
+
+/**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+export class ICU4XFixedDecimal {
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_i32(v: i32): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_u32(v: u32): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_i64(v: i64): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html Rust documentation for `FixedDecimal`} for more information.
+ */
+ static create_from_u64(v: u64): ICU4XFixedDecimal;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an integer-valued float
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_integer_precision(f: f64): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an float, with a given power of 10 for the lower magnitude
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_lower_magnitude(f: f64, magnitude: i16): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an float, for a given number of significant digits
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_significant_digits(f: f64, digits: u8): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from an float, with enough digits to recover the original floating point in IEEE 754 without needing trailing zeros
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.try_from_f64 Rust documentation for `try_from_f64`} for more information.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.FloatPrecision.html Rust documentation for `FloatPrecision`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_f64_with_floating_precision(f: f64): ICU4XFixedDecimal | never;
+
+ /**
+
+ * Construct an {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} from a string.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.from_str Rust documentation for `from_str`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(v: string): ICU4XFixedDecimal | never;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.digit_at Rust documentation for `digit_at`} for more information.
+ */
+ digit_at(magnitude: i16): u8;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range Rust documentation for `magnitude_range`} for more information.
+ */
+ magnitude_start(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.magnitude_range Rust documentation for `magnitude_range`} for more information.
+ */
+ magnitude_end(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_start Rust documentation for `nonzero_magnitude_start`} for more information.
+ */
+ nonzero_magnitude_start(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.nonzero_magnitude_end Rust documentation for `nonzero_magnitude_end`} for more information.
+ */
+ nonzero_magnitude_end(): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.is_zero Rust documentation for `is_zero`} for more information.
+ */
+ is_zero(): boolean;
+
+ /**
+
+ * Multiply the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} by a given power of ten.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.multiply_pow10 Rust documentation for `multiply_pow10`} for more information.
+ */
+ multiply_pow10(power: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.sign Rust documentation for `sign`} for more information.
+ */
+ sign(): ICU4XFixedDecimalSign;
+
+ /**
+
+ * Set the sign of the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`}.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_sign Rust documentation for `set_sign`} for more information.
+ */
+ set_sign(sign: ICU4XFixedDecimalSign): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.apply_sign_display Rust documentation for `apply_sign_display`} for more information.
+ */
+ apply_sign_display(sign_display: ICU4XFixedDecimalSignDisplay): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_start Rust documentation for `trim_start`} for more information.
+ */
+ trim_start(): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trim_end Rust documentation for `trim_end`} for more information.
+ */
+ trim_end(): void;
+
+ /**
+
+ * Zero-pad the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} on the left to a particular position
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_start Rust documentation for `pad_start`} for more information.
+ */
+ pad_start(position: i16): void;
+
+ /**
+
+ * Zero-pad the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} on the right to a particular position
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.pad_end Rust documentation for `pad_end`} for more information.
+ */
+ pad_end(position: i16): void;
+
+ /**
+
+ * Truncate the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} on the left to a particular position, deleting digits if necessary. This is useful for, e.g. abbreviating years ("2022" -> "22")
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.set_max_position Rust documentation for `set_max_position`} for more information.
+ */
+ set_max_position(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.trunc Rust documentation for `trunc`} for more information.
+ */
+ trunc(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_trunc Rust documentation for `half_trunc`} for more information.
+ */
+ half_trunc(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.expand Rust documentation for `expand`} for more information.
+ */
+ expand(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_expand Rust documentation for `half_expand`} for more information.
+ */
+ half_expand(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.ceil Rust documentation for `ceil`} for more information.
+ */
+ ceil(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_ceil Rust documentation for `half_ceil`} for more information.
+ */
+ half_ceil(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.floor Rust documentation for `floor`} for more information.
+ */
+ floor(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_floor Rust documentation for `half_floor`} for more information.
+ */
+ half_floor(position: i16): void;
+
+ /**
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.half_even Rust documentation for `half_even`} for more information.
+ */
+ half_even(position: i16): void;
+
+ /**
+
+ * Concatenates `other` to the end of `self`.
+
+ * If successful, `other` will be set to 0 and a successful status is returned.
+
+ * If not successful, `other` will be unchanged and an error is returned.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.concatenate_end Rust documentation for `concatenate_end`} for more information.
+ * @throws {@link FFIError}<void>
+ */
+ concatenate_end(other: ICU4XFixedDecimal): void | never;
+
+ /**
+
+ * Format the {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} as a string.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/struct.FixedDecimal.html#method.write_to Rust documentation for `write_to`} for more information.
+ */
+ to_string(): string;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js
new file mode 100644
index 0000000000..e517bc9f48
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimal.js
@@ -0,0 +1,235 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XFixedDecimalSign_js_to_rust, ICU4XFixedDecimalSign_rust_to_js } from "./ICU4XFixedDecimalSign.js"
+import { ICU4XFixedDecimalSignDisplay_js_to_rust, ICU4XFixedDecimalSignDisplay_rust_to_js } from "./ICU4XFixedDecimalSignDisplay.js"
+
+const ICU4XFixedDecimal_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XFixedDecimal_destroy(underlying);
+});
+
+export class ICU4XFixedDecimal {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XFixedDecimal_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_i32(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_i32(arg_v), true, []);
+ }
+
+ static create_from_u32(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_u32(arg_v), true, []);
+ }
+
+ static create_from_i64(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_i64(arg_v), true, []);
+ }
+
+ static create_from_u64(arg_v) {
+ return new ICU4XFixedDecimal(wasm.ICU4XFixedDecimal_create_from_u64(arg_v), true, []);
+ }
+
+ static create_from_f64_with_integer_precision(arg_f) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_integer_precision(diplomat_receive_buffer, arg_f);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_f64_with_lower_magnitude(arg_f, arg_magnitude) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_lower_magnitude(diplomat_receive_buffer, arg_f, arg_magnitude);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_f64_with_significant_digits(arg_f, arg_digits) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_significant_digits(diplomat_receive_buffer, arg_f, arg_digits);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_f64_with_floating_precision(arg_f) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_f64_with_floating_precision(diplomat_receive_buffer, arg_f);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_string(arg_v) {
+ const buf_arg_v = diplomatRuntime.DiplomatBuf.str(wasm, arg_v);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimal_create_from_string(diplomat_receive_buffer, buf_arg_v.ptr, buf_arg_v.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimal(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_v.free();
+ return diplomat_out;
+ }
+
+ digit_at(arg_magnitude) {
+ return wasm.ICU4XFixedDecimal_digit_at(this.underlying, arg_magnitude);
+ }
+
+ magnitude_start() {
+ return wasm.ICU4XFixedDecimal_magnitude_start(this.underlying);
+ }
+
+ magnitude_end() {
+ return wasm.ICU4XFixedDecimal_magnitude_end(this.underlying);
+ }
+
+ nonzero_magnitude_start() {
+ return wasm.ICU4XFixedDecimal_nonzero_magnitude_start(this.underlying);
+ }
+
+ nonzero_magnitude_end() {
+ return wasm.ICU4XFixedDecimal_nonzero_magnitude_end(this.underlying);
+ }
+
+ is_zero() {
+ return wasm.ICU4XFixedDecimal_is_zero(this.underlying);
+ }
+
+ multiply_pow10(arg_power) {
+ wasm.ICU4XFixedDecimal_multiply_pow10(this.underlying, arg_power);
+ }
+
+ sign() {
+ return ICU4XFixedDecimalSign_rust_to_js[wasm.ICU4XFixedDecimal_sign(this.underlying)];
+ }
+
+ set_sign(arg_sign) {
+ wasm.ICU4XFixedDecimal_set_sign(this.underlying, ICU4XFixedDecimalSign_js_to_rust[arg_sign]);
+ }
+
+ apply_sign_display(arg_sign_display) {
+ wasm.ICU4XFixedDecimal_apply_sign_display(this.underlying, ICU4XFixedDecimalSignDisplay_js_to_rust[arg_sign_display]);
+ }
+
+ trim_start() {
+ wasm.ICU4XFixedDecimal_trim_start(this.underlying);
+ }
+
+ trim_end() {
+ wasm.ICU4XFixedDecimal_trim_end(this.underlying);
+ }
+
+ pad_start(arg_position) {
+ wasm.ICU4XFixedDecimal_pad_start(this.underlying, arg_position);
+ }
+
+ pad_end(arg_position) {
+ wasm.ICU4XFixedDecimal_pad_end(this.underlying, arg_position);
+ }
+
+ set_max_position(arg_position) {
+ wasm.ICU4XFixedDecimal_set_max_position(this.underlying, arg_position);
+ }
+
+ trunc(arg_position) {
+ wasm.ICU4XFixedDecimal_trunc(this.underlying, arg_position);
+ }
+
+ half_trunc(arg_position) {
+ wasm.ICU4XFixedDecimal_half_trunc(this.underlying, arg_position);
+ }
+
+ expand(arg_position) {
+ wasm.ICU4XFixedDecimal_expand(this.underlying, arg_position);
+ }
+
+ half_expand(arg_position) {
+ wasm.ICU4XFixedDecimal_half_expand(this.underlying, arg_position);
+ }
+
+ ceil(arg_position) {
+ wasm.ICU4XFixedDecimal_ceil(this.underlying, arg_position);
+ }
+
+ half_ceil(arg_position) {
+ wasm.ICU4XFixedDecimal_half_ceil(this.underlying, arg_position);
+ }
+
+ floor(arg_position) {
+ wasm.ICU4XFixedDecimal_floor(this.underlying, arg_position);
+ }
+
+ half_floor(arg_position) {
+ wasm.ICU4XFixedDecimal_half_floor(this.underlying, arg_position);
+ }
+
+ half_even(arg_position) {
+ wasm.ICU4XFixedDecimal_half_even(this.underlying, arg_position);
+ }
+
+ concatenate_end(arg_other) {
+ return (() => {
+ const is_ok = wasm.ICU4XFixedDecimal_concatenate_end(this.underlying, arg_other.underlying) == 1;
+ if (!is_ok) {
+ throw new diplomatRuntime.FFIError(undefined);
+ }
+ })();
+ }
+
+ to_string() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return wasm.ICU4XFixedDecimal_to_string(this.underlying, writeable);
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts
new file mode 100644
index 0000000000..3abe6f9947
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.d.ts
@@ -0,0 +1,43 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDataStruct } from "./ICU4XDataStruct";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XFixedDecimal } from "./ICU4XFixedDecimal";
+import { ICU4XFixedDecimalGroupingStrategy } from "./ICU4XFixedDecimalGroupingStrategy";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X Fixed Decimal Format object, capable of formatting a {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} as a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html Rust documentation for `FixedDecimalFormatter`} for more information.
+ */
+export class ICU4XFixedDecimalFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XFixedDecimalFormatter `ICU4XFixedDecimalFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_grouping_strategy(provider: ICU4XDataProvider, locale: ICU4XLocale, grouping_strategy: ICU4XFixedDecimalGroupingStrategy): ICU4XFixedDecimalFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XFixedDecimalFormatter `ICU4XFixedDecimalFormatter`} from preconstructed locale data in the form of an {@link ICU4XDataStruct `ICU4XDataStruct`} constructed from `ICU4XDataStruct::create_decimal_symbols()`.
+
+ * The contents of the data struct will be consumed: if you wish to use the struct again it will have to be reconstructed. Passing a consumed struct to this method will return an error.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_decimal_symbols_v1(data_struct: ICU4XDataStruct, grouping_strategy: ICU4XFixedDecimalGroupingStrategy): ICU4XFixedDecimalFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XFixedDecimal `ICU4XFixedDecimal`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/struct.FixedDecimalFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format(value: ICU4XFixedDecimal): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js
new file mode 100644
index 0000000000..03cff035b1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalFormatter.js
@@ -0,0 +1,72 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XFixedDecimalGroupingStrategy_js_to_rust, ICU4XFixedDecimalGroupingStrategy_rust_to_js } from "./ICU4XFixedDecimalGroupingStrategy.js"
+
+const ICU4XFixedDecimalFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XFixedDecimalFormatter_destroy(underlying);
+});
+
+export class ICU4XFixedDecimalFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XFixedDecimalFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_grouping_strategy(arg_provider, arg_locale, arg_grouping_strategy) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimalFormatter_create_with_grouping_strategy(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XFixedDecimalGroupingStrategy_js_to_rust[arg_grouping_strategy]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimalFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_decimal_symbols_v1(arg_data_struct, arg_grouping_strategy) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimalFormatter_create_with_decimal_symbols_v1(diplomat_receive_buffer, arg_data_struct.underlying, ICU4XFixedDecimalGroupingStrategy_js_to_rust[arg_grouping_strategy]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XFixedDecimalFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XFixedDecimalFormatter_format(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts
new file mode 100644
index 0000000000..6a615f93a5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/decimal/options/enum.GroupingStrategy.html Rust documentation for `GroupingStrategy`} for more information.
+ */
+export enum ICU4XFixedDecimalGroupingStrategy {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Never = 'Never',
+ /**
+ */
+ Always = 'Always',
+ /**
+ */
+ Min2 = 'Min2',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js
new file mode 100644
index 0000000000..8272ee599d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalGroupingStrategy.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XFixedDecimalGroupingStrategy_js_to_rust = {
+ "Auto": 0,
+ "Never": 1,
+ "Always": 2,
+ "Min2": 3,
+};
+
+export const ICU4XFixedDecimalGroupingStrategy_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Never",
+ [2]: "Always",
+ [3]: "Min2",
+};
+
+export const ICU4XFixedDecimalGroupingStrategy = {
+ "Auto": "Auto",
+ "Never": "Never",
+ "Always": "Always",
+ "Min2": "Min2",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts
new file mode 100644
index 0000000000..ec777aa3eb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.d.ts
@@ -0,0 +1,24 @@
+
+/**
+
+ * The sign of a FixedDecimal, as shown in formatting.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.Sign.html Rust documentation for `Sign`} for more information.
+ */
+export enum ICU4XFixedDecimalSign {
+ /**
+
+ * No sign (implicitly positive, e.g., 1729).
+ */
+ None = 'None',
+ /**
+
+ * A negative sign, e.g., -1729.
+ */
+ Negative = 'Negative',
+ /**
+
+ * An explicit positive sign, e.g., +1729.
+ */
+ Positive = 'Positive',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js
new file mode 100644
index 0000000000..407cf14d33
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSign.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XFixedDecimalSign_js_to_rust = {
+ "None": 0,
+ "Negative": 1,
+ "Positive": 2,
+};
+
+export const ICU4XFixedDecimalSign_rust_to_js = {
+ [0]: "None",
+ [1]: "Negative",
+ [2]: "Positive",
+};
+
+export const ICU4XFixedDecimalSign = {
+ "None": "None",
+ "Negative": "Negative",
+ "Positive": "Positive",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts
new file mode 100644
index 0000000000..d3302911a1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.d.ts
@@ -0,0 +1,24 @@
+
+/**
+
+ * ECMA-402 compatible sign display preference.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.SignDisplay.html Rust documentation for `SignDisplay`} for more information.
+ */
+export enum ICU4XFixedDecimalSignDisplay {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ Never = 'Never',
+ /**
+ */
+ Always = 'Always',
+ /**
+ */
+ ExceptZero = 'ExceptZero',
+ /**
+ */
+ Negative = 'Negative',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js
new file mode 100644
index 0000000000..21bd180800
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XFixedDecimalSignDisplay.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XFixedDecimalSignDisplay_js_to_rust = {
+ "Auto": 0,
+ "Never": 1,
+ "Always": 2,
+ "ExceptZero": 3,
+ "Negative": 4,
+};
+
+export const ICU4XFixedDecimalSignDisplay_rust_to_js = {
+ [0]: "Auto",
+ [1]: "Never",
+ [2]: "Always",
+ [3]: "ExceptZero",
+ [4]: "Negative",
+};
+
+export const ICU4XFixedDecimalSignDisplay = {
+ "Auto": "Auto",
+ "Never": "Never",
+ "Always": "Always",
+ "ExceptZero": "ExceptZero",
+ "Negative": "Negative",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts
new file mode 100644
index 0000000000..b5cfef9cab
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.d.ts
@@ -0,0 +1,38 @@
+import { u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * A type capable of looking up General Category mask values from a string name.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html Rust documentation for `PropertyValueNameToEnumMapper`} for more information.
+ */
+export class ICU4XGeneralCategoryNameToMaskMapper {
+
+ /**
+
+ * Get the mask value matching the given name, using strict matching
+
+ * Returns 0 if the name is unknown for this property
+ */
+ get_strict(name: string): u32;
+
+ /**
+
+ * Get the mask value matching the given name, using loose matching
+
+ * Returns 0 if the name is unknown for this property
+ */
+ get_loose(name: string): u32;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategoryGroup.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load(provider: ICU4XDataProvider): ICU4XGeneralCategoryNameToMaskMapper | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js
new file mode 100644
index 0000000000..4f3319123a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGeneralCategoryNameToMaskMapper.js
@@ -0,0 +1,49 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XGeneralCategoryNameToMaskMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGeneralCategoryNameToMaskMapper_destroy(underlying);
+});
+
+export class ICU4XGeneralCategoryNameToMaskMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGeneralCategoryNameToMaskMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get_strict(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XGeneralCategoryNameToMaskMapper_get_strict(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ get_loose(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XGeneralCategoryNameToMaskMapper_get_loose(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ static load(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGeneralCategoryNameToMaskMapper_load(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGeneralCategoryNameToMaskMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..5022d4baa7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html Rust documentation for `GraphemeClusterBreakIterator`} for more information.
+ */
+export class ICU4XGraphemeClusterBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js
new file mode 100644
index 0000000000..a50df59feb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorLatin1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XGraphemeClusterBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XGraphemeClusterBreakIteratorLatin1_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..95d21da695
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html Rust documentation for `GraphemeClusterBreakIterator`} for more information.
+ */
+export class ICU4XGraphemeClusterBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js
new file mode 100644
index 0000000000..cc997daa05
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf16.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XGraphemeClusterBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XGraphemeClusterBreakIteratorUtf16_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..cb78596153
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html Rust documentation for `GraphemeClusterBreakIterator`} for more information.
+ */
+export class ICU4XGraphemeClusterBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js
new file mode 100644
index 0000000000..2a16170dfe
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterBreakIteratorUtf8.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XGraphemeClusterBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XGraphemeClusterBreakIteratorUtf8_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts
new file mode 100644
index 0000000000..860b6206c9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.d.ts
@@ -0,0 +1,48 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XGraphemeClusterBreakIteratorLatin1 } from "./ICU4XGraphemeClusterBreakIteratorLatin1";
+import { ICU4XGraphemeClusterBreakIteratorUtf16 } from "./ICU4XGraphemeClusterBreakIteratorUtf16";
+import { ICU4XGraphemeClusterBreakIteratorUtf8 } from "./ICU4XGraphemeClusterBreakIteratorUtf8";
+
+/**
+
+ * An ICU4X grapheme-cluster-break segmenter, capable of finding grapheme cluster breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html Rust documentation for `GraphemeClusterSegmenter`} for more information.
+ */
+export class ICU4XGraphemeClusterSegmenter {
+
+ /**
+
+ * Construct an {@link ICU4XGraphemeClusterSegmenter `ICU4XGraphemeClusterSegmenter`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XGraphemeClusterSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XGraphemeClusterBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XGraphemeClusterBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.GraphemeClusterSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XGraphemeClusterBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js
new file mode 100644
index 0000000000..91dfea1ba5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGraphemeClusterSegmenter.js
@@ -0,0 +1,53 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XGraphemeClusterBreakIteratorLatin1 } from "./ICU4XGraphemeClusterBreakIteratorLatin1.js"
+import { ICU4XGraphemeClusterBreakIteratorUtf16 } from "./ICU4XGraphemeClusterBreakIteratorUtf16.js"
+import { ICU4XGraphemeClusterBreakIteratorUtf8 } from "./ICU4XGraphemeClusterBreakIteratorUtf8.js"
+
+const ICU4XGraphemeClusterSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGraphemeClusterSegmenter_destroy(underlying);
+});
+
+export class ICU4XGraphemeClusterSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGraphemeClusterSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGraphemeClusterSegmenter_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGraphemeClusterSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XGraphemeClusterBreakIteratorUtf8(wasm.ICU4XGraphemeClusterSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XGraphemeClusterBreakIteratorUtf16(wasm.ICU4XGraphemeClusterSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XGraphemeClusterBreakIteratorLatin1(wasm.ICU4XGraphemeClusterSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts
new file mode 100644
index 0000000000..7beb9ffa9b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.d.ts
@@ -0,0 +1,43 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X TypedDateFormatter object capable of formatting a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} as a string, using the Gregorian Calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html Rust documentation for `TypedDateFormatter`} for more information.
+ */
+export class ICU4XGregorianDateFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianDateFormatter `ICU4XGregorianDateFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.try_new_with_length Rust documentation for `try_new_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XDateLength): ICU4XGregorianDateFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDate `ICU4XIsoDate`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_date(value: ICU4XIsoDate): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js
new file mode 100644
index 0000000000..c9bb1b329f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateFormatter.js
@@ -0,0 +1,74 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XGregorianDateFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGregorianDateFormatter_destroy(underlying);
+});
+
+export class ICU4XGregorianDateFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGregorianDateFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateFormatter_create_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianDateFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_iso_date(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateFormatter_format_iso_date(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..0eb459cc80
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.d.ts
@@ -0,0 +1,34 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An ICU4X TypedDateTimeFormatter object capable of formatting a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} as a string, using the Gregorian Calendar.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html Rust documentation for `TypedDateTimeFormatter`} for more information.
+ */
+export class ICU4XGregorianDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianDateFormatter `ICU4XGregorianDateFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XGregorianDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js
new file mode 100644
index 0000000000..5315ad4c14
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianDateTimeFormatter.js
@@ -0,0 +1,56 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XGregorianDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGregorianDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XGregorianDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGregorianDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianDateTimeFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..1b90d361a9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCustomTimeZone } from "./ICU4XCustomTimeZone";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XIsoTimeZoneOptions } from "./ICU4XIsoTimeZoneOptions";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An object capable of formatting a date time with time zone to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html Rust documentation for `TypedZonedDateTimeFormatter`} for more information.
+ */
+export class ICU4XGregorianZonedDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianZonedDateTimeFormatter `ICU4XGregorianZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses default options for the time zone.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XGregorianZonedDateTimeFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XGregorianZonedDateTimeFormatter `ICU4XGregorianZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths_and_iso_8601_time_zone_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength, zone_options: ICU4XIsoTimeZoneOptions): ICU4XGregorianZonedDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} and {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TypedZonedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime_with_custom_time_zone(datetime: ICU4XIsoDateTime, time_zone: ICU4XCustomTimeZone): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js
new file mode 100644
index 0000000000..3e5fa8007b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XGregorianZonedDateTimeFormatter.js
@@ -0,0 +1,79 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XGregorianZonedDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XGregorianZonedDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XGregorianZonedDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XGregorianZonedDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianZonedDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_lengths_and_iso_8601_time_zone_fallback(arg_provider, arg_locale, arg_date_length, arg_time_length, arg_zone_options) {
+ const field_format_arg_zone_options = arg_zone_options["format"];
+ const field_minutes_arg_zone_options = arg_zone_options["minutes"];
+ const field_seconds_arg_zone_options = arg_zone_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length], ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_zone_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_zone_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_zone_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XGregorianZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_iso_datetime_with_custom_time_zone(arg_datetime, arg_time_zone) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XGregorianZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_datetime.underlying, arg_time_zone.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts
new file mode 100644
index 0000000000..0d34c90101
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.d.ts
@@ -0,0 +1,21 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An object capable of mapping from an IANA time zone ID to a BCP-47 ID.
+
+ * This can be used via `try_set_iana_time_zone_id()` on {@link crate::timezone::ffi::ICU4XCustomTimeZone `ICU4XCustomTimeZone`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html Rust documentation for `IanaToBcp47Mapper`} for more information.
+ */
+export class ICU4XIanaToBcp47Mapper {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.IanaToBcp47Mapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XIanaToBcp47Mapper | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js
new file mode 100644
index 0000000000..ee2c931898
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIanaToBcp47Mapper.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XIanaToBcp47Mapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XIanaToBcp47Mapper_destroy(underlying);
+});
+
+export class ICU4XIanaToBcp47Mapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XIanaToBcp47Mapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XIanaToBcp47Mapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XIanaToBcp47Mapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts
new file mode 100644
index 0000000000..cf1cc1b15f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDate.d.ts
@@ -0,0 +1,131 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XDate } from "./ICU4XDate";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X Date object capable of containing a ISO-8601 date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html Rust documentation for `Date`} for more information.
+ */
+export class ICU4XIsoDate {
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDate `ICU4XIsoDate`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.try_new_iso_date Rust documentation for `try_new_iso_date`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(year: i32, month: u8, day: u8): ICU4XIsoDate | never;
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDate `ICU4XIsoDate`} representing January 1, 1970.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.unix_epoch Rust documentation for `unix_epoch`} for more information.
+ */
+ static create_for_unix_epoch(): ICU4XIsoDate;
+
+ /**
+
+ * Convert this date to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDate;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.to_any Rust documentation for `to_any`} for more information.
+ */
+ to_any(): ICU4XDate;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ month(): u32;
+
+ /**
+
+ * Returns the year number for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year(): i32;
+
+ /**
+
+ * Returns if the year is a leap year for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year Rust documentation for `is_in_leap_year`} for more information.
+ */
+ is_in_leap_year(): boolean;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDate.js b/intl/icu_capi/js/package/lib/ICU4XIsoDate.js
new file mode 100644
index 0000000000..6fcfaf2b09
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDate.js
@@ -0,0 +1,104 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDate } from "./ICU4XDate.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XIsoDate_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XIsoDate_destroy(underlying);
+});
+
+export class ICU4XIsoDate {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XIsoDate_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_year, arg_month, arg_day) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XIsoDate_create(diplomat_receive_buffer, arg_year, arg_month, arg_day);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XIsoDate(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_for_unix_epoch() {
+ return new ICU4XIsoDate(wasm.ICU4XIsoDate_create_for_unix_epoch(), true, []);
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDate(wasm.ICU4XIsoDate_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ to_any() {
+ return new ICU4XDate(wasm.ICU4XIsoDate_to_any(this.underlying), true, []);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XIsoDate_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XIsoDate_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XIsoDate_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XIsoDate_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ month() {
+ return wasm.ICU4XIsoDate_month(this.underlying);
+ }
+
+ year() {
+ return wasm.ICU4XIsoDate_year(this.underlying);
+ }
+
+ is_in_leap_year() {
+ return wasm.ICU4XIsoDate_is_in_leap_year(this.underlying);
+ }
+
+ months_in_year() {
+ return wasm.ICU4XIsoDate_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XIsoDate_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XIsoDate_days_in_year(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts
new file mode 100644
index 0000000000..ebf1d5f8d2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.d.ts
@@ -0,0 +1,199 @@
+import { u8, u16, i32, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCalendar } from "./ICU4XCalendar";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDate } from "./ICU4XIsoDate";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XTime } from "./ICU4XTime";
+import { ICU4XWeekCalculator } from "./ICU4XWeekCalculator";
+import { ICU4XWeekOf } from "./ICU4XWeekOf";
+
+/**
+
+ * An ICU4X DateTime object capable of containing a ISO-8601 date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html Rust documentation for `DateTime`} for more information.
+ */
+export class ICU4XIsoDateTime {
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} from the specified date and time.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.try_new_iso_datetime Rust documentation for `try_new_iso_datetime`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(year: i32, month: u8, day: u8, hour: u8, minute: u8, second: u8, nanosecond: u32): ICU4XIsoDateTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} from an {@link ICU4XIsoDate `ICU4XIsoDate`} and {@link ICU4XTime `ICU4XTime`} object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.new Rust documentation for `new`} for more information.
+ */
+ static crate_from_date_and_time(date: ICU4XIsoDate, time: ICU4XTime): ICU4XIsoDateTime;
+
+ /**
+
+ * Construct from the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.from_minutes_since_local_unix_epoch Rust documentation for `from_minutes_since_local_unix_epoch`} for more information.
+ */
+ static create_from_minutes_since_local_unix_epoch(minutes: i32): ICU4XIsoDateTime;
+
+ /**
+
+ * Gets the date contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.date Rust documentation for `date`} for more information.
+ */
+ date(): ICU4XIsoDate;
+
+ /**
+
+ * Gets the time contained in this object
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#structfield.time Rust documentation for `time`} for more information.
+ */
+ time(): ICU4XTime;
+
+ /**
+
+ * Converts this to an {@link ICU4XDateTime `ICU4XDateTime`} capable of being mixed with dates of other calendars
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_any Rust documentation for `to_any`} for more information.
+ */
+ to_any(): ICU4XDateTime;
+
+ /**
+
+ * Gets the minutes since the local unix epoch for this date (Jan 1 1970, 00:00)
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.minutes_since_local_unix_epoch Rust documentation for `minutes_since_local_unix_epoch`} for more information.
+ */
+ minutes_since_local_unix_epoch(): i32;
+
+ /**
+
+ * Convert this datetime to one in a different calendar
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.DateTime.html#method.to_calendar Rust documentation for `to_calendar`} for more information.
+ */
+ to_calendar(calendar: ICU4XCalendar): ICU4XDateTime;
+
+ /**
+
+ * Returns the hour in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour Rust documentation for `hour`} for more information.
+ */
+ hour(): u8;
+
+ /**
+
+ * Returns the minute in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute Rust documentation for `minute`} for more information.
+ */
+ minute(): u8;
+
+ /**
+
+ * Returns the second in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second Rust documentation for `second`} for more information.
+ */
+ second(): u8;
+
+ /**
+
+ * Returns the nanosecond in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond Rust documentation for `nanosecond`} for more information.
+ */
+ nanosecond(): u32;
+
+ /**
+
+ * Returns the 1-indexed day in the month for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_month Rust documentation for `day_of_month`} for more information.
+ */
+ day_of_month(): u32;
+
+ /**
+
+ * Returns the day in the week for this day
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.day_of_week Rust documentation for `day_of_week`} for more information.
+ */
+ day_of_week(): ICU4XIsoWeekday;
+
+ /**
+
+ * Returns the week number in this month, 1-indexed, based on what is considered the first day of the week (often a locale preference).
+
+ * `first_weekday` can be obtained via `first_weekday()` on {@link ICU4XWeekCalculator `ICU4XWeekCalculator`}
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_month Rust documentation for `week_of_month`} for more information.
+ */
+ week_of_month(first_weekday: ICU4XIsoWeekday): u32;
+
+ /**
+
+ * Returns the week number in this year, using week data
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.week_of_year Rust documentation for `week_of_year`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ week_of_year(calculator: ICU4XWeekCalculator): ICU4XWeekOf | never;
+
+ /**
+
+ * Returns 1-indexed number of the month of this date in its year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.month Rust documentation for `month`} for more information.
+ */
+ month(): u32;
+
+ /**
+
+ * Returns the year number for this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.year Rust documentation for `year`} for more information.
+ */
+ year(): i32;
+
+ /**
+
+ * Returns whether this date is in a leap year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.is_in_leap_year Rust documentation for `is_in_leap_year`} for more information.
+ */
+ is_in_leap_year(): boolean;
+
+ /**
+
+ * Returns the number of months in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.months_in_year Rust documentation for `months_in_year`} for more information.
+ */
+ months_in_year(): u8;
+
+ /**
+
+ * Returns the number of days in the month represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_month Rust documentation for `days_in_month`} for more information.
+ */
+ days_in_month(): u8;
+
+ /**
+
+ * Returns the number of days in the year represented by this date
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/struct.Date.html#method.days_in_year Rust documentation for `days_in_year`} for more information.
+ */
+ days_in_year(): u16;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js
new file mode 100644
index 0000000000..320361285d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoDateTime.js
@@ -0,0 +1,138 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateTime } from "./ICU4XDateTime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoDate } from "./ICU4XIsoDate.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+import { ICU4XTime } from "./ICU4XTime.js"
+import { ICU4XWeekOf } from "./ICU4XWeekOf.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+const ICU4XIsoDateTime_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XIsoDateTime_destroy(underlying);
+});
+
+export class ICU4XIsoDateTime {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XIsoDateTime_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XIsoDateTime_create(diplomat_receive_buffer, arg_year, arg_month, arg_day, arg_hour, arg_minute, arg_second, arg_nanosecond);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XIsoDateTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static crate_from_date_and_time(arg_date, arg_time) {
+ return new ICU4XIsoDateTime(wasm.ICU4XIsoDateTime_crate_from_date_and_time(arg_date.underlying, arg_time.underlying), true, []);
+ }
+
+ static create_from_minutes_since_local_unix_epoch(arg_minutes) {
+ return new ICU4XIsoDateTime(wasm.ICU4XIsoDateTime_create_from_minutes_since_local_unix_epoch(arg_minutes), true, []);
+ }
+
+ date() {
+ return new ICU4XIsoDate(wasm.ICU4XIsoDateTime_date(this.underlying), true, []);
+ }
+
+ time() {
+ return new ICU4XTime(wasm.ICU4XIsoDateTime_time(this.underlying), true, []);
+ }
+
+ to_any() {
+ return new ICU4XDateTime(wasm.ICU4XIsoDateTime_to_any(this.underlying), true, []);
+ }
+
+ minutes_since_local_unix_epoch() {
+ return wasm.ICU4XIsoDateTime_minutes_since_local_unix_epoch(this.underlying);
+ }
+
+ to_calendar(arg_calendar) {
+ return new ICU4XDateTime(wasm.ICU4XIsoDateTime_to_calendar(this.underlying, arg_calendar.underlying), true, []);
+ }
+
+ hour() {
+ return wasm.ICU4XIsoDateTime_hour(this.underlying);
+ }
+
+ minute() {
+ return wasm.ICU4XIsoDateTime_minute(this.underlying);
+ }
+
+ second() {
+ return wasm.ICU4XIsoDateTime_second(this.underlying);
+ }
+
+ nanosecond() {
+ return wasm.ICU4XIsoDateTime_nanosecond(this.underlying);
+ }
+
+ day_of_month() {
+ return wasm.ICU4XIsoDateTime_day_of_month(this.underlying);
+ }
+
+ day_of_week() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XIsoDateTime_day_of_week(this.underlying)];
+ }
+
+ week_of_month(arg_first_weekday) {
+ return wasm.ICU4XIsoDateTime_week_of_month(this.underlying, ICU4XIsoWeekday_js_to_rust[arg_first_weekday]);
+ }
+
+ week_of_year(arg_calculator) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(9, 4);
+ wasm.ICU4XIsoDateTime_week_of_year(diplomat_receive_buffer, this.underlying, arg_calculator.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 8);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekOf(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 9, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ month() {
+ return wasm.ICU4XIsoDateTime_month(this.underlying);
+ }
+
+ year() {
+ return wasm.ICU4XIsoDateTime_year(this.underlying);
+ }
+
+ is_in_leap_year() {
+ return wasm.ICU4XIsoDateTime_is_in_leap_year(this.underlying);
+ }
+
+ months_in_year() {
+ return wasm.ICU4XIsoDateTime_months_in_year(this.underlying);
+ }
+
+ days_in_month() {
+ return wasm.ICU4XIsoDateTime_days_in_month(this.underlying);
+ }
+
+ days_in_year() {
+ return wasm.ICU4XIsoDateTime_days_in_year(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts
new file mode 100644
index 0000000000..8889318a02
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoFormat.html Rust documentation for `IsoFormat`} for more information.
+ */
+export enum ICU4XIsoTimeZoneFormat {
+ /**
+ */
+ Basic = 'Basic',
+ /**
+ */
+ Extended = 'Extended',
+ /**
+ */
+ UtcBasic = 'UtcBasic',
+ /**
+ */
+ UtcExtended = 'UtcExtended',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js
new file mode 100644
index 0000000000..aae553da77
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneFormat.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoTimeZoneFormat_js_to_rust = {
+ "Basic": 0,
+ "Extended": 1,
+ "UtcBasic": 2,
+ "UtcExtended": 3,
+};
+
+export const ICU4XIsoTimeZoneFormat_rust_to_js = {
+ [0]: "Basic",
+ [1]: "Extended",
+ [2]: "UtcBasic",
+ [3]: "UtcExtended",
+};
+
+export const ICU4XIsoTimeZoneFormat = {
+ "Basic": "Basic",
+ "Extended": "Extended",
+ "UtcBasic": "UtcBasic",
+ "UtcExtended": "UtcExtended",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts
new file mode 100644
index 0000000000..07ed133c18
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoMinutes.html Rust documentation for `IsoMinutes`} for more information.
+ */
+export enum ICU4XIsoTimeZoneMinuteDisplay {
+ /**
+ */
+ Required = 'Required',
+ /**
+ */
+ Optional = 'Optional',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js
new file mode 100644
index 0000000000..f6daf3ef46
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneMinuteDisplay.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoTimeZoneMinuteDisplay_js_to_rust = {
+ "Required": 0,
+ "Optional": 1,
+};
+
+export const ICU4XIsoTimeZoneMinuteDisplay_rust_to_js = {
+ [0]: "Required",
+ [1]: "Optional",
+};
+
+export const ICU4XIsoTimeZoneMinuteDisplay = {
+ "Required": "Required",
+ "Optional": "Optional",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts
new file mode 100644
index 0000000000..d150b2d2e5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.d.ts
@@ -0,0 +1,11 @@
+import { ICU4XIsoTimeZoneFormat } from "./ICU4XIsoTimeZoneFormat";
+import { ICU4XIsoTimeZoneMinuteDisplay } from "./ICU4XIsoTimeZoneMinuteDisplay";
+import { ICU4XIsoTimeZoneSecondDisplay } from "./ICU4XIsoTimeZoneSecondDisplay";
+
+/**
+ */
+export class ICU4XIsoTimeZoneOptions {
+ format: ICU4XIsoTimeZoneFormat;
+ minutes: ICU4XIsoTimeZoneMinuteDisplay;
+ seconds: ICU4XIsoTimeZoneSecondDisplay;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js
new file mode 100644
index 0000000000..5e9e8f16a7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneOptions.js
@@ -0,0 +1,13 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+
+export class ICU4XIsoTimeZoneOptions {
+ constructor(underlying) {
+ this.format = ICU4XIsoTimeZoneFormat_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.minutes = ICU4XIsoTimeZoneMinuteDisplay_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.seconds = ICU4XIsoTimeZoneSecondDisplay_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 8)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts
new file mode 100644
index 0000000000..77f1c9e8b7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.IsoSeconds.html Rust documentation for `IsoSeconds`} for more information.
+ */
+export enum ICU4XIsoTimeZoneSecondDisplay {
+ /**
+ */
+ Optional = 'Optional',
+ /**
+ */
+ Never = 'Never',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js
new file mode 100644
index 0000000000..d57b7139e1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoTimeZoneSecondDisplay.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoTimeZoneSecondDisplay_js_to_rust = {
+ "Optional": 0,
+ "Never": 1,
+};
+
+export const ICU4XIsoTimeZoneSecondDisplay_rust_to_js = {
+ [0]: "Optional",
+ [1]: "Never",
+};
+
+export const ICU4XIsoTimeZoneSecondDisplay = {
+ "Optional": "Optional",
+ "Never": "Never",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts
new file mode 100644
index 0000000000..873f20a55f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.d.ts
@@ -0,0 +1,26 @@
+
+/**
+ */
+export enum ICU4XIsoWeekday {
+ /**
+ */
+ Monday = 'Monday',
+ /**
+ */
+ Tuesday = 'Tuesday',
+ /**
+ */
+ Wednesday = 'Wednesday',
+ /**
+ */
+ Thursday = 'Thursday',
+ /**
+ */
+ Friday = 'Friday',
+ /**
+ */
+ Saturday = 'Saturday',
+ /**
+ */
+ Sunday = 'Sunday',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js
new file mode 100644
index 0000000000..71912bd0e3
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XIsoWeekday.js
@@ -0,0 +1,32 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XIsoWeekday_js_to_rust = {
+ "Monday": 1,
+ "Tuesday": 2,
+ "Wednesday": 3,
+ "Thursday": 4,
+ "Friday": 5,
+ "Saturday": 6,
+ "Sunday": 7,
+};
+
+export const ICU4XIsoWeekday_rust_to_js = {
+ [1]: "Monday",
+ [2]: "Tuesday",
+ [3]: "Wednesday",
+ [4]: "Thursday",
+ [5]: "Friday",
+ [6]: "Saturday",
+ [7]: "Sunday",
+};
+
+export const ICU4XIsoWeekday = {
+ "Monday": "Monday",
+ "Tuesday": "Tuesday",
+ "Wednesday": "Wednesday",
+ "Thursday": "Thursday",
+ "Friday": "Friday",
+ "Saturday": "Saturday",
+ "Sunday": "Sunday",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts
new file mode 100644
index 0000000000..8c391e8ebb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/options/enum.LanguageDisplay.html Rust documentation for `LanguageDisplay`} for more information.
+ */
+export enum ICU4XLanguageDisplay {
+ /**
+ */
+ Dialect = 'Dialect',
+ /**
+ */
+ Standard = 'Standard',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js
new file mode 100644
index 0000000000..abac8082e0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLanguageDisplay.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLanguageDisplay_js_to_rust = {
+ "Dialect": 0,
+ "Standard": 1,
+};
+
+export const ICU4XLanguageDisplay_rust_to_js = {
+ [0]: "Dialect",
+ [1]: "Standard",
+};
+
+export const ICU4XLanguageDisplay = {
+ "Dialect": "Dialect",
+ "Standard": "Standard",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts
new file mode 100644
index 0000000000..b170cdb94b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/enum.LeadingAdjustment.html Rust documentation for `LeadingAdjustment`} for more information.
+ */
+export enum ICU4XLeadingAdjustment {
+ /**
+ */
+ Auto = 'Auto',
+ /**
+ */
+ None = 'None',
+ /**
+ */
+ ToCased = 'ToCased',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js
new file mode 100644
index 0000000000..e57aa259ac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLeadingAdjustment.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLeadingAdjustment_js_to_rust = {
+ "Auto": 0,
+ "None": 1,
+ "ToCased": 2,
+};
+
+export const ICU4XLeadingAdjustment_rust_to_js = {
+ [0]: "Auto",
+ [1]: "None",
+ [2]: "ToCased",
+};
+
+export const ICU4XLeadingAdjustment = {
+ "Auto": "Auto",
+ "None": "None",
+ "ToCased": "ToCased",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..e8dfe70b58
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.d.ts
@@ -0,0 +1,18 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html Rust documentation for `LineBreakIterator`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorLatin1.html 1}
+ */
+export class ICU4XLineBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js
new file mode 100644
index 0000000000..7bd8f13153
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorLatin1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLineBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XLineBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XLineBreakIteratorLatin1_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..4a1b41ba9d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.d.ts
@@ -0,0 +1,18 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html Rust documentation for `LineBreakIterator`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorUtf16.html 1}
+ */
+export class ICU4XLineBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js
new file mode 100644
index 0000000000..3ac2f871ac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf16.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLineBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XLineBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XLineBreakIteratorUtf16_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..9a576f1224
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.d.ts
@@ -0,0 +1,18 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html Rust documentation for `LineBreakIterator`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/segmenter/type.LineBreakIteratorPotentiallyIllFormedUtf8.html 1}
+ */
+export class ICU4XLineBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js
new file mode 100644
index 0000000000..a9802d0033
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakIteratorUtf8.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLineBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XLineBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XLineBreakIteratorUtf8_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts
new file mode 100644
index 0000000000..9dd3f2e841
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.d.ts
@@ -0,0 +1,12 @@
+import { ICU4XLineBreakStrictness } from "./ICU4XLineBreakStrictness";
+import { ICU4XLineBreakWordOption } from "./ICU4XLineBreakWordOption";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineBreakOptions.html Rust documentation for `LineBreakOptions`} for more information.
+ */
+export class ICU4XLineBreakOptionsV1 {
+ strictness: ICU4XLineBreakStrictness;
+ word_option: ICU4XLineBreakWordOption;
+ ja_zh: boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js
new file mode 100644
index 0000000000..ee3a48175f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakOptionsV1.js
@@ -0,0 +1,12 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLineBreakStrictness_js_to_rust, ICU4XLineBreakStrictness_rust_to_js } from "./ICU4XLineBreakStrictness.js"
+import { ICU4XLineBreakWordOption_js_to_rust, ICU4XLineBreakWordOption_rust_to_js } from "./ICU4XLineBreakWordOption.js"
+
+export class ICU4XLineBreakOptionsV1 {
+ constructor(underlying) {
+ this.strictness = ICU4XLineBreakStrictness_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.word_option = ICU4XLineBreakWordOption_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ this.ja_zh = (new Uint8Array(wasm.memory.buffer, underlying + 8, 1))[0] == 1;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts
new file mode 100644
index 0000000000..f92e35a751
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakStrictness.html Rust documentation for `LineBreakStrictness`} for more information.
+ */
+export enum ICU4XLineBreakStrictness {
+ /**
+ */
+ Loose = 'Loose',
+ /**
+ */
+ Normal = 'Normal',
+ /**
+ */
+ Strict = 'Strict',
+ /**
+ */
+ Anywhere = 'Anywhere',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js
new file mode 100644
index 0000000000..c52030b79f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakStrictness.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLineBreakStrictness_js_to_rust = {
+ "Loose": 0,
+ "Normal": 1,
+ "Strict": 2,
+ "Anywhere": 3,
+};
+
+export const ICU4XLineBreakStrictness_rust_to_js = {
+ [0]: "Loose",
+ [1]: "Normal",
+ [2]: "Strict",
+ [3]: "Anywhere",
+};
+
+export const ICU4XLineBreakStrictness = {
+ "Loose": "Loose",
+ "Normal": "Normal",
+ "Strict": "Strict",
+ "Anywhere": "Anywhere",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts
new file mode 100644
index 0000000000..256ddb0e08
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/enum.LineBreakWordOption.html Rust documentation for `LineBreakWordOption`} for more information.
+ */
+export enum ICU4XLineBreakWordOption {
+ /**
+ */
+ Normal = 'Normal',
+ /**
+ */
+ BreakAll = 'BreakAll',
+ /**
+ */
+ KeepAll = 'KeepAll',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js
new file mode 100644
index 0000000000..60094fdafd
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineBreakWordOption.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLineBreakWordOption_js_to_rust = {
+ "Normal": 0,
+ "BreakAll": 1,
+ "KeepAll": 2,
+};
+
+export const ICU4XLineBreakWordOption_rust_to_js = {
+ [0]: "Normal",
+ [1]: "BreakAll",
+ [2]: "KeepAll",
+};
+
+export const ICU4XLineBreakWordOption = {
+ "Normal": "Normal",
+ "BreakAll": "BreakAll",
+ "KeepAll": "KeepAll",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts
new file mode 100644
index 0000000000..47ae8b1891
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.d.ts
@@ -0,0 +1,94 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLineBreakIteratorLatin1 } from "./ICU4XLineBreakIteratorLatin1";
+import { ICU4XLineBreakIteratorUtf16 } from "./ICU4XLineBreakIteratorUtf16";
+import { ICU4XLineBreakIteratorUtf8 } from "./ICU4XLineBreakIteratorUtf8";
+import { ICU4XLineBreakOptionsV1 } from "./ICU4XLineBreakOptionsV1";
+
+/**
+
+ * An ICU4X line-break segmenter, capable of finding breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html Rust documentation for `LineSegmenter`} for more information.
+ */
+export class ICU4XLineSegmenter {
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto Rust documentation for `new_auto`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_auto(provider: ICU4XDataProvider): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm Rust documentation for `new_lstm`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_lstm(provider: ICU4XDataProvider): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with default options and dictionary payload data for Burmese, Khmer, Lao, and Thai..
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary Rust documentation for `new_dictionary`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_dictionary(provider: ICU4XDataProvider): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options. It automatically loads the best available payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_auto_with_options Rust documentation for `new_auto_with_options`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_auto_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options and LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_lstm_with_options Rust documentation for `new_lstm_with_options`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_lstm_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Construct a {@link ICU4XLineSegmenter `ICU4XLineSegmenter`} with custom options and dictionary payload data for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.new_dictionary_with_options Rust documentation for `new_dictionary_with_options`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_dictionary_with_options_v1(provider: ICU4XDataProvider, options: ICU4XLineBreakOptionsV1): ICU4XLineSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XLineBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XLineBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.LineSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XLineBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js
new file mode 100644
index 0000000000..eabb317515
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLineSegmenter.js
@@ -0,0 +1,149 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLineBreakIteratorLatin1 } from "./ICU4XLineBreakIteratorLatin1.js"
+import { ICU4XLineBreakIteratorUtf16 } from "./ICU4XLineBreakIteratorUtf16.js"
+import { ICU4XLineBreakIteratorUtf8 } from "./ICU4XLineBreakIteratorUtf8.js"
+import { ICU4XLineBreakStrictness_js_to_rust, ICU4XLineBreakStrictness_rust_to_js } from "./ICU4XLineBreakStrictness.js"
+import { ICU4XLineBreakWordOption_js_to_rust, ICU4XLineBreakWordOption_rust_to_js } from "./ICU4XLineBreakWordOption.js"
+
+const ICU4XLineSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLineSegmenter_destroy(underlying);
+});
+
+export class ICU4XLineSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLineSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_auto(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_auto(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_lstm(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_lstm(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_dictionary(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_dictionary(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_auto_with_options_v1(arg_provider, arg_options) {
+ const field_strictness_arg_options = arg_options["strictness"];
+ const field_word_option_arg_options = arg_options["word_option"];
+ const field_ja_zh_arg_options = arg_options["ja_zh"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_auto_with_options_v1(diplomat_receive_buffer, arg_provider.underlying, ICU4XLineBreakStrictness_js_to_rust[field_strictness_arg_options], ICU4XLineBreakWordOption_js_to_rust[field_word_option_arg_options], field_ja_zh_arg_options);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_lstm_with_options_v1(arg_provider, arg_options) {
+ const field_strictness_arg_options = arg_options["strictness"];
+ const field_word_option_arg_options = arg_options["word_option"];
+ const field_ja_zh_arg_options = arg_options["ja_zh"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_lstm_with_options_v1(diplomat_receive_buffer, arg_provider.underlying, ICU4XLineBreakStrictness_js_to_rust[field_strictness_arg_options], ICU4XLineBreakWordOption_js_to_rust[field_word_option_arg_options], field_ja_zh_arg_options);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_dictionary_with_options_v1(arg_provider, arg_options) {
+ const field_strictness_arg_options = arg_options["strictness"];
+ const field_word_option_arg_options = arg_options["word_option"];
+ const field_ja_zh_arg_options = arg_options["ja_zh"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLineSegmenter_create_dictionary_with_options_v1(diplomat_receive_buffer, arg_provider.underlying, ICU4XLineBreakStrictness_js_to_rust[field_strictness_arg_options], ICU4XLineBreakWordOption_js_to_rust[field_word_option_arg_options], field_ja_zh_arg_options);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLineSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XLineBreakIteratorUtf8(wasm.ICU4XLineSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XLineBreakIteratorUtf16(wasm.ICU4XLineSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XLineBreakIteratorLatin1(wasm.ICU4XLineSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XList.d.ts b/intl/icu_capi/js/package/lib/ICU4XList.d.ts
new file mode 100644
index 0000000000..facf54a8cb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XList.d.ts
@@ -0,0 +1,34 @@
+import { usize } from "./diplomat-runtime"
+
+/**
+
+ * A list of strings
+ */
+export class ICU4XList {
+
+ /**
+
+ * Create a new list of strings
+ */
+ static create(): ICU4XList;
+
+ /**
+
+ * Create a new list of strings with preallocated space to hold at least `capacity` elements
+ */
+ static create_with_capacity(capacity: usize): ICU4XList;
+
+ /**
+
+ * Push a string to the list
+
+ * For C++ users, potentially invalid UTF8 will be handled via REPLACEMENT CHARACTERs
+ */
+ push(val: string): void;
+
+ /**
+
+ * The number of elements in this list
+ */
+ len(): usize;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XList.js b/intl/icu_capi/js/package/lib/ICU4XList.js
new file mode 100644
index 0000000000..55475df4db
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XList.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XList_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XList_destroy(underlying);
+});
+
+export class ICU4XList {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XList_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create() {
+ return new ICU4XList(wasm.ICU4XList_create(), true, []);
+ }
+
+ static create_with_capacity(arg_capacity) {
+ return new ICU4XList(wasm.ICU4XList_create_with_capacity(arg_capacity), true, []);
+ }
+
+ push(arg_val) {
+ const buf_arg_val = diplomatRuntime.DiplomatBuf.str(wasm, arg_val);
+ wasm.ICU4XList_push(this.underlying, buf_arg_val.ptr, buf_arg_val.size);
+ buf_arg_val.free();
+ }
+
+ len() {
+ return wasm.ICU4XList_len(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts
new file mode 100644
index 0000000000..c60883f02f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListFormatter.d.ts
@@ -0,0 +1,47 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XList } from "./ICU4XList";
+import { ICU4XListLength } from "./ICU4XListLength";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html Rust documentation for `ListFormatter`} for more information.
+ */
+export class ICU4XListFormatter {
+
+ /**
+
+ * Construct a new ICU4XListFormatter instance for And patterns
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and_with_length Rust documentation for `try_new_and_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_and_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never;
+
+ /**
+
+ * Construct a new ICU4XListFormatter instance for And patterns
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or_with_length Rust documentation for `try_new_or_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_or_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never;
+
+ /**
+
+ * Construct a new ICU4XListFormatter instance for And patterns
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit_with_length Rust documentation for `try_new_unit_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_unit_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XListLength): ICU4XListFormatter | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format(list: ICU4XList): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XListFormatter.js b/intl/icu_capi/js/package/lib/ICU4XListFormatter.js
new file mode 100644
index 0000000000..63ef80b23f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListFormatter.js
@@ -0,0 +1,89 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XListLength_js_to_rust, ICU4XListLength_rust_to_js } from "./ICU4XListLength.js"
+
+const ICU4XListFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XListFormatter_destroy(underlying);
+});
+
+export class ICU4XListFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XListFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_and_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_create_and_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XListLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XListFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_or_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_create_or_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XListLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XListFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_unit_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_create_unit_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XListLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XListFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format(arg_list) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XListFormatter_format(diplomat_receive_buffer, this.underlying, arg_list.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XListLength.d.ts b/intl/icu_capi/js/package/lib/ICU4XListLength.d.ts
new file mode 100644
index 0000000000..4aa3e3b4d5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListLength.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/list/enum.ListLength.html Rust documentation for `ListLength`} for more information.
+ */
+export enum ICU4XListLength {
+ /**
+ */
+ Wide = 'Wide',
+ /**
+ */
+ Short = 'Short',
+ /**
+ */
+ Narrow = 'Narrow',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XListLength.js b/intl/icu_capi/js/package/lib/ICU4XListLength.js
new file mode 100644
index 0000000000..171e851b4d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XListLength.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XListLength_js_to_rust = {
+ "Wide": 0,
+ "Short": 1,
+ "Narrow": 2,
+};
+
+export const ICU4XListLength_rust_to_js = {
+ [0]: "Wide",
+ [1]: "Short",
+ [2]: "Narrow",
+};
+
+export const ICU4XListLength = {
+ "Wide": "Wide",
+ "Short": "Short",
+ "Narrow": "Narrow",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocale.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocale.d.ts
new file mode 100644
index 0000000000..b18b577302
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocale.d.ts
@@ -0,0 +1,159 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XOrdering } from "./ICU4XOrdering";
+
+/**
+
+ * An ICU4X Locale, capable of representing strings like `"en-US"`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html Rust documentation for `Locale`} for more information.
+ */
+export class ICU4XLocale {
+
+ /**
+
+ * Construct an {@link ICU4XLocale `ICU4XLocale`} from an locale identifier.
+
+ * This will run the complete locale parsing algorithm. If code size and performance are critical and the locale is of a known shape (such as `aa-BB`) use `create_und`, `set_language`, `set_script`, and `set_region`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(name: string): ICU4XLocale | never;
+
+ /**
+
+ * Construct a default undefined {@link ICU4XLocale `ICU4XLocale`} "und".
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#associatedconstant.UND Rust documentation for `UND`} for more information.
+ */
+ static create_und(): ICU4XLocale;
+
+ /**
+
+ * Clones the {@link ICU4XLocale `ICU4XLocale`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html Rust documentation for `Locale`} for more information.
+ */
+ clone(): ICU4XLocale;
+
+ /**
+
+ * Write a string representation of the `LanguageIdentifier` part of {@link ICU4XLocale `ICU4XLocale`} to `write`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ basename(): string | never;
+
+ /**
+
+ * Write a string representation of the unicode extension to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.extensions Rust documentation for `extensions`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ get_unicode_extension(bytes: string): string | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} language to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ language(): string | never;
+
+ /**
+
+ * Set the language part of the {@link ICU4XLocale `ICU4XLocale`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_language(bytes: string): void | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} region to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ region(): string | never;
+
+ /**
+
+ * Set the region part of the {@link ICU4XLocale `ICU4XLocale`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_region(bytes: string): void | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} script to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#structfield.id Rust documentation for `id`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ script(): string | never;
+
+ /**
+
+ * Set the script part of the {@link ICU4XLocale `ICU4XLocale`}. Pass an empty string to remove the script.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.try_from_bytes Rust documentation for `try_from_bytes`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ set_script(bytes: string): void | never;
+
+ /**
+
+ * Best effort locale canonicalizer that doesn't need any data
+
+ * Use ICU4XLocaleCanonicalizer for better control and functionality
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.canonicalize Rust documentation for `canonicalize`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static canonicalize(bytes: string): string | never;
+
+ /**
+
+ * Write a string representation of {@link ICU4XLocale `ICU4XLocale`} to `write`
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.write_to Rust documentation for `write_to`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ to_string(): string | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.normalizing_eq Rust documentation for `normalizing_eq`} for more information.
+ */
+ normalizing_eq(other: string): boolean;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid/struct.Locale.html#method.strict_cmp Rust documentation for `strict_cmp`} for more information.
+ */
+ strict_cmp(other: string): ICU4XOrdering;
+
+ /**
+
+ * Deprecated
+
+ * Use `create_from_string("en").
+ */
+ static create_en(): ICU4XLocale;
+
+ /**
+
+ * Deprecated
+
+ * Use `create_from_string("bn").
+ */
+ static create_bn(): ICU4XLocale;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocale.js b/intl/icu_capi/js/package/lib/ICU4XLocale.js
new file mode 100644
index 0000000000..b3cb139842
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocale.js
@@ -0,0 +1,268 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XOrdering_js_to_rust, ICU4XOrdering_rust_to_js } from "./ICU4XOrdering.js"
+
+const ICU4XLocale_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocale_destroy(underlying);
+});
+
+export class ICU4XLocale {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocale_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_string(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_create_from_string(diplomat_receive_buffer, buf_arg_name.ptr, buf_arg_name.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocale(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ static create_und() {
+ return new ICU4XLocale(wasm.ICU4XLocale_create_und(), true, []);
+ }
+
+ clone() {
+ return new ICU4XLocale(wasm.ICU4XLocale_clone(this.underlying), true, []);
+ }
+
+ basename() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_basename(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ get_unicode_extension(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_get_unicode_extension(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ language() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_language(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_language(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_set_language(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ region() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_region(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_region(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_set_region(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ script() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_script(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ set_script(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_set_script(diplomat_receive_buffer, this.underlying, buf_arg_bytes.ptr, buf_arg_bytes.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ static canonicalize(arg_bytes) {
+ const buf_arg_bytes = diplomatRuntime.DiplomatBuf.str(wasm, arg_bytes);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_canonicalize(diplomat_receive_buffer, buf_arg_bytes.ptr, buf_arg_bytes.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_bytes.free();
+ return diplomat_out;
+ }
+
+ to_string() {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocale_to_string(diplomat_receive_buffer, this.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ normalizing_eq(arg_other) {
+ const buf_arg_other = diplomatRuntime.DiplomatBuf.str(wasm, arg_other);
+ const diplomat_out = wasm.ICU4XLocale_normalizing_eq(this.underlying, buf_arg_other.ptr, buf_arg_other.size);
+ buf_arg_other.free();
+ return diplomat_out;
+ }
+
+ strict_cmp(arg_other) {
+ const buf_arg_other = diplomatRuntime.DiplomatBuf.str(wasm, arg_other);
+ const diplomat_out = ICU4XOrdering_rust_to_js[wasm.ICU4XLocale_strict_cmp(this.underlying, buf_arg_other.ptr, buf_arg_other.size)];
+ buf_arg_other.free();
+ return diplomat_out;
+ }
+
+ static create_en() {
+ return new ICU4XLocale(wasm.ICU4XLocale_create_en(), true, []);
+ }
+
+ static create_bn() {
+ return new ICU4XLocale(wasm.ICU4XLocale_create_bn(), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts
new file mode 100644
index 0000000000..2263c73e2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.d.ts
@@ -0,0 +1,40 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTransformResult } from "./ICU4XTransformResult";
+
+/**
+
+ * A locale canonicalizer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html Rust documentation for `LocaleCanonicalizer`} for more information.
+ */
+export class ICU4XLocaleCanonicalizer {
+
+ /**
+
+ * Create a new {@link ICU4XLocaleCanonicalizer `ICU4XLocaleCanonicalizer`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleCanonicalizer | never;
+
+ /**
+
+ * Create a new {@link ICU4XLocaleCanonicalizer `ICU4XLocaleCanonicalizer`} with extended data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.new_with_expander Rust documentation for `new_with_expander`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_extended(provider: ICU4XDataProvider): ICU4XLocaleCanonicalizer | never;
+
+ /**
+
+ * FFI version of `LocaleCanonicalizer::canonicalize()`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleCanonicalizer.html#method.canonicalize Rust documentation for `canonicalize`} for more information.
+ */
+ canonicalize(locale: ICU4XLocale): ICU4XTransformResult;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js
new file mode 100644
index 0000000000..8a5a98da83
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleCanonicalizer.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTransformResult_js_to_rust, ICU4XTransformResult_rust_to_js } from "./ICU4XTransformResult.js"
+
+const ICU4XLocaleCanonicalizer_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleCanonicalizer_destroy(underlying);
+});
+
+export class ICU4XLocaleCanonicalizer {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleCanonicalizer_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleCanonicalizer_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleCanonicalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_extended(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleCanonicalizer_create_extended(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleCanonicalizer(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ canonicalize(arg_locale) {
+ return ICU4XTransformResult_rust_to_js[wasm.ICU4XLocaleCanonicalizer_canonicalize(this.underlying, arg_locale.underlying)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts
new file mode 100644
index 0000000000..f0e1bae74d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/enum.Direction.html Rust documentation for `Direction`} for more information.
+ */
+export enum ICU4XLocaleDirection {
+ /**
+ */
+ LeftToRight = 'LeftToRight',
+ /**
+ */
+ RightToLeft = 'RightToLeft',
+ /**
+ */
+ Unknown = 'Unknown',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js
new file mode 100644
index 0000000000..6219c42fda
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirection.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLocaleDirection_js_to_rust = {
+ "LeftToRight": 0,
+ "RightToLeft": 1,
+ "Unknown": 2,
+};
+
+export const ICU4XLocaleDirection_rust_to_js = {
+ [0]: "LeftToRight",
+ [1]: "RightToLeft",
+ [2]: "Unknown",
+};
+
+export const ICU4XLocaleDirection = {
+ "LeftToRight": "LeftToRight",
+ "RightToLeft": "RightToLeft",
+ "Unknown": "Unknown",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts
new file mode 100644
index 0000000000..d8eb4ef0bf
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.d.ts
@@ -0,0 +1,49 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XLocaleDirection } from "./ICU4XLocaleDirection";
+import { ICU4XLocaleExpander } from "./ICU4XLocaleExpander";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html Rust documentation for `LocaleDirectionality`} for more information.
+ */
+export class ICU4XLocaleDirectionality {
+
+ /**
+
+ * Construct a new ICU4XLocaleDirectionality instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleDirectionality | never;
+
+ /**
+
+ * Construct a new ICU4XLocaleDirectionality instance with a custom expander
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.new_with_expander Rust documentation for `new_with_expander`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_expander(provider: ICU4XDataProvider, expander: ICU4XLocaleExpander): ICU4XLocaleDirectionality | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(locale: ICU4XLocale): ICU4XLocaleDirection;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_left_to_right Rust documentation for `is_left_to_right`} for more information.
+ */
+ is_left_to_right(locale: ICU4XLocale): boolean;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleDirectionality.html#method.is_right_to_left Rust documentation for `is_right_to_left`} for more information.
+ */
+ is_right_to_left(locale: ICU4XLocale): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js
new file mode 100644
index 0000000000..8957e4c9fa
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDirectionality.js
@@ -0,0 +1,65 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLocaleDirection_js_to_rust, ICU4XLocaleDirection_rust_to_js } from "./ICU4XLocaleDirection.js"
+
+const ICU4XLocaleDirectionality_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleDirectionality_destroy(underlying);
+});
+
+export class ICU4XLocaleDirectionality {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleDirectionality_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDirectionality_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleDirectionality(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_expander(arg_provider, arg_expander) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDirectionality_create_with_expander(diplomat_receive_buffer, arg_provider.underlying, arg_expander.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleDirectionality(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get(arg_locale) {
+ return ICU4XLocaleDirection_rust_to_js[wasm.ICU4XLocaleDirectionality_get(this.underlying, arg_locale.underlying)];
+ }
+
+ is_left_to_right(arg_locale) {
+ return wasm.ICU4XLocaleDirectionality_is_left_to_right(this.underlying, arg_locale.underlying);
+ }
+
+ is_right_to_left(arg_locale) {
+ return wasm.ICU4XLocaleDirectionality_is_right_to_left(this.underlying, arg_locale.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts
new file mode 100644
index 0000000000..0725831729
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.d.ts
@@ -0,0 +1,30 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDisplayNamesOptionsV1 } from "./ICU4XDisplayNamesOptionsV1";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html Rust documentation for `LocaleDisplayNamesFormatter`} for more information.
+ */
+export class ICU4XLocaleDisplayNamesFormatter {
+
+ /**
+
+ * Creates a new `LocaleDisplayNamesFormatter` from locale data and an options bag.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XDisplayNamesOptionsV1): ICU4XLocaleDisplayNamesFormatter | never;
+
+ /**
+
+ * Returns the locale-specific display name of a locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.LocaleDisplayNamesFormatter.html#method.of Rust documentation for `of`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ of(locale: ICU4XLocale): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js
new file mode 100644
index 0000000000..63d45a154d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleDisplayNamesFormatter.js
@@ -0,0 +1,60 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDisplayNamesFallback_js_to_rust, ICU4XDisplayNamesFallback_rust_to_js } from "./ICU4XDisplayNamesFallback.js"
+import { ICU4XDisplayNamesStyle_js_to_rust, ICU4XDisplayNamesStyle_rust_to_js } from "./ICU4XDisplayNamesStyle.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLanguageDisplay_js_to_rust, ICU4XLanguageDisplay_rust_to_js } from "./ICU4XLanguageDisplay.js"
+
+const ICU4XLocaleDisplayNamesFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleDisplayNamesFormatter_destroy(underlying);
+});
+
+export class ICU4XLocaleDisplayNamesFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleDisplayNamesFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider, arg_locale, arg_options) {
+ const field_style_arg_options = arg_options["style"];
+ const field_fallback_arg_options = arg_options["fallback"];
+ const field_language_display_arg_options = arg_options["language_display"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDisplayNamesFormatter_create(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDisplayNamesStyle_js_to_rust[field_style_arg_options], ICU4XDisplayNamesFallback_js_to_rust[field_fallback_arg_options], ICU4XLanguageDisplay_js_to_rust[field_language_display_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleDisplayNamesFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ of(arg_locale) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleDisplayNamesFormatter_of(diplomat_receive_buffer, this.underlying, arg_locale.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts
new file mode 100644
index 0000000000..d3f8b8ff3a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts
@@ -0,0 +1,48 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTransformResult } from "./ICU4XTransformResult";
+
+/**
+
+ * A locale expander.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html Rust documentation for `LocaleExpander`} for more information.
+ */
+export class ICU4XLocaleExpander {
+
+ /**
+
+ * Create a new {@link ICU4XLocaleExpander `ICU4XLocaleExpander`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleExpander | never;
+
+ /**
+
+ * Create a new {@link ICU4XLocaleExpander `ICU4XLocaleExpander`} with extended data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new_extended Rust documentation for `new_extended`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_extended(provider: ICU4XDataProvider): ICU4XLocaleExpander | never;
+
+ /**
+
+ * FFI version of `LocaleExpander::maximize()`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.maximize Rust documentation for `maximize`} for more information.
+ */
+ maximize(locale: ICU4XLocale): ICU4XTransformResult;
+
+ /**
+
+ * FFI version of `LocaleExpander::minimize()`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.minimize Rust documentation for `minimize`} for more information.
+ */
+ minimize(locale: ICU4XLocale): ICU4XTransformResult;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js
new file mode 100644
index 0000000000..439698b27e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.js
@@ -0,0 +1,61 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTransformResult_js_to_rust, ICU4XTransformResult_rust_to_js } from "./ICU4XTransformResult.js"
+
+const ICU4XLocaleExpander_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleExpander_destroy(underlying);
+});
+
+export class ICU4XLocaleExpander {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleExpander_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleExpander_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleExpander(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_extended(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleExpander_create_extended(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleExpander(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ maximize(arg_locale) {
+ return ICU4XTransformResult_rust_to_js[wasm.ICU4XLocaleExpander_maximize(this.underlying, arg_locale.underlying)];
+ }
+
+ minimize(arg_locale) {
+ return ICU4XTransformResult_rust_to_js[wasm.ICU4XLocaleExpander_minimize(this.underlying, arg_locale.underlying)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts
new file mode 100644
index 0000000000..58c1f79232
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.d.ts
@@ -0,0 +1,14 @@
+import { ICU4XLocaleFallbackPriority } from "./ICU4XLocaleFallbackPriority";
+import { ICU4XLocaleFallbackSupplement } from "./ICU4XLocaleFallbackSupplement";
+
+/**
+
+ * Collection of configurations for the ICU4X fallback algorithm.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackConfig.html Rust documentation for `LocaleFallbackConfig`} for more information.
+ */
+export class ICU4XLocaleFallbackConfig {
+ priority: ICU4XLocaleFallbackPriority;
+ extension_key: string;
+ fallback_supplement: ICU4XLocaleFallbackSupplement;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js
new file mode 100644
index 0000000000..f327a084be
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackConfig.js
@@ -0,0 +1,15 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLocaleFallbackPriority_js_to_rust, ICU4XLocaleFallbackPriority_rust_to_js } from "./ICU4XLocaleFallbackPriority.js"
+import { ICU4XLocaleFallbackSupplement_js_to_rust, ICU4XLocaleFallbackSupplement_rust_to_js } from "./ICU4XLocaleFallbackSupplement.js"
+
+export class ICU4XLocaleFallbackConfig {
+ constructor(underlying, edges_a) {
+ this.priority = ICU4XLocaleFallbackPriority_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.extension_key = (() => {
+ const [ptr, size] = new Uint32Array(wasm.memory.buffer, underlying + 4, 2);
+ return diplomatRuntime.readString(wasm, ptr, size);
+ })();
+ this.fallback_supplement = ICU4XLocaleFallbackSupplement_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 12)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts
new file mode 100644
index 0000000000..348d2a7386
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.d.ts
@@ -0,0 +1,26 @@
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An iterator over the locale under fallback.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html Rust documentation for `LocaleFallbackIterator`} for more information.
+ */
+export class ICU4XLocaleFallbackIterator {
+
+ /**
+
+ * Gets a snapshot of the current state of the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.get Rust documentation for `get`} for more information.
+ */
+ get(): ICU4XLocale;
+
+ /**
+
+ * Performs one step of the fallback algorithm, mutating the locale.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackIterator.html#method.step Rust documentation for `step`} for more information.
+ */
+ step(): void;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js
new file mode 100644
index 0000000000..4540e3d7db
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackIterator.js
@@ -0,0 +1,26 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLocale } from "./ICU4XLocale.js"
+
+const ICU4XLocaleFallbackIterator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleFallbackIterator_destroy(underlying);
+});
+
+export class ICU4XLocaleFallbackIterator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleFallbackIterator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get() {
+ return new ICU4XLocale(wasm.ICU4XLocaleFallbackIterator_get(this.underlying), true, []);
+ }
+
+ step() {
+ wasm.ICU4XLocaleFallbackIterator_step(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts
new file mode 100644
index 0000000000..5ebc55f192
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.d.ts
@@ -0,0 +1,18 @@
+
+/**
+
+ * Priority mode for the ICU4X fallback algorithm.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackPriority.html Rust documentation for `LocaleFallbackPriority`} for more information.
+ */
+export enum ICU4XLocaleFallbackPriority {
+ /**
+ */
+ Language = 'Language',
+ /**
+ */
+ Region = 'Region',
+ /**
+ */
+ Collation = 'Collation',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js
new file mode 100644
index 0000000000..421e73fb71
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackPriority.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLocaleFallbackPriority_js_to_rust = {
+ "Language": 0,
+ "Region": 1,
+ "Collation": 2,
+};
+
+export const ICU4XLocaleFallbackPriority_rust_to_js = {
+ [0]: "Language",
+ [1]: "Region",
+ [2]: "Collation",
+};
+
+export const ICU4XLocaleFallbackPriority = {
+ "Language": "Language",
+ "Region": "Region",
+ "Collation": "Collation",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts
new file mode 100644
index 0000000000..8fc00bb1b0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.d.ts
@@ -0,0 +1,15 @@
+
+/**
+
+ * What additional data is required to load when performing fallback.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/enum.LocaleFallbackSupplement.html Rust documentation for `LocaleFallbackSupplement`} for more information.
+ */
+export enum ICU4XLocaleFallbackSupplement {
+ /**
+ */
+ None = 'None',
+ /**
+ */
+ Collation = 'Collation',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js
new file mode 100644
index 0000000000..c9caa34aea
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackSupplement.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XLocaleFallbackSupplement_js_to_rust = {
+ "None": 0,
+ "Collation": 1,
+};
+
+export const ICU4XLocaleFallbackSupplement_rust_to_js = {
+ [0]: "None",
+ [1]: "Collation",
+};
+
+export const ICU4XLocaleFallbackSupplement = {
+ "None": "None",
+ "Collation": "Collation",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts
new file mode 100644
index 0000000000..9a2ea9a4fe
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts
@@ -0,0 +1,40 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocaleFallbackConfig } from "./ICU4XLocaleFallbackConfig";
+import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig";
+
+/**
+
+ * An object that runs the ICU4X locale fallback algorithm.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html Rust documentation for `LocaleFallbacker`} for more information.
+ */
+export class ICU4XLocaleFallbacker {
+
+ /**
+
+ * Creates a new `ICU4XLocaleFallbacker` from a data provider.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XLocaleFallbacker | never;
+
+ /**
+
+ * Creates a new `ICU4XLocaleFallbacker` without data for limited functionality.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data Rust documentation for `new_without_data`} for more information.
+ */
+ static create_without_data(): ICU4XLocaleFallbacker;
+
+ /**
+
+ * Associates this `ICU4XLocaleFallbacker` with configuration options.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config Rust documentation for `for_config`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ for_config(config: ICU4XLocaleFallbackConfig): ICU4XLocaleFallbackerWithConfig | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js
new file mode 100644
index 0000000000..8163c11bac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.js
@@ -0,0 +1,65 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLocaleFallbackPriority_js_to_rust, ICU4XLocaleFallbackPriority_rust_to_js } from "./ICU4XLocaleFallbackPriority.js"
+import { ICU4XLocaleFallbackSupplement_js_to_rust, ICU4XLocaleFallbackSupplement_rust_to_js } from "./ICU4XLocaleFallbackSupplement.js"
+import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig.js"
+
+const ICU4XLocaleFallbacker_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleFallbacker_destroy(underlying);
+});
+
+export class ICU4XLocaleFallbacker {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleFallbacker_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleFallbacker_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleFallbacker(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_without_data() {
+ return new ICU4XLocaleFallbacker(wasm.ICU4XLocaleFallbacker_create_without_data(), true, []);
+ }
+
+ for_config(arg_config) {
+ const field_priority_arg_config = arg_config["priority"];
+ const field_extension_key_arg_config = arg_config["extension_key"];
+ const buf_field_extension_key_arg_config = diplomatRuntime.DiplomatBuf.str(wasm, field_extension_key_arg_config);
+ const field_fallback_supplement_arg_config = arg_config["fallback_supplement"];
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XLocaleFallbacker_for_config(diplomat_receive_buffer, this.underlying, ICU4XLocaleFallbackPriority_js_to_rust[field_priority_arg_config], buf_field_extension_key_arg_config.ptr, buf_field_extension_key_arg_config.size, ICU4XLocaleFallbackSupplement_js_to_rust[field_fallback_supplement_arg_config]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XLocaleFallbackerWithConfig(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, [this]);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_field_extension_key_arg_config.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts
new file mode 100644
index 0000000000..9df416ae90
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.d.ts
@@ -0,0 +1,21 @@
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XLocaleFallbackIterator } from "./ICU4XLocaleFallbackIterator";
+
+/**
+
+ * An object that runs the ICU4X locale fallback algorithm with specific configurations.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html Rust documentation for `LocaleFallbacker`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbackerWithConfig.html Rust documentation for `LocaleFallbackerWithConfig`} for more information.
+ */
+export class ICU4XLocaleFallbackerWithConfig {
+
+ /**
+
+ * Creates an iterator from a locale with each step of fallback.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.fallback_for Rust documentation for `fallback_for`} for more information.
+ */
+ fallback_for_locale(locale: ICU4XLocale): ICU4XLocaleFallbackIterator;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js
new file mode 100644
index 0000000000..632654df03
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLocaleFallbackerWithConfig.js
@@ -0,0 +1,22 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLocaleFallbackIterator } from "./ICU4XLocaleFallbackIterator.js"
+
+const ICU4XLocaleFallbackerWithConfig_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLocaleFallbackerWithConfig_destroy(underlying);
+});
+
+export class ICU4XLocaleFallbackerWithConfig {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLocaleFallbackerWithConfig_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ fallback_for_locale(arg_locale) {
+ return new ICU4XLocaleFallbackIterator(wasm.ICU4XLocaleFallbackerWithConfig_fallback_for_locale(this.underlying, arg_locale.underlying), true, [this]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLogger.d.ts b/intl/icu_capi/js/package/lib/ICU4XLogger.d.ts
new file mode 100644
index 0000000000..c44d9c4be2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLogger.d.ts
@@ -0,0 +1,23 @@
+
+/**
+
+ * An object allowing control over the logging used
+ */
+export class ICU4XLogger {
+
+ /**
+
+ * Initialize the logger using `simple_logger`
+
+ * Requires the `simple_logger` Cargo feature.
+
+ * Returns `false` if there was already a logger set.
+ */
+ static init_simple_logger(): boolean;
+
+ /**
+
+ * Deprecated: since ICU4X 1.4, this now happens automatically if the `log` feature is enabled.
+ */
+ static init_console_logger(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XLogger.js b/intl/icu_capi/js/package/lib/ICU4XLogger.js
new file mode 100644
index 0000000000..e696f7fd9b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XLogger.js
@@ -0,0 +1,25 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XLogger_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XLogger_destroy(underlying);
+});
+
+export class ICU4XLogger {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XLogger_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static init_simple_logger() {
+ return wasm.ICU4XLogger_init_simple_logger();
+ }
+
+ static init_console_logger() {
+ return wasm.ICU4XLogger_init_console_logger();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts
new file mode 100644
index 0000000000..73b263c21f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.d.ts
@@ -0,0 +1,21 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An object capable of computing the metazone from a timezone.
+
+ * This can be used via `maybe_calculate_metazone()` on {@link crate::timezone::ffi::ICU4XCustomTimeZone `ICU4XCustomTimeZone`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html Rust documentation for `MetazoneCalculator`} for more information.
+ */
+export class ICU4XMetazoneCalculator {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/timezone/struct.MetazoneCalculator.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XMetazoneCalculator | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js
new file mode 100644
index 0000000000..a72b56af0c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XMetazoneCalculator.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XMetazoneCalculator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XMetazoneCalculator_destroy(underlying);
+});
+
+export class ICU4XMetazoneCalculator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XMetazoneCalculator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XMetazoneCalculator_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XMetazoneCalculator(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts b/intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts
new file mode 100644
index 0000000000..1567229a9b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XOrdering.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/core/latest/core/cmp/enum.Ordering.html Rust documentation for `Ordering`} for more information.
+ */
+export enum ICU4XOrdering {
+ /**
+ */
+ Less = 'Less',
+ /**
+ */
+ Equal = 'Equal',
+ /**
+ */
+ Greater = 'Greater',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XOrdering.js b/intl/icu_capi/js/package/lib/ICU4XOrdering.js
new file mode 100644
index 0000000000..fb86968e70
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XOrdering.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XOrdering_js_to_rust = {
+ "Less": -1,
+ "Equal": 0,
+ "Greater": 1,
+};
+
+export const ICU4XOrdering_rust_to_js = {
+ [-1]: "Less",
+ [0]: "Equal",
+ [1]: "Greater",
+};
+
+export const ICU4XOrdering = {
+ "Less": "Less",
+ "Equal": "Equal",
+ "Greater": "Greater",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts
new file mode 100644
index 0000000000..f74b1f4f93
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * FFI version of `PluralRules::categories()` data.
+ */
+export class ICU4XPluralCategories {
+ zero: boolean;
+ one: boolean;
+ two: boolean;
+ few: boolean;
+ many: boolean;
+ other: boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategories.js b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.js
new file mode 100644
index 0000000000..84e8fcf1ce
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategories.js
@@ -0,0 +1,13 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export class ICU4XPluralCategories {
+ constructor(underlying) {
+ this.zero = (new Uint8Array(wasm.memory.buffer, underlying, 1))[0] == 1;
+ this.one = (new Uint8Array(wasm.memory.buffer, underlying + 1, 1))[0] == 1;
+ this.two = (new Uint8Array(wasm.memory.buffer, underlying + 2, 1))[0] == 1;
+ this.few = (new Uint8Array(wasm.memory.buffer, underlying + 3, 1))[0] == 1;
+ this.many = (new Uint8Array(wasm.memory.buffer, underlying + 4, 1))[0] == 1;
+ this.other = (new Uint8Array(wasm.memory.buffer, underlying + 5, 1))[0] == 1;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts
new file mode 100644
index 0000000000..7b1a9831c0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.d.ts
@@ -0,0 +1,28 @@
+import { FFIError } from "./diplomat-runtime"
+
+/**
+
+ * FFI version of `PluralCategory`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/enum.PluralCategory.html Rust documentation for `PluralCategory`} for more information.
+ */
+export enum ICU4XPluralCategory {
+ /**
+ */
+ Zero = 'Zero',
+ /**
+ */
+ One = 'One',
+ /**
+ */
+ Two = 'Two',
+ /**
+ */
+ Few = 'Few',
+ /**
+ */
+ Many = 'Many',
+ /**
+ */
+ Other = 'Other',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralCategory.js b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.js
new file mode 100644
index 0000000000..299abbb4b0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralCategory.js
@@ -0,0 +1,29 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XPluralCategory_js_to_rust = {
+ "Zero": 0,
+ "One": 1,
+ "Two": 2,
+ "Few": 3,
+ "Many": 4,
+ "Other": 5,
+};
+
+export const ICU4XPluralCategory_rust_to_js = {
+ [0]: "Zero",
+ [1]: "One",
+ [2]: "Two",
+ [3]: "Few",
+ [4]: "Many",
+ [5]: "Other",
+};
+
+export const ICU4XPluralCategory = {
+ "Zero": "Zero",
+ "One": "One",
+ "Two": "Two",
+ "Few": "Few",
+ "Many": "Many",
+ "Other": "Other",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts
new file mode 100644
index 0000000000..a521100d17
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.d.ts
@@ -0,0 +1,20 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * FFI version of `PluralOperands`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html Rust documentation for `PluralOperands`} for more information.
+ */
+export class ICU4XPluralOperands {
+
+ /**
+
+ * Construct for a given string representing a number
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralOperands.html#method.from_str Rust documentation for `from_str`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_from_string(s: string): ICU4XPluralOperands | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralOperands.js b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.js
new file mode 100644
index 0000000000..6fdffaef2a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralOperands.js
@@ -0,0 +1,38 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XPluralOperands_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XPluralOperands_destroy(underlying);
+});
+
+export class ICU4XPluralOperands {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XPluralOperands_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_from_string(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPluralOperands_create_from_string(diplomat_receive_buffer, buf_arg_s.ptr, buf_arg_s.size);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPluralOperands(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts b/intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts
new file mode 100644
index 0000000000..5092ae4218
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralRules.d.ts
@@ -0,0 +1,50 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XPluralCategories } from "./ICU4XPluralCategories";
+import { ICU4XPluralCategory } from "./ICU4XPluralCategory";
+import { ICU4XPluralOperands } from "./ICU4XPluralOperands";
+
+/**
+
+ * FFI version of `PluralRules`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html Rust documentation for `PluralRules`} for more information.
+ */
+export class ICU4XPluralRules {
+
+ /**
+
+ * Construct an {@link ICU4XPluralRules `ICU4XPluralRules`} for the given locale, for cardinal numbers
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_cardinal Rust documentation for `try_new_cardinal`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_cardinal(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XPluralRules | never;
+
+ /**
+
+ * Construct an {@link ICU4XPluralRules `ICU4XPluralRules`} for the given locale, for ordinal numbers
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.try_new_ordinal Rust documentation for `try_new_ordinal`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_ordinal(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XPluralRules | never;
+
+ /**
+
+ * Get the category for a given number represented as operands
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.category_for Rust documentation for `category_for`} for more information.
+ */
+ category_for(op: ICU4XPluralOperands): ICU4XPluralCategory;
+
+ /**
+
+ * Get all of the categories needed in the current locale
+
+ * See the {@link https://docs.rs/icu/latest/icu/plurals/struct.PluralRules.html#method.categories Rust documentation for `categories`} for more information.
+ */
+ categories(): ICU4XPluralCategories;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPluralRules.js b/intl/icu_capi/js/package/lib/ICU4XPluralRules.js
new file mode 100644
index 0000000000..bb78fd8ab5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPluralRules.js
@@ -0,0 +1,68 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XPluralCategories } from "./ICU4XPluralCategories.js"
+import { ICU4XPluralCategory_js_to_rust, ICU4XPluralCategory_rust_to_js } from "./ICU4XPluralCategory.js"
+
+const ICU4XPluralRules_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XPluralRules_destroy(underlying);
+});
+
+export class ICU4XPluralRules {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XPluralRules_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_cardinal(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPluralRules_create_cardinal(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPluralRules(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_ordinal(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPluralRules_create_ordinal(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPluralRules(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ category_for(arg_op) {
+ return ICU4XPluralCategory_rust_to_js[wasm.ICU4XPluralRules_category_for(this.underlying, arg_op.underlying)];
+ }
+
+ categories() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(6, 1);
+ wasm.ICU4XPluralRules_categories(diplomat_receive_buffer, this.underlying);
+ const out = new ICU4XPluralCategories(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 6, 1);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts
new file mode 100644
index 0000000000..f12131e1e7
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.d.ts
@@ -0,0 +1,98 @@
+import { i16 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * A type capable of looking up a property value from a string name.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapper.html Rust documentation for `PropertyValueNameToEnumMapper`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html Rust documentation for `PropertyValueNameToEnumMapperBorrowed`} for more information.
+ */
+export class ICU4XPropertyValueNameToEnumMapper {
+
+ /**
+
+ * Get the property value matching the given name, using strict matching
+
+ * Returns -1 if the name is unknown for this property
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_strict Rust documentation for `get_strict`} for more information.
+ */
+ get_strict(name: string): i16;
+
+ /**
+
+ * Get the property value matching the given name, using loose matching
+
+ * Returns -1 if the name is unknown for this property
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/names/struct.PropertyValueNameToEnumMapperBorrowed.html#method.get_loose Rust documentation for `get_loose`} for more information.
+ */
+ get_loose(name: string): i16;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GeneralCategory.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_general_category(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.BidiClass.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_bidi_class(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.EastAsianWidth.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_east_asian_width(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.IndicSyllabicCategory.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_indic_syllabic_category(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.LineBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_line_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.GraphemeClusterBreak.html#method.get_name_to_enum_mapper Rust documentation for `get_name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_grapheme_cluster_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.WordBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_word_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.SentenceBreak.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_sentence_break(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/struct.Script.html#method.name_to_enum_mapper Rust documentation for `name_to_enum_mapper`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_script(provider: ICU4XDataProvider): ICU4XPropertyValueNameToEnumMapper | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js
new file mode 100644
index 0000000000..ef0ddf1f37
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XPropertyValueNameToEnumMapper.js
@@ -0,0 +1,185 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XPropertyValueNameToEnumMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XPropertyValueNameToEnumMapper_destroy(underlying);
+});
+
+export class ICU4XPropertyValueNameToEnumMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XPropertyValueNameToEnumMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get_strict(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XPropertyValueNameToEnumMapper_get_strict(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ get_loose(arg_name) {
+ const buf_arg_name = diplomatRuntime.DiplomatBuf.str(wasm, arg_name);
+ const diplomat_out = wasm.ICU4XPropertyValueNameToEnumMapper_get_loose(this.underlying, buf_arg_name.ptr, buf_arg_name.size);
+ buf_arg_name.free();
+ return diplomat_out;
+ }
+
+ static load_general_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_general_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_bidi_class(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_bidi_class(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_east_asian_width(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_east_asian_width(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_indic_syllabic_category(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_indic_syllabic_category(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_line_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_line_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_grapheme_cluster_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_grapheme_cluster_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_word_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_word_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_sentence_break(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_sentence_break(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_script(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XPropertyValueNameToEnumMapper_load_script(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XPropertyValueNameToEnumMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts
new file mode 100644
index 0000000000..6c0ee43d29
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts
@@ -0,0 +1,29 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html Rust documentation for `RegionDisplayNames`} for more information.
+ */
+export class ICU4XRegionDisplayNames {
+
+ /**
+
+ * Creates a new `RegionDisplayNames` from locale data and an options bag.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XRegionDisplayNames | never;
+
+ /**
+
+ * Returns the locale specific display name of a region. Note that the funtion returns an empty string in case the display name for a given region code is not found.
+
+ * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of Rust documentation for `of`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ of(region: string): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js
new file mode 100644
index 0000000000..afaf0a9d4d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.js
@@ -0,0 +1,57 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XRegionDisplayNames_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XRegionDisplayNames_destroy(underlying);
+});
+
+export class ICU4XRegionDisplayNames {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XRegionDisplayNames_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XRegionDisplayNames_create(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XRegionDisplayNames(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ of(arg_region) {
+ const buf_arg_region = diplomatRuntime.DiplomatBuf.str(wasm, arg_region);
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XRegionDisplayNames_of(diplomat_receive_buffer, this.underlying, buf_arg_region.ptr, buf_arg_region.size, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_region.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts
new file mode 100644
index 0000000000..ef6889f2ae
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts
@@ -0,0 +1,30 @@
+import { usize } from "./diplomat-runtime"
+
+/**
+
+ * Thin wrapper around a vector that maps visual indices to source indices
+
+ * `map[visualIndex] = sourceIndex`
+
+ * Produced by `reorder_visual()` on {@link ICU4XBidi `ICU4XBidi`}.
+ */
+export class ICU4XReorderedIndexMap {
+
+ /**
+
+ * Get this as a slice/array of indices
+ */
+ as_slice(): Uint32Array;
+
+ /**
+
+ * The length of this map
+ */
+ len(): usize;
+
+ /**
+
+ * Get element at `index`. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use `len()` to avoid out-of-bounds)
+ */
+ get(index: usize): usize;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js
new file mode 100644
index 0000000000..46ad3060c1
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XReorderedIndexMap_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XReorderedIndexMap_destroy(underlying);
+});
+
+export class ICU4XReorderedIndexMap {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XReorderedIndexMap_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ as_slice() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(8, 4);
+ wasm.ICU4XReorderedIndexMap_as_slice(diplomat_receive_buffer, this.underlying);
+ const [ptr, size] = new Uint32Array(wasm.memory.buffer, diplomat_receive_buffer, 2);
+ wasm.diplomat_free(diplomat_receive_buffer, 8, 4);
+ return new Uint32Array(wasm.memory.buffer, ptr, size);
+ })();
+ }
+
+ len() {
+ return wasm.ICU4XReorderedIndexMap_len(this.underlying);
+ }
+
+ get(arg_index) {
+ return wasm.ICU4XReorderedIndexMap_get(this.underlying, arg_index);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts
new file mode 100644
index 0000000000..5d3c676318
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.d.ts
@@ -0,0 +1,21 @@
+
+/**
+
+ * Increment used in a rounding operation.
+
+ * See the {@link https://docs.rs/fixed_decimal/latest/fixed_decimal/enum.RoundingIncrement.html Rust documentation for `RoundingIncrement`} for more information.
+ */
+export enum ICU4XRoundingIncrement {
+ /**
+ */
+ MultiplesOf1 = 'MultiplesOf1',
+ /**
+ */
+ MultiplesOf2 = 'MultiplesOf2',
+ /**
+ */
+ MultiplesOf5 = 'MultiplesOf5',
+ /**
+ */
+ MultiplesOf25 = 'MultiplesOf25',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js
new file mode 100644
index 0000000000..c93a450e28
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XRoundingIncrement.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XRoundingIncrement_js_to_rust = {
+ "MultiplesOf1": 0,
+ "MultiplesOf2": 1,
+ "MultiplesOf5": 2,
+ "MultiplesOf25": 3,
+};
+
+export const ICU4XRoundingIncrement_rust_to_js = {
+ [0]: "MultiplesOf1",
+ [1]: "MultiplesOf2",
+ [2]: "MultiplesOf5",
+ [3]: "MultiplesOf25",
+};
+
+export const ICU4XRoundingIncrement = {
+ "MultiplesOf1": "MultiplesOf1",
+ "MultiplesOf2": "MultiplesOf2",
+ "MultiplesOf5": "MultiplesOf5",
+ "MultiplesOf25": "MultiplesOf25",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts
new file mode 100644
index 0000000000..dcef951fcb
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.d.ts
@@ -0,0 +1,36 @@
+import { u16, usize } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+
+/**
+
+ * An object that represents the Script_Extensions property for a single character
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html Rust documentation for `ScriptExtensionsSet`} for more information.
+ */
+export class ICU4XScriptExtensionsSet {
+
+ /**
+
+ * Check if the Script_Extensions property of the given code point covers the given script
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.contains Rust documentation for `contains`} for more information.
+ */
+ contains(script: u16): boolean;
+
+ /**
+
+ * Get the number of scripts contained in here
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter Rust documentation for `iter`} for more information.
+ */
+ count(): usize;
+
+ /**
+
+ * Get script at index, returning an error if out of bounds
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptExtensionsSet.html#method.iter Rust documentation for `iter`} for more information.
+ * @throws {@link FFIError}<void>
+ */
+ script_at(index: usize): u16 | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js
new file mode 100644
index 0000000000..c0a95a662b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptExtensionsSet.js
@@ -0,0 +1,42 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XScriptExtensionsSet_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XScriptExtensionsSet_destroy(underlying);
+});
+
+export class ICU4XScriptExtensionsSet {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XScriptExtensionsSet_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ contains(arg_script) {
+ return wasm.ICU4XScriptExtensionsSet_contains(this.underlying, arg_script);
+ }
+
+ count() {
+ return wasm.ICU4XScriptExtensionsSet_count(this.underlying);
+ }
+
+ script_at(arg_index) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(3, 2);
+ wasm.ICU4XScriptExtensionsSet_script_at(diplomat_receive_buffer, this.underlying, arg_index);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 2);
+ if (is_ok) {
+ const ok_value = (new Uint16Array(wasm.memory.buffer, diplomat_receive_buffer, 1))[0];
+ wasm.diplomat_free(diplomat_receive_buffer, 3, 2);
+ return ok_value;
+ } else {
+ const throw_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 3, 2);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts
new file mode 100644
index 0000000000..1c994a1c59
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.d.ts
@@ -0,0 +1,54 @@
+import { u16, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { CodePointRangeIterator } from "./CodePointRangeIterator";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed";
+
+/**
+
+ * An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html Rust documentation for `ScriptWithExtensions`} for more information.
+ */
+export class ICU4XScriptWithExtensions {
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html Rust documentation for `script_with_extensions`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XScriptWithExtensions | never;
+
+ /**
+
+ * Get the Script property value for a code point
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val Rust documentation for `get_script_val`} for more information.
+ */
+ get_script_val(code_point: u32): u16;
+
+ /**
+
+ * Check if the Script_Extensions property of the given code point covers the given script
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script Rust documentation for `has_script`} for more information.
+ */
+ has_script(code_point: u32, script: u16): boolean;
+
+ /**
+
+ * Borrow this object for a slightly faster variant with more operations
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed Rust documentation for `as_borrowed`} for more information.
+ */
+ as_borrowed(): ICU4XScriptWithExtensionsBorrowed;
+
+ /**
+
+ * Get a list of ranges of code points that contain this script in their Script_Extensions values
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges Rust documentation for `get_script_extensions_ranges`} for more information.
+ */
+ iter_ranges_for_script(script: u16): CodePointRangeIterator;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js
new file mode 100644
index 0000000000..fc5be89c87
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensions.js
@@ -0,0 +1,53 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { CodePointRangeIterator } from "./CodePointRangeIterator.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed.js"
+
+const ICU4XScriptWithExtensions_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XScriptWithExtensions_destroy(underlying);
+});
+
+export class ICU4XScriptWithExtensions {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XScriptWithExtensions_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XScriptWithExtensions_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XScriptWithExtensions(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ get_script_val(arg_code_point) {
+ return wasm.ICU4XScriptWithExtensions_get_script_val(this.underlying, arg_code_point);
+ }
+
+ has_script(arg_code_point, arg_script) {
+ return wasm.ICU4XScriptWithExtensions_has_script(this.underlying, arg_code_point, arg_script);
+ }
+
+ as_borrowed() {
+ return new ICU4XScriptWithExtensionsBorrowed(wasm.ICU4XScriptWithExtensions_as_borrowed(this.underlying), true, [this]);
+ }
+
+ iter_ranges_for_script(arg_script) {
+ return new CodePointRangeIterator(wasm.ICU4XScriptWithExtensions_iter_ranges_for_script(this.underlying, arg_script), true, [this]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts
new file mode 100644
index 0000000000..0e44554e0e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.d.ts
@@ -0,0 +1,44 @@
+import { u16, u32 } from "./diplomat-runtime"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData";
+import { ICU4XScriptExtensionsSet } from "./ICU4XScriptExtensionsSet";
+
+/**
+
+ * A slightly faster ICU4XScriptWithExtensions object
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html Rust documentation for `ScriptWithExtensionsBorrowed`} for more information.
+ */
+export class ICU4XScriptWithExtensionsBorrowed {
+
+ /**
+
+ * Get the Script property value for a code point
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val Rust documentation for `get_script_val`} for more information.
+ */
+ get_script_val(code_point: u32): u16;
+
+ /**
+
+ * Get the Script property value for a code point
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_val Rust documentation for `get_script_extensions_val`} for more information.
+ */
+ get_script_extensions_val(code_point: u32): ICU4XScriptExtensionsSet;
+
+ /**
+
+ * Check if the Script_Extensions property of the given code point covers the given script
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script Rust documentation for `has_script`} for more information.
+ */
+ has_script(code_point: u32, script: u16): boolean;
+
+ /**
+
+ * Build the CodePointSetData corresponding to a codepoints matching a particular script in their Script_Extensions
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_set Rust documentation for `get_script_extensions_set`} for more information.
+ */
+ get_script_extensions_set(script: u16): ICU4XCodePointSetData;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js
new file mode 100644
index 0000000000..073a493f8c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XScriptWithExtensionsBorrowed.js
@@ -0,0 +1,35 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData.js"
+import { ICU4XScriptExtensionsSet } from "./ICU4XScriptExtensionsSet.js"
+
+const ICU4XScriptWithExtensionsBorrowed_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XScriptWithExtensionsBorrowed_destroy(underlying);
+});
+
+export class ICU4XScriptWithExtensionsBorrowed {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XScriptWithExtensionsBorrowed_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ get_script_val(arg_code_point) {
+ return wasm.ICU4XScriptWithExtensionsBorrowed_get_script_val(this.underlying, arg_code_point);
+ }
+
+ get_script_extensions_val(arg_code_point) {
+ return new ICU4XScriptExtensionsSet(wasm.ICU4XScriptWithExtensionsBorrowed_get_script_extensions_val(this.underlying, arg_code_point), true, [this]);
+ }
+
+ has_script(arg_code_point, arg_script) {
+ return wasm.ICU4XScriptWithExtensionsBorrowed_has_script(this.underlying, arg_code_point, arg_script);
+ }
+
+ get_script_extensions_set(arg_script) {
+ return new ICU4XCodePointSetData(wasm.ICU4XScriptWithExtensionsBorrowed_get_script_extensions_set(this.underlying, arg_script), true, []);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts
new file mode 100644
index 0000000000..35eae4becf
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/enum.WordType.html Rust documentation for `WordType`} for more information.
+ */
+export enum ICU4XSegmenterWordType {
+ /**
+ */
+ None = 'None',
+ /**
+ */
+ Number = 'Number',
+ /**
+ */
+ Letter = 'Letter',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js
new file mode 100644
index 0000000000..390fdb45ca
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSegmenterWordType.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XSegmenterWordType_js_to_rust = {
+ "None": 0,
+ "Number": 1,
+ "Letter": 2,
+};
+
+export const ICU4XSegmenterWordType_rust_to_js = {
+ [0]: "None",
+ [1]: "Number",
+ [2]: "Letter",
+};
+
+export const ICU4XSegmenterWordType = {
+ "None": "None",
+ "Number": "Number",
+ "Letter": "Letter",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..1601ae83ba
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html Rust documentation for `SentenceBreakIterator`} for more information.
+ */
+export class ICU4XSentenceBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js
new file mode 100644
index 0000000000..674e015a7d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorLatin1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XSentenceBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XSentenceBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XSentenceBreakIteratorLatin1_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..76b4e04d32
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html Rust documentation for `SentenceBreakIterator`} for more information.
+ */
+export class ICU4XSentenceBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js
new file mode 100644
index 0000000000..8a69b6907e
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf16.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XSentenceBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XSentenceBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XSentenceBreakIteratorUtf16_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..b4080e2112
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.d.ts
@@ -0,0 +1,16 @@
+import { i32 } from "./diplomat-runtime"
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html Rust documentation for `SentenceBreakIterator`} for more information.
+ */
+export class ICU4XSentenceBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js
new file mode 100644
index 0000000000..cd140f513b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceBreakIteratorUtf8.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+const ICU4XSentenceBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XSentenceBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XSentenceBreakIteratorUtf8_next(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts
new file mode 100644
index 0000000000..acda263fad
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.d.ts
@@ -0,0 +1,48 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XSentenceBreakIteratorLatin1 } from "./ICU4XSentenceBreakIteratorLatin1";
+import { ICU4XSentenceBreakIteratorUtf16 } from "./ICU4XSentenceBreakIteratorUtf16";
+import { ICU4XSentenceBreakIteratorUtf8 } from "./ICU4XSentenceBreakIteratorUtf8";
+
+/**
+
+ * An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html Rust documentation for `SentenceSegmenter`} for more information.
+ */
+export class ICU4XSentenceSegmenter {
+
+ /**
+
+ * Construct an {@link ICU4XSentenceSegmenter `ICU4XSentenceSegmenter`}.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XSentenceSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XSentenceBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XSentenceBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.SentenceSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XSentenceBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js
new file mode 100644
index 0000000000..de617070a2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XSentenceSegmenter.js
@@ -0,0 +1,53 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XSentenceBreakIteratorLatin1 } from "./ICU4XSentenceBreakIteratorLatin1.js"
+import { ICU4XSentenceBreakIteratorUtf16 } from "./ICU4XSentenceBreakIteratorUtf16.js"
+import { ICU4XSentenceBreakIteratorUtf8 } from "./ICU4XSentenceBreakIteratorUtf8.js"
+
+const ICU4XSentenceSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XSentenceSegmenter_destroy(underlying);
+});
+
+export class ICU4XSentenceSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XSentenceSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XSentenceSegmenter_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XSentenceSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XSentenceBreakIteratorUtf8(wasm.ICU4XSentenceSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XSentenceBreakIteratorUtf16(wasm.ICU4XSentenceSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XSentenceBreakIteratorLatin1(wasm.ICU4XSentenceSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTime.d.ts b/intl/icu_capi/js/package/lib/ICU4XTime.d.ts
new file mode 100644
index 0000000000..14956745b6
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTime.d.ts
@@ -0,0 +1,62 @@
+import { u8, u32 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XError } from "./ICU4XError";
+
+/**
+
+ * An ICU4X Time object representing a time in terms of hour, minute, second, nanosecond
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html Rust documentation for `Time`} for more information.
+ */
+export class ICU4XTime {
+
+ /**
+
+ * Creates a new {@link ICU4XTime `ICU4XTime`} given field values
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html Rust documentation for `Time`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(hour: u8, minute: u8, second: u8, nanosecond: u32): ICU4XTime | never;
+
+ /**
+
+ * Creates a new {@link ICU4XTime `ICU4XTime`} representing midnight (00:00.000).
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html Rust documentation for `Time`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_midnight(): ICU4XTime | never;
+
+ /**
+
+ * Returns the hour in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.hour Rust documentation for `hour`} for more information.
+ */
+ hour(): u8;
+
+ /**
+
+ * Returns the minute in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.minute Rust documentation for `minute`} for more information.
+ */
+ minute(): u8;
+
+ /**
+
+ * Returns the second in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.second Rust documentation for `second`} for more information.
+ */
+ second(): u8;
+
+ /**
+
+ * Returns the nanosecond in this time
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/types/struct.Time.html#structfield.nanosecond Rust documentation for `nanosecond`} for more information.
+ */
+ nanosecond(): u32;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTime.js b/intl/icu_capi/js/package/lib/ICU4XTime.js
new file mode 100644
index 0000000000..7f87801e9c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTime.js
@@ -0,0 +1,68 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XTime_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTime_destroy(underlying);
+});
+
+export class ICU4XTime {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTime_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_hour, arg_minute, arg_second, arg_nanosecond) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTime_create(diplomat_receive_buffer, arg_hour, arg_minute, arg_second, arg_nanosecond);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_midnight() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTime_create_midnight(diplomat_receive_buffer);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTime(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ hour() {
+ return wasm.ICU4XTime_hour(this.underlying);
+ }
+
+ minute() {
+ return wasm.ICU4XTime_minute(this.underlying);
+ }
+
+ second() {
+ return wasm.ICU4XTime_second(this.underlying);
+ }
+
+ nanosecond() {
+ return wasm.ICU4XTime_nanosecond(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts
new file mode 100644
index 0000000000..f5d3da0813
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.d.ts
@@ -0,0 +1,53 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTime } from "./ICU4XTime";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An ICU4X TimeFormatter object capable of formatting an {@link ICU4XTime `ICU4XTime`} type (and others) as a string
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html Rust documentation for `TimeFormatter`} for more information.
+ */
+export class ICU4XTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XTimeFormatter `ICU4XTimeFormatter`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.try_new_with_length Rust documentation for `try_new_with_length`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_length(provider: ICU4XDataProvider, locale: ICU4XLocale, length: ICU4XTimeLength): ICU4XTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XTime `ICU4XTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_time(value: ICU4XTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime(value: ICU4XDateTime): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.TimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime(value: ICU4XIsoDateTime): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js
new file mode 100644
index 0000000000..9b7fb7e1a8
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeFormatter.js
@@ -0,0 +1,93 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_length(arg_provider, arg_locale, arg_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_create_with_length(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XTimeLength_js_to_rust[arg_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_time(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_format_time(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_format_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeFormatter_format_iso_datetime(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts b/intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts
new file mode 100644
index 0000000000..ac90d6175b
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeLength.d.ts
@@ -0,0 +1,19 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/options/length/enum.Time.html Rust documentation for `Time`} for more information.
+ */
+export enum ICU4XTimeLength {
+ /**
+ */
+ Full = 'Full',
+ /**
+ */
+ Long = 'Long',
+ /**
+ */
+ Medium = 'Medium',
+ /**
+ */
+ Short = 'Short',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeLength.js b/intl/icu_capi/js/package/lib/ICU4XTimeLength.js
new file mode 100644
index 0000000000..f8a9c7e5f0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeLength.js
@@ -0,0 +1,23 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XTimeLength_js_to_rust = {
+ "Full": 0,
+ "Long": 1,
+ "Medium": 2,
+ "Short": 3,
+};
+
+export const ICU4XTimeLength_rust_to_js = {
+ [0]: "Full",
+ [1]: "Long",
+ [2]: "Medium",
+ [3]: "Short",
+};
+
+export const ICU4XTimeLength = {
+ "Full": "Full",
+ "Long": "Long",
+ "Medium": "Medium",
+ "Short": "Short",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts
new file mode 100644
index 0000000000..feae2fc234
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.d.ts
@@ -0,0 +1,115 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCustomTimeZone } from "./ICU4XCustomTimeZone";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoTimeZoneOptions } from "./ICU4XIsoTimeZoneOptions";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X TimeZoneFormatter object capable of formatting an {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} type (and others) as a string
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html Rust documentation for `TimeZoneFormatter`} for more information.
+ */
+export class ICU4XTimeZoneFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XTimeZoneFormatter `ICU4XTimeZoneFormatter`} from locale data.
+
+ * Uses localized GMT as the fallback format.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_localized_gmt_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XTimeZoneFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XTimeZoneFormatter `ICU4XTimeZoneFormatter`} from locale data.
+
+ * Uses ISO-8601 as the fallback format.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/datetime/time_zone/enum.FallbackFormat.html 1}
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_iso_8601_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale, options: ICU4XIsoTimeZoneOptions): ICU4XTimeZoneFormatter | never;
+
+ /**
+
+ * Loads generic non-location long format. Example: "Pacific Time"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_long Rust documentation for `include_generic_non_location_long`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_generic_non_location_long(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads generic non-location short format. Example: "PT"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_non_location_short Rust documentation for `include_generic_non_location_short`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_generic_non_location_short(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads specific non-location long format. Example: "Pacific Standard Time"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_long Rust documentation for `include_specific_non_location_long`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_specific_non_location_long(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads specific non-location short format. Example: "PST"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_specific_non_location_short Rust documentation for `include_specific_non_location_short`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_specific_non_location_short(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads generic location format. Example: "Los Angeles Time"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_generic_location_format Rust documentation for `include_generic_location_format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_generic_location_format(provider: ICU4XDataProvider): void | never;
+
+ /**
+
+ * Loads localized GMT format. Example: "GMT-07:00"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_localized_gmt_format Rust documentation for `include_localized_gmt_format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ include_localized_gmt_format(): void | never;
+
+ /**
+
+ * Loads ISO-8601 format. Example: "-07:00"
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.include_iso_8601_format Rust documentation for `include_iso_8601_format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ load_iso_8601_format(options: ICU4XIsoTimeZoneOptions): void | never;
+
+ /**
+
+ * Formats a {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format Rust documentation for `format`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/time_zone/struct.TimeZoneFormatter.html#method.format_to_string Rust documentation for `format_to_string`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_custom_time_zone(value: ICU4XCustomTimeZone): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js
new file mode 100644
index 0000000000..9d2e4500de
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTimeZoneFormatter.js
@@ -0,0 +1,199 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+
+const ICU4XTimeZoneFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTimeZoneFormatter_destroy(underlying);
+});
+
+export class ICU4XTimeZoneFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTimeZoneFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_localized_gmt_fallback(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_create_with_localized_gmt_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTimeZoneFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_iso_8601_fallback(arg_provider, arg_locale, arg_options) {
+ const field_format_arg_options = arg_options["format"];
+ const field_minutes_arg_options = arg_options["minutes"];
+ const field_seconds_arg_options = arg_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_create_with_iso_8601_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTimeZoneFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_generic_non_location_long(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_generic_non_location_long(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_generic_non_location_short(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_generic_non_location_short(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_specific_non_location_long(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_specific_non_location_long(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_specific_non_location_short(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_specific_non_location_short(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_generic_location_format(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_generic_location_format(diplomat_receive_buffer, this.underlying, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ include_localized_gmt_format() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_include_localized_gmt_format(diplomat_receive_buffer, this.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ load_iso_8601_format(arg_options) {
+ const field_format_arg_options = arg_options["format"];
+ const field_minutes_arg_options = arg_options["minutes"];
+ const field_seconds_arg_options = arg_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_load_iso_8601_format(diplomat_receive_buffer, this.underlying, ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_custom_time_zone(arg_value) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTimeZoneFormatter_format_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_value.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts
new file mode 100644
index 0000000000..dc2f41f866
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.d.ts
@@ -0,0 +1,32 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTitlecaseOptionsV1 } from "./ICU4XTitlecaseOptionsV1";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html Rust documentation for `TitlecaseMapper`} for more information.
+ */
+export class ICU4XTitlecaseMapper {
+
+ /**
+
+ * Construct a new `ICU4XTitlecaseMapper` instance
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.new Rust documentation for `new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider): ICU4XTitlecaseMapper | never;
+
+ /**
+
+ * Returns the full titlecase mapping of the given string
+
+ * The `v1` refers to the version of the options struct, which may change as we add more options
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/struct.TitlecaseMapper.html#method.titlecase_segment Rust documentation for `titlecase_segment`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ titlecase_segment_v1(s: string, locale: ICU4XLocale, options: ICU4XTitlecaseOptionsV1): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js
new file mode 100644
index 0000000000..c25bf08702
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseMapper.js
@@ -0,0 +1,61 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.js"
+import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.js"
+
+const ICU4XTitlecaseMapper_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XTitlecaseMapper_destroy(underlying);
+});
+
+export class ICU4XTitlecaseMapper {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XTitlecaseMapper_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTitlecaseMapper_create(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XTitlecaseMapper(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ titlecase_segment_v1(arg_s, arg_locale, arg_options) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const field_leading_adjustment_arg_options = arg_options["leading_adjustment"];
+ const field_trailing_case_arg_options = arg_options["trailing_case"];
+ const diplomat_out = diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XTitlecaseMapper_titlecase_segment_v1(diplomat_receive_buffer, this.underlying, buf_arg_s.ptr, buf_arg_s.size, arg_locale.underlying, ICU4XLeadingAdjustment_js_to_rust[field_leading_adjustment_arg_options], ICU4XTrailingCase_js_to_rust[field_trailing_case_arg_options], writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts
new file mode 100644
index 0000000000..949043ecac
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.d.ts
@@ -0,0 +1,17 @@
+import { ICU4XLeadingAdjustment } from "./ICU4XLeadingAdjustment";
+import { ICU4XTrailingCase } from "./ICU4XTrailingCase";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html Rust documentation for `TitlecaseOptions`} for more information.
+ */
+export class ICU4XTitlecaseOptionsV1 {
+ leading_adjustment: ICU4XLeadingAdjustment;
+ trailing_case: ICU4XTrailingCase;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/struct.TitlecaseOptions.html#method.default Rust documentation for `default`} for more information.
+ */
+ static default_options(): ICU4XTitlecaseOptionsV1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js
new file mode 100644
index 0000000000..e1325f6abc
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTitlecaseOptionsV1.js
@@ -0,0 +1,21 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XLeadingAdjustment_js_to_rust, ICU4XLeadingAdjustment_rust_to_js } from "./ICU4XLeadingAdjustment.js"
+import { ICU4XTrailingCase_js_to_rust, ICU4XTrailingCase_rust_to_js } from "./ICU4XTrailingCase.js"
+
+export class ICU4XTitlecaseOptionsV1 {
+ constructor(underlying) {
+ this.leading_adjustment = ICU4XLeadingAdjustment_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying)];
+ this.trailing_case = ICU4XTrailingCase_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ }
+
+ static default_options() {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(8, 4);
+ wasm.ICU4XTitlecaseOptionsV1_default_options(diplomat_receive_buffer);
+ const out = new ICU4XTitlecaseOptionsV1(diplomat_receive_buffer);
+ wasm.diplomat_free(diplomat_receive_buffer, 8, 4);
+ return out;
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts
new file mode 100644
index 0000000000..efd1abe729
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.d.ts
@@ -0,0 +1,13 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/casemap/titlecase/enum.TrailingCase.html Rust documentation for `TrailingCase`} for more information.
+ */
+export enum ICU4XTrailingCase {
+ /**
+ */
+ Lower = 'Lower',
+ /**
+ */
+ Unchanged = 'Unchanged',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XTrailingCase.js b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.js
new file mode 100644
index 0000000000..6630717842
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTrailingCase.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XTrailingCase_js_to_rust = {
+ "Lower": 0,
+ "Unchanged": 1,
+};
+
+export const ICU4XTrailingCase_rust_to_js = {
+ [0]: "Lower",
+ [1]: "Unchanged",
+};
+
+export const ICU4XTrailingCase = {
+ "Lower": "Lower",
+ "Unchanged": "Unchanged",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts b/intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts
new file mode 100644
index 0000000000..e741659ea9
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTransformResult.d.ts
@@ -0,0 +1,15 @@
+
+/**
+
+ * FFI version of `TransformResult`.
+
+ * See the {@link https://docs.rs/icu/latest/icu/locid_transform/enum.TransformResult.html Rust documentation for `TransformResult`} for more information.
+ */
+export enum ICU4XTransformResult {
+ /**
+ */
+ Modified = 'Modified',
+ /**
+ */
+ Unmodified = 'Unmodified',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XTransformResult.js b/intl/icu_capi/js/package/lib/ICU4XTransformResult.js
new file mode 100644
index 0000000000..db68a34f0f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XTransformResult.js
@@ -0,0 +1,17 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XTransformResult_js_to_rust = {
+ "Modified": 0,
+ "Unmodified": 1,
+};
+
+export const ICU4XTransformResult_rust_to_js = {
+ [0]: "Modified",
+ [1]: "Unmodified",
+};
+
+export const ICU4XTransformResult = {
+ "Modified": "Modified",
+ "Unmodified": "Unmodified",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts
new file mode 100644
index 0000000000..117ae86f2c
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.d.ts
@@ -0,0 +1,82 @@
+import { u32, char } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * An ICU4X Unicode Set Property object, capable of querying whether a code point is contained in a set based on a Unicode property.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetData.html Rust documentation for `UnicodeSetData`} for more information.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html Rust documentation for `UnicodeSetDataBorrowed`} for more information.
+ */
+export class ICU4XUnicodeSetData {
+
+ /**
+
+ * Checks whether the string is in the set.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains Rust documentation for `contains`} for more information.
+ */
+ contains(s: string): boolean;
+
+ /**
+
+ * Checks whether the code point is in the set.
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/struct.UnicodeSetDataBorrowed.html#method.contains_char Rust documentation for `contains_char`} for more information.
+ */
+ contains_char(cp: char): boolean;
+
+ /**
+
+ * Checks whether the code point (specified as a 32 bit integer, in UTF-32) is in the set.
+ */
+ contains32(cp: u32): boolean;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/sets/fn.basic_emoji.html Rust documentation for `basic_emoji`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_basic_emoji(provider: ICU4XDataProvider): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_main.html Rust documentation for `exemplars_main`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_main(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_auxiliary.html Rust documentation for `exemplars_auxiliary`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_auxiliary(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_punctuation.html Rust documentation for `exemplars_punctuation`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_punctuation(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_numbers.html Rust documentation for `exemplars_numbers`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_numbers(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+
+ /**
+
+ * See the {@link https://docs.rs/icu/latest/icu/properties/exemplar_chars/fn.exemplars_index.html Rust documentation for `exemplars_index`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static load_exemplars_index(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XUnicodeSetData | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js
new file mode 100644
index 0000000000..b345a10123
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XUnicodeSetData.js
@@ -0,0 +1,135 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+
+const ICU4XUnicodeSetData_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XUnicodeSetData_destroy(underlying);
+});
+
+export class ICU4XUnicodeSetData {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XUnicodeSetData_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ contains(arg_s) {
+ const buf_arg_s = diplomatRuntime.DiplomatBuf.str(wasm, arg_s);
+ const diplomat_out = wasm.ICU4XUnicodeSetData_contains(this.underlying, buf_arg_s.ptr, buf_arg_s.size);
+ buf_arg_s.free();
+ return diplomat_out;
+ }
+
+ contains_char(arg_cp) {
+ return wasm.ICU4XUnicodeSetData_contains_char(this.underlying, diplomatRuntime.extractCodePoint(arg_cp, 'arg_cp'));
+ }
+
+ contains32(arg_cp) {
+ return wasm.ICU4XUnicodeSetData_contains32(this.underlying, arg_cp);
+ }
+
+ static load_basic_emoji(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_basic_emoji(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_main(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_main(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_auxiliary(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_auxiliary(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_punctuation(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_punctuation(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_numbers(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_numbers(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static load_exemplars_index(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XUnicodeSetData_load_exemplars_index(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XUnicodeSetData(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts
new file mode 100644
index 0000000000..cf60ebbc18
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.d.ts
@@ -0,0 +1,46 @@
+import { u8 } from "./diplomat-runtime"
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoWeekday } from "./ICU4XIsoWeekday";
+import { ICU4XLocale } from "./ICU4XLocale";
+
+/**
+
+ * A Week calculator, useful to be passed in to `week_of_year()` on Date and DateTime types
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html Rust documentation for `WeekCalculator`} for more information.
+ */
+export class ICU4XWeekCalculator {
+
+ /**
+
+ * Creates a new {@link ICU4XWeekCalculator `ICU4XWeekCalculator`} from locale data.
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XWeekCalculator | never;
+
+ /**
+
+ * Additional information: {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday 1}, {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days 2}
+ */
+ static create_from_first_day_of_week_and_min_week_days(first_weekday: ICU4XIsoWeekday, min_week_days: u8): ICU4XWeekCalculator;
+
+ /**
+
+ * Returns the weekday that starts the week for this object's locale
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.first_weekday Rust documentation for `first_weekday`} for more information.
+ */
+ first_weekday(): ICU4XIsoWeekday;
+
+ /**
+
+ * The minimum number of days overlapping a year required for a week to be considered part of that year
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekCalculator.html#structfield.min_week_days Rust documentation for `min_week_days`} for more information.
+ */
+ min_week_days(): u8;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js
new file mode 100644
index 0000000000..7b3110538d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekCalculator.js
@@ -0,0 +1,48 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoWeekday_js_to_rust, ICU4XIsoWeekday_rust_to_js } from "./ICU4XIsoWeekday.js"
+
+const ICU4XWeekCalculator_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWeekCalculator_destroy(underlying);
+});
+
+export class ICU4XWeekCalculator {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWeekCalculator_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create(arg_provider, arg_locale) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWeekCalculator_create(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWeekCalculator(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_from_first_day_of_week_and_min_week_days(arg_first_weekday, arg_min_week_days) {
+ return new ICU4XWeekCalculator(wasm.ICU4XWeekCalculator_create_from_first_day_of_week_and_min_week_days(ICU4XIsoWeekday_js_to_rust[arg_first_weekday], arg_min_week_days), true, []);
+ }
+
+ first_weekday() {
+ return ICU4XIsoWeekday_rust_to_js[wasm.ICU4XWeekCalculator_first_weekday(this.underlying)];
+ }
+
+ min_week_days() {
+ return wasm.ICU4XWeekCalculator_min_week_days(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts b/intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts
new file mode 100644
index 0000000000..dfcf1eb97f
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekOf.d.ts
@@ -0,0 +1,11 @@
+import { u16 } from "./diplomat-runtime"
+import { ICU4XWeekRelativeUnit } from "./ICU4XWeekRelativeUnit";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/struct.WeekOf.html Rust documentation for `WeekOf`} for more information.
+ */
+export class ICU4XWeekOf {
+ week: u16;
+ unit: ICU4XWeekRelativeUnit;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekOf.js b/intl/icu_capi/js/package/lib/ICU4XWeekOf.js
new file mode 100644
index 0000000000..5f74b5d1a5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekOf.js
@@ -0,0 +1,10 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XWeekRelativeUnit_js_to_rust, ICU4XWeekRelativeUnit_rust_to_js } from "./ICU4XWeekRelativeUnit.js"
+
+export class ICU4XWeekOf {
+ constructor(underlying) {
+ this.week = (new Uint16Array(wasm.memory.buffer, underlying, 1))[0];
+ this.unit = ICU4XWeekRelativeUnit_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, underlying + 4)];
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts
new file mode 100644
index 0000000000..60a12eddb5
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.d.ts
@@ -0,0 +1,16 @@
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/calendar/week/enum.RelativeUnit.html Rust documentation for `RelativeUnit`} for more information.
+ */
+export enum ICU4XWeekRelativeUnit {
+ /**
+ */
+ Previous = 'Previous',
+ /**
+ */
+ Current = 'Current',
+ /**
+ */
+ Next = 'Next',
+} \ No newline at end of file
diff --git a/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js
new file mode 100644
index 0000000000..685a296b20
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWeekRelativeUnit.js
@@ -0,0 +1,20 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+
+export const ICU4XWeekRelativeUnit_js_to_rust = {
+ "Previous": 0,
+ "Current": 1,
+ "Next": 2,
+};
+
+export const ICU4XWeekRelativeUnit_rust_to_js = {
+ [0]: "Previous",
+ [1]: "Current",
+ [2]: "Next",
+};
+
+export const ICU4XWeekRelativeUnit = {
+ "Previous": "Previous",
+ "Current": "Current",
+ "Next": "Next",
+};
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts
new file mode 100644
index 0000000000..3bd6da5224
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.d.ts
@@ -0,0 +1,33 @@
+import { i32 } from "./diplomat-runtime"
+import { ICU4XSegmenterWordType } from "./ICU4XSegmenterWordType";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html Rust documentation for `WordBreakIterator`} for more information.
+ */
+export class ICU4XWordBreakIteratorLatin1 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+
+ /**
+
+ * Return the status value of break boundary.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type Rust documentation for `word_type`} for more information.
+ */
+ word_type(): ICU4XSegmenterWordType;
+
+ /**
+
+ * Return true when break boundary is word-like such as letter/number/CJK
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like Rust documentation for `is_word_like`} for more information.
+ */
+ is_word_like(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js
new file mode 100644
index 0000000000..bdeac9ae71
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorLatin1.js
@@ -0,0 +1,30 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XSegmenterWordType_js_to_rust, ICU4XSegmenterWordType_rust_to_js } from "./ICU4XSegmenterWordType.js"
+
+const ICU4XWordBreakIteratorLatin1_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordBreakIteratorLatin1_destroy(underlying);
+});
+
+export class ICU4XWordBreakIteratorLatin1 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordBreakIteratorLatin1_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XWordBreakIteratorLatin1_next(this.underlying);
+ }
+
+ word_type() {
+ return ICU4XSegmenterWordType_rust_to_js[wasm.ICU4XWordBreakIteratorLatin1_word_type(this.underlying)];
+ }
+
+ is_word_like() {
+ return wasm.ICU4XWordBreakIteratorLatin1_is_word_like(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts
new file mode 100644
index 0000000000..d0f67acd2d
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.d.ts
@@ -0,0 +1,33 @@
+import { i32 } from "./diplomat-runtime"
+import { ICU4XSegmenterWordType } from "./ICU4XSegmenterWordType";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html Rust documentation for `WordBreakIterator`} for more information.
+ */
+export class ICU4XWordBreakIteratorUtf16 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+
+ /**
+
+ * Return the status value of break boundary.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type Rust documentation for `word_type`} for more information.
+ */
+ word_type(): ICU4XSegmenterWordType;
+
+ /**
+
+ * Return true when break boundary is word-like such as letter/number/CJK
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like Rust documentation for `is_word_like`} for more information.
+ */
+ is_word_like(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js
new file mode 100644
index 0000000000..7dd16d4ef0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf16.js
@@ -0,0 +1,30 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XSegmenterWordType_js_to_rust, ICU4XSegmenterWordType_rust_to_js } from "./ICU4XSegmenterWordType.js"
+
+const ICU4XWordBreakIteratorUtf16_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordBreakIteratorUtf16_destroy(underlying);
+});
+
+export class ICU4XWordBreakIteratorUtf16 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordBreakIteratorUtf16_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XWordBreakIteratorUtf16_next(this.underlying);
+ }
+
+ word_type() {
+ return ICU4XSegmenterWordType_rust_to_js[wasm.ICU4XWordBreakIteratorUtf16_word_type(this.underlying)];
+ }
+
+ is_word_like() {
+ return wasm.ICU4XWordBreakIteratorUtf16_is_word_like(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts
new file mode 100644
index 0000000000..1a74af6d88
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.d.ts
@@ -0,0 +1,33 @@
+import { i32 } from "./diplomat-runtime"
+import { ICU4XSegmenterWordType } from "./ICU4XSegmenterWordType";
+
+/**
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html Rust documentation for `WordBreakIterator`} for more information.
+ */
+export class ICU4XWordBreakIteratorUtf8 {
+
+ /**
+
+ * Finds the next breakpoint. Returns -1 if at the end of the string or if the index is out of range of a 32-bit signed integer.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.next Rust documentation for `next`} for more information.
+ */
+ next(): i32;
+
+ /**
+
+ * Return the status value of break boundary.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.word_type Rust documentation for `word_type`} for more information.
+ */
+ word_type(): ICU4XSegmenterWordType;
+
+ /**
+
+ * Return true when break boundary is word-like such as letter/number/CJK
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordBreakIterator.html#method.is_word_like Rust documentation for `is_word_like`} for more information.
+ */
+ is_word_like(): boolean;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js
new file mode 100644
index 0000000000..f4517683d2
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordBreakIteratorUtf8.js
@@ -0,0 +1,30 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XSegmenterWordType_js_to_rust, ICU4XSegmenterWordType_rust_to_js } from "./ICU4XSegmenterWordType.js"
+
+const ICU4XWordBreakIteratorUtf8_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordBreakIteratorUtf8_destroy(underlying);
+});
+
+export class ICU4XWordBreakIteratorUtf8 {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordBreakIteratorUtf8_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ next() {
+ return wasm.ICU4XWordBreakIteratorUtf8_next(this.underlying);
+ }
+
+ word_type() {
+ return ICU4XSegmenterWordType_rust_to_js[wasm.ICU4XWordBreakIteratorUtf8_word_type(this.underlying)];
+ }
+
+ is_word_like() {
+ return wasm.ICU4XWordBreakIteratorUtf8_is_word_like(this.underlying);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts
new file mode 100644
index 0000000000..3c553428fd
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.d.ts
@@ -0,0 +1,70 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XWordBreakIteratorLatin1 } from "./ICU4XWordBreakIteratorLatin1";
+import { ICU4XWordBreakIteratorUtf16 } from "./ICU4XWordBreakIteratorUtf16";
+import { ICU4XWordBreakIteratorUtf8 } from "./ICU4XWordBreakIteratorUtf8";
+
+/**
+
+ * An ICU4X word-break segmenter, capable of finding word breakpoints in strings.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html Rust documentation for `WordSegmenter`} for more information.
+ */
+export class ICU4XWordSegmenter {
+
+ /**
+
+ * Construct an {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} with automatically selecting the best available LSTM or dictionary payload data.
+
+ * Note: currently, it uses dictionary for Chinese and Japanese, and LSTM for Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_auto Rust documentation for `new_auto`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_auto(provider: ICU4XDataProvider): ICU4XWordSegmenter | never;
+
+ /**
+
+ * Construct an {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} with LSTM payload data for Burmese, Khmer, Lao, and Thai.
+
+ * Warning: {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} created by this function doesn't handle Chinese or Japanese.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_lstm Rust documentation for `new_lstm`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_lstm(provider: ICU4XDataProvider): ICU4XWordSegmenter | never;
+
+ /**
+
+ * Construct an {@link ICU4XWordSegmenter `ICU4XWordSegmenter`} with dictionary payload data for Chinese, Japanese, Burmese, Khmer, Lao, and Thai.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.new_dictionary Rust documentation for `new_dictionary`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_dictionary(provider: ICU4XDataProvider): ICU4XWordSegmenter | never;
+
+ /**
+
+ * Segments a (potentially ill-formed) UTF-8 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf8 Rust documentation for `segment_utf8`} for more information.
+ */
+ segment_utf8(input: string): ICU4XWordBreakIteratorUtf8;
+
+ /**
+
+ * Segments a UTF-16 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_utf16 Rust documentation for `segment_utf16`} for more information.
+ */
+ segment_utf16(input: Uint16Array): ICU4XWordBreakIteratorUtf16;
+
+ /**
+
+ * Segments a Latin-1 string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/segmenter/struct.WordSegmenter.html#method.segment_latin1 Rust documentation for `segment_latin1`} for more information.
+ */
+ segment_latin1(input: Uint8Array): ICU4XWordBreakIteratorLatin1;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js
new file mode 100644
index 0000000000..f1a1b263ee
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XWordSegmenter.js
@@ -0,0 +1,87 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XWordBreakIteratorLatin1 } from "./ICU4XWordBreakIteratorLatin1.js"
+import { ICU4XWordBreakIteratorUtf16 } from "./ICU4XWordBreakIteratorUtf16.js"
+import { ICU4XWordBreakIteratorUtf8 } from "./ICU4XWordBreakIteratorUtf8.js"
+
+const ICU4XWordSegmenter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XWordSegmenter_destroy(underlying);
+});
+
+export class ICU4XWordSegmenter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XWordSegmenter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_auto(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWordSegmenter_create_auto(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWordSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_lstm(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWordSegmenter_create_lstm(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWordSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_dictionary(arg_provider) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XWordSegmenter_create_dictionary(diplomat_receive_buffer, arg_provider.underlying);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XWordSegmenter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ segment_utf8(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.str(wasm, arg_input);
+ return new ICU4XWordBreakIteratorUtf8(wasm.ICU4XWordSegmenter_segment_utf8(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_utf16(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 2);
+ return new ICU4XWordBreakIteratorUtf16(wasm.ICU4XWordSegmenter_segment_utf16(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+
+ segment_latin1(arg_input) {
+ const buf_arg_input = diplomatRuntime.DiplomatBuf.slice(wasm, arg_input, 1);
+ return new ICU4XWordBreakIteratorLatin1(wasm.ICU4XWordSegmenter_segment_latin1(this.underlying, buf_arg_input.ptr, buf_arg_input.size), true, [this, buf_arg_input]);
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts
new file mode 100644
index 0000000000..33dcacf995
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.d.ts
@@ -0,0 +1,59 @@
+import { FFIError } from "./diplomat-runtime"
+import { ICU4XCustomTimeZone } from "./ICU4XCustomTimeZone";
+import { ICU4XDataProvider } from "./ICU4XDataProvider";
+import { ICU4XDateLength } from "./ICU4XDateLength";
+import { ICU4XDateTime } from "./ICU4XDateTime";
+import { ICU4XError } from "./ICU4XError";
+import { ICU4XIsoDateTime } from "./ICU4XIsoDateTime";
+import { ICU4XIsoTimeZoneOptions } from "./ICU4XIsoTimeZoneOptions";
+import { ICU4XLocale } from "./ICU4XLocale";
+import { ICU4XTimeLength } from "./ICU4XTimeLength";
+
+/**
+
+ * An object capable of formatting a date time with time zone to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html Rust documentation for `ZonedDateTimeFormatter`} for more information.
+ */
+export class ICU4XZonedDateTimeFormatter {
+
+ /**
+
+ * Creates a new {@link ICU4XZonedDateTimeFormatter `ICU4XZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses default options for the time zone.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength): ICU4XZonedDateTimeFormatter | never;
+
+ /**
+
+ * Creates a new {@link ICU4XZonedDateTimeFormatter `ICU4XZonedDateTimeFormatter`} from locale data.
+
+ * This function has `date_length` and `time_length` arguments and uses an ISO-8601 style fallback for the time zone with the given configurations.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.try_new Rust documentation for `try_new`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ static create_with_lengths_and_iso_8601_time_zone_fallback(provider: ICU4XDataProvider, locale: ICU4XLocale, date_length: ICU4XDateLength, time_length: ICU4XTimeLength, zone_options: ICU4XIsoTimeZoneOptions): ICU4XZonedDateTimeFormatter | never;
+
+ /**
+
+ * Formats a {@link ICU4XDateTime `ICU4XDateTime`} and {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_datetime_with_custom_time_zone(datetime: ICU4XDateTime, time_zone: ICU4XCustomTimeZone): string | never;
+
+ /**
+
+ * Formats a {@link ICU4XIsoDateTime `ICU4XIsoDateTime`} and {@link ICU4XCustomTimeZone `ICU4XCustomTimeZone`} to a string.
+
+ * See the {@link https://docs.rs/icu/latest/icu/datetime/struct.ZonedDateTimeFormatter.html#method.format Rust documentation for `format`} for more information.
+ * @throws {@link FFIError}<{@link ICU4XError}>
+ */
+ format_iso_datetime_with_custom_time_zone(datetime: ICU4XIsoDateTime, time_zone: ICU4XCustomTimeZone): string | never;
+}
diff --git a/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js
new file mode 100644
index 0000000000..3dab173201
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XZonedDateTimeFormatter.js
@@ -0,0 +1,98 @@
+import wasm from "./diplomat-wasm.mjs"
+import * as diplomatRuntime from "./diplomat-runtime.js"
+import { ICU4XDateLength_js_to_rust, ICU4XDateLength_rust_to_js } from "./ICU4XDateLength.js"
+import { ICU4XError_js_to_rust, ICU4XError_rust_to_js } from "./ICU4XError.js"
+import { ICU4XIsoTimeZoneFormat_js_to_rust, ICU4XIsoTimeZoneFormat_rust_to_js } from "./ICU4XIsoTimeZoneFormat.js"
+import { ICU4XIsoTimeZoneMinuteDisplay_js_to_rust, ICU4XIsoTimeZoneMinuteDisplay_rust_to_js } from "./ICU4XIsoTimeZoneMinuteDisplay.js"
+import { ICU4XIsoTimeZoneSecondDisplay_js_to_rust, ICU4XIsoTimeZoneSecondDisplay_rust_to_js } from "./ICU4XIsoTimeZoneSecondDisplay.js"
+import { ICU4XTimeLength_js_to_rust, ICU4XTimeLength_rust_to_js } from "./ICU4XTimeLength.js"
+
+const ICU4XZonedDateTimeFormatter_box_destroy_registry = new FinalizationRegistry(underlying => {
+ wasm.ICU4XZonedDateTimeFormatter_destroy(underlying);
+});
+
+export class ICU4XZonedDateTimeFormatter {
+ #lifetimeEdges = [];
+ constructor(underlying, owned, edges) {
+ this.underlying = underlying;
+ this.#lifetimeEdges.push(...edges);
+ if (owned) {
+ ICU4XZonedDateTimeFormatter_box_destroy_registry.register(this, underlying);
+ }
+ }
+
+ static create_with_lengths(arg_provider, arg_locale, arg_date_length, arg_time_length) {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_create_with_lengths(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ static create_with_lengths_and_iso_8601_time_zone_fallback(arg_provider, arg_locale, arg_date_length, arg_time_length, arg_zone_options) {
+ const field_format_arg_zone_options = arg_zone_options["format"];
+ const field_minutes_arg_zone_options = arg_zone_options["minutes"];
+ const field_seconds_arg_zone_options = arg_zone_options["seconds"];
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_create_with_lengths_and_iso_8601_time_zone_fallback(diplomat_receive_buffer, arg_provider.underlying, arg_locale.underlying, ICU4XDateLength_js_to_rust[arg_date_length], ICU4XTimeLength_js_to_rust[arg_time_length], ICU4XIsoTimeZoneFormat_js_to_rust[field_format_arg_zone_options], ICU4XIsoTimeZoneMinuteDisplay_js_to_rust[field_minutes_arg_zone_options], ICU4XIsoTimeZoneSecondDisplay_js_to_rust[field_seconds_arg_zone_options]);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = new ICU4XZonedDateTimeFormatter(diplomatRuntime.ptrRead(wasm, diplomat_receive_buffer), true, []);
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ }
+
+ format_datetime_with_custom_time_zone(arg_datetime, arg_time_zone) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_format_datetime_with_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_datetime.underlying, arg_time_zone.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+
+ format_iso_datetime_with_custom_time_zone(arg_datetime, arg_time_zone) {
+ return diplomatRuntime.withWriteable(wasm, (writeable) => {
+ return (() => {
+ const diplomat_receive_buffer = wasm.diplomat_alloc(5, 4);
+ wasm.ICU4XZonedDateTimeFormatter_format_iso_datetime_with_custom_time_zone(diplomat_receive_buffer, this.underlying, arg_datetime.underlying, arg_time_zone.underlying, writeable);
+ const is_ok = diplomatRuntime.resultFlag(wasm, diplomat_receive_buffer, 4);
+ if (is_ok) {
+ const ok_value = {};
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ return ok_value;
+ } else {
+ const throw_value = ICU4XError_rust_to_js[diplomatRuntime.enumDiscriminant(wasm, diplomat_receive_buffer)];
+ wasm.diplomat_free(diplomat_receive_buffer, 5, 4);
+ throw new diplomatRuntime.FFIError(throw_value);
+ }
+ })();
+ });
+ }
+}
diff --git a/intl/icu_capi/js/package/lib/diplomat-runtime.d.ts b/intl/icu_capi/js/package/lib/diplomat-runtime.d.ts
new file mode 100644
index 0000000000..8a8748b6a4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/diplomat-runtime.d.ts
@@ -0,0 +1,20 @@
+/**
+ * An error that occurred in Rust.
+ */
+export class FFIError<E> extends Error {
+ error_value: E;
+}
+
+export type u8 = number;
+export type i8 = number;
+export type u16 = number;
+export type i16 = number;
+export type u32 = number;
+export type i32 = number;
+export type u64 = bigint;
+export type i64 = bigint;
+export type usize = number;
+export type isize = number;
+export type f32 = number;
+export type f64 = number;
+export type char = string;
diff --git a/intl/icu_capi/js/package/lib/diplomat-runtime.js b/intl/icu_capi/js/package/lib/diplomat-runtime.js
new file mode 100644
index 0000000000..75317d4a74
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/diplomat-runtime.js
@@ -0,0 +1,121 @@
+export function readString(wasm, ptr, len) {
+ const buf = new Uint8Array(wasm.memory.buffer, ptr, len);
+ return (new TextDecoder("utf-8")).decode(buf)
+}
+
+export function withWriteable(wasm, callback) {
+ const writeable = wasm.diplomat_buffer_writeable_create(0);
+ try {
+ callback(writeable);
+ const outStringPtr = wasm.diplomat_buffer_writeable_get_bytes(writeable);
+ const outStringLen = wasm.diplomat_buffer_writeable_len(writeable);
+ return readString(wasm, outStringPtr, outStringLen);
+ } finally {
+ wasm.diplomat_buffer_writeable_destroy(writeable);
+ }
+}
+
+export class FFIError extends Error {
+ constructor(error_value) {
+ super("Error over FFI");
+ this.error_value = error_value; // (2)
+ }
+}
+
+export function extractCodePoint(str, param) {
+ const cp = str.codePointAt?.(0);
+ if ((!cp && cp !== 0) || [...str]?.length != 1) {
+ throw new TypeError(`Expected single-character string for char parameter ${param}, found ${str}`);
+ }
+ return cp;
+}
+
+// Get the pointer returned by an FFI function
+//
+// It's tempting to call `(new Uint32Array(wasm.memory.buffer, FFI_func(), 1))[0]`.
+// However, there's a chance that `wasm.memory.buffer` will be resized between
+// the time it's accessed and the time it's used, invalidating the view.
+// This function ensures that the view into wasm memory is fresh.
+//
+// This is used for methods that return multiple types into a wasm buffer, where
+// one of those types is another ptr. Call this method to get access to the returned
+// ptr, so the return buffer can be freed.
+export function ptrRead(wasm, ptr) {
+ return (new Uint32Array(wasm.memory.buffer, ptr, 1))[0];
+}
+
+// Get the flag of a result type.
+export function resultFlag(wasm, ptr, offset) {
+ return (new Uint8Array(wasm.memory.buffer, ptr + offset, 1))[0];
+}
+
+// Get the discriminant of a Rust enum.
+export function enumDiscriminant(wasm, ptr) {
+ return (new Int32Array(wasm.memory.buffer, ptr, 1))[0]
+}
+
+// A wrapper around a slice of WASM memory that can be freed manually or
+// automatically by the garbage collector.
+//
+// This type is necessary for Rust functions that take a `&str` or `&[T]`, since
+// they can create an edge to this object if they borrow from the str/slice,
+// or we can manually free the WASM memory if they don't.
+export class DiplomatBuf {
+ static str = (wasm, string) => {
+ var utf8_len = 0;
+ for (const codepoint_string of string) {
+ let codepoint = codepoint_string.codePointAt(0);
+ if (codepoint < 0x80) {
+ utf8_len += 1
+ } else if (codepoint < 0x800) {
+ utf8_len += 2
+ } else if (codepoint < 0x10000) {
+ utf8_len += 3
+ } else {
+ utf8_len += 4
+ }
+ }
+ return new DiplomatBuf(wasm, utf8_len, 1, buf => {
+ const result = (new TextEncoder()).encodeInto(string, buf);
+ console.assert(string.length == result.read && utf8_len == result.written, "UTF-8 write error");
+ })
+}
+
+ static slice = (wasm, slice, align) => {
+ // If the slice is not a Uint8Array, we have to convert to one, as that's the only
+ // thing we can write into the wasm buffer.
+ const bytes = slice.constructor.name == "Uint8Array" ? slice : new Uint8Array(slice);
+ return new DiplomatBuf(wasm, bytes.length, align, buf => buf.set(bytes));
+ }
+
+ constructor(wasm, size, align, encodeCallback) {
+ const ptr = wasm.diplomat_alloc(size, align);
+ encodeCallback(new Uint8Array(wasm.memory.buffer, ptr, size));
+
+ this.ptr = ptr;
+ this.size = size;
+ this.free = () => {
+ const successfully_unregistered = DiplomatBuf_finalizer.unregister(this);
+ if (successfully_unregistered) {
+ wasm.diplomat_free(this.ptr, this.size, align);
+ } else {
+ console.error(`Failed to unregister DiplomatBuf at ${ptr}, this is a bug. Either it was never registered (leak), it was already unregistered (failed attempt to double free), or the unregister token was unrecognized (fallback to GC).`);
+ }
+ }
+
+ DiplomatBuf_finalizer.register(this, { wasm, ptr, size, align }, this);
+ }
+
+ leak = () => {
+ const successfully_unregistered = DiplomatBuf_finalizer.unregister(this);
+ if (successfully_unregistered) {
+ // leak
+ } else {
+ console.error(`Failed to unregister DiplomatBuf at ${this.ptr}, this is a bug. Either it was never registered (leak), it was already unregistered (failed attempt to double free), or the unregister token was unrecognized (fallback to GC).`);
+ }
+ }
+}
+
+const DiplomatBuf_finalizer = new FinalizationRegistry(({ wasm, ptr, size, align }) => {
+ wasm.diplomat_free(ptr, size, align);
+});
diff --git a/intl/icu_capi/js/package/lib/diplomat-wasm.mjs b/intl/icu_capi/js/package/lib/diplomat-wasm.mjs
new file mode 100644
index 0000000000..2dd3293ba0
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/diplomat-wasm.mjs
@@ -0,0 +1,44 @@
+import cfg from '../diplomat.config.js';
+import {readString} from './diplomat-runtime.js'
+
+let wasm;
+
+const imports = {
+ env: {
+ diplomat_console_debug_js(ptr, len) {
+ console.debug(readString(wasm, ptr, len));
+ },
+ diplomat_console_error_js(ptr, len) {
+ console.error(readString(wasm, ptr, len));
+ },
+ diplomat_console_info_js(ptr, len) {
+ console.info(readString(wasm, ptr, len));
+ },
+ diplomat_console_log_js(ptr, len) {
+ console.log(readString(wasm, ptr, len));
+ },
+ diplomat_console_warn_js(ptr, len) {
+ console.warn(readString(wasm, ptr, len));
+ },
+ diplomat_throw_error_js(ptr, len) {
+ throw new Error(readString(wasm, ptr, len));
+ }
+ }
+}
+
+if (typeof fetch === 'undefined') { // Node
+ const fs = await import("fs");
+ const wasmFile = new Uint8Array(fs.readFileSync(cfg['wasm_path']));
+ const loadedWasm = await WebAssembly.instantiate(wasmFile, imports);
+ wasm = loadedWasm.instance.exports;
+} else { // Browser
+ const loadedWasm = await WebAssembly.instantiateStreaming(fetch(cfg['wasm_path']), imports);
+ wasm = loadedWasm.instance.exports;
+}
+
+wasm.diplomat_init();
+if (cfg['init'] !== undefined) {
+ cfg['init'](wasm);
+}
+
+export default wasm;
diff --git a/intl/icu_capi/js/package/lib/index.d.ts b/intl/icu_capi/js/package/lib/index.d.ts
new file mode 100644
index 0000000000..b8c013da3a
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/index.d.ts
@@ -0,0 +1,124 @@
+export { FFIError, i8, u8, i16, u16, i32, u32, i64, u64, f32, f64, char } from './diplomat-runtime.js';
+export { CodePointRangeIterator } from './CodePointRangeIterator.js';
+export { CodePointRangeIteratorResult } from './CodePointRangeIteratorResult.js';
+export { ICU4XAnyCalendarKind } from './ICU4XAnyCalendarKind.js';
+export { ICU4XBcp47ToIanaMapper } from './ICU4XBcp47ToIanaMapper.js';
+export { ICU4XBidi } from './ICU4XBidi.js';
+export { ICU4XBidiDirection } from './ICU4XBidiDirection.js';
+export { ICU4XBidiInfo } from './ICU4XBidiInfo.js';
+export { ICU4XBidiParagraph } from './ICU4XBidiParagraph.js';
+export { ICU4XCalendar } from './ICU4XCalendar.js';
+export { ICU4XCanonicalCombiningClassMap } from './ICU4XCanonicalCombiningClassMap.js';
+export { ICU4XCanonicalComposition } from './ICU4XCanonicalComposition.js';
+export { ICU4XCanonicalDecomposition } from './ICU4XCanonicalDecomposition.js';
+export { ICU4XCaseMapCloser } from './ICU4XCaseMapCloser.js';
+export { ICU4XCaseMapper } from './ICU4XCaseMapper.js';
+export { ICU4XCodePointMapData16 } from './ICU4XCodePointMapData16.js';
+export { ICU4XCodePointMapData8 } from './ICU4XCodePointMapData8.js';
+export { ICU4XCodePointSetBuilder } from './ICU4XCodePointSetBuilder.js';
+export { ICU4XCodePointSetData } from './ICU4XCodePointSetData.js';
+export { ICU4XCollator } from './ICU4XCollator.js';
+export { ICU4XCollatorAlternateHandling } from './ICU4XCollatorAlternateHandling.js';
+export { ICU4XCollatorBackwardSecondLevel } from './ICU4XCollatorBackwardSecondLevel.js';
+export { ICU4XCollatorCaseFirst } from './ICU4XCollatorCaseFirst.js';
+export { ICU4XCollatorCaseLevel } from './ICU4XCollatorCaseLevel.js';
+export { ICU4XCollatorMaxVariable } from './ICU4XCollatorMaxVariable.js';
+export { ICU4XCollatorNumeric } from './ICU4XCollatorNumeric.js';
+export { ICU4XCollatorOptionsV1 } from './ICU4XCollatorOptionsV1.js';
+export { ICU4XCollatorStrength } from './ICU4XCollatorStrength.js';
+export { ICU4XComposingNormalizer } from './ICU4XComposingNormalizer.js';
+export { ICU4XCustomTimeZone } from './ICU4XCustomTimeZone.js';
+export { ICU4XDataProvider } from './ICU4XDataProvider.js';
+export { ICU4XDataStruct } from './ICU4XDataStruct.js';
+export { ICU4XDate } from './ICU4XDate.js';
+export { ICU4XDateFormatter } from './ICU4XDateFormatter.js';
+export { ICU4XDateLength } from './ICU4XDateLength.js';
+export { ICU4XDateTime } from './ICU4XDateTime.js';
+export { ICU4XDateTimeFormatter } from './ICU4XDateTimeFormatter.js';
+export { ICU4XDecomposed } from './ICU4XDecomposed.js';
+export { ICU4XDecomposingNormalizer } from './ICU4XDecomposingNormalizer.js';
+export { ICU4XDisplayNamesFallback } from './ICU4XDisplayNamesFallback.js';
+export { ICU4XDisplayNamesOptionsV1 } from './ICU4XDisplayNamesOptionsV1.js';
+export { ICU4XDisplayNamesStyle } from './ICU4XDisplayNamesStyle.js';
+export { ICU4XError } from './ICU4XError.js';
+export { ICU4XFixedDecimal } from './ICU4XFixedDecimal.js';
+export { ICU4XFixedDecimalFormatter } from './ICU4XFixedDecimalFormatter.js';
+export { ICU4XFixedDecimalGroupingStrategy } from './ICU4XFixedDecimalGroupingStrategy.js';
+export { ICU4XFixedDecimalSign } from './ICU4XFixedDecimalSign.js';
+export { ICU4XFixedDecimalSignDisplay } from './ICU4XFixedDecimalSignDisplay.js';
+export { ICU4XGeneralCategoryNameToMaskMapper } from './ICU4XGeneralCategoryNameToMaskMapper.js';
+export { ICU4XGraphemeClusterBreakIteratorLatin1 } from './ICU4XGraphemeClusterBreakIteratorLatin1.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf16 } from './ICU4XGraphemeClusterBreakIteratorUtf16.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf8 } from './ICU4XGraphemeClusterBreakIteratorUtf8.js';
+export { ICU4XGraphemeClusterSegmenter } from './ICU4XGraphemeClusterSegmenter.js';
+export { ICU4XGregorianDateFormatter } from './ICU4XGregorianDateFormatter.js';
+export { ICU4XGregorianDateTimeFormatter } from './ICU4XGregorianDateTimeFormatter.js';
+export { ICU4XGregorianZonedDateTimeFormatter } from './ICU4XGregorianZonedDateTimeFormatter.js';
+export { ICU4XIanaToBcp47Mapper } from './ICU4XIanaToBcp47Mapper.js';
+export { ICU4XIsoDate } from './ICU4XIsoDate.js';
+export { ICU4XIsoDateTime } from './ICU4XIsoDateTime.js';
+export { ICU4XIsoTimeZoneFormat } from './ICU4XIsoTimeZoneFormat.js';
+export { ICU4XIsoTimeZoneMinuteDisplay } from './ICU4XIsoTimeZoneMinuteDisplay.js';
+export { ICU4XIsoTimeZoneOptions } from './ICU4XIsoTimeZoneOptions.js';
+export { ICU4XIsoTimeZoneSecondDisplay } from './ICU4XIsoTimeZoneSecondDisplay.js';
+export { ICU4XIsoWeekday } from './ICU4XIsoWeekday.js';
+export { ICU4XLanguageDisplay } from './ICU4XLanguageDisplay.js';
+export { ICU4XLeadingAdjustment } from './ICU4XLeadingAdjustment.js';
+export { ICU4XLineBreakIteratorLatin1 } from './ICU4XLineBreakIteratorLatin1.js';
+export { ICU4XLineBreakIteratorUtf16 } from './ICU4XLineBreakIteratorUtf16.js';
+export { ICU4XLineBreakIteratorUtf8 } from './ICU4XLineBreakIteratorUtf8.js';
+export { ICU4XLineBreakOptionsV1 } from './ICU4XLineBreakOptionsV1.js';
+export { ICU4XLineBreakStrictness } from './ICU4XLineBreakStrictness.js';
+export { ICU4XLineBreakWordOption } from './ICU4XLineBreakWordOption.js';
+export { ICU4XLineSegmenter } from './ICU4XLineSegmenter.js';
+export { ICU4XList } from './ICU4XList.js';
+export { ICU4XListFormatter } from './ICU4XListFormatter.js';
+export { ICU4XListLength } from './ICU4XListLength.js';
+export { ICU4XLocale } from './ICU4XLocale.js';
+export { ICU4XLocaleCanonicalizer } from './ICU4XLocaleCanonicalizer.js';
+export { ICU4XLocaleDirection } from './ICU4XLocaleDirection.js';
+export { ICU4XLocaleDirectionality } from './ICU4XLocaleDirectionality.js';
+export { ICU4XLocaleDisplayNamesFormatter } from './ICU4XLocaleDisplayNamesFormatter.js';
+export { ICU4XLocaleExpander } from './ICU4XLocaleExpander.js';
+export { ICU4XLocaleFallbackConfig } from './ICU4XLocaleFallbackConfig.js';
+export { ICU4XLocaleFallbackIterator } from './ICU4XLocaleFallbackIterator.js';
+export { ICU4XLocaleFallbackPriority } from './ICU4XLocaleFallbackPriority.js';
+export { ICU4XLocaleFallbackSupplement } from './ICU4XLocaleFallbackSupplement.js';
+export { ICU4XLocaleFallbacker } from './ICU4XLocaleFallbacker.js';
+export { ICU4XLocaleFallbackerWithConfig } from './ICU4XLocaleFallbackerWithConfig.js';
+export { ICU4XLogger } from './ICU4XLogger.js';
+export { ICU4XMetazoneCalculator } from './ICU4XMetazoneCalculator.js';
+export { ICU4XOrdering } from './ICU4XOrdering.js';
+export { ICU4XPluralCategories } from './ICU4XPluralCategories.js';
+export { ICU4XPluralCategory } from './ICU4XPluralCategory.js';
+export { ICU4XPluralOperands } from './ICU4XPluralOperands.js';
+export { ICU4XPluralRules } from './ICU4XPluralRules.js';
+export { ICU4XPropertyValueNameToEnumMapper } from './ICU4XPropertyValueNameToEnumMapper.js';
+export { ICU4XRegionDisplayNames } from './ICU4XRegionDisplayNames.js';
+export { ICU4XReorderedIndexMap } from './ICU4XReorderedIndexMap.js';
+export { ICU4XRoundingIncrement } from './ICU4XRoundingIncrement.js';
+export { ICU4XScriptExtensionsSet } from './ICU4XScriptExtensionsSet.js';
+export { ICU4XScriptWithExtensions } from './ICU4XScriptWithExtensions.js';
+export { ICU4XScriptWithExtensionsBorrowed } from './ICU4XScriptWithExtensionsBorrowed.js';
+export { ICU4XSegmenterWordType } from './ICU4XSegmenterWordType.js';
+export { ICU4XSentenceBreakIteratorLatin1 } from './ICU4XSentenceBreakIteratorLatin1.js';
+export { ICU4XSentenceBreakIteratorUtf16 } from './ICU4XSentenceBreakIteratorUtf16.js';
+export { ICU4XSentenceBreakIteratorUtf8 } from './ICU4XSentenceBreakIteratorUtf8.js';
+export { ICU4XSentenceSegmenter } from './ICU4XSentenceSegmenter.js';
+export { ICU4XTime } from './ICU4XTime.js';
+export { ICU4XTimeFormatter } from './ICU4XTimeFormatter.js';
+export { ICU4XTimeLength } from './ICU4XTimeLength.js';
+export { ICU4XTimeZoneFormatter } from './ICU4XTimeZoneFormatter.js';
+export { ICU4XTitlecaseMapper } from './ICU4XTitlecaseMapper.js';
+export { ICU4XTitlecaseOptionsV1 } from './ICU4XTitlecaseOptionsV1.js';
+export { ICU4XTrailingCase } from './ICU4XTrailingCase.js';
+export { ICU4XTransformResult } from './ICU4XTransformResult.js';
+export { ICU4XUnicodeSetData } from './ICU4XUnicodeSetData.js';
+export { ICU4XWeekCalculator } from './ICU4XWeekCalculator.js';
+export { ICU4XWeekOf } from './ICU4XWeekOf.js';
+export { ICU4XWeekRelativeUnit } from './ICU4XWeekRelativeUnit.js';
+export { ICU4XWordBreakIteratorLatin1 } from './ICU4XWordBreakIteratorLatin1.js';
+export { ICU4XWordBreakIteratorUtf16 } from './ICU4XWordBreakIteratorUtf16.js';
+export { ICU4XWordBreakIteratorUtf8 } from './ICU4XWordBreakIteratorUtf8.js';
+export { ICU4XWordSegmenter } from './ICU4XWordSegmenter.js';
+export { ICU4XZonedDateTimeFormatter } from './ICU4XZonedDateTimeFormatter.js';
diff --git a/intl/icu_capi/js/package/lib/index.js b/intl/icu_capi/js/package/lib/index.js
new file mode 100644
index 0000000000..52509139e4
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/index.js
@@ -0,0 +1,124 @@
+export { FFIError } from './diplomat-runtime.js';
+export { CodePointRangeIterator } from './CodePointRangeIterator.js';
+export { CodePointRangeIteratorResult } from './CodePointRangeIteratorResult.js';
+export { ICU4XAnyCalendarKind } from './ICU4XAnyCalendarKind.js';
+export { ICU4XBcp47ToIanaMapper } from './ICU4XBcp47ToIanaMapper.js';
+export { ICU4XBidi } from './ICU4XBidi.js';
+export { ICU4XBidiDirection } from './ICU4XBidiDirection.js';
+export { ICU4XBidiInfo } from './ICU4XBidiInfo.js';
+export { ICU4XBidiParagraph } from './ICU4XBidiParagraph.js';
+export { ICU4XCalendar } from './ICU4XCalendar.js';
+export { ICU4XCanonicalCombiningClassMap } from './ICU4XCanonicalCombiningClassMap.js';
+export { ICU4XCanonicalComposition } from './ICU4XCanonicalComposition.js';
+export { ICU4XCanonicalDecomposition } from './ICU4XCanonicalDecomposition.js';
+export { ICU4XCaseMapCloser } from './ICU4XCaseMapCloser.js';
+export { ICU4XCaseMapper } from './ICU4XCaseMapper.js';
+export { ICU4XCodePointMapData16 } from './ICU4XCodePointMapData16.js';
+export { ICU4XCodePointMapData8 } from './ICU4XCodePointMapData8.js';
+export { ICU4XCodePointSetBuilder } from './ICU4XCodePointSetBuilder.js';
+export { ICU4XCodePointSetData } from './ICU4XCodePointSetData.js';
+export { ICU4XCollator } from './ICU4XCollator.js';
+export { ICU4XCollatorAlternateHandling } from './ICU4XCollatorAlternateHandling.js';
+export { ICU4XCollatorBackwardSecondLevel } from './ICU4XCollatorBackwardSecondLevel.js';
+export { ICU4XCollatorCaseFirst } from './ICU4XCollatorCaseFirst.js';
+export { ICU4XCollatorCaseLevel } from './ICU4XCollatorCaseLevel.js';
+export { ICU4XCollatorMaxVariable } from './ICU4XCollatorMaxVariable.js';
+export { ICU4XCollatorNumeric } from './ICU4XCollatorNumeric.js';
+export { ICU4XCollatorOptionsV1 } from './ICU4XCollatorOptionsV1.js';
+export { ICU4XCollatorStrength } from './ICU4XCollatorStrength.js';
+export { ICU4XComposingNormalizer } from './ICU4XComposingNormalizer.js';
+export { ICU4XCustomTimeZone } from './ICU4XCustomTimeZone.js';
+export { ICU4XDataProvider } from './ICU4XDataProvider.js';
+export { ICU4XDataStruct } from './ICU4XDataStruct.js';
+export { ICU4XDate } from './ICU4XDate.js';
+export { ICU4XDateFormatter } from './ICU4XDateFormatter.js';
+export { ICU4XDateLength } from './ICU4XDateLength.js';
+export { ICU4XDateTime } from './ICU4XDateTime.js';
+export { ICU4XDateTimeFormatter } from './ICU4XDateTimeFormatter.js';
+export { ICU4XDecomposed } from './ICU4XDecomposed.js';
+export { ICU4XDecomposingNormalizer } from './ICU4XDecomposingNormalizer.js';
+export { ICU4XDisplayNamesFallback } from './ICU4XDisplayNamesFallback.js';
+export { ICU4XDisplayNamesOptionsV1 } from './ICU4XDisplayNamesOptionsV1.js';
+export { ICU4XDisplayNamesStyle } from './ICU4XDisplayNamesStyle.js';
+export { ICU4XError } from './ICU4XError.js';
+export { ICU4XFixedDecimal } from './ICU4XFixedDecimal.js';
+export { ICU4XFixedDecimalFormatter } from './ICU4XFixedDecimalFormatter.js';
+export { ICU4XFixedDecimalGroupingStrategy } from './ICU4XFixedDecimalGroupingStrategy.js';
+export { ICU4XFixedDecimalSign } from './ICU4XFixedDecimalSign.js';
+export { ICU4XFixedDecimalSignDisplay } from './ICU4XFixedDecimalSignDisplay.js';
+export { ICU4XGeneralCategoryNameToMaskMapper } from './ICU4XGeneralCategoryNameToMaskMapper.js';
+export { ICU4XGraphemeClusterBreakIteratorLatin1 } from './ICU4XGraphemeClusterBreakIteratorLatin1.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf16 } from './ICU4XGraphemeClusterBreakIteratorUtf16.js';
+export { ICU4XGraphemeClusterBreakIteratorUtf8 } from './ICU4XGraphemeClusterBreakIteratorUtf8.js';
+export { ICU4XGraphemeClusterSegmenter } from './ICU4XGraphemeClusterSegmenter.js';
+export { ICU4XGregorianDateFormatter } from './ICU4XGregorianDateFormatter.js';
+export { ICU4XGregorianDateTimeFormatter } from './ICU4XGregorianDateTimeFormatter.js';
+export { ICU4XGregorianZonedDateTimeFormatter } from './ICU4XGregorianZonedDateTimeFormatter.js';
+export { ICU4XIanaToBcp47Mapper } from './ICU4XIanaToBcp47Mapper.js';
+export { ICU4XIsoDate } from './ICU4XIsoDate.js';
+export { ICU4XIsoDateTime } from './ICU4XIsoDateTime.js';
+export { ICU4XIsoTimeZoneFormat } from './ICU4XIsoTimeZoneFormat.js';
+export { ICU4XIsoTimeZoneMinuteDisplay } from './ICU4XIsoTimeZoneMinuteDisplay.js';
+export { ICU4XIsoTimeZoneOptions } from './ICU4XIsoTimeZoneOptions.js';
+export { ICU4XIsoTimeZoneSecondDisplay } from './ICU4XIsoTimeZoneSecondDisplay.js';
+export { ICU4XIsoWeekday } from './ICU4XIsoWeekday.js';
+export { ICU4XLanguageDisplay } from './ICU4XLanguageDisplay.js';
+export { ICU4XLeadingAdjustment } from './ICU4XLeadingAdjustment.js';
+export { ICU4XLineBreakIteratorLatin1 } from './ICU4XLineBreakIteratorLatin1.js';
+export { ICU4XLineBreakIteratorUtf16 } from './ICU4XLineBreakIteratorUtf16.js';
+export { ICU4XLineBreakIteratorUtf8 } from './ICU4XLineBreakIteratorUtf8.js';
+export { ICU4XLineBreakOptionsV1 } from './ICU4XLineBreakOptionsV1.js';
+export { ICU4XLineBreakStrictness } from './ICU4XLineBreakStrictness.js';
+export { ICU4XLineBreakWordOption } from './ICU4XLineBreakWordOption.js';
+export { ICU4XLineSegmenter } from './ICU4XLineSegmenter.js';
+export { ICU4XList } from './ICU4XList.js';
+export { ICU4XListFormatter } from './ICU4XListFormatter.js';
+export { ICU4XListLength } from './ICU4XListLength.js';
+export { ICU4XLocale } from './ICU4XLocale.js';
+export { ICU4XLocaleCanonicalizer } from './ICU4XLocaleCanonicalizer.js';
+export { ICU4XLocaleDirection } from './ICU4XLocaleDirection.js';
+export { ICU4XLocaleDirectionality } from './ICU4XLocaleDirectionality.js';
+export { ICU4XLocaleDisplayNamesFormatter } from './ICU4XLocaleDisplayNamesFormatter.js';
+export { ICU4XLocaleExpander } from './ICU4XLocaleExpander.js';
+export { ICU4XLocaleFallbackConfig } from './ICU4XLocaleFallbackConfig.js';
+export { ICU4XLocaleFallbackIterator } from './ICU4XLocaleFallbackIterator.js';
+export { ICU4XLocaleFallbackPriority } from './ICU4XLocaleFallbackPriority.js';
+export { ICU4XLocaleFallbackSupplement } from './ICU4XLocaleFallbackSupplement.js';
+export { ICU4XLocaleFallbacker } from './ICU4XLocaleFallbacker.js';
+export { ICU4XLocaleFallbackerWithConfig } from './ICU4XLocaleFallbackerWithConfig.js';
+export { ICU4XLogger } from './ICU4XLogger.js';
+export { ICU4XMetazoneCalculator } from './ICU4XMetazoneCalculator.js';
+export { ICU4XOrdering } from './ICU4XOrdering.js';
+export { ICU4XPluralCategories } from './ICU4XPluralCategories.js';
+export { ICU4XPluralCategory } from './ICU4XPluralCategory.js';
+export { ICU4XPluralOperands } from './ICU4XPluralOperands.js';
+export { ICU4XPluralRules } from './ICU4XPluralRules.js';
+export { ICU4XPropertyValueNameToEnumMapper } from './ICU4XPropertyValueNameToEnumMapper.js';
+export { ICU4XRegionDisplayNames } from './ICU4XRegionDisplayNames.js';
+export { ICU4XReorderedIndexMap } from './ICU4XReorderedIndexMap.js';
+export { ICU4XRoundingIncrement } from './ICU4XRoundingIncrement.js';
+export { ICU4XScriptExtensionsSet } from './ICU4XScriptExtensionsSet.js';
+export { ICU4XScriptWithExtensions } from './ICU4XScriptWithExtensions.js';
+export { ICU4XScriptWithExtensionsBorrowed } from './ICU4XScriptWithExtensionsBorrowed.js';
+export { ICU4XSegmenterWordType } from './ICU4XSegmenterWordType.js';
+export { ICU4XSentenceBreakIteratorLatin1 } from './ICU4XSentenceBreakIteratorLatin1.js';
+export { ICU4XSentenceBreakIteratorUtf16 } from './ICU4XSentenceBreakIteratorUtf16.js';
+export { ICU4XSentenceBreakIteratorUtf8 } from './ICU4XSentenceBreakIteratorUtf8.js';
+export { ICU4XSentenceSegmenter } from './ICU4XSentenceSegmenter.js';
+export { ICU4XTime } from './ICU4XTime.js';
+export { ICU4XTimeFormatter } from './ICU4XTimeFormatter.js';
+export { ICU4XTimeLength } from './ICU4XTimeLength.js';
+export { ICU4XTimeZoneFormatter } from './ICU4XTimeZoneFormatter.js';
+export { ICU4XTitlecaseMapper } from './ICU4XTitlecaseMapper.js';
+export { ICU4XTitlecaseOptionsV1 } from './ICU4XTitlecaseOptionsV1.js';
+export { ICU4XTrailingCase } from './ICU4XTrailingCase.js';
+export { ICU4XTransformResult } from './ICU4XTransformResult.js';
+export { ICU4XUnicodeSetData } from './ICU4XUnicodeSetData.js';
+export { ICU4XWeekCalculator } from './ICU4XWeekCalculator.js';
+export { ICU4XWeekOf } from './ICU4XWeekOf.js';
+export { ICU4XWeekRelativeUnit } from './ICU4XWeekRelativeUnit.js';
+export { ICU4XWordBreakIteratorLatin1 } from './ICU4XWordBreakIteratorLatin1.js';
+export { ICU4XWordBreakIteratorUtf16 } from './ICU4XWordBreakIteratorUtf16.js';
+export { ICU4XWordBreakIteratorUtf8 } from './ICU4XWordBreakIteratorUtf8.js';
+export { ICU4XWordSegmenter } from './ICU4XWordSegmenter.js';
+export { ICU4XZonedDateTimeFormatter } from './ICU4XZonedDateTimeFormatter.js';
diff --git a/intl/icu_capi/js/package/package-lock.json b/intl/icu_capi/js/package/package-lock.json
new file mode 100644
index 0000000000..d154e8a0e3
--- /dev/null
+++ b/intl/icu_capi/js/package/package-lock.json
@@ -0,0 +1,2948 @@
+{
+ "name": "icu4x",
+ "version": "0.0.1",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "icu4x",
+ "version": "0.0.1",
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "ava": "^5.3.1",
+ "benchmark": "^2.1.4"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/aggregate-error": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz",
+ "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==",
+ "dev": true,
+ "dependencies": {
+ "clean-stack": "^4.0.0",
+ "indent-string": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-regex?sponsor=1"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "dependencies": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "node_modules/array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/arrgv": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz",
+ "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/arrify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz",
+ "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ava": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/ava/-/ava-5.3.1.tgz",
+ "integrity": "sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.8.2",
+ "acorn-walk": "^8.2.0",
+ "ansi-styles": "^6.2.1",
+ "arrgv": "^1.0.2",
+ "arrify": "^3.0.0",
+ "callsites": "^4.0.0",
+ "cbor": "^8.1.0",
+ "chalk": "^5.2.0",
+ "chokidar": "^3.5.3",
+ "chunkd": "^2.0.1",
+ "ci-info": "^3.8.0",
+ "ci-parallel-vars": "^1.0.1",
+ "clean-yaml-object": "^0.1.0",
+ "cli-truncate": "^3.1.0",
+ "code-excerpt": "^4.0.0",
+ "common-path-prefix": "^3.0.0",
+ "concordance": "^5.0.4",
+ "currently-unhandled": "^0.4.1",
+ "debug": "^4.3.4",
+ "emittery": "^1.0.1",
+ "figures": "^5.0.0",
+ "globby": "^13.1.4",
+ "ignore-by-default": "^2.1.0",
+ "indent-string": "^5.0.0",
+ "is-error": "^2.2.2",
+ "is-plain-object": "^5.0.0",
+ "is-promise": "^4.0.0",
+ "matcher": "^5.0.0",
+ "mem": "^9.0.2",
+ "ms": "^2.1.3",
+ "p-event": "^5.0.1",
+ "p-map": "^5.5.0",
+ "picomatch": "^2.3.1",
+ "pkg-conf": "^4.0.0",
+ "plur": "^5.1.0",
+ "pretty-ms": "^8.0.0",
+ "resolve-cwd": "^3.0.0",
+ "stack-utils": "^2.0.6",
+ "strip-ansi": "^7.0.1",
+ "supertap": "^3.0.1",
+ "temp-dir": "^3.0.0",
+ "write-file-atomic": "^5.0.1",
+ "yargs": "^17.7.2"
+ },
+ "bin": {
+ "ava": "entrypoints/cli.mjs"
+ },
+ "engines": {
+ "node": ">=14.19 <15 || >=16.15 <17 || >=18"
+ },
+ "peerDependencies": {
+ "@ava/typescript": "*"
+ },
+ "peerDependenciesMeta": {
+ "@ava/typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/benchmark": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
+ "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==",
+ "dev": true,
+ "dependencies": {
+ "lodash": "^4.17.4",
+ "platform": "^1.3.3"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/blueimp-md5": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz",
+ "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==",
+ "dev": true
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.1.0.tgz",
+ "integrity": "sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cbor": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz",
+ "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==",
+ "dev": true,
+ "dependencies": {
+ "nofilter": "^3.1.0"
+ },
+ "engines": {
+ "node": ">=12.19"
+ }
+ },
+ "node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "dev": true,
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/chunkd": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz",
+ "integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==",
+ "dev": true
+ },
+ "node_modules/ci-info": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/sibiraj-s"
+ }
+ ],
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ci-parallel-vars": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz",
+ "integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==",
+ "dev": true
+ },
+ "node_modules/clean-stack": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz",
+ "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "5.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/clean-yaml-object": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
+ "integrity": "sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/cli-truncate": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz",
+ "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==",
+ "dev": true,
+ "dependencies": {
+ "slice-ansi": "^5.0.0",
+ "string-width": "^5.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dev": true,
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/cliui/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/cliui/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/cliui/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/code-excerpt": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",
+ "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",
+ "dev": true,
+ "dependencies": {
+ "convert-to-spaces": "^2.0.1"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/common-path-prefix": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
+ "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==",
+ "dev": true
+ },
+ "node_modules/concordance": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz",
+ "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==",
+ "dev": true,
+ "dependencies": {
+ "date-time": "^3.1.0",
+ "esutils": "^2.0.3",
+ "fast-diff": "^1.2.0",
+ "js-string-escape": "^1.0.1",
+ "lodash": "^4.17.15",
+ "md5-hex": "^3.0.1",
+ "semver": "^7.3.2",
+ "well-known-symbols": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14"
+ }
+ },
+ "node_modules/convert-to-spaces": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",
+ "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==",
+ "dev": true,
+ "dependencies": {
+ "array-find-index": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/date-time": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz",
+ "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==",
+ "dev": true,
+ "dependencies": {
+ "time-zone": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/debug/node_modules/ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "node_modules/dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "dependencies": {
+ "path-type": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+ "dev": true
+ },
+ "node_modules/emittery": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.0.1.tgz",
+ "integrity": "sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/emittery?sponsor=1"
+ }
+ },
+ "node_modules/emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true
+ },
+ "node_modules/escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true,
+ "bin": {
+ "esparse": "bin/esparse.js",
+ "esvalidate": "bin/esvalidate.js"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/fast-diff": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
+ "dev": true
+ },
+ "node_modules/fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ },
+ "engines": {
+ "node": ">=8.6.0"
+ }
+ },
+ "node_modules/fastq": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+ "dev": true,
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/figures": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
+ "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^5.0.0",
+ "is-unicode-supported": "^1.2.0"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/find-up": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
+ "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^7.1.0",
+ "path-exists": "^5.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true,
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/globby": {
+ "version": "13.2.2",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz",
+ "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==",
+ "dev": true,
+ "dependencies": {
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.3.0",
+ "ignore": "^5.2.4",
+ "merge2": "^1.4.1",
+ "slash": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/ignore-by-default": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz",
+ "integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10 <11 || >=12 <13 || >=14"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/indent-string": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/irregular-plurals": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz",
+ "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-error": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz",
+ "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==",
+ "dev": true
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/is-plain-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "dev": true
+ },
+ "node_modules/is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/js-string-escape": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
+ "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "dependencies": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "node_modules/load-json-file": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz",
+ "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/locate-path": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
+ "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^6.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/map-age-cleaner": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+ "dev": true,
+ "dependencies": {
+ "p-defer": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/matcher": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz",
+ "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^5.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/md5-hex": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz",
+ "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==",
+ "dev": true,
+ "dependencies": {
+ "blueimp-md5": "^2.10.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/mem": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz",
+ "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==",
+ "dev": true,
+ "dependencies": {
+ "map-age-cleaner": "^0.1.3",
+ "mimic-fn": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/mem?sponsor=1"
+ }
+ },
+ "node_modules/merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "dependencies": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "node_modules/nofilter": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz",
+ "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.19"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/p-defer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/p-event": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz",
+ "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==",
+ "dev": true,
+ "dependencies": {
+ "p-timeout": "^5.0.2"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-limit": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
+ "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^1.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-locate": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
+ "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^4.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-map": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz",
+ "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==",
+ "dev": true,
+ "dependencies": {
+ "aggregate-error": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parse-ms": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
+ "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/path-exists": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
+ "dev": true,
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pkg-conf": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz",
+ "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==",
+ "dev": true,
+ "dependencies": {
+ "find-up": "^6.0.0",
+ "load-json-file": "^7.0.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/platform": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
+ "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
+ "dev": true
+ },
+ "node_modules/plur": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz",
+ "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==",
+ "dev": true,
+ "dependencies": {
+ "irregular-plurals": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/pretty-ms": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz",
+ "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==",
+ "dev": true,
+ "dependencies": {
+ "parse-ms": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "dependencies": {
+ "resolve-from": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true,
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/serialize-error": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
+ "dev": true,
+ "dependencies": {
+ "type-fest": "^0.13.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true,
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/slash": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
+ "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/slice-ansi": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
+ "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^6.0.0",
+ "is-fullwidth-code-point": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/slice-ansi?sponsor=1"
+ }
+ },
+ "node_modules/sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "dev": true
+ },
+ "node_modules/stack-utils": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
+ "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
+ "dev": true,
+ "dependencies": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/stack-utils/node_modules/escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "dev": true,
+ "dependencies": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+ }
+ },
+ "node_modules/supertap": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz",
+ "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==",
+ "dev": true,
+ "dependencies": {
+ "indent-string": "^5.0.0",
+ "js-yaml": "^3.14.1",
+ "serialize-error": "^7.0.1",
+ "strip-ansi": "^7.0.1"
+ },
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ }
+ },
+ "node_modules/temp-dir": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz",
+ "integrity": "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ }
+ },
+ "node_modules/time-zone": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz",
+ "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/well-known-symbols": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
+ "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/write-file-atomic": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
+ "dev": true,
+ "dependencies": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
+ },
+ "engines": {
+ "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dev": true,
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs/node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "node_modules/yargs/node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yargs/node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/yocto-queue": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
+ "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.20"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ }
+ },
+ "dependencies": {
+ "@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ }
+ },
+ "@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true
+ },
+ "@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ }
+ },
+ "acorn": {
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
+ "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
+ "dev": true
+ },
+ "acorn-walk": {
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
+ "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
+ "dev": true
+ },
+ "aggregate-error": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz",
+ "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==",
+ "dev": true,
+ "requires": {
+ "clean-stack": "^4.0.0",
+ "indent-string": "^5.0.0"
+ }
+ },
+ "ansi-regex": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+ "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+ "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
+ "array-find-index": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==",
+ "dev": true
+ },
+ "arrgv": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz",
+ "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==",
+ "dev": true
+ },
+ "arrify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz",
+ "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==",
+ "dev": true
+ },
+ "ava": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/ava/-/ava-5.3.1.tgz",
+ "integrity": "sha512-Scv9a4gMOXB6+ni4toLuhAm9KYWEjsgBglJl+kMGI5+IVDt120CCDZyB5HNU9DjmLI2t4I0GbnxGLmmRfGTJGg==",
+ "dev": true,
+ "requires": {
+ "acorn": "^8.8.2",
+ "acorn-walk": "^8.2.0",
+ "ansi-styles": "^6.2.1",
+ "arrgv": "^1.0.2",
+ "arrify": "^3.0.0",
+ "callsites": "^4.0.0",
+ "cbor": "^8.1.0",
+ "chalk": "^5.2.0",
+ "chokidar": "^3.5.3",
+ "chunkd": "^2.0.1",
+ "ci-info": "^3.8.0",
+ "ci-parallel-vars": "^1.0.1",
+ "clean-yaml-object": "^0.1.0",
+ "cli-truncate": "^3.1.0",
+ "code-excerpt": "^4.0.0",
+ "common-path-prefix": "^3.0.0",
+ "concordance": "^5.0.4",
+ "currently-unhandled": "^0.4.1",
+ "debug": "^4.3.4",
+ "emittery": "^1.0.1",
+ "figures": "^5.0.0",
+ "globby": "^13.1.4",
+ "ignore-by-default": "^2.1.0",
+ "indent-string": "^5.0.0",
+ "is-error": "^2.2.2",
+ "is-plain-object": "^5.0.0",
+ "is-promise": "^4.0.0",
+ "matcher": "^5.0.0",
+ "mem": "^9.0.2",
+ "ms": "^2.1.3",
+ "p-event": "^5.0.1",
+ "p-map": "^5.5.0",
+ "picomatch": "^2.3.1",
+ "pkg-conf": "^4.0.0",
+ "plur": "^5.1.0",
+ "pretty-ms": "^8.0.0",
+ "resolve-cwd": "^3.0.0",
+ "stack-utils": "^2.0.6",
+ "strip-ansi": "^7.0.1",
+ "supertap": "^3.0.1",
+ "temp-dir": "^3.0.0",
+ "write-file-atomic": "^5.0.1",
+ "yargs": "^17.7.2"
+ }
+ },
+ "benchmark": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
+ "integrity": "sha512-l9MlfN4M1K/H2fbhfMy3B7vJd6AGKJVQn2h6Sg/Yx+KckoUA7ewS5Vv6TjSq18ooE1kS9hhAlQRH3AkXIh/aOQ==",
+ "dev": true,
+ "requires": {
+ "lodash": "^4.17.4",
+ "platform": "^1.3.3"
+ }
+ },
+ "binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true
+ },
+ "blueimp-md5": {
+ "version": "2.19.0",
+ "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz",
+ "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==",
+ "dev": true
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "callsites": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.1.0.tgz",
+ "integrity": "sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw==",
+ "dev": true
+ },
+ "cbor": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz",
+ "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==",
+ "dev": true,
+ "requires": {
+ "nofilter": "^3.1.0"
+ }
+ },
+ "chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "dev": true
+ },
+ "chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ }
+ },
+ "chunkd": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/chunkd/-/chunkd-2.0.1.tgz",
+ "integrity": "sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ==",
+ "dev": true
+ },
+ "ci-info": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
+ "dev": true
+ },
+ "ci-parallel-vars": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/ci-parallel-vars/-/ci-parallel-vars-1.0.1.tgz",
+ "integrity": "sha512-uvzpYrpmidaoxvIQHM+rKSrigjOe9feHYbw4uOI2gdfe1C3xIlxO+kVXq83WQWNniTf8bAxVpy+cQeFQsMERKg==",
+ "dev": true
+ },
+ "clean-stack": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz",
+ "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "5.0.0"
+ }
+ },
+ "clean-yaml-object": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
+ "integrity": "sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==",
+ "dev": true
+ },
+ "cli-truncate": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz",
+ "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==",
+ "dev": true,
+ "requires": {
+ "slice-ansi": "^5.0.0",
+ "string-width": "^5.0.0"
+ }
+ },
+ "cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dev": true,
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
+ },
+ "code-excerpt": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",
+ "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",
+ "dev": true,
+ "requires": {
+ "convert-to-spaces": "^2.0.1"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "common-path-prefix": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
+ "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==",
+ "dev": true
+ },
+ "concordance": {
+ "version": "5.0.4",
+ "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz",
+ "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==",
+ "dev": true,
+ "requires": {
+ "date-time": "^3.1.0",
+ "esutils": "^2.0.3",
+ "fast-diff": "^1.2.0",
+ "js-string-escape": "^1.0.1",
+ "lodash": "^4.17.15",
+ "md5-hex": "^3.0.1",
+ "semver": "^7.3.2",
+ "well-known-symbols": "^2.0.0"
+ }
+ },
+ "convert-to-spaces": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",
+ "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==",
+ "dev": true
+ },
+ "currently-unhandled": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==",
+ "dev": true,
+ "requires": {
+ "array-find-index": "^1.0.1"
+ }
+ },
+ "date-time": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz",
+ "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==",
+ "dev": true,
+ "requires": {
+ "time-zone": "^1.0.0"
+ }
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ },
+ "dependencies": {
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "dir-glob": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+ "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+ "dev": true,
+ "requires": {
+ "path-type": "^4.0.0"
+ }
+ },
+ "eastasianwidth": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+ "dev": true
+ },
+ "emittery": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.0.1.tgz",
+ "integrity": "sha512-2ID6FdrMD9KDLldGesP6317G78K7km/kMcwItRtVFva7I/cSEOIaLpewaUb+YLXVwdAp3Ctfxh/V5zIl1sj7dQ==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "9.2.2",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+ "dev": true
+ },
+ "escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true
+ },
+ "escape-string-regexp": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+ "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+ "dev": true
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true
+ },
+ "fast-diff": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz",
+ "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==",
+ "dev": true
+ },
+ "fast-glob": {
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
+ "dev": true,
+ "requires": {
+ "@nodelib/fs.stat": "^2.0.2",
+ "@nodelib/fs.walk": "^1.2.3",
+ "glob-parent": "^5.1.2",
+ "merge2": "^1.3.0",
+ "micromatch": "^4.0.4"
+ }
+ },
+ "fastq": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+ "dev": true,
+ "requires": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "figures": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
+ "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^5.0.0",
+ "is-unicode-supported": "^1.2.0"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "find-up": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz",
+ "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^7.1.0",
+ "path-exists": "^5.0.0"
+ }
+ },
+ "fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "optional": true
+ },
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true
+ },
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "globby": {
+ "version": "13.2.2",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz",
+ "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==",
+ "dev": true,
+ "requires": {
+ "dir-glob": "^3.0.1",
+ "fast-glob": "^3.3.0",
+ "ignore": "^5.2.4",
+ "merge2": "^1.4.1",
+ "slash": "^4.0.0"
+ }
+ },
+ "ignore": {
+ "version": "5.2.4",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
+ "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+ "dev": true
+ },
+ "ignore-by-default": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz",
+ "integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==",
+ "dev": true
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true
+ },
+ "indent-string": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
+ "dev": true
+ },
+ "irregular-plurals": {
+ "version": "3.5.0",
+ "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz",
+ "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==",
+ "dev": true
+ },
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
+ "is-error": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz",
+ "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==",
+ "dev": true
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
+ "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "is-plain-object": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+ "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+ "dev": true
+ },
+ "is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "dev": true
+ },
+ "is-unicode-supported": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+ "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
+ "dev": true
+ },
+ "js-string-escape": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz",
+ "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "load-json-file": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz",
+ "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==",
+ "dev": true
+ },
+ "locate-path": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
+ "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^6.0.0"
+ }
+ },
+ "lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "map-age-cleaner": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
+ "dev": true,
+ "requires": {
+ "p-defer": "^1.0.0"
+ }
+ },
+ "matcher": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz",
+ "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^5.0.0"
+ }
+ },
+ "md5-hex": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz",
+ "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==",
+ "dev": true,
+ "requires": {
+ "blueimp-md5": "^2.10.0"
+ }
+ },
+ "mem": {
+ "version": "9.0.2",
+ "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz",
+ "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==",
+ "dev": true,
+ "requires": {
+ "map-age-cleaner": "^0.1.3",
+ "mimic-fn": "^4.0.0"
+ }
+ },
+ "merge2": {
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+ "dev": true
+ },
+ "micromatch": {
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
+ "dev": true,
+ "requires": {
+ "braces": "^3.0.2",
+ "picomatch": "^2.3.1"
+ }
+ },
+ "mimic-fn": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+ "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "nofilter": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz",
+ "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==",
+ "dev": true
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "p-defer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==",
+ "dev": true
+ },
+ "p-event": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz",
+ "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==",
+ "dev": true,
+ "requires": {
+ "p-timeout": "^5.0.2"
+ }
+ },
+ "p-limit": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
+ "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
+ "dev": true,
+ "requires": {
+ "yocto-queue": "^1.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
+ "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^4.0.0"
+ }
+ },
+ "p-map": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz",
+ "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==",
+ "dev": true,
+ "requires": {
+ "aggregate-error": "^4.0.0"
+ }
+ },
+ "p-timeout": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+ "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+ "dev": true
+ },
+ "parse-ms": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz",
+ "integrity": "sha512-Tpb8Z7r7XbbtBTrM9UhpkzzaMrqA2VXMT3YChzYltwV3P3pM6t8wl7TvpMnSTosz1aQAdVib7kdoys7vYOPerw==",
+ "dev": true
+ },
+ "path-exists": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
+ "dev": true
+ },
+ "path-type": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+ "dev": true
+ },
+ "picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true
+ },
+ "pkg-conf": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz",
+ "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==",
+ "dev": true,
+ "requires": {
+ "find-up": "^6.0.0",
+ "load-json-file": "^7.0.0"
+ }
+ },
+ "platform": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
+ "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
+ "dev": true
+ },
+ "plur": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz",
+ "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==",
+ "dev": true,
+ "requires": {
+ "irregular-plurals": "^3.3.0"
+ }
+ },
+ "pretty-ms": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-8.0.0.tgz",
+ "integrity": "sha512-ASJqOugUF1bbzI35STMBUpZqdfYKlJugy6JBziGi2EE+AL5JPJGSzvpeVXojxrr0ViUYoToUjb5kjSEGf7Y83Q==",
+ "dev": true,
+ "requires": {
+ "parse-ms": "^3.0.0"
+ }
+ },
+ "queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true
+ },
+ "readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.2.1"
+ }
+ },
+ "require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true
+ },
+ "resolve-cwd": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+ "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+ "dev": true,
+ "requires": {
+ "resolve-from": "^5.0.0"
+ }
+ },
+ "resolve-from": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+ "dev": true
+ },
+ "reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true
+ },
+ "run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "requires": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "serialize-error": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz",
+ "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.13.1"
+ }
+ },
+ "signal-exit": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
+ "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==",
+ "dev": true
+ },
+ "slash": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
+ "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
+ "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^6.0.0",
+ "is-fullwidth-code-point": "^4.0.0"
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
+ "dev": true
+ },
+ "stack-utils": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
+ "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^2.0.0"
+ },
+ "dependencies": {
+ "escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "dev": true
+ }
+ }
+ },
+ "string-width": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+ "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+ "dev": true,
+ "requires": {
+ "eastasianwidth": "^0.2.0",
+ "emoji-regex": "^9.2.2",
+ "strip-ansi": "^7.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+ "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^6.0.1"
+ }
+ },
+ "supertap": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz",
+ "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==",
+ "dev": true,
+ "requires": {
+ "indent-string": "^5.0.0",
+ "js-yaml": "^3.14.1",
+ "serialize-error": "^7.0.1",
+ "strip-ansi": "^7.0.1"
+ }
+ },
+ "temp-dir": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-3.0.0.tgz",
+ "integrity": "sha512-nHc6S/bwIilKHNRgK/3jlhDoIHcp45YgyiwcAk46Tr0LfEqGBVpmiAyuiuxeVE44m3mXnEeVhaipLOEWmH+Njw==",
+ "dev": true
+ },
+ "time-zone": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz",
+ "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==",
+ "dev": true
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "type-fest": {
+ "version": "0.13.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
+ "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "dev": true
+ },
+ "well-known-symbols": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz",
+ "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
+ },
+ "write-file-atomic": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz",
+ "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4",
+ "signal-exit": "^4.0.1"
+ }
+ },
+ "y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dev": true,
+ "requires": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ }
+ }
+ },
+ "yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "dev": true
+ },
+ "yocto-queue": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz",
+ "integrity": "sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==",
+ "dev": true
+ }
+ }
+}
diff --git a/intl/icu_capi/js/package/package.json b/intl/icu_capi/js/package/package.json
new file mode 100644
index 0000000000..2fc98113ef
--- /dev/null
+++ b/intl/icu_capi/js/package/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "icu4x",
+ "version": "0.0.1",
+ "description": "ICU4X JavaScript bindings via WebAssembly",
+ "main": "index.js",
+ "type": "module",
+ "directories": {
+ "lib": "lib",
+ "test": "test",
+ "bench": "bench"
+ },
+ "ava": {
+ "files": [
+ "test/*.mjs"
+ ]
+ },
+ "scripts": {
+ "test": "ava",
+ "bench": "node bench/all.mjs",
+ "prepare": "make"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/unicode-org/icu4x.git"
+ },
+ "keywords": [
+ "i18n"
+ ],
+ "bugs": {
+ "url": "https://github.com/unicode-org/icu4x/issues"
+ },
+ "homepage": "https://github.com/unicode-org/icu4x#readme",
+ "author": "The ICU4X Project Developers",
+ "license": "Apache-2.0",
+ "devDependencies": {
+ "ava": "^5.3.1",
+ "benchmark": "^2.1.4"
+ }
+}
diff --git a/intl/icu_capi/js/package/test/data-providers.mjs b/intl/icu_capi/js/package/test/data-providers.mjs
new file mode 100644
index 0000000000..9d1ba68350
--- /dev/null
+++ b/intl/icu_capi/js/package/test/data-providers.mjs
@@ -0,0 +1,19 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import test from 'ava';
+
+import { ICU4XFixedDecimal, ICU4XLocale, ICU4XDataProvider, ICU4XFixedDecimalFormatter } from "../index.js"
+
+test("use create_compiled to format a simple decimal", async t => {
+ const locale = ICU4XLocale.create_from_string("bn");
+ const provider = ICU4XDataProvider.create_compiled();
+
+ const format = ICU4XFixedDecimalFormatter.create_with_grouping_strategy(provider, locale, "Auto");
+
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.multiply_pow10(-2);
+
+ t.is(format.format(decimal), "১২.৩৪");
+});
diff --git a/intl/icu_capi/js/package/test/fixed-decimal-format.mjs b/intl/icu_capi/js/package/test/fixed-decimal-format.mjs
new file mode 100644
index 0000000000..f49a0494cf
--- /dev/null
+++ b/intl/icu_capi/js/package/test/fixed-decimal-format.mjs
@@ -0,0 +1,32 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import test from 'ava';
+
+import { ICU4XFixedDecimal, ICU4XLocale, ICU4XDataProvider, ICU4XFixedDecimalFormatter } from "../index.js"
+
+const locale = ICU4XLocale.create_from_string("bn");
+const provider = ICU4XDataProvider.create_compiled();
+const format = ICU4XFixedDecimalFormatter.create_with_grouping_strategy(provider, locale, "Auto");
+
+test("format a simple decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.multiply_pow10(-2);
+
+ t.is(format.format(decimal), "১২.৩৪");
+});
+
+test("format a long decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1000007);
+
+ t.is(format.format(decimal), "১০,০০,০০৭");
+});
+
+test("format a negated, scaled decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1000007);
+ decimal.multiply_pow10(2);
+ decimal.set_sign("Negative");
+
+ t.is(format.format(decimal), "-১০,০০,০০,৭০০");
+});
diff --git a/intl/icu_capi/js/package/test/fixed-decimal.mjs b/intl/icu_capi/js/package/test/fixed-decimal.mjs
new file mode 100644
index 0000000000..1295d47c0e
--- /dev/null
+++ b/intl/icu_capi/js/package/test/fixed-decimal.mjs
@@ -0,0 +1,27 @@
+// This file is part of ICU4X. For terms of use, please see the file
+// called LICENSE at the top level of the ICU4X source tree
+// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).
+
+import test from 'ava';
+
+import { ICU4XFixedDecimal } from "../lib/index.js"
+
+test("convert a simple decimal to a string", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i64(1234n);
+
+ t.is(decimal.to_string(), "1234");
+});
+
+test("multiply a decimal by a power of 10", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.multiply_pow10(-2);
+
+ t.is(decimal.to_string(), "12.34");
+});
+
+test("negate a decimal", t => {
+ const decimal = ICU4XFixedDecimal.create_from_i32(1234);
+ decimal.set_sign("Negative");
+
+ t.is(decimal.to_string(), "-1234");
+});