@react-fabric/lexical 1.0.0-beta.61 → 1.0.0-beta.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/_lexical.css +61 -0
- package/dist/cjs/node_modules/date-fns/_lib/addLeadingZeros.js +9 -0
- package/dist/cjs/node_modules/date-fns/_lib/defaultOptions.js +9 -0
- package/dist/cjs/node_modules/date-fns/_lib/format/formatters.js +779 -0
- package/dist/cjs/node_modules/date-fns/_lib/format/lightFormatters.js +96 -0
- package/dist/cjs/node_modules/date-fns/_lib/format/longFormatters.js +68 -0
- package/dist/cjs/node_modules/date-fns/_lib/getRoundingMethod.js +12 -0
- package/dist/cjs/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +33 -0
- package/dist/cjs/node_modules/date-fns/_lib/normalizeDates.js +13 -0
- package/dist/cjs/node_modules/date-fns/_lib/normalizeInterval.js +10 -0
- package/dist/cjs/node_modules/date-fns/_lib/protectedTokens.js +29 -0
- package/dist/cjs/node_modules/date-fns/add.js +73 -0
- package/dist/cjs/node_modules/date-fns/addDays.js +46 -0
- package/dist/cjs/node_modules/date-fns/addHours.js +39 -0
- package/dist/cjs/node_modules/date-fns/addMilliseconds.js +39 -0
- package/dist/cjs/node_modules/date-fns/addMinutes.js +41 -0
- package/dist/cjs/node_modules/date-fns/addMonths.js +80 -0
- package/dist/cjs/node_modules/date-fns/addQuarters.js +38 -0
- package/dist/cjs/node_modules/date-fns/addWeeks.js +38 -0
- package/dist/cjs/node_modules/date-fns/addYears.js +38 -0
- package/dist/cjs/node_modules/date-fns/compareAsc.js +50 -0
- package/dist/cjs/node_modules/date-fns/constants.js +66 -0
- package/dist/cjs/node_modules/date-fns/constructFrom.js +54 -0
- package/dist/cjs/node_modules/date-fns/differenceInCalendarDays.js +67 -0
- package/dist/cjs/node_modules/date-fns/differenceInCalendarMonths.js +47 -0
- package/dist/cjs/node_modules/date-fns/differenceInCalendarYears.js +43 -0
- package/dist/cjs/node_modules/date-fns/differenceInDays.js +112 -0
- package/dist/cjs/node_modules/date-fns/differenceInHours.js +46 -0
- package/dist/cjs/node_modules/date-fns/differenceInMilliseconds.js +34 -0
- package/dist/cjs/node_modules/date-fns/differenceInMinutes.js +50 -0
- package/dist/cjs/node_modules/date-fns/differenceInMonths.js +65 -0
- package/dist/cjs/node_modules/date-fns/differenceInSeconds.js +41 -0
- package/dist/cjs/node_modules/date-fns/differenceInYears.js +67 -0
- package/dist/cjs/node_modules/date-fns/endOfDay.js +40 -0
- package/dist/cjs/node_modules/date-fns/endOfDecade.js +45 -0
- package/dist/cjs/node_modules/date-fns/endOfHour.js +40 -0
- package/dist/cjs/node_modules/date-fns/endOfMinute.js +40 -0
- package/dist/cjs/node_modules/date-fns/endOfMonth.js +42 -0
- package/dist/cjs/node_modules/date-fns/endOfQuarter.js +43 -0
- package/dist/cjs/node_modules/date-fns/endOfWeek.js +58 -0
- package/dist/cjs/node_modules/date-fns/endOfYear.js +42 -0
- package/dist/cjs/node_modules/date-fns/format.js +431 -0
- package/dist/cjs/node_modules/date-fns/getDayOfYear.js +39 -0
- package/dist/cjs/node_modules/date-fns/getISOWeek.js +45 -0
- package/dist/cjs/node_modules/date-fns/getISOWeekYear.js +57 -0
- package/dist/cjs/node_modules/date-fns/getWeek.js +59 -0
- package/dist/cjs/node_modules/date-fns/getWeekYear.js +80 -0
- package/dist/cjs/node_modules/date-fns/intervalToDuration.js +70 -0
- package/dist/cjs/node_modules/date-fns/isAfter.js +30 -0
- package/dist/cjs/node_modules/date-fns/isBefore.js +30 -0
- package/dist/cjs/node_modules/date-fns/isDate.js +46 -0
- package/dist/cjs/node_modules/date-fns/isLastDayOfMonth.js +33 -0
- package/dist/cjs/node_modules/date-fns/isSameMonth.js +48 -0
- package/dist/cjs/node_modules/date-fns/isSameWeek.js +56 -0
- package/dist/cjs/node_modules/date-fns/isSameYear.js +40 -0
- package/dist/cjs/node_modules/date-fns/isValid.js +44 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +12 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +66 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchFn.js +61 -0
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +24 -0
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js +139 -0
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatRelative.js +15 -0
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/localize.js +166 -0
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/match.js +146 -0
- package/dist/cjs/node_modules/date-fns/locale/ar-SA.js +32 -0
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatDistance.js +200 -0
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatLong.js +44 -0
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatRelative.js +15 -0
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/localize.js +195 -0
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/match.js +138 -0
- package/dist/cjs/node_modules/date-fns/locale/de.js +36 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +15 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/localize.js +191 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/match.js +136 -0
- package/dist/cjs/node_modules/date-fns/locale/en-US.js +33 -0
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatRelative.js +29 -0
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/localize.js +168 -0
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/match.js +142 -0
- package/dist/cjs/node_modules/date-fns/locale/es.js +36 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatDistance.js +104 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatRelative.js +15 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/localize.js +169 -0
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/match.js +137 -0
- package/dist/cjs/node_modules/date-fns/locale/fr.js +33 -0
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatDistance.js +109 -0
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatRelative.js +15 -0
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/localize.js +233 -0
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/match.js +141 -0
- package/dist/cjs/node_modules/date-fns/locale/hi.js +32 -0
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatRelative.js +70 -0
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/localize.js +168 -0
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/match.js +137 -0
- package/dist/cjs/node_modules/date-fns/locale/it.js +34 -0
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatDistance.js +119 -0
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatRelative.js +16 -0
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/localize.js +181 -0
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/match.js +122 -0
- package/dist/cjs/node_modules/date-fns/locale/ja.js +36 -0
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatRelative.js +15 -0
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/localize.js +171 -0
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/match.js +119 -0
- package/dist/cjs/node_modules/date-fns/locale/ko.js +34 -0
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatRelative.js +26 -0
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/localize.js +168 -0
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/match.js +141 -0
- package/dist/cjs/node_modules/date-fns/locale/pt.js +33 -0
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatDistance.js +250 -0
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatLong.js +40 -0
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatRelative.js +92 -0
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/localize.js +214 -0
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/match.js +142 -0
- package/dist/cjs/node_modules/date-fns/locale/ru.js +33 -0
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +105 -0
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +43 -0
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +35 -0
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/localize.js +187 -0
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/match.js +134 -0
- package/dist/cjs/node_modules/date-fns/locale/zh-CN.js +36 -0
- package/dist/cjs/node_modules/date-fns/startOfDay.js +40 -0
- package/dist/cjs/node_modules/date-fns/startOfDecade.js +45 -0
- package/dist/cjs/node_modules/date-fns/startOfHour.js +40 -0
- package/dist/cjs/node_modules/date-fns/startOfISOWeek.js +40 -0
- package/dist/cjs/node_modules/date-fns/startOfISOWeekYear.js +47 -0
- package/dist/cjs/node_modules/date-fns/startOfMinute.js +40 -0
- package/dist/cjs/node_modules/date-fns/startOfMonth.js +42 -0
- package/dist/cjs/node_modules/date-fns/startOfQuarter.js +43 -0
- package/dist/cjs/node_modules/date-fns/startOfWeek.js +58 -0
- package/dist/cjs/node_modules/date-fns/startOfWeekYear.js +69 -0
- package/dist/cjs/node_modules/date-fns/startOfYear.js +41 -0
- package/dist/cjs/node_modules/date-fns/toDate.js +51 -0
- package/dist/cjs/packages/date/dist/esm/display/DateDuration.js +178 -0
- package/dist/cjs/packages/date/dist/esm/hijri/DateConverter.js +154 -0
- package/dist/cjs/packages/date/dist/esm/hijri/FormatDate.js +116 -0
- package/dist/cjs/packages/date/dist/esm/hijri/HijriDate.js +531 -0
- package/dist/cjs/packages/date/dist/esm/hijri/StringDateParser.js +74 -0
- package/dist/cjs/packages/date/dist/esm/hijri/index.js +21 -0
- package/dist/cjs/packages/date/dist/esm/hijri/initializer.js +113 -0
- package/dist/cjs/packages/date/dist/esm/hijri/locales.js +19 -0
- package/dist/cjs/packages/date/dist/esm/hijri/safe.js +17 -0
- package/dist/cjs/packages/date/dist/esm/i18n/ar/date.json.js +213 -0
- package/dist/cjs/packages/date/dist/esm/i18n/en/date.json.js +83 -0
- package/{src/plugins/StickyPlugin.ts → dist/cjs/packages/date/dist/esm/i18n/index.js} +10 -15
- package/dist/cjs/packages/date/dist/esm/types/index.js +46 -0
- package/dist/cjs/packages/date/dist/esm/utils/dateUtil.js +472 -0
- package/dist/cjs/{editor → packages/lexical/src/editor}/LexicalEditor.js +32 -9
- package/dist/cjs/{i18n/ar.json.js → packages/lexical/src/i18n/ar/lexical.json.js} +10 -4
- package/dist/cjs/{i18n/en.json.js → packages/lexical/src/i18n/en/lexical.json.js} +7 -1
- package/dist/cjs/{i18n → packages/lexical/src/i18n}/index.js +4 -4
- package/dist/cjs/packages/lexical/src/plugins/CommentPlugin.js +477 -0
- package/dist/cjs/{plugins → packages/lexical/src/plugins}/DraggableBlockPlugin.js +8 -11
- package/dist/esm/node_modules/date-fns/_lib/addLeadingZeros.js +9 -0
- package/dist/esm/node_modules/date-fns/_lib/defaultOptions.js +9 -0
- package/dist/esm/node_modules/date-fns/_lib/format/formatters.js +779 -0
- package/dist/esm/node_modules/date-fns/_lib/format/lightFormatters.js +96 -0
- package/dist/esm/node_modules/date-fns/_lib/format/longFormatters.js +68 -0
- package/dist/esm/node_modules/date-fns/_lib/getRoundingMethod.js +12 -0
- package/dist/esm/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +33 -0
- package/dist/esm/node_modules/date-fns/_lib/normalizeDates.js +13 -0
- package/dist/esm/node_modules/date-fns/_lib/normalizeInterval.js +10 -0
- package/dist/esm/node_modules/date-fns/_lib/protectedTokens.js +27 -0
- package/dist/esm/node_modules/date-fns/add.js +70 -0
- package/dist/esm/node_modules/date-fns/addDays.js +43 -0
- package/dist/esm/node_modules/date-fns/addHours.js +36 -0
- package/dist/esm/node_modules/date-fns/addMilliseconds.js +36 -0
- package/dist/esm/node_modules/date-fns/addMinutes.js +38 -0
- package/dist/esm/node_modules/date-fns/addMonths.js +77 -0
- package/dist/esm/node_modules/date-fns/addQuarters.js +35 -0
- package/dist/esm/node_modules/date-fns/addWeeks.js +35 -0
- package/dist/esm/node_modules/date-fns/addYears.js +35 -0
- package/dist/esm/node_modules/date-fns/compareAsc.js +47 -0
- package/dist/esm/node_modules/date-fns/constants.js +62 -0
- package/dist/esm/node_modules/date-fns/constructFrom.js +51 -0
- package/dist/esm/node_modules/date-fns/differenceInCalendarDays.js +64 -0
- package/dist/esm/node_modules/date-fns/differenceInCalendarMonths.js +44 -0
- package/dist/esm/node_modules/date-fns/differenceInCalendarYears.js +40 -0
- package/dist/esm/node_modules/date-fns/differenceInDays.js +109 -0
- package/dist/esm/node_modules/date-fns/differenceInHours.js +43 -0
- package/dist/esm/node_modules/date-fns/differenceInMilliseconds.js +31 -0
- package/dist/esm/node_modules/date-fns/differenceInMinutes.js +47 -0
- package/dist/esm/node_modules/date-fns/differenceInMonths.js +62 -0
- package/dist/esm/node_modules/date-fns/differenceInSeconds.js +38 -0
- package/dist/esm/node_modules/date-fns/differenceInYears.js +64 -0
- package/dist/esm/node_modules/date-fns/endOfDay.js +37 -0
- package/dist/esm/node_modules/date-fns/endOfDecade.js +42 -0
- package/dist/esm/node_modules/date-fns/endOfHour.js +37 -0
- package/dist/esm/node_modules/date-fns/endOfMinute.js +37 -0
- package/dist/esm/node_modules/date-fns/endOfMonth.js +39 -0
- package/dist/esm/node_modules/date-fns/endOfQuarter.js +40 -0
- package/dist/esm/node_modules/date-fns/endOfWeek.js +55 -0
- package/dist/esm/node_modules/date-fns/endOfYear.js +39 -0
- package/dist/esm/node_modules/date-fns/format.js +425 -0
- package/dist/esm/node_modules/date-fns/getDayOfYear.js +36 -0
- package/dist/esm/node_modules/date-fns/getISOWeek.js +42 -0
- package/dist/esm/node_modules/date-fns/getISOWeekYear.js +54 -0
- package/dist/esm/node_modules/date-fns/getWeek.js +56 -0
- package/dist/esm/node_modules/date-fns/getWeekYear.js +77 -0
- package/dist/esm/node_modules/date-fns/intervalToDuration.js +67 -0
- package/dist/esm/node_modules/date-fns/isAfter.js +27 -0
- package/dist/esm/node_modules/date-fns/isBefore.js +27 -0
- package/dist/esm/node_modules/date-fns/isDate.js +43 -0
- package/dist/esm/node_modules/date-fns/isLastDayOfMonth.js +30 -0
- package/dist/esm/node_modules/date-fns/isSameMonth.js +45 -0
- package/dist/esm/node_modules/date-fns/isSameWeek.js +53 -0
- package/dist/esm/node_modules/date-fns/isSameYear.js +37 -0
- package/dist/esm/node_modules/date-fns/isValid.js +41 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +12 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +66 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchFn.js +61 -0
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +24 -0
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js +139 -0
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatRelative.js +15 -0
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/localize.js +166 -0
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/match.js +146 -0
- package/dist/esm/node_modules/date-fns/locale/ar-SA.js +29 -0
- package/dist/esm/node_modules/date-fns/locale/de/_lib/formatDistance.js +200 -0
- package/dist/esm/node_modules/date-fns/locale/de/_lib/formatLong.js +44 -0
- package/dist/esm/node_modules/date-fns/locale/de/_lib/formatRelative.js +15 -0
- package/dist/esm/node_modules/date-fns/locale/de/_lib/localize.js +195 -0
- package/dist/esm/node_modules/date-fns/locale/de/_lib/match.js +138 -0
- package/dist/esm/node_modules/date-fns/locale/de.js +33 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +105 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +15 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/localize.js +191 -0
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/match.js +136 -0
- package/dist/esm/node_modules/date-fns/locale/en-US.js +30 -0
- package/dist/esm/node_modules/date-fns/locale/es/_lib/formatDistance.js +105 -0
- package/dist/esm/node_modules/date-fns/locale/es/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/es/_lib/formatRelative.js +29 -0
- package/dist/esm/node_modules/date-fns/locale/es/_lib/localize.js +168 -0
- package/dist/esm/node_modules/date-fns/locale/es/_lib/match.js +142 -0
- package/dist/esm/node_modules/date-fns/locale/es.js +33 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatDistance.js +104 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatRelative.js +15 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/localize.js +169 -0
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/match.js +137 -0
- package/dist/esm/node_modules/date-fns/locale/fr.js +30 -0
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatDistance.js +109 -0
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatRelative.js +15 -0
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/localize.js +231 -0
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/match.js +141 -0
- package/dist/esm/node_modules/date-fns/locale/hi.js +29 -0
- package/dist/esm/node_modules/date-fns/locale/it/_lib/formatDistance.js +105 -0
- package/dist/esm/node_modules/date-fns/locale/it/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/it/_lib/formatRelative.js +70 -0
- package/dist/esm/node_modules/date-fns/locale/it/_lib/localize.js +168 -0
- package/dist/esm/node_modules/date-fns/locale/it/_lib/match.js +137 -0
- package/dist/esm/node_modules/date-fns/locale/it.js +31 -0
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatDistance.js +119 -0
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatRelative.js +16 -0
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/localize.js +181 -0
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/match.js +122 -0
- package/dist/esm/node_modules/date-fns/locale/ja.js +33 -0
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatDistance.js +105 -0
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatRelative.js +15 -0
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/localize.js +171 -0
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/match.js +119 -0
- package/dist/esm/node_modules/date-fns/locale/ko.js +31 -0
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatDistance.js +105 -0
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatRelative.js +26 -0
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/localize.js +168 -0
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/match.js +141 -0
- package/dist/esm/node_modules/date-fns/locale/pt.js +30 -0
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatDistance.js +250 -0
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatLong.js +40 -0
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatRelative.js +92 -0
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/localize.js +214 -0
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/match.js +142 -0
- package/dist/esm/node_modules/date-fns/locale/ru.js +30 -0
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +105 -0
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +43 -0
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +35 -0
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/localize.js +187 -0
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/match.js +134 -0
- package/dist/esm/node_modules/date-fns/locale/zh-CN.js +33 -0
- package/dist/esm/node_modules/date-fns/startOfDay.js +37 -0
- package/dist/esm/node_modules/date-fns/startOfDecade.js +42 -0
- package/dist/esm/node_modules/date-fns/startOfHour.js +37 -0
- package/dist/esm/node_modules/date-fns/startOfISOWeek.js +37 -0
- package/dist/esm/node_modules/date-fns/startOfISOWeekYear.js +44 -0
- package/dist/esm/node_modules/date-fns/startOfMinute.js +37 -0
- package/dist/esm/node_modules/date-fns/startOfMonth.js +39 -0
- package/dist/esm/node_modules/date-fns/startOfQuarter.js +40 -0
- package/dist/esm/node_modules/date-fns/startOfWeek.js +55 -0
- package/dist/esm/node_modules/date-fns/startOfWeekYear.js +66 -0
- package/dist/esm/node_modules/date-fns/startOfYear.js +38 -0
- package/dist/esm/node_modules/date-fns/toDate.js +48 -0
- package/dist/esm/packages/date/dist/esm/display/DateDuration.js +178 -0
- package/dist/esm/packages/date/dist/esm/hijri/DateConverter.js +152 -0
- package/dist/esm/packages/date/dist/esm/hijri/FormatDate.js +113 -0
- package/dist/esm/packages/date/dist/esm/hijri/HijriDate.js +528 -0
- package/dist/esm/packages/date/dist/esm/hijri/StringDateParser.js +74 -0
- package/dist/esm/packages/date/dist/esm/hijri/index.js +21 -0
- package/dist/esm/packages/date/dist/esm/hijri/initializer.js +113 -0
- package/dist/esm/packages/date/dist/esm/hijri/locales.js +18 -0
- package/dist/esm/packages/date/dist/esm/hijri/safe.js +14 -0
- package/dist/esm/packages/date/dist/esm/i18n/ar/date.json.js +209 -0
- package/dist/esm/packages/date/dist/esm/i18n/en/date.json.js +79 -0
- package/dist/esm/packages/date/dist/esm/i18n/index.js +33 -0
- package/dist/esm/packages/date/dist/esm/types/index.js +45 -0
- package/dist/esm/packages/date/dist/esm/utils/dateUtil.js +474 -0
- package/dist/esm/{editor → packages/lexical/src/editor}/LexicalEditor.js +33 -10
- package/dist/esm/{i18n/ar.json.js → packages/lexical/src/i18n/ar/lexical.json.js} +9 -5
- package/dist/esm/{i18n/en.json.js → packages/lexical/src/i18n/en/lexical.json.js} +6 -2
- package/dist/esm/{i18n → packages/lexical/src/i18n}/index.js +2 -2
- package/dist/esm/packages/lexical/src/plugins/CommentPlugin.js +477 -0
- package/dist/esm/{plugins → packages/lexical/src/plugins}/DraggableBlockPlugin.js +9 -12
- package/dist/types/editor/LexicalEditor.d.ts +12 -3
- package/dist/types/hooks/useFormatWatcher.d.ts +1 -1
- package/dist/types/plugins/CommentPlugin.d.ts +5 -0
- package/dist/types/plugins/DraggableBlockPlugin.d.ts +2 -1
- package/package.json +5 -5
- package/src/editor/LexicalEditor.tsx +65 -18
- package/src/i18n/{ar.json → ar/lexical.json} +6 -4
- package/src/i18n/{en.json → en/lexical.json} +3 -1
- package/src/i18n/index.ts +2 -2
- package/src/plugins/CommentPlugin.tsx +554 -0
- package/src/plugins/DraggableBlockPlugin.tsx +5 -10
- package/dist/cjs/components/StickyComponent.js +0 -220
- package/dist/cjs/nodes/StickyNode.js +0 -218
- package/dist/cjs/plugins/StickyPlugin.js +0 -20
- package/dist/esm/components/StickyComponent.js +0 -220
- package/dist/esm/nodes/StickyNode.js +0 -216
- package/dist/esm/plugins/StickyPlugin.js +0 -20
- package/dist/types/components/StickyComponent.d.ts +0 -9
- package/dist/types/nodes/StickyNode.d.ts +0 -34
- package/dist/types/plugins/StickyPlugin.d.ts +0 -1
- package/src/components/StickyComponent.tsx +0 -270
- package/src/nodes/StickyNode.tsx +0 -249
- /package/dist/cjs/{editor → packages/lexical/src/editor}/theme.js +0 -0
- /package/dist/cjs/{hooks → packages/lexical/src/hooks}/useFormatWatcher.js +0 -0
- /package/dist/cjs/{index.js → packages/lexical/src/index.js} +0 -0
- /package/dist/cjs/{plugins → packages/lexical/src/plugins}/ToolbarPlugin.js +0 -0
- /package/dist/cjs/{utils → packages/lexical/src/utils}/index.js +0 -0
- /package/dist/esm/{editor → packages/lexical/src/editor}/theme.js +0 -0
- /package/dist/esm/{hooks → packages/lexical/src/hooks}/useFormatWatcher.js +0 -0
- /package/dist/esm/{index.js → packages/lexical/src/index.js} +0 -0
- /package/dist/esm/{plugins → packages/lexical/src/plugins}/ToolbarPlugin.js +0 -0
- /package/dist/esm/{utils → packages/lexical/src/utils}/index.js +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { formatDistance } from './hi/_lib/formatDistance.js';
|
|
4
|
+
import { formatLong } from './hi/_lib/formatLong.js';
|
|
5
|
+
import { formatRelative } from './hi/_lib/formatRelative.js';
|
|
6
|
+
import { localize } from './hi/_lib/localize.js';
|
|
7
|
+
import { match } from './hi/_lib/match.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @category Locales
|
|
11
|
+
* @summary Hindi locale (India).
|
|
12
|
+
* @language Hindi
|
|
13
|
+
* @iso-639-2 hin
|
|
14
|
+
* @author Mukesh Mandiwal [@mukeshmandiwal](https://github.com/mukeshmandiwal)
|
|
15
|
+
*/
|
|
16
|
+
const hi = {
|
|
17
|
+
code: "hi",
|
|
18
|
+
formatDistance: formatDistance,
|
|
19
|
+
formatLong: formatLong,
|
|
20
|
+
formatRelative: formatRelative,
|
|
21
|
+
localize: localize,
|
|
22
|
+
match: match,
|
|
23
|
+
options: {
|
|
24
|
+
weekStartsOn: 0 /* Monday */,
|
|
25
|
+
firstWeekContainsDate: 4,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { hi as default, hi };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
const formatDistanceLocale = {
|
|
4
|
+
lessThanXSeconds: {
|
|
5
|
+
one: "meno di un secondo",
|
|
6
|
+
other: "meno di {{count}} secondi",
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
xSeconds: {
|
|
10
|
+
one: "un secondo",
|
|
11
|
+
other: "{{count}} secondi",
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
halfAMinute: "alcuni secondi",
|
|
15
|
+
|
|
16
|
+
lessThanXMinutes: {
|
|
17
|
+
one: "meno di un minuto",
|
|
18
|
+
other: "meno di {{count}} minuti",
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
xMinutes: {
|
|
22
|
+
one: "un minuto",
|
|
23
|
+
other: "{{count}} minuti",
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
aboutXHours: {
|
|
27
|
+
one: "circa un'ora",
|
|
28
|
+
other: "circa {{count}} ore",
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
xHours: {
|
|
32
|
+
one: "un'ora",
|
|
33
|
+
other: "{{count}} ore",
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
xDays: {
|
|
37
|
+
one: "un giorno",
|
|
38
|
+
other: "{{count}} giorni",
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
aboutXWeeks: {
|
|
42
|
+
one: "circa una settimana",
|
|
43
|
+
other: "circa {{count}} settimane",
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
xWeeks: {
|
|
47
|
+
one: "una settimana",
|
|
48
|
+
other: "{{count}} settimane",
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
aboutXMonths: {
|
|
52
|
+
one: "circa un mese",
|
|
53
|
+
other: "circa {{count}} mesi",
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
xMonths: {
|
|
57
|
+
one: "un mese",
|
|
58
|
+
other: "{{count}} mesi",
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
aboutXYears: {
|
|
62
|
+
one: "circa un anno",
|
|
63
|
+
other: "circa {{count}} anni",
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
xYears: {
|
|
67
|
+
one: "un anno",
|
|
68
|
+
other: "{{count}} anni",
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
overXYears: {
|
|
72
|
+
one: "più di un anno",
|
|
73
|
+
other: "più di {{count}} anni",
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
almostXYears: {
|
|
77
|
+
one: "quasi un anno",
|
|
78
|
+
other: "quasi {{count}} anni",
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const formatDistance = (token, count, options) => {
|
|
83
|
+
let result;
|
|
84
|
+
|
|
85
|
+
const tokenValue = formatDistanceLocale[token];
|
|
86
|
+
if (typeof tokenValue === "string") {
|
|
87
|
+
result = tokenValue;
|
|
88
|
+
} else if (count === 1) {
|
|
89
|
+
result = tokenValue.one;
|
|
90
|
+
} else {
|
|
91
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (options?.addSuffix) {
|
|
95
|
+
if (options.comparison && options.comparison > 0) {
|
|
96
|
+
return "tra " + result;
|
|
97
|
+
} else {
|
|
98
|
+
return result + " fa";
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return result;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export { formatDistance };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { buildFormatLongFn } from '../../_lib/buildFormatLongFn.js';
|
|
4
|
+
|
|
5
|
+
const dateFormats = {
|
|
6
|
+
full: "EEEE d MMMM y",
|
|
7
|
+
long: "d MMMM y",
|
|
8
|
+
medium: "d MMM y",
|
|
9
|
+
short: "dd/MM/y",
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const timeFormats = {
|
|
13
|
+
full: "HH:mm:ss zzzz",
|
|
14
|
+
long: "HH:mm:ss z",
|
|
15
|
+
medium: "HH:mm:ss",
|
|
16
|
+
short: "HH:mm",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const dateTimeFormats = {
|
|
20
|
+
full: "{{date}} {{time}}",
|
|
21
|
+
long: "{{date}} {{time}}",
|
|
22
|
+
medium: "{{date}} {{time}}",
|
|
23
|
+
short: "{{date}} {{time}}",
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const formatLong = {
|
|
27
|
+
date: buildFormatLongFn({
|
|
28
|
+
formats: dateFormats,
|
|
29
|
+
defaultWidth: "full",
|
|
30
|
+
}),
|
|
31
|
+
|
|
32
|
+
time: buildFormatLongFn({
|
|
33
|
+
formats: timeFormats,
|
|
34
|
+
defaultWidth: "full",
|
|
35
|
+
}),
|
|
36
|
+
|
|
37
|
+
dateTime: buildFormatLongFn({
|
|
38
|
+
formats: dateTimeFormats,
|
|
39
|
+
defaultWidth: "full",
|
|
40
|
+
}),
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { formatLong };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { isSameWeek } from '../../../isSameWeek.js';
|
|
4
|
+
|
|
5
|
+
const weekdays = [
|
|
6
|
+
"domenica",
|
|
7
|
+
"lunedì",
|
|
8
|
+
"martedì",
|
|
9
|
+
"mercoledì",
|
|
10
|
+
"giovedì",
|
|
11
|
+
"venerdì",
|
|
12
|
+
"sabato",
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
function lastWeek(day) {
|
|
16
|
+
switch (day) {
|
|
17
|
+
case 0:
|
|
18
|
+
return "'domenica scorsa alle' p";
|
|
19
|
+
default:
|
|
20
|
+
return "'" + weekdays[day] + " scorso alle' p";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function thisWeek(day) {
|
|
25
|
+
return "'" + weekdays[day] + " alle' p";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function nextWeek(day) {
|
|
29
|
+
switch (day) {
|
|
30
|
+
case 0:
|
|
31
|
+
return "'domenica prossima alle' p";
|
|
32
|
+
default:
|
|
33
|
+
return "'" + weekdays[day] + " prossimo alle' p";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const formatRelativeLocale = {
|
|
38
|
+
lastWeek: (date, baseDate, options) => {
|
|
39
|
+
const day = date.getDay();
|
|
40
|
+
if (isSameWeek(date, baseDate, options)) {
|
|
41
|
+
return thisWeek(day);
|
|
42
|
+
} else {
|
|
43
|
+
return lastWeek(day);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
yesterday: "'ieri alle' p",
|
|
47
|
+
today: "'oggi alle' p",
|
|
48
|
+
tomorrow: "'domani alle' p",
|
|
49
|
+
nextWeek: (date, baseDate, options) => {
|
|
50
|
+
const day = date.getDay();
|
|
51
|
+
if (isSameWeek(date, baseDate, options)) {
|
|
52
|
+
return thisWeek(day);
|
|
53
|
+
} else {
|
|
54
|
+
return nextWeek(day);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
other: "P",
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const formatRelative = (token, date, baseDate, options) => {
|
|
61
|
+
const format = formatRelativeLocale[token];
|
|
62
|
+
|
|
63
|
+
if (typeof format === "function") {
|
|
64
|
+
return format(date, baseDate, options);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return format;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export { formatRelative };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { buildLocalizeFn } from '../../_lib/buildLocalizeFn.js';
|
|
4
|
+
|
|
5
|
+
const eraValues = {
|
|
6
|
+
narrow: ["aC", "dC"],
|
|
7
|
+
abbreviated: ["a.C.", "d.C."],
|
|
8
|
+
wide: ["avanti Cristo", "dopo Cristo"],
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const quarterValues = {
|
|
12
|
+
narrow: ["1", "2", "3", "4"],
|
|
13
|
+
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
14
|
+
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const monthValues = {
|
|
18
|
+
narrow: ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"],
|
|
19
|
+
abbreviated: [
|
|
20
|
+
"gen",
|
|
21
|
+
"feb",
|
|
22
|
+
"mar",
|
|
23
|
+
"apr",
|
|
24
|
+
"mag",
|
|
25
|
+
"giu",
|
|
26
|
+
"lug",
|
|
27
|
+
"ago",
|
|
28
|
+
"set",
|
|
29
|
+
"ott",
|
|
30
|
+
"nov",
|
|
31
|
+
"dic",
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
wide: [
|
|
35
|
+
"gennaio",
|
|
36
|
+
"febbraio",
|
|
37
|
+
"marzo",
|
|
38
|
+
"aprile",
|
|
39
|
+
"maggio",
|
|
40
|
+
"giugno",
|
|
41
|
+
"luglio",
|
|
42
|
+
"agosto",
|
|
43
|
+
"settembre",
|
|
44
|
+
"ottobre",
|
|
45
|
+
"novembre",
|
|
46
|
+
"dicembre",
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const dayValues = {
|
|
51
|
+
narrow: ["D", "L", "M", "M", "G", "V", "S"],
|
|
52
|
+
short: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"],
|
|
53
|
+
abbreviated: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"],
|
|
54
|
+
wide: [
|
|
55
|
+
"domenica",
|
|
56
|
+
"lunedì",
|
|
57
|
+
"martedì",
|
|
58
|
+
"mercoledì",
|
|
59
|
+
"giovedì",
|
|
60
|
+
"venerdì",
|
|
61
|
+
"sabato",
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const dayPeriodValues = {
|
|
66
|
+
narrow: {
|
|
67
|
+
am: "m.",
|
|
68
|
+
pm: "p.",
|
|
69
|
+
midnight: "mezzanotte",
|
|
70
|
+
noon: "mezzogiorno",
|
|
71
|
+
morning: "mattina",
|
|
72
|
+
afternoon: "pomeriggio",
|
|
73
|
+
evening: "sera",
|
|
74
|
+
night: "notte",
|
|
75
|
+
},
|
|
76
|
+
abbreviated: {
|
|
77
|
+
am: "AM",
|
|
78
|
+
pm: "PM",
|
|
79
|
+
midnight: "mezzanotte",
|
|
80
|
+
noon: "mezzogiorno",
|
|
81
|
+
morning: "mattina",
|
|
82
|
+
afternoon: "pomeriggio",
|
|
83
|
+
evening: "sera",
|
|
84
|
+
night: "notte",
|
|
85
|
+
},
|
|
86
|
+
wide: {
|
|
87
|
+
am: "AM",
|
|
88
|
+
pm: "PM",
|
|
89
|
+
midnight: "mezzanotte",
|
|
90
|
+
noon: "mezzogiorno",
|
|
91
|
+
morning: "mattina",
|
|
92
|
+
afternoon: "pomeriggio",
|
|
93
|
+
evening: "sera",
|
|
94
|
+
night: "notte",
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const formattingDayPeriodValues = {
|
|
99
|
+
narrow: {
|
|
100
|
+
am: "m.",
|
|
101
|
+
pm: "p.",
|
|
102
|
+
midnight: "mezzanotte",
|
|
103
|
+
noon: "mezzogiorno",
|
|
104
|
+
morning: "di mattina",
|
|
105
|
+
afternoon: "del pomeriggio",
|
|
106
|
+
evening: "di sera",
|
|
107
|
+
night: "di notte",
|
|
108
|
+
},
|
|
109
|
+
abbreviated: {
|
|
110
|
+
am: "AM",
|
|
111
|
+
pm: "PM",
|
|
112
|
+
midnight: "mezzanotte",
|
|
113
|
+
noon: "mezzogiorno",
|
|
114
|
+
morning: "di mattina",
|
|
115
|
+
afternoon: "del pomeriggio",
|
|
116
|
+
evening: "di sera",
|
|
117
|
+
night: "di notte",
|
|
118
|
+
},
|
|
119
|
+
wide: {
|
|
120
|
+
am: "AM",
|
|
121
|
+
pm: "PM",
|
|
122
|
+
midnight: "mezzanotte",
|
|
123
|
+
noon: "mezzogiorno",
|
|
124
|
+
morning: "di mattina",
|
|
125
|
+
afternoon: "del pomeriggio",
|
|
126
|
+
evening: "di sera",
|
|
127
|
+
night: "di notte",
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const ordinalNumber = (dirtyNumber, _options) => {
|
|
132
|
+
const number = Number(dirtyNumber);
|
|
133
|
+
return String(number);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const localize = {
|
|
137
|
+
ordinalNumber,
|
|
138
|
+
|
|
139
|
+
era: buildLocalizeFn({
|
|
140
|
+
values: eraValues,
|
|
141
|
+
defaultWidth: "wide",
|
|
142
|
+
}),
|
|
143
|
+
|
|
144
|
+
quarter: buildLocalizeFn({
|
|
145
|
+
values: quarterValues,
|
|
146
|
+
defaultWidth: "wide",
|
|
147
|
+
argumentCallback: (quarter) => quarter - 1,
|
|
148
|
+
}),
|
|
149
|
+
|
|
150
|
+
month: buildLocalizeFn({
|
|
151
|
+
values: monthValues,
|
|
152
|
+
defaultWidth: "wide",
|
|
153
|
+
}),
|
|
154
|
+
|
|
155
|
+
day: buildLocalizeFn({
|
|
156
|
+
values: dayValues,
|
|
157
|
+
defaultWidth: "wide",
|
|
158
|
+
}),
|
|
159
|
+
|
|
160
|
+
dayPeriod: buildLocalizeFn({
|
|
161
|
+
values: dayPeriodValues,
|
|
162
|
+
defaultWidth: "wide",
|
|
163
|
+
formattingValues: formattingDayPeriodValues,
|
|
164
|
+
defaultFormattingWidth: "wide",
|
|
165
|
+
}),
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export { localize };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { buildMatchFn } from '../../_lib/buildMatchFn.js';
|
|
4
|
+
import { buildMatchPatternFn } from '../../_lib/buildMatchPatternFn.js';
|
|
5
|
+
|
|
6
|
+
const matchOrdinalNumberPattern = /^(\d+)(º)?/i;
|
|
7
|
+
const parseOrdinalNumberPattern = /\d+/i;
|
|
8
|
+
|
|
9
|
+
const matchEraPatterns = {
|
|
10
|
+
narrow: /^(aC|dC)/i,
|
|
11
|
+
abbreviated: /^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,
|
|
12
|
+
wide: /^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i,
|
|
13
|
+
};
|
|
14
|
+
const parseEraPatterns = {
|
|
15
|
+
any: [/^a/i, /^(d|e)/i],
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const matchQuarterPatterns = {
|
|
19
|
+
narrow: /^[1234]/i,
|
|
20
|
+
abbreviated: /^t[1234]/i,
|
|
21
|
+
wide: /^[1234](º)? trimestre/i,
|
|
22
|
+
};
|
|
23
|
+
const parseQuarterPatterns = {
|
|
24
|
+
any: [/1/i, /2/i, /3/i, /4/i],
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const matchMonthPatterns = {
|
|
28
|
+
narrow: /^[gfmalsond]/i,
|
|
29
|
+
abbreviated: /^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,
|
|
30
|
+
wide: /^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i,
|
|
31
|
+
};
|
|
32
|
+
const parseMonthPatterns = {
|
|
33
|
+
narrow: [
|
|
34
|
+
/^g/i,
|
|
35
|
+
/^f/i,
|
|
36
|
+
/^m/i,
|
|
37
|
+
/^a/i,
|
|
38
|
+
/^m/i,
|
|
39
|
+
/^g/i,
|
|
40
|
+
/^l/i,
|
|
41
|
+
/^a/i,
|
|
42
|
+
/^s/i,
|
|
43
|
+
/^o/i,
|
|
44
|
+
/^n/i,
|
|
45
|
+
/^d/i,
|
|
46
|
+
],
|
|
47
|
+
|
|
48
|
+
any: [
|
|
49
|
+
/^ge/i,
|
|
50
|
+
/^f/i,
|
|
51
|
+
/^mar/i,
|
|
52
|
+
/^ap/i,
|
|
53
|
+
/^mag/i,
|
|
54
|
+
/^gi/i,
|
|
55
|
+
/^l/i,
|
|
56
|
+
/^ag/i,
|
|
57
|
+
/^s/i,
|
|
58
|
+
/^o/i,
|
|
59
|
+
/^n/i,
|
|
60
|
+
/^d/i,
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const matchDayPatterns = {
|
|
65
|
+
narrow: /^[dlmgvs]/i,
|
|
66
|
+
short: /^(do|lu|ma|me|gi|ve|sa)/i,
|
|
67
|
+
abbreviated: /^(dom|lun|mar|mer|gio|ven|sab)/i,
|
|
68
|
+
wide: /^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i,
|
|
69
|
+
};
|
|
70
|
+
const parseDayPatterns = {
|
|
71
|
+
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^g/i, /^v/i, /^s/i],
|
|
72
|
+
any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^g/i, /^v/i, /^s/i],
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const matchDayPeriodPatterns = {
|
|
76
|
+
narrow:
|
|
77
|
+
/^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,
|
|
78
|
+
any: /^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,
|
|
79
|
+
};
|
|
80
|
+
const parseDayPeriodPatterns = {
|
|
81
|
+
any: {
|
|
82
|
+
am: /^a/i,
|
|
83
|
+
pm: /^p/i,
|
|
84
|
+
midnight: /^mezza/i,
|
|
85
|
+
noon: /^mezzo/i,
|
|
86
|
+
morning: /mattina/i,
|
|
87
|
+
afternoon: /pomeriggio/i,
|
|
88
|
+
evening: /sera/i,
|
|
89
|
+
night: /notte/i,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const match = {
|
|
94
|
+
ordinalNumber: buildMatchPatternFn({
|
|
95
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
96
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
97
|
+
valueCallback: (value) => parseInt(value, 10),
|
|
98
|
+
}),
|
|
99
|
+
|
|
100
|
+
era: buildMatchFn({
|
|
101
|
+
matchPatterns: matchEraPatterns,
|
|
102
|
+
defaultMatchWidth: "wide",
|
|
103
|
+
parsePatterns: parseEraPatterns,
|
|
104
|
+
defaultParseWidth: "any",
|
|
105
|
+
}),
|
|
106
|
+
|
|
107
|
+
quarter: buildMatchFn({
|
|
108
|
+
matchPatterns: matchQuarterPatterns,
|
|
109
|
+
defaultMatchWidth: "wide",
|
|
110
|
+
parsePatterns: parseQuarterPatterns,
|
|
111
|
+
defaultParseWidth: "any",
|
|
112
|
+
valueCallback: (index) => index + 1,
|
|
113
|
+
}),
|
|
114
|
+
|
|
115
|
+
month: buildMatchFn({
|
|
116
|
+
matchPatterns: matchMonthPatterns,
|
|
117
|
+
defaultMatchWidth: "wide",
|
|
118
|
+
parsePatterns: parseMonthPatterns,
|
|
119
|
+
defaultParseWidth: "any",
|
|
120
|
+
}),
|
|
121
|
+
|
|
122
|
+
day: buildMatchFn({
|
|
123
|
+
matchPatterns: matchDayPatterns,
|
|
124
|
+
defaultMatchWidth: "wide",
|
|
125
|
+
parsePatterns: parseDayPatterns,
|
|
126
|
+
defaultParseWidth: "any",
|
|
127
|
+
}),
|
|
128
|
+
|
|
129
|
+
dayPeriod: buildMatchFn({
|
|
130
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
131
|
+
defaultMatchWidth: "any",
|
|
132
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
133
|
+
defaultParseWidth: "any",
|
|
134
|
+
}),
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export { match };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { formatDistance } from './it/_lib/formatDistance.js';
|
|
4
|
+
import { formatLong } from './it/_lib/formatLong.js';
|
|
5
|
+
import { formatRelative } from './it/_lib/formatRelative.js';
|
|
6
|
+
import { localize } from './it/_lib/localize.js';
|
|
7
|
+
import { match } from './it/_lib/match.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @category Locales
|
|
11
|
+
* @summary Italian locale.
|
|
12
|
+
* @language Italian
|
|
13
|
+
* @iso-639-2 ita
|
|
14
|
+
* @author Alberto Restifo [@albertorestifo](https://github.com/albertorestifo)
|
|
15
|
+
* @author Giovanni Polimeni [@giofilo](https://github.com/giofilo)
|
|
16
|
+
* @author Vincenzo Carrese [@vin-car](https://github.com/vin-car)
|
|
17
|
+
*/
|
|
18
|
+
const it = {
|
|
19
|
+
code: "it",
|
|
20
|
+
formatDistance: formatDistance,
|
|
21
|
+
formatLong: formatLong,
|
|
22
|
+
formatRelative: formatRelative,
|
|
23
|
+
localize: localize,
|
|
24
|
+
match: match,
|
|
25
|
+
options: {
|
|
26
|
+
weekStartsOn: 1 /* Monday */,
|
|
27
|
+
firstWeekContainsDate: 4,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { it as default, it };
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
const formatDistanceLocale = {
|
|
4
|
+
lessThanXSeconds: {
|
|
5
|
+
one: "1秒未満",
|
|
6
|
+
other: "{{count}}秒未満",
|
|
7
|
+
oneWithSuffix: "約1秒",
|
|
8
|
+
otherWithSuffix: "約{{count}}秒",
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
xSeconds: {
|
|
12
|
+
one: "1秒",
|
|
13
|
+
other: "{{count}}秒",
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
halfAMinute: "30秒",
|
|
17
|
+
|
|
18
|
+
lessThanXMinutes: {
|
|
19
|
+
one: "1分未満",
|
|
20
|
+
other: "{{count}}分未満",
|
|
21
|
+
oneWithSuffix: "約1分",
|
|
22
|
+
otherWithSuffix: "約{{count}}分",
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
xMinutes: {
|
|
26
|
+
one: "1分",
|
|
27
|
+
other: "{{count}}分",
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
aboutXHours: {
|
|
31
|
+
one: "約1時間",
|
|
32
|
+
other: "約{{count}}時間",
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
xHours: {
|
|
36
|
+
one: "1時間",
|
|
37
|
+
other: "{{count}}時間",
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
xDays: {
|
|
41
|
+
one: "1日",
|
|
42
|
+
other: "{{count}}日",
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
aboutXWeeks: {
|
|
46
|
+
one: "約1週間",
|
|
47
|
+
other: "約{{count}}週間",
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
xWeeks: {
|
|
51
|
+
one: "1週間",
|
|
52
|
+
other: "{{count}}週間",
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
aboutXMonths: {
|
|
56
|
+
one: "約1か月",
|
|
57
|
+
other: "約{{count}}か月",
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
xMonths: {
|
|
61
|
+
one: "1か月",
|
|
62
|
+
other: "{{count}}か月",
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
aboutXYears: {
|
|
66
|
+
one: "約1年",
|
|
67
|
+
other: "約{{count}}年",
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
xYears: {
|
|
71
|
+
one: "1年",
|
|
72
|
+
other: "{{count}}年",
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
overXYears: {
|
|
76
|
+
one: "1年以上",
|
|
77
|
+
other: "{{count}}年以上",
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
almostXYears: {
|
|
81
|
+
one: "1年近く",
|
|
82
|
+
other: "{{count}}年近く",
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const formatDistance = (token, count, options) => {
|
|
87
|
+
options = options || {};
|
|
88
|
+
|
|
89
|
+
let result;
|
|
90
|
+
|
|
91
|
+
const tokenValue = formatDistanceLocale[token];
|
|
92
|
+
if (typeof tokenValue === "string") {
|
|
93
|
+
result = tokenValue;
|
|
94
|
+
} else if (count === 1) {
|
|
95
|
+
if (options.addSuffix && tokenValue.oneWithSuffix) {
|
|
96
|
+
result = tokenValue.oneWithSuffix;
|
|
97
|
+
} else {
|
|
98
|
+
result = tokenValue.one;
|
|
99
|
+
}
|
|
100
|
+
} else {
|
|
101
|
+
if (options.addSuffix && tokenValue.otherWithSuffix) {
|
|
102
|
+
result = tokenValue.otherWithSuffix.replace("{{count}}", String(count));
|
|
103
|
+
} else {
|
|
104
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (options.addSuffix) {
|
|
109
|
+
if (options.comparison && options.comparison > 0) {
|
|
110
|
+
return result + "後";
|
|
111
|
+
} else {
|
|
112
|
+
return result + "前";
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return result;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export { formatDistance };
|