@flickfyi/flkr 0.0.141 → 0.0.153
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/node_modules/@flickfyi/attestation/.turbo/turbo-build.log +7 -7
- package/node_modules/@flickfyi/biscuit/.turbo/turbo-build.log +7 -7
- package/node_modules/@flickfyi/core/.oxlintrc.json +2 -1
- package/node_modules/@flickfyi/core/.turbo/turbo-build.log +499 -92
- package/node_modules/@flickfyi/core/README.md +58 -4
- package/node_modules/@flickfyi/core/dist/index.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/index.js +35 -24
- package/node_modules/@flickfyi/core/dist/kowalski/calculations.d.ts +17 -0
- package/node_modules/@flickfyi/core/dist/kowalski/calculator.d.ts +13 -0
- package/node_modules/@flickfyi/core/dist/kowalski/catalog.cjs +1 -0
- package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.cts +962 -0
- package/node_modules/@flickfyi/core/dist/kowalski/catalog.d.ts +962 -0
- package/node_modules/@flickfyi/core/dist/kowalski/catalog.js +639 -0
- package/node_modules/@flickfyi/core/dist/kowalski/clocks.d.ts +4 -0
- package/node_modules/@flickfyi/core/dist/kowalski/date-time.d.ts +22 -0
- package/node_modules/@flickfyi/core/dist/kowalski/details.d.ts +7 -0
- package/node_modules/@flickfyi/core/dist/kowalski/everyday.d.ts +8 -0
- package/node_modules/@flickfyi/core/dist/kowalski/format.d.ts +4 -0
- package/node_modules/@flickfyi/core/dist/kowalski/frame.d.ts +161 -0
- package/node_modules/@flickfyi/core/dist/kowalski/index.cjs +21 -0
- package/node_modules/@flickfyi/core/dist/kowalski/index.d.cts +8 -0
- package/node_modules/@flickfyi/core/dist/kowalski/index.d.ts +8 -0
- package/node_modules/@flickfyi/core/dist/kowalski/index.js +7496 -0
- package/node_modules/@flickfyi/core/dist/kowalski/productivity.d.ts +5 -0
- package/node_modules/@flickfyi/core/dist/kowalski/recipe.d.ts +8 -0
- package/node_modules/@flickfyi/core/dist/kowalski/tools.d.ts +7 -0
- package/node_modules/@flickfyi/core/dist/kowalski/use-clock.d.ts +6 -0
- package/node_modules/@flickfyi/core/dist/kowalski/use-configured-feature.d.ts +19 -0
- package/node_modules/@flickfyi/core/dist/kowalski/use-feature-store.d.ts +15 -0
- package/node_modules/@flickfyi/core/dist/kowalski.css +506 -0
- package/node_modules/@flickfyi/core/dist/molecules/field/field.d.ts +8 -0
- package/node_modules/@flickfyi/core/dist/molecules/index.cjs +1 -1
- package/node_modules/@flickfyi/core/dist/molecules/index.d.cts +3 -0
- package/node_modules/@flickfyi/core/dist/molecules/index.d.ts +3 -0
- package/node_modules/@flickfyi/core/dist/molecules/index.js +88 -27
- package/node_modules/@flickfyi/core/dist/molecules/segmented/segmented.d.ts +10 -0
- package/node_modules/@flickfyi/core/dist/molecules/stepper/stepper.d.ts +10 -0
- package/node_modules/@flickfyi/core/dist/quantum/use-store.d.ts +7 -1
- package/node_modules/@flickfyi/core/dist/themes.css +2 -0
- package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/bill-split/bill-split.tsx +17 -0
- package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/bookmark/bookmark.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/budget/budget.tsx +26 -0
- package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/calculator/calculator.tsx +24 -0
- package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/checklist/checklist.tsx +26 -0
- package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/color-palette/color-palette.tsx +22 -0
- package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/contact/contact.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/countdown/countdown.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/event/event.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/event/event.tsx +24 -0
- package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/expense/expense.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/goal/goal.tsx +24 -0
- package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/habit/habit.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/ledger/ledger.tsx +25 -0
- package/node_modules/@flickfyi/core/examples/kowalski/note/note.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/note/note.tsx +22 -0
- package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/poll/poll.tsx +26 -0
- package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/random-picker/random-picker.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/rating/rating.tsx +19 -0
- package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/recipe/recipe.tsx +120 -0
- package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/reminder/reminder.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/rotation/rotation.tsx +27 -0
- package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/scoreboard/scoreboard.tsx +26 -0
- package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/shopping-list/shopping-list.tsx +27 -0
- package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/task-board/task-board.tsx +27 -0
- package/node_modules/@flickfyi/core/examples/kowalski/theme.ts +3 -0
- package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/time-zone/time-zone.tsx +22 -0
- package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/timer/timer.tsx +23 -0
- package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/trip/trip.tsx +26 -0
- package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.stories.tsx +15 -0
- package/node_modules/@flickfyi/core/examples/kowalski/unit-converter/unit-converter.tsx +24 -0
- package/node_modules/@flickfyi/core/examples/parrott/calculator/calculator.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/checklist/checklist.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/countdown/countdown.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/counter/counter.stories.tsx +1 -0
- package/node_modules/@flickfyi/core/examples/parrott/fortune/fortune.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/grid/grid.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/kale-smoothie/kale-smoothie.stories.tsx +1 -0
- package/node_modules/@flickfyi/core/examples/parrott/list/list.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/log/log.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/timed-task/timed-task.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/examples/parrott/timer/timer.stories.tsx +3 -1
- package/node_modules/@flickfyi/core/fixtures/native/host/project.yml +3 -0
- package/node_modules/@flickfyi/core/fixtures/native/src/catalog-features.tsx +88 -0
- package/node_modules/@flickfyi/core/package.json +35 -5
- package/node_modules/@flickfyi/core/package.tsgo.json +19 -1
- package/node_modules/@flickfyi/core/scripts/vite-globals.d.ts +2 -0
- package/node_modules/@flickfyi/core/src/generated-types.d.ts +1 -0
- package/node_modules/@flickfyi/core/src/kowalski/README.md +9 -0
- package/node_modules/@flickfyi/core/src/kowalski/calculations.ts +106 -0
- package/node_modules/@flickfyi/core/src/kowalski/calculator.ts +243 -0
- package/node_modules/@flickfyi/core/src/kowalski/catalog.ts +787 -0
- package/node_modules/@flickfyi/core/src/kowalski/clocks.tsx +464 -0
- package/node_modules/@flickfyi/core/src/kowalski/date-time.tsx +469 -0
- package/node_modules/@flickfyi/core/src/kowalski/details.tsx +1387 -0
- package/node_modules/@flickfyi/core/src/kowalski/everyday.tsx +652 -0
- package/node_modules/@flickfyi/core/src/kowalski/format.ts +48 -0
- package/node_modules/@flickfyi/core/src/kowalski/frame.tsx +351 -0
- package/node_modules/@flickfyi/core/src/kowalski/index.ts +23 -0
- package/node_modules/@flickfyi/core/src/kowalski/productivity.tsx +575 -0
- package/node_modules/@flickfyi/core/src/kowalski/recipe.tsx +555 -0
- package/node_modules/@flickfyi/core/src/kowalski/stories/composition.stories.tsx +47 -0
- package/node_modules/@flickfyi/core/src/kowalski/stories/composition.tsx +100 -0
- package/node_modules/@flickfyi/core/src/kowalski/tools.tsx +1213 -0
- package/node_modules/@flickfyi/core/src/kowalski/use-clock.ts +19 -0
- package/node_modules/@flickfyi/core/src/kowalski/use-configured-feature.ts +85 -0
- package/node_modules/@flickfyi/core/src/kowalski/use-feature-store.ts +119 -0
- package/node_modules/@flickfyi/core/src/molecules/field/field.tsx +34 -0
- package/node_modules/@flickfyi/core/src/molecules/index.ts +3 -0
- package/node_modules/@flickfyi/core/src/molecules/segmented/segmented.tsx +48 -0
- package/node_modules/@flickfyi/core/src/molecules/stepper/stepper.tsx +54 -0
- package/node_modules/@flickfyi/core/src/quantum/use-store.ts +41 -16
- package/node_modules/@flickfyi/core/tests/fly.test.ts +34 -7
- package/node_modules/@flickfyi/core/tests/kowalski-calculations.test.ts +60 -0
- package/node_modules/@flickfyi/core/tests/kowalski-calculator.test.ts +142 -0
- package/node_modules/@flickfyi/core/tests/kowalski-contracts.test.ts +223 -0
- package/node_modules/@flickfyi/core/tests/kowalski-date-time.test.tsx +462 -0
- package/node_modules/@flickfyi/core/tests/kowalski-features.test.tsx +2158 -0
- package/node_modules/@flickfyi/core/tests/kowalski-store.test.tsx +514 -0
- package/node_modules/@flickfyi/core/tests/preview-build.test.ts +1 -1
- package/node_modules/@flickfyi/core/tests/quantum-use-store.test.ts +53 -1
- package/node_modules/@flickfyi/core/tests/verify-tsgo-assets.test.ts +1 -1
- package/node_modules/@flickfyi/core/tsconfig.vite-dts.json +2 -1
- package/node_modules/@flickfyi/core/tsgo.bun.lock +111 -9
- package/node_modules/@flickfyi/core/tsgo.package.json +21 -3
- package/node_modules/@flickfyi/core/vite.config.ts +9 -5
- package/node_modules/@flickfyi/core/vitest.config.ts +1 -1
- package/node_modules/@flickfyi/http-message-sig/.turbo/turbo-build.log +7 -7
- package/node_modules/@flickfyi/identity/.turbo/turbo-build.log +8 -9
- package/node_modules/@flickfyi/lens/.turbo/turbo-build.log +7 -7
- package/node_modules/@flickfyi/photon/.turbo/turbo-build.log +4 -4
- package/node_modules/@flickfyi/photon/Sources/Photon/Components/Button.swift +29 -2
- package/node_modules/@flickfyi/photon/Sources/PhotonVersion/Resources/photon-version.json +1 -1
- package/node_modules/@flickfyi/photon/Tests/PhotonTests/Components/ButtonHostTests.swift +26 -0
- package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-features.styles.json +1 -0
- package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-native.styles.json +1 -1
- package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-scale.styles.json +1 -1
- package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-theme.styles.json +1 -1
- package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/catalog-typography.styles.json +1 -1
- package/node_modules/@flickfyi/photon/Tests/PhotonTests/Fixtures/StyleX/stylex-calculator.styles.json +1 -1
- package/node_modules/@flickfyi/photon/dist/globals.d.ts +5 -0
- package/node_modules/@flickfyi/photon/dist/version.cjs +1 -1
- package/node_modules/@flickfyi/photon/dist/version.js +1 -1
- package/node_modules/@flickfyi/photon/generated/react-swiftui.d.ts +1 -0
- package/node_modules/@flickfyi/photon/package.json +1 -1
- package/node_modules/@flickfyi/photon/src/globals.d.ts +5 -0
- package/node_modules/@flickfyi/rwsdk-extensions/.turbo/turbo-build.log +7 -7
- package/node_modules/@formatjs/fast-memoize/LICENSE.md +9 -0
- package/node_modules/@formatjs/fast-memoize/README.md +3 -0
- package/node_modules/@formatjs/fast-memoize/index.d.ts +35 -0
- package/node_modules/@formatjs/fast-memoize/index.js +69 -0
- package/node_modules/@formatjs/fast-memoize/index.js.map +1 -0
- package/node_modules/@formatjs/fast-memoize/package.json +25 -0
- package/node_modules/@formatjs/icu-messageformat-parser/LICENSE.md +9 -0
- package/node_modules/@formatjs/icu-messageformat-parser/README.md +38 -0
- package/node_modules/@formatjs/icu-messageformat-parser/index.d.ts +393 -0
- package/node_modules/@formatjs/icu-messageformat-parser/index.js +2187 -0
- package/node_modules/@formatjs/icu-messageformat-parser/index.js.map +1 -0
- package/node_modules/@formatjs/icu-messageformat-parser/manipulator.d.ts +175 -0
- package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js +209 -0
- package/node_modules/@formatjs/icu-messageformat-parser/manipulator.js.map +1 -0
- package/node_modules/@formatjs/icu-messageformat-parser/no-parser.d.ts +183 -0
- package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js +162 -0
- package/node_modules/@formatjs/icu-messageformat-parser/no-parser.js.map +1 -0
- package/node_modules/@formatjs/icu-messageformat-parser/package.json +21 -0
- package/node_modules/@formatjs/icu-messageformat-parser/printer.d.ts +154 -0
- package/node_modules/@formatjs/icu-messageformat-parser/printer.js +224 -0
- package/node_modules/@formatjs/icu-messageformat-parser/printer.js.map +1 -0
- package/node_modules/@formatjs/icu-skeleton-parser/LICENSE.md +9 -0
- package/node_modules/@formatjs/icu-skeleton-parser/README.md +1 -0
- package/node_modules/@formatjs/icu-skeleton-parser/index.d.ts +67 -0
- package/node_modules/@formatjs/icu-skeleton-parser/index.js +380 -0
- package/node_modules/@formatjs/icu-skeleton-parser/index.js.map +1 -0
- package/node_modules/@formatjs/icu-skeleton-parser/package.json +15 -0
- package/node_modules/@formatjs/intl/LICENSE.md +9 -0
- package/node_modules/@formatjs/intl/README.md +3 -0
- package/node_modules/@formatjs/intl/index.d.ts +499 -0
- package/node_modules/@formatjs/intl/index.js +595 -0
- package/node_modules/@formatjs/intl/index.js.map +1 -0
- package/node_modules/@formatjs/intl/package.json +37 -0
- package/node_modules/decimal.js/LICENCE.md +23 -0
- package/node_modules/decimal.js/README.md +246 -0
- package/node_modules/decimal.js/decimal.d.ts +301 -0
- package/node_modules/decimal.js/decimal.js +4951 -0
- package/node_modules/decimal.js/decimal.mjs +4914 -0
- package/node_modules/decimal.js/package.json +55 -0
- package/node_modules/format-quantity/LICENSE +21 -0
- package/node_modules/format-quantity/README.md +181 -0
- package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.d.ts +131 -0
- package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js +214 -0
- package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.development.js.map +1 -0
- package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.d.ts +131 -0
- package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js +2 -0
- package/node_modules/format-quantity/dist/cjs/format-quantity.cjs.production.js.map +1 -0
- package/node_modules/format-quantity/dist/cjs/index.d.ts +1 -0
- package/node_modules/format-quantity/dist/cjs/index.js +6 -0
- package/node_modules/format-quantity/dist/format-quantity.d.mts +131 -0
- package/node_modules/format-quantity/dist/format-quantity.legacy-esm.d.ts +131 -0
- package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js +268 -0
- package/node_modules/format-quantity/dist/format-quantity.legacy-esm.js.map +1 -0
- package/node_modules/format-quantity/dist/format-quantity.mjs +208 -0
- package/node_modules/format-quantity/dist/format-quantity.mjs.map +1 -0
- package/node_modules/format-quantity/dist/format-quantity.production.d.mts +131 -0
- package/node_modules/format-quantity/dist/format-quantity.production.mjs +2 -0
- package/node_modules/format-quantity/dist/format-quantity.production.mjs.map +1 -0
- package/node_modules/format-quantity/dist/format-quantity.umd.min.js +3 -0
- package/node_modules/format-quantity/dist/format-quantity.umd.min.js.map +1 -0
- package/node_modules/format-quantity/package.json +81 -0
- package/node_modules/intl-messageformat/LICENSE.md +33 -0
- package/node_modules/intl-messageformat/README.md +3 -0
- package/node_modules/intl-messageformat/index.d.ts +177 -0
- package/node_modules/intl-messageformat/index.js +327 -0
- package/node_modules/intl-messageformat/index.js.map +1 -0
- package/node_modules/intl-messageformat/intl-messageformat.iife.js +2819 -0
- package/node_modules/intl-messageformat/package.json +40 -0
- package/node_modules/numeric-quantity/LICENSE +21 -0
- package/node_modules/numeric-quantity/README.md +306 -0
- package/node_modules/numeric-quantity/dist/cjs/index.d.ts +1 -0
- package/node_modules/numeric-quantity/dist/cjs/index.js +6 -0
- package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.d.ts +293 -0
- package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js +579 -0
- package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.development.js.map +1 -0
- package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.d.ts +293 -0
- package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js +2 -0
- package/node_modules/numeric-quantity/dist/cjs/numeric-quantity.cjs.production.js.map +1 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.d.mts +293 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js +2 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.iife.umd.min.js.map +1 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.d.ts +293 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js +622 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.legacy-esm.js.map +1 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.mjs +564 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.mjs.map +1 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.production.d.mts +293 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs +2 -0
- package/node_modules/numeric-quantity/dist/numeric-quantity.production.mjs.map +1 -0
- package/node_modules/numeric-quantity/package.json +72 -0
- package/node_modules/validator/LICENSE +20 -0
- package/node_modules/validator/README.md +269 -0
- package/node_modules/validator/es/index.js +218 -0
- package/node_modules/validator/es/lib/alpha.js +151 -0
- package/node_modules/validator/es/lib/blacklist.js +5 -0
- package/node_modules/validator/es/lib/contains.js +15 -0
- package/node_modules/validator/es/lib/equals.js +5 -0
- package/node_modules/validator/es/lib/escape.js +5 -0
- package/node_modules/validator/es/lib/isAbaRouting.js +15 -0
- package/node_modules/validator/es/lib/isAfter.js +10 -0
- package/node_modules/validator/es/lib/isAlpha.js +23 -0
- package/node_modules/validator/es/lib/isAlphanumeric.js +23 -0
- package/node_modules/validator/es/lib/isAscii.js +10 -0
- package/node_modules/validator/es/lib/isBIC.js +16 -0
- package/node_modules/validator/es/lib/isBase32.js +15 -0
- package/node_modules/validator/es/lib/isBase58.js +8 -0
- package/node_modules/validator/es/lib/isBase64.js +23 -0
- package/node_modules/validator/es/lib/isBefore.js +10 -0
- package/node_modules/validator/es/lib/isBoolean.js +15 -0
- package/node_modules/validator/es/lib/isBtcAddress.js +7 -0
- package/node_modules/validator/es/lib/isByteLength.js +19 -0
- package/node_modules/validator/es/lib/isCreditCard.js +43 -0
- package/node_modules/validator/es/lib/isCurrency.js +74 -0
- package/node_modules/validator/es/lib/isDataURI.js +31 -0
- package/node_modules/validator/es/lib/isDate.js +93 -0
- package/node_modules/validator/es/lib/isDecimal.js +22 -0
- package/node_modules/validator/es/lib/isDivisibleBy.js +6 -0
- package/node_modules/validator/es/lib/isEAN.js +70 -0
- package/node_modules/validator/es/lib/isEmail.js +165 -0
- package/node_modules/validator/es/lib/isEmpty.js +10 -0
- package/node_modules/validator/es/lib/isEthereumAddress.js +6 -0
- package/node_modules/validator/es/lib/isFQDN.js +67 -0
- package/node_modules/validator/es/lib/isFloat.js +14 -0
- package/node_modules/validator/es/lib/isFullWidth.js +6 -0
- package/node_modules/validator/es/lib/isHSL.js +13 -0
- package/node_modules/validator/es/lib/isHalfWidth.js +6 -0
- package/node_modules/validator/es/lib/isHash.js +21 -0
- package/node_modules/validator/es/lib/isHexColor.js +13 -0
- package/node_modules/validator/es/lib/isHexadecimal.js +6 -0
- package/node_modules/validator/es/lib/isIBAN.js +171 -0
- package/node_modules/validator/es/lib/isIMEI.js +40 -0
- package/node_modules/validator/es/lib/isIP.js +58 -0
- package/node_modules/validator/es/lib/isIPRange.js +41 -0
- package/node_modules/validator/es/lib/isISBN.js +47 -0
- package/node_modules/validator/es/lib/isISIN.js +55 -0
- package/node_modules/validator/es/lib/isISO15924.js +9 -0
- package/node_modules/validator/es/lib/isISO31661Alpha2.js +21 -0
- package/node_modules/validator/es/lib/isISO31661Alpha3.js +20 -0
- package/node_modules/validator/es/lib/isISO31661Numeric.js +8 -0
- package/node_modules/validator/es/lib/isISO4217.js +9 -0
- package/node_modules/validator/es/lib/isISO6346.js +28 -0
- package/node_modules/validator/es/lib/isISO6391.js +6 -0
- package/node_modules/validator/es/lib/isISO8601.js +42 -0
- package/node_modules/validator/es/lib/isISRC.js +8 -0
- package/node_modules/validator/es/lib/isISSN.js +19 -0
- package/node_modules/validator/es/lib/isIdentityCard.js +407 -0
- package/node_modules/validator/es/lib/isIn.js +23 -0
- package/node_modules/validator/es/lib/isInt.js +19 -0
- package/node_modules/validator/es/lib/isJSON.js +26 -0
- package/node_modules/validator/es/lib/isJWT.js +15 -0
- package/node_modules/validator/es/lib/isLatLong.js +21 -0
- package/node_modules/validator/es/lib/isLength.js +27 -0
- package/node_modules/validator/es/lib/isLicensePlate.js +58 -0
- package/node_modules/validator/es/lib/isLocale.js +107 -0
- package/node_modules/validator/es/lib/isLowercase.js +5 -0
- package/node_modules/validator/es/lib/isLuhnNumber.js +25 -0
- package/node_modules/validator/es/lib/isMACAddress.js +36 -0
- package/node_modules/validator/es/lib/isMD5.js +6 -0
- package/node_modules/validator/es/lib/isMagnetURI.js +9 -0
- package/node_modules/validator/es/lib/isMailtoURI.js +75 -0
- package/node_modules/validator/es/lib/isMimeType.js +40 -0
- package/node_modules/validator/es/lib/isMobilePhone.js +212 -0
- package/node_modules/validator/es/lib/isMongoId.js +6 -0
- package/node_modules/validator/es/lib/isMultibyte.js +10 -0
- package/node_modules/validator/es/lib/isNumeric.js +10 -0
- package/node_modules/validator/es/lib/isOctal.js +6 -0
- package/node_modules/validator/es/lib/isPassportNumber.js +145 -0
- package/node_modules/validator/es/lib/isPort.js +8 -0
- package/node_modules/validator/es/lib/isPostalCode.js +100 -0
- package/node_modules/validator/es/lib/isRFC3339.js +21 -0
- package/node_modules/validator/es/lib/isRgbColor.js +34 -0
- package/node_modules/validator/es/lib/isSemVer.js +14 -0
- package/node_modules/validator/es/lib/isSlug.js +6 -0
- package/node_modules/validator/es/lib/isStrongPassword.js +90 -0
- package/node_modules/validator/es/lib/isSurrogatePair.js +6 -0
- package/node_modules/validator/es/lib/isTaxID.js +1407 -0
- package/node_modules/validator/es/lib/isTime.js +22 -0
- package/node_modules/validator/es/lib/isULID.js +5 -0
- package/node_modules/validator/es/lib/isURL.js +241 -0
- package/node_modules/validator/es/lib/isUUID.js +23 -0
- package/node_modules/validator/es/lib/isUppercase.js +5 -0
- package/node_modules/validator/es/lib/isVAT.js +264 -0
- package/node_modules/validator/es/lib/isVariableWidth.js +7 -0
- package/node_modules/validator/es/lib/isWhitelisted.js +10 -0
- package/node_modules/validator/es/lib/ltrim.js +7 -0
- package/node_modules/validator/es/lib/matches.js +8 -0
- package/node_modules/validator/es/lib/normalizeEmail.js +131 -0
- package/node_modules/validator/es/lib/rtrim.js +15 -0
- package/node_modules/validator/es/lib/stripLow.js +7 -0
- package/node_modules/validator/es/lib/toBoolean.js +8 -0
- package/node_modules/validator/es/lib/toDate.js +6 -0
- package/node_modules/validator/es/lib/toFloat.js +5 -0
- package/node_modules/validator/es/lib/toInt.js +5 -0
- package/node_modules/validator/es/lib/trim.js +5 -0
- package/node_modules/validator/es/lib/unescape.js +8 -0
- package/node_modules/validator/es/lib/util/algorithms.js +79 -0
- package/node_modules/validator/es/lib/util/assertString.js +4 -0
- package/node_modules/validator/es/lib/util/checkHost.js +12 -0
- package/node_modules/validator/es/lib/util/includesArray.js +6 -0
- package/node_modules/validator/es/lib/util/includesString.js +4 -0
- package/node_modules/validator/es/lib/util/merge.js +14 -0
- package/node_modules/validator/es/lib/util/multilineRegex.js +12 -0
- package/node_modules/validator/es/lib/util/nullUndefinedCheck.js +3 -0
- package/node_modules/validator/es/lib/util/toString.js +13 -0
- package/node_modules/validator/es/lib/util/typeOf.js +10 -0
- package/node_modules/validator/es/lib/whitelist.js +5 -0
- package/node_modules/validator/index.js +229 -0
- package/node_modules/validator/lib/alpha.js +157 -0
- package/node_modules/validator/lib/blacklist.js +14 -0
- package/node_modules/validator/lib/contains.js +24 -0
- package/node_modules/validator/lib/equals.js +14 -0
- package/node_modules/validator/lib/escape.js +14 -0
- package/node_modules/validator/lib/isAbaRouting.js +23 -0
- package/node_modules/validator/lib/isAfter.js +19 -0
- package/node_modules/validator/lib/isAlpha.js +31 -0
- package/node_modules/validator/lib/isAlphanumeric.js +31 -0
- package/node_modules/validator/lib/isAscii.js +18 -0
- package/node_modules/validator/lib/isBIC.js +24 -0
- package/node_modules/validator/lib/isBase32.js +24 -0
- package/node_modules/validator/lib/isBase58.js +16 -0
- package/node_modules/validator/lib/isBase64.js +32 -0
- package/node_modules/validator/lib/isBefore.js +19 -0
- package/node_modules/validator/lib/isBoolean.js +24 -0
- package/node_modules/validator/lib/isBtcAddress.js +16 -0
- package/node_modules/validator/lib/isByteLength.js +27 -0
- package/node_modules/validator/lib/isCreditCard.js +52 -0
- package/node_modules/validator/lib/isCurrency.js +83 -0
- package/node_modules/validator/lib/isDataURI.js +40 -0
- package/node_modules/validator/lib/isDate.js +102 -0
- package/node_modules/validator/lib/isDecimal.js +31 -0
- package/node_modules/validator/lib/isDivisibleBy.js +15 -0
- package/node_modules/validator/lib/isEAN.js +78 -0
- package/node_modules/validator/lib/isEmail.js +174 -0
- package/node_modules/validator/lib/isEmpty.js +19 -0
- package/node_modules/validator/lib/isEthereumAddress.js +15 -0
- package/node_modules/validator/lib/isFQDN.js +76 -0
- package/node_modules/validator/lib/isFloat.js +22 -0
- package/node_modules/validator/lib/isFullWidth.js +14 -0
- package/node_modules/validator/lib/isHSL.js +22 -0
- package/node_modules/validator/lib/isHalfWidth.js +14 -0
- package/node_modules/validator/lib/isHash.js +30 -0
- package/node_modules/validator/lib/isHexColor.js +22 -0
- package/node_modules/validator/lib/isHexadecimal.js +15 -0
- package/node_modules/validator/lib/isIBAN.js +178 -0
- package/node_modules/validator/lib/isIMEI.js +49 -0
- package/node_modules/validator/lib/isIP.js +67 -0
- package/node_modules/validator/lib/isIPRange.js +50 -0
- package/node_modules/validator/lib/isISBN.js +56 -0
- package/node_modules/validator/lib/isISIN.js +64 -0
- package/node_modules/validator/lib/isISO15924.js +16 -0
- package/node_modules/validator/lib/isISO31661Alpha2.js +28 -0
- package/node_modules/validator/lib/isISO31661Alpha3.js +28 -0
- package/node_modules/validator/lib/isISO31661Numeric.js +16 -0
- package/node_modules/validator/lib/isISO4217.js +16 -0
- package/node_modules/validator/lib/isISO6346.js +35 -0
- package/node_modules/validator/lib/isISO6391.js +15 -0
- package/node_modules/validator/lib/isISO8601.js +50 -0
- package/node_modules/validator/lib/isISRC.js +16 -0
- package/node_modules/validator/lib/isISSN.js +28 -0
- package/node_modules/validator/lib/isIdentityCard.js +416 -0
- package/node_modules/validator/lib/isIn.js +32 -0
- package/node_modules/validator/lib/isInt.js +28 -0
- package/node_modules/validator/lib/isJSON.js +35 -0
- package/node_modules/validator/lib/isJWT.js +24 -0
- package/node_modules/validator/lib/isLatLong.js +30 -0
- package/node_modules/validator/lib/isLength.js +35 -0
- package/node_modules/validator/lib/isLicensePlate.js +67 -0
- package/node_modules/validator/lib/isLocale.js +115 -0
- package/node_modules/validator/lib/isLowercase.js +14 -0
- package/node_modules/validator/lib/isLuhnNumber.js +34 -0
- package/node_modules/validator/lib/isMACAddress.js +45 -0
- package/node_modules/validator/lib/isMD5.js +15 -0
- package/node_modules/validator/lib/isMagnetURI.js +18 -0
- package/node_modules/validator/lib/isMailtoURI.js +84 -0
- package/node_modules/validator/lib/isMimeType.js +48 -0
- package/node_modules/validator/lib/isMobilePhone.js +219 -0
- package/node_modules/validator/lib/isMongoId.js +15 -0
- package/node_modules/validator/lib/isMultibyte.js +18 -0
- package/node_modules/validator/lib/isNumeric.js +19 -0
- package/node_modules/validator/lib/isOctal.js +15 -0
- package/node_modules/validator/lib/isPassportNumber.js +152 -0
- package/node_modules/validator/lib/isPort.js +17 -0
- package/node_modules/validator/lib/isPostalCode.js +107 -0
- package/node_modules/validator/lib/isRFC3339.js +29 -0
- package/node_modules/validator/lib/isRgbColor.js +42 -0
- package/node_modules/validator/lib/isSemVer.js +22 -0
- package/node_modules/validator/lib/isSlug.js +15 -0
- package/node_modules/validator/lib/isStrongPassword.js +99 -0
- package/node_modules/validator/lib/isSurrogatePair.js +15 -0
- package/node_modules/validator/lib/isTaxID.js +1417 -0
- package/node_modules/validator/lib/isTime.js +31 -0
- package/node_modules/validator/lib/isULID.js +14 -0
- package/node_modules/validator/lib/isURL.js +249 -0
- package/node_modules/validator/lib/isUUID.js +32 -0
- package/node_modules/validator/lib/isUppercase.js +14 -0
- package/node_modules/validator/lib/isVAT.js +274 -0
- package/node_modules/validator/lib/isVariableWidth.js +16 -0
- package/node_modules/validator/lib/isWhitelisted.js +19 -0
- package/node_modules/validator/lib/ltrim.js +16 -0
- package/node_modules/validator/lib/matches.js +17 -0
- package/node_modules/validator/lib/normalizeEmail.js +140 -0
- package/node_modules/validator/lib/rtrim.js +24 -0
- package/node_modules/validator/lib/stripLow.js +16 -0
- package/node_modules/validator/lib/toBoolean.js +17 -0
- package/node_modules/validator/lib/toDate.js +15 -0
- package/node_modules/validator/lib/toFloat.js +14 -0
- package/node_modules/validator/lib/toInt.js +14 -0
- package/node_modules/validator/lib/trim.js +14 -0
- package/node_modules/validator/lib/unescape.js +17 -0
- package/node_modules/validator/lib/util/algorithms.js +88 -0
- package/node_modules/validator/lib/util/assertString.js +12 -0
- package/node_modules/validator/lib/util/checkHost.js +20 -0
- package/node_modules/validator/lib/util/includesArray.js +14 -0
- package/node_modules/validator/lib/util/includesString.js +12 -0
- package/node_modules/validator/lib/util/merge.js +22 -0
- package/node_modules/validator/lib/util/multilineRegex.js +20 -0
- package/node_modules/validator/lib/util/nullUndefinedCheck.js +11 -0
- package/node_modules/validator/lib/util/toString.js +21 -0
- package/node_modules/validator/lib/util/typeOf.js +18 -0
- package/node_modules/validator/lib/whitelist.js +14 -0
- package/node_modules/validator/package.json +76 -0
- package/node_modules/validator/validator.js +5808 -0
- package/node_modules/validator/validator.min.js +23 -0
- package/package.json +3 -3
|
@@ -117,11 +117,16 @@ declare global {
|
|
|
117
117
|
scope: 'private' | 'public'
|
|
118
118
|
version: number
|
|
119
119
|
}) => Promise<{
|
|
120
|
+
/** False for a native snapshot view. */
|
|
121
|
+
canWrite?: boolean
|
|
120
122
|
/**
|
|
121
123
|
* Set store value.
|
|
122
124
|
*/
|
|
123
125
|
set: (value: unknown) => void
|
|
124
126
|
|
|
127
|
+
/** Resolves after local persistence, or rejects when the write fails. */
|
|
128
|
+
setAsync?: (value: unknown) => Promise<{ rawValue: unknown; version: number }>
|
|
129
|
+
|
|
125
130
|
/**
|
|
126
131
|
* Subscribe to store changes.
|
|
127
132
|
* Callback receives raw value and version for lens parsing.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`0.0.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=`0.0.35`;exports.VERSION=e;
|
|
@@ -117,11 +117,16 @@ declare global {
|
|
|
117
117
|
scope: 'private' | 'public'
|
|
118
118
|
version: number
|
|
119
119
|
}) => Promise<{
|
|
120
|
+
/** False for a native snapshot view. */
|
|
121
|
+
canWrite?: boolean
|
|
120
122
|
/**
|
|
121
123
|
* Set store value.
|
|
122
124
|
*/
|
|
123
125
|
set: (value: unknown) => void
|
|
124
126
|
|
|
127
|
+
/** Resolves after local persistence, or rejects when the write fails. */
|
|
128
|
+
setAsync?: (value: unknown) => Promise<{ rawValue: unknown; version: number }>
|
|
129
|
+
|
|
125
130
|
/**
|
|
126
131
|
* Subscribe to store changes.
|
|
127
132
|
* Callback receives raw value and version for lens parsing.
|
|
@@ -5,7 +5,7 @@ transforming...
|
|
|
5
5
|
rendering chunks...
|
|
6
6
|
[32m
|
|
7
7
|
[36m[unplugin:dts][32m Start generate declaration files...[39m
|
|
8
|
-
[32m[36m[unplugin:dts][32m Declaration files built in
|
|
8
|
+
[32m[36m[unplugin:dts][32m Declaration files built in 6581ms.
|
|
9
9
|
[39m
|
|
10
10
|
computing gzip size...
|
|
11
11
|
dist/otel-worker.js 0.56 kB │ gzip: 0.36 kB
|
|
@@ -16,10 +16,10 @@ dist/otel.js 4.44 kB │ gzip: 1.45 kB
|
|
|
16
16
|
dist/rpc-client.js 6.34 kB │ gzip: 2.44 kB
|
|
17
17
|
dist/lifecycles.js 6.35 kB │ gzip: 2.27 kB
|
|
18
18
|
|
|
19
|
-
[32m✓ built in
|
|
20
|
-
[33m[33m[PLUGIN_TIMINGS] [
|
|
21
|
-
The slowest
|
|
22
|
-
- unplugin-dts buildStart (93%,
|
|
23
|
-
Additional
|
|
24
|
-
See https://rolldown.rs/reference/InputOptions.checks#
|
|
19
|
+
[32m✓ built in 6.84s[39m
|
|
20
|
+
[33m[33m[PLUGIN_TIMINGS] [0mJavaScript callbacks ran for 6.6s of this 6.8s build (97%).
|
|
21
|
+
The slowest callbacks, timed inside each callback (the wait before a callback starts is excluded, the time it awaits is included):
|
|
22
|
+
- plugin unplugin-dts buildStart (93%, 6.4s, 1 call)
|
|
23
|
+
Additional callback time came from callbacks under 1s.
|
|
24
|
+
See https://rolldown.rs/reference/InputOptions.checks#bundlertimings for more details.
|
|
25
25
|
[39m
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 FormatJS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region packages/fast-memoize/index.d.ts
|
|
2
|
+
type Func = (...args: any[]) => any;
|
|
3
|
+
interface Cache<K, V> {
|
|
4
|
+
create: CacheCreateFunc<K, V>;
|
|
5
|
+
}
|
|
6
|
+
interface CacheCreateFunc<K, V> {
|
|
7
|
+
(): DefaultCache<K, V>;
|
|
8
|
+
}
|
|
9
|
+
interface DefaultCache<K, V> {
|
|
10
|
+
get(key: K): V | undefined;
|
|
11
|
+
set(key: K, value: V | undefined): void;
|
|
12
|
+
}
|
|
13
|
+
type Serializer = (args: any[]) => string;
|
|
14
|
+
interface Options<F extends Func> {
|
|
15
|
+
cache?: Cache<string, ReturnType<F>>;
|
|
16
|
+
serializer?: Serializer;
|
|
17
|
+
strategy?: MemoizeFunc<F>;
|
|
18
|
+
}
|
|
19
|
+
interface ResolvedOptions<F extends Func> {
|
|
20
|
+
cache: Cache<string, ReturnType<F>>;
|
|
21
|
+
serializer: Serializer;
|
|
22
|
+
}
|
|
23
|
+
interface MemoizeFunc<F extends Func> {
|
|
24
|
+
(fn: F, options?: Options<F>): F;
|
|
25
|
+
}
|
|
26
|
+
declare function memoize<F extends Func>(fn: F, options?: Options<F>): F;
|
|
27
|
+
type StrategyFn = <F extends Func>(this: unknown, fn: F, cache: DefaultCache<string, ReturnType<F>>, serializer: Serializer, arg: any) => any;
|
|
28
|
+
interface Strategies<F extends Func> {
|
|
29
|
+
variadic: MemoizeFunc<F>;
|
|
30
|
+
monadic: MemoizeFunc<F>;
|
|
31
|
+
}
|
|
32
|
+
declare const strategies: Strategies<Func>;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Cache, MemoizeFunc, Options, ResolvedOptions, Serializer, Strategies, StrategyFn, memoize, strategies };
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
//#region packages/fast-memoize/index.ts
|
|
2
|
+
function memoize(fn, options) {
|
|
3
|
+
const cache = options && options.cache ? options.cache : cacheDefault;
|
|
4
|
+
const serializer = options && options.serializer ? options.serializer : serializerDefault;
|
|
5
|
+
return (options && options.strategy ? options.strategy : strategyDefault)(fn, {
|
|
6
|
+
cache,
|
|
7
|
+
serializer
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
function isPrimitive(value) {
|
|
11
|
+
return value == null || typeof value === "number" || typeof value === "boolean";
|
|
12
|
+
}
|
|
13
|
+
function monadic(fn, cache, serializer, arg) {
|
|
14
|
+
const cacheKey = isPrimitive(arg) ? arg : serializer(arg);
|
|
15
|
+
let computedValue = cache.get(cacheKey);
|
|
16
|
+
if (typeof computedValue === "undefined") {
|
|
17
|
+
computedValue = fn.call(this, arg);
|
|
18
|
+
cache.set(cacheKey, computedValue);
|
|
19
|
+
}
|
|
20
|
+
return computedValue;
|
|
21
|
+
}
|
|
22
|
+
function variadic(fn, cache, serializer) {
|
|
23
|
+
const args = Array.prototype.slice.call(arguments, 3);
|
|
24
|
+
const cacheKey = serializer(args);
|
|
25
|
+
let computedValue = cache.get(cacheKey);
|
|
26
|
+
if (typeof computedValue === "undefined") {
|
|
27
|
+
computedValue = fn.apply(this, args);
|
|
28
|
+
cache.set(cacheKey, computedValue);
|
|
29
|
+
}
|
|
30
|
+
return computedValue;
|
|
31
|
+
}
|
|
32
|
+
function assemble(fn, context, strategy, cache, serialize) {
|
|
33
|
+
return strategy.bind(context, fn, cache, serialize);
|
|
34
|
+
}
|
|
35
|
+
function strategyDefault(fn, options) {
|
|
36
|
+
const strategy = fn.length === 1 ? monadic : variadic;
|
|
37
|
+
return assemble(fn, this, strategy, options.cache.create(), options.serializer);
|
|
38
|
+
}
|
|
39
|
+
function strategyVariadic(fn, options) {
|
|
40
|
+
return assemble(fn, this, variadic, options.cache.create(), options.serializer);
|
|
41
|
+
}
|
|
42
|
+
function strategyMonadic(fn, options) {
|
|
43
|
+
return assemble(fn, this, monadic, options.cache.create(), options.serializer);
|
|
44
|
+
}
|
|
45
|
+
const serializerDefault = function() {
|
|
46
|
+
return JSON.stringify(arguments);
|
|
47
|
+
};
|
|
48
|
+
var ObjectWithoutPrototypeCache = class {
|
|
49
|
+
constructor() {
|
|
50
|
+
this.cache = Object.create(null);
|
|
51
|
+
}
|
|
52
|
+
get(key) {
|
|
53
|
+
return this.cache[key];
|
|
54
|
+
}
|
|
55
|
+
set(key, value) {
|
|
56
|
+
this.cache[key] = value;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const cacheDefault = { create: function create() {
|
|
60
|
+
return new ObjectWithoutPrototypeCache();
|
|
61
|
+
} };
|
|
62
|
+
const strategies = {
|
|
63
|
+
variadic: strategyVariadic,
|
|
64
|
+
monadic: strategyMonadic
|
|
65
|
+
};
|
|
66
|
+
//#endregion
|
|
67
|
+
export { memoize, strategies };
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../index.ts"],"sourcesContent":["//\n// Main\n//\n\ntype Func = (...args: any[]) => any\n\nexport interface Cache<K, V> {\n create: CacheCreateFunc<K, V>\n}\n\ninterface CacheCreateFunc<K, V> {\n (): DefaultCache<K, V>\n}\n\ninterface DefaultCache<K, V> {\n get(key: K): V | undefined\n set(key: K, value: V | undefined): void\n}\n\nexport type Serializer = (args: any[]) => string\n\nexport interface Options<F extends Func> {\n cache?: Cache<string, ReturnType<F>>\n serializer?: Serializer\n strategy?: MemoizeFunc<F>\n}\n\nexport interface ResolvedOptions<F extends Func> {\n cache: Cache<string, ReturnType<F>>\n serializer: Serializer\n}\n\nexport interface MemoizeFunc<F extends Func> {\n (fn: F, options?: Options<F>): F\n}\n\nexport function memoize<F extends Func>(fn: F, options?: Options<F>): F {\n const cache = options && options.cache ? options.cache : cacheDefault\n\n const serializer =\n options && options.serializer ? options.serializer : serializerDefault\n\n const strategy =\n options && options.strategy ? options.strategy : strategyDefault\n\n return strategy(fn, {\n cache,\n serializer,\n })\n}\n\n//\n// Strategy\n//\n\nfunction isPrimitive(value: any): boolean {\n return (\n value == null || typeof value === 'number' || typeof value === 'boolean'\n ) // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\n\nexport type StrategyFn = <F extends Func>(\n this: unknown,\n fn: F,\n cache: DefaultCache<string, ReturnType<F>>,\n serializer: Serializer,\n arg: any\n) => any\n\nfunction monadic<F extends Func>(\n this: unknown,\n fn: F,\n cache: DefaultCache<string, ReturnType<F>>,\n serializer: Serializer,\n arg: any\n) {\n const cacheKey = isPrimitive(arg) ? arg : serializer(arg)\n\n let computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction variadic<F extends Func>(\n this: unknown,\n fn: F,\n cache: DefaultCache<string, ReturnType<F>>,\n serializer: Serializer\n) {\n const args = Array.prototype.slice.call(arguments, 3)\n const cacheKey = serializer(args)\n\n let computedValue = cache.get(cacheKey)\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args)\n cache.set(cacheKey, computedValue)\n }\n\n return computedValue\n}\n\nfunction assemble<F extends Func>(\n fn: F,\n context: unknown,\n strategy: StrategyFn,\n cache: DefaultCache<string, ReturnType<F>>,\n serialize: Serializer\n): F {\n return strategy.bind(context, fn, cache, serialize) as F\n}\n\nfunction strategyDefault<F extends Func>(\n this: unknown,\n fn: F,\n options: ResolvedOptions<F>\n) {\n const strategy = fn.length === 1 ? monadic : variadic\n\n return assemble(\n fn,\n this,\n strategy,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyVariadic<F extends Func>(\n this: unknown,\n fn: F,\n options: ResolvedOptions<F>\n) {\n return assemble(\n fn,\n this,\n variadic,\n options.cache.create(),\n options.serializer\n )\n}\n\nfunction strategyMonadic<F extends Func>(\n this: unknown,\n fn: F,\n options: ResolvedOptions<F>\n) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer)\n}\n\n//\n// Serializer\n//\n\nconst serializerDefault: Serializer = function (): string {\n return JSON.stringify(arguments)\n}\n\n//\n// Cache\n//\n\nclass ObjectWithoutPrototypeCache {\n private cache: Record<string, any>\n\n constructor() {\n this.cache = Object.create(null) as Record<string, any>\n }\n\n get(key: string) {\n return this.cache[key]\n }\n\n set<T>(key: string, value: T): void {\n this.cache[key] = value\n }\n}\n\nconst cacheDefault: Cache<any, any> = {\n create: function create() {\n return new ObjectWithoutPrototypeCache()\n },\n}\n\n//\n// API\n//\n\nexport interface Strategies<F extends Func> {\n variadic: MemoizeFunc<F>\n monadic: MemoizeFunc<F>\n}\n\nexport const strategies: Strategies<Func> = {\n variadic: strategyVariadic as MemoizeFunc<Func>,\n monadic: strategyMonadic as MemoizeFunc<Func>,\n}\n"],"mappings":";AAoCA,SAAgB,QAAwB,IAAO,SAAyB;CACtE,MAAM,QAAQ,WAAW,QAAQ,QAAQ,QAAQ,QAAQ;CAEzD,MAAM,aACJ,WAAW,QAAQ,aAAa,QAAQ,aAAa;CAKvD,QAFE,WAAW,QAAQ,WAAW,QAAQ,WAAW,gBAAA,CAEnC,IAAI;EAClB;EACA;CACF,CAAC;AACH;AAMA,SAAS,YAAY,OAAqB;CACxC,OACE,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,UAAU;AAEnE;AAUA,SAAS,QAEP,IACA,OACA,YACA,KACA;CACA,MAAM,WAAW,YAAY,GAAG,IAAI,MAAM,WAAW,GAAG;CAExD,IAAI,gBAAgB,MAAM,IAAI,QAAQ;CACtC,IAAI,OAAO,kBAAkB,aAAa;EACxC,gBAAgB,GAAG,KAAK,MAAM,GAAG;EACjC,MAAM,IAAI,UAAU,aAAa;CACnC;CAEA,OAAO;AACT;AAEA,SAAS,SAEP,IACA,OACA,YACA;CACA,MAAM,OAAO,MAAM,UAAU,MAAM,KAAK,WAAW,CAAC;CACpD,MAAM,WAAW,WAAW,IAAI;CAEhC,IAAI,gBAAgB,MAAM,IAAI,QAAQ;CACtC,IAAI,OAAO,kBAAkB,aAAa;EACxC,gBAAgB,GAAG,MAAM,MAAM,IAAI;EACnC,MAAM,IAAI,UAAU,aAAa;CACnC;CAEA,OAAO;AACT;AAEA,SAAS,SACP,IACA,SACA,UACA,OACA,WACG;CACH,OAAO,SAAS,KAAK,SAAS,IAAI,OAAO,SAAS;AACpD;AAEA,SAAS,gBAEP,IACA,SACA;CACA,MAAM,WAAW,GAAG,WAAW,IAAI,UAAU;CAE7C,OAAO,SACL,IACA,MACA,UACA,QAAQ,MAAM,OAAO,GACrB,QAAQ,UACV;AACF;AAEA,SAAS,iBAEP,IACA,SACA;CACA,OAAO,SACL,IACA,MACA,UACA,QAAQ,MAAM,OAAO,GACrB,QAAQ,UACV;AACF;AAEA,SAAS,gBAEP,IACA,SACA;CACA,OAAO,SAAS,IAAI,MAAM,SAAS,QAAQ,MAAM,OAAO,GAAG,QAAQ,UAAU;AAC/E;AAMA,MAAM,oBAAgC,WAAoB;CACxD,OAAO,KAAK,UAAU,SAAS;AACjC;AAMA,IAAM,8BAAN,MAAkC;CAGhC,cAAc;EACZ,KAAK,QAAQ,OAAO,OAAO,IAAI;CACjC;CAEA,IAAI,KAAa;EACf,OAAO,KAAK,MAAM;CACpB;CAEA,IAAO,KAAa,OAAgB;EAClC,KAAK,MAAM,OAAO;CACpB;AACF;AAEA,MAAM,eAAgC,EACpC,QAAQ,SAAS,SAAS;CACxB,OAAO,IAAI,4BAA4B;AACzC,EACF;AAWA,MAAa,aAA+B;CAC1C,UAAU;CACV,SAAS;AACX"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@formatjs/fast-memoize",
|
|
3
|
+
"version": "3.1.7",
|
|
4
|
+
"description": "fork of fast-memoize and support esm",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"fast-memoize",
|
|
7
|
+
"i18n",
|
|
8
|
+
"intl",
|
|
9
|
+
"memoize"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/formatjs/formatjs#readme",
|
|
12
|
+
"bugs": "https://github.com/formatjs/formatjs/issues",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "Long Ho <holevietlong@gmail.com>",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "formatjs/formatjs.git"
|
|
18
|
+
},
|
|
19
|
+
"type": "module",
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"types": "index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./index.js"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 FormatJS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# MessageFormat Parser
|
|
2
|
+
|
|
3
|
+
Hand-written ICU MessageFormat parser with compatible output as
|
|
4
|
+
[`intl-messageformat-parser`](https://www.npmjs.com/package/intl-messageformat-parser)
|
|
5
|
+
but 6 - 10 times as fast.
|
|
6
|
+
|
|
7
|
+
## Benchmarks
|
|
8
|
+
|
|
9
|
+
### JavaScript/TypeScript Parser
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
$ bazel run //packages/icu-messageformat-parser/benchmark:benchmark
|
|
13
|
+
complex_msg AST length 2599
|
|
14
|
+
normal_msg AST length 400
|
|
15
|
+
simple_msg AST length 79
|
|
16
|
+
string_msg AST length 36
|
|
17
|
+
|
|
18
|
+
complex_msg: 21.39 µs (48,112 ops/sec)
|
|
19
|
+
normal_msg: 3.10 µs (337,642 ops/sec)
|
|
20
|
+
simple_msg: 0.54 µs (1,910,194 ops/sec)
|
|
21
|
+
string_msg: 0.15 µs (7,461,955 ops/sec)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Rust Parser (WASM)
|
|
25
|
+
|
|
26
|
+
The Rust parser (optimized build) is **2.3-3.5x faster** than the JavaScript parser:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
$ bazel run -c opt //crates/icu_messageformat_parser:parser_bench -- --bench --output-format bencher
|
|
30
|
+
complex_msg: 9.43 µs (2.27x faster than JS)
|
|
31
|
+
normal_msg: 1.18 µs (2.63x faster than JS)
|
|
32
|
+
simple_msg: 153 ns (3.55x faster than JS)
|
|
33
|
+
string_msg: 59 ns (2.47x faster than JS)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The Rust parser is also faster than the SWC ICU MessageFormat parser in this
|
|
37
|
+
benchmark, ranging from 6% faster on `normal_msg` to 2.14x faster on
|
|
38
|
+
`string_msg`.
|