tempest-react-sdk 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/audio/sfx-pool.cjs +1 -1
- package/dist/audio/sfx-pool.cjs.map +1 -1
- package/dist/audio/sfx-pool.js +16 -7
- package/dist/audio/sfx-pool.js.map +1 -1
- package/dist/audio/use-sfx-pool.cjs +1 -1
- package/dist/audio/use-sfx-pool.cjs.map +1 -1
- package/dist/audio/use-sfx-pool.js +3 -8
- package/dist/audio/use-sfx-pool.js.map +1 -1
- package/dist/auth/passkey.cjs +1 -1
- package/dist/auth/passkey.cjs.map +1 -1
- package/dist/auth/passkey.js +79 -81
- package/dist/auth/passkey.js.map +1 -1
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +4 -4
- package/dist/components/AIChat/AIChatTurn.cjs +1 -1
- package/dist/components/AIChat/AIChatTurn.js +4 -4
- package/dist/components/AppBar/use-sticky-body-warning.cjs.map +1 -1
- package/dist/components/AppBar/use-sticky-body-warning.js.map +1 -1
- package/dist/components/BarList/BarList.cjs +1 -1
- package/dist/components/BarList/BarList.cjs.map +1 -1
- package/dist/components/BarList/BarList.js +31 -24
- package/dist/components/BarList/BarList.js.map +1 -1
- package/dist/components/BarList/bar-list-model.cjs +1 -1
- package/dist/components/BarList/bar-list-model.cjs.map +1 -1
- package/dist/components/BarList/bar-list-model.js +5 -5
- package/dist/components/BarList/bar-list-model.js.map +1 -1
- package/dist/components/ClickOutside/ClickOutside.cjs +1 -1
- package/dist/components/ClickOutside/ClickOutside.cjs.map +1 -1
- package/dist/components/ClickOutside/ClickOutside.js +13 -14
- package/dist/components/ClickOutside/ClickOutside.js.map +1 -1
- package/dist/components/DataTable/DataTable.cjs +1 -1
- package/dist/components/DataTable/DataTable.cjs.map +1 -1
- package/dist/components/DataTable/DataTable.js +131 -129
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/use-dev-warnings.cjs.map +1 -1
- package/dist/components/DataTable/use-dev-warnings.js.map +1 -1
- package/dist/components/FilterBar/filter-apply.cjs +1 -1
- package/dist/components/FilterBar/filter-apply.cjs.map +1 -1
- package/dist/components/FilterBar/filter-apply.js +35 -38
- package/dist/components/FilterBar/filter-apply.js.map +1 -1
- package/dist/components/FilterBar/filter-query.cjs +1 -1
- package/dist/components/FilterBar/filter-query.cjs.map +1 -1
- package/dist/components/FilterBar/filter-query.js +16 -13
- package/dist/components/FilterBar/filter-query.js.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.cjs +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.js +21 -21
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.js +91 -38
- package/dist/components/Sidebar/Sidebar.js.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.cjs +1 -1
- package/dist/components/Sidebar/Sidebar.module.cjs.map +1 -1
- package/dist/components/Sidebar/Sidebar.module.js +12 -8
- package/dist/components/Sidebar/Sidebar.module.js.map +1 -1
- package/dist/forms/masked-inputs.cjs +1 -1
- package/dist/forms/masked-inputs.js +12 -12
- package/dist/geo/use-position-tracker.cjs +1 -1
- package/dist/geo/use-position-tracker.cjs.map +1 -1
- package/dist/geo/use-position-tracker.js +25 -26
- package/dist/geo/use-position-tracker.js.map +1 -1
- package/dist/hooks/use-async.cjs +1 -1
- package/dist/hooks/use-async.cjs.map +1 -1
- package/dist/hooks/use-async.js +27 -30
- package/dist/hooks/use-async.js.map +1 -1
- package/dist/hooks/use-click-outside.cjs +1 -1
- package/dist/hooks/use-click-outside.cjs.map +1 -1
- package/dist/hooks/use-click-outside.js +8 -9
- package/dist/hooks/use-click-outside.js.map +1 -1
- package/dist/hooks/use-countdown.cjs +1 -1
- package/dist/hooks/use-countdown.cjs.map +1 -1
- package/dist/hooks/use-countdown.js +8 -13
- package/dist/hooks/use-countdown.js.map +1 -1
- package/dist/hooks/use-event-listener.cjs +1 -1
- package/dist/hooks/use-event-listener.cjs.map +1 -1
- package/dist/hooks/use-event-listener.js +6 -6
- package/dist/hooks/use-event-listener.js.map +1 -1
- package/dist/hooks/use-interval.cjs +1 -1
- package/dist/hooks/use-interval.cjs.map +1 -1
- package/dist/hooks/use-interval.js +5 -6
- package/dist/hooks/use-interval.js.map +1 -1
- package/dist/hooks/use-latest-ref.cjs.map +1 -1
- package/dist/hooks/use-latest-ref.js.map +1 -1
- package/dist/hooks/use-long-press-handlers.cjs +1 -1
- package/dist/hooks/use-long-press-handlers.cjs.map +1 -1
- package/dist/hooks/use-long-press-handlers.js +8 -10
- package/dist/hooks/use-long-press-handlers.js.map +1 -1
- package/dist/hooks/use-long-press.cjs +1 -1
- package/dist/hooks/use-long-press.cjs.map +1 -1
- package/dist/hooks/use-long-press.js +6 -6
- package/dist/hooks/use-long-press.js.map +1 -1
- package/dist/hooks/use-online.cjs +1 -1
- package/dist/hooks/use-online.cjs.map +1 -1
- package/dist/hooks/use-online.js +10 -10
- package/dist/hooks/use-online.js.map +1 -1
- package/dist/hooks/use-service-worker-update.cjs +1 -1
- package/dist/hooks/use-service-worker-update.cjs.map +1 -1
- package/dist/hooks/use-service-worker-update.js +24 -25
- package/dist/hooks/use-service-worker-update.js.map +1 -1
- package/dist/hooks/use-stable-callback.cjs +1 -1
- package/dist/hooks/use-stable-callback.cjs.map +1 -1
- package/dist/hooks/use-stable-callback.js +4 -3
- package/dist/hooks/use-stable-callback.js.map +1 -1
- package/dist/hooks/use-timeout.cjs +1 -1
- package/dist/hooks/use-timeout.cjs.map +1 -1
- package/dist/hooks/use-timeout.js +5 -6
- package/dist/hooks/use-timeout.js.map +1 -1
- package/dist/hooks/use-typewriter.cjs +1 -1
- package/dist/hooks/use-typewriter.cjs.map +1 -1
- package/dist/hooks/use-typewriter.js +9 -18
- package/dist/hooks/use-typewriter.js.map +1 -1
- package/dist/http/api-client.cjs +1 -1
- package/dist/http/api-client.cjs.map +1 -1
- package/dist/http/api-client.js +55 -46
- package/dist/http/api-client.js.map +1 -1
- package/dist/http/describe-api-error.cjs +1 -1
- package/dist/http/describe-api-error.cjs.map +1 -1
- package/dist/http/describe-api-error.js +15 -14
- package/dist/http/describe-api-error.js.map +1 -1
- package/dist/http/errors.cjs +1 -1
- package/dist/http/errors.cjs.map +1 -1
- package/dist/http/errors.js +49 -20
- package/dist/http/errors.js.map +1 -1
- package/dist/http/resumable-upload.cjs +1 -1
- package/dist/http/resumable-upload.cjs.map +1 -1
- package/dist/http/resumable-upload.js +60 -61
- package/dist/http/resumable-upload.js.map +1 -1
- package/dist/http/retry.cjs +1 -1
- package/dist/http/retry.cjs.map +1 -1
- package/dist/http/retry.js +20 -16
- package/dist/http/retry.js.map +1 -1
- package/dist/http/use-describe-api-error.cjs +1 -1
- package/dist/http/use-describe-api-error.cjs.map +1 -1
- package/dist/http/use-describe-api-error.js +14 -10
- package/dist/http/use-describe-api-error.js.map +1 -1
- package/dist/i18n/create-i18n.cjs +1 -1
- package/dist/i18n/create-i18n.cjs.map +1 -1
- package/dist/i18n/create-i18n.js +6 -6
- package/dist/i18n/create-i18n.js.map +1 -1
- package/dist/icons/Icon.cjs +1 -1
- package/dist/icons/Icon.cjs.map +1 -1
- package/dist/icons/Icon.js +15 -14
- package/dist/icons/Icon.js.map +1 -1
- package/dist/icons/IconPicker.cjs +2 -0
- package/dist/icons/IconPicker.cjs.map +1 -0
- package/dist/icons/IconPicker.js +49 -0
- package/dist/icons/IconPicker.js.map +1 -0
- package/dist/icons/IconPicker.module.cjs +2 -0
- package/dist/icons/IconPicker.module.cjs.map +1 -0
- package/dist/icons/IconPicker.module.js +10 -0
- package/dist/icons/IconPicker.module.js.map +1 -0
- package/dist/icons/alias.cjs +2 -0
- package/dist/icons/alias.cjs.map +1 -0
- package/dist/icons/alias.js +9 -0
- package/dist/icons/alias.js.map +1 -0
- package/dist/icons/generated/loaders.cjs +1 -1
- package/dist/icons/generated/loaders.cjs.map +1 -1
- package/dist/icons/generated/loaders.js +273 -28
- package/dist/icons/generated/loaders.js.map +1 -1
- package/dist/icons/generated/shard-00.cjs +2 -0
- package/dist/icons/generated/shard-00.cjs.map +1 -0
- package/dist/icons/generated/shard-00.js +48 -0
- package/dist/icons/generated/shard-00.js.map +1 -0
- package/dist/icons/generated/shard-01.cjs +2 -0
- package/dist/icons/generated/shard-01.cjs.map +1 -0
- package/dist/icons/generated/shard-01.js +48 -0
- package/dist/icons/generated/shard-01.js.map +1 -0
- package/dist/icons/generated/shard-02.cjs +2 -0
- package/dist/icons/generated/shard-02.cjs.map +1 -0
- package/dist/icons/generated/shard-02.js +48 -0
- package/dist/icons/generated/shard-02.js.map +1 -0
- package/dist/icons/generated/shard-03.cjs +2 -0
- package/dist/icons/generated/shard-03.cjs.map +1 -0
- package/dist/icons/generated/shard-03.js +48 -0
- package/dist/icons/generated/shard-03.js.map +1 -0
- package/dist/icons/generated/shard-04.cjs +2 -0
- package/dist/icons/generated/shard-04.cjs.map +1 -0
- package/dist/icons/generated/shard-04.js +48 -0
- package/dist/icons/generated/shard-04.js.map +1 -0
- package/dist/icons/generated/shard-05.cjs +2 -0
- package/dist/icons/generated/shard-05.cjs.map +1 -0
- package/dist/icons/generated/shard-05.js +48 -0
- package/dist/icons/generated/shard-05.js.map +1 -0
- package/dist/icons/generated/shard-06.cjs +2 -0
- package/dist/icons/generated/shard-06.cjs.map +1 -0
- package/dist/icons/generated/shard-06.js +48 -0
- package/dist/icons/generated/shard-06.js.map +1 -0
- package/dist/icons/generated/shard-07.cjs +2 -0
- package/dist/icons/generated/shard-07.cjs.map +1 -0
- package/dist/icons/generated/shard-07.js +48 -0
- package/dist/icons/generated/shard-07.js.map +1 -0
- package/dist/icons/generated/shard-08.cjs +2 -0
- package/dist/icons/generated/shard-08.cjs.map +1 -0
- package/dist/icons/generated/shard-08.js +48 -0
- package/dist/icons/generated/shard-08.js.map +1 -0
- package/dist/icons/generated/shard-09.cjs +2 -0
- package/dist/icons/generated/shard-09.cjs.map +1 -0
- package/dist/icons/generated/shard-09.js +48 -0
- package/dist/icons/generated/shard-09.js.map +1 -0
- package/dist/icons/generated/shard-10.cjs +2 -0
- package/dist/icons/generated/shard-10.cjs.map +1 -0
- package/dist/icons/generated/shard-10.js +48 -0
- package/dist/icons/generated/shard-10.js.map +1 -0
- package/dist/icons/generated/shard-11.cjs +2 -0
- package/dist/icons/generated/shard-11.cjs.map +1 -0
- package/dist/icons/generated/shard-11.js +48 -0
- package/dist/icons/generated/shard-11.js.map +1 -0
- package/dist/icons/generated/shard-12.cjs +2 -0
- package/dist/icons/generated/shard-12.cjs.map +1 -0
- package/dist/icons/generated/shard-12.js +48 -0
- package/dist/icons/generated/shard-12.js.map +1 -0
- package/dist/icons/generated/shard-13.cjs +2 -0
- package/dist/icons/generated/shard-13.cjs.map +1 -0
- package/dist/icons/generated/shard-13.js +48 -0
- package/dist/icons/generated/shard-13.js.map +1 -0
- package/dist/icons/generated/shard-14.cjs +2 -0
- package/dist/icons/generated/shard-14.cjs.map +1 -0
- package/dist/icons/generated/shard-14.js +48 -0
- package/dist/icons/generated/shard-14.js.map +1 -0
- package/dist/icons/generated/shard-15.cjs +2 -0
- package/dist/icons/generated/shard-15.cjs.map +1 -0
- package/dist/icons/generated/shard-15.js +48 -0
- package/dist/icons/generated/shard-15.js.map +1 -0
- package/dist/icons/generated/shard-16.cjs +2 -0
- package/dist/icons/generated/shard-16.cjs.map +1 -0
- package/dist/icons/generated/shard-16.js +48 -0
- package/dist/icons/generated/shard-16.js.map +1 -0
- package/dist/icons/generated/shard-17.cjs +2 -0
- package/dist/icons/generated/shard-17.cjs.map +1 -0
- package/dist/icons/generated/shard-17.js +48 -0
- package/dist/icons/generated/shard-17.js.map +1 -0
- package/dist/icons/generated/shard-18.cjs +2 -0
- package/dist/icons/generated/shard-18.cjs.map +1 -0
- package/dist/icons/generated/shard-18.js +48 -0
- package/dist/icons/generated/shard-18.js.map +1 -0
- package/dist/icons/generated/shard-19.cjs +2 -0
- package/dist/icons/generated/shard-19.cjs.map +1 -0
- package/dist/icons/generated/shard-19.js +48 -0
- package/dist/icons/generated/shard-19.js.map +1 -0
- package/dist/icons/generated/shard-20.cjs +2 -0
- package/dist/icons/generated/shard-20.cjs.map +1 -0
- package/dist/icons/generated/shard-20.js +48 -0
- package/dist/icons/generated/shard-20.js.map +1 -0
- package/dist/icons/generated/shard-21.cjs +2 -0
- package/dist/icons/generated/shard-21.cjs.map +1 -0
- package/dist/icons/generated/shard-21.js +48 -0
- package/dist/icons/generated/shard-21.js.map +1 -0
- package/dist/icons/generated/shard-22.cjs +2 -0
- package/dist/icons/generated/shard-22.cjs.map +1 -0
- package/dist/icons/generated/shard-22.js +48 -0
- package/dist/icons/generated/shard-22.js.map +1 -0
- package/dist/icons/generated/shard-23.cjs +2 -0
- package/dist/icons/generated/shard-23.cjs.map +1 -0
- package/dist/icons/generated/shard-23.js +48 -0
- package/dist/icons/generated/shard-23.js.map +1 -0
- package/dist/icons/generated/shard-24.cjs +2 -0
- package/dist/icons/generated/shard-24.cjs.map +1 -0
- package/dist/icons/generated/shard-24.js +48 -0
- package/dist/icons/generated/shard-24.js.map +1 -0
- package/dist/icons/generated/shard-25.cjs +2 -0
- package/dist/icons/generated/shard-25.cjs.map +1 -0
- package/dist/icons/generated/shard-25.js +48 -0
- package/dist/icons/generated/shard-25.js.map +1 -0
- package/dist/icons/generated/shard-26.cjs +2 -0
- package/dist/icons/generated/shard-26.cjs.map +1 -0
- package/dist/icons/generated/shard-26.js +48 -0
- package/dist/icons/generated/shard-26.js.map +1 -0
- package/dist/icons/generated/shard-27.cjs +2 -0
- package/dist/icons/generated/shard-27.cjs.map +1 -0
- package/dist/icons/generated/shard-27.js +48 -0
- package/dist/icons/generated/shard-27.js.map +1 -0
- package/dist/icons/generated/shard-28.cjs +2 -0
- package/dist/icons/generated/shard-28.cjs.map +1 -0
- package/dist/icons/generated/shard-28.js +48 -0
- package/dist/icons/generated/shard-28.js.map +1 -0
- package/dist/icons/generated/shard-29.cjs +2 -0
- package/dist/icons/generated/shard-29.cjs.map +1 -0
- package/dist/icons/generated/shard-29.js +48 -0
- package/dist/icons/generated/shard-29.js.map +1 -0
- package/dist/icons/generated/shard-30.cjs +2 -0
- package/dist/icons/generated/shard-30.cjs.map +1 -0
- package/dist/icons/generated/shard-30.js +48 -0
- package/dist/icons/generated/shard-30.js.map +1 -0
- package/dist/icons/generated/shard-31.cjs +2 -0
- package/dist/icons/generated/shard-31.cjs.map +1 -0
- package/dist/icons/generated/shard-31.js +48 -0
- package/dist/icons/generated/shard-31.js.map +1 -0
- package/dist/icons/generated/shard-32.cjs +2 -0
- package/dist/icons/generated/shard-32.cjs.map +1 -0
- package/dist/icons/generated/shard-32.js +48 -0
- package/dist/icons/generated/shard-32.js.map +1 -0
- package/dist/icons/generated/shard-33.cjs +2 -0
- package/dist/icons/generated/shard-33.cjs.map +1 -0
- package/dist/icons/generated/shard-33.js +48 -0
- package/dist/icons/generated/shard-33.js.map +1 -0
- package/dist/icons/generated/shard-34.cjs +2 -0
- package/dist/icons/generated/shard-34.cjs.map +1 -0
- package/dist/icons/generated/shard-34.js +48 -0
- package/dist/icons/generated/shard-34.js.map +1 -0
- package/dist/icons/generated/shard-35.cjs +2 -0
- package/dist/icons/generated/shard-35.cjs.map +1 -0
- package/dist/icons/generated/shard-35.js +48 -0
- package/dist/icons/generated/shard-35.js.map +1 -0
- package/dist/icons/generated/shard-36.cjs +2 -0
- package/dist/icons/generated/shard-36.cjs.map +1 -0
- package/dist/icons/generated/shard-36.js +48 -0
- package/dist/icons/generated/shard-36.js.map +1 -0
- package/dist/icons/generated/shard-37.cjs +2 -0
- package/dist/icons/generated/shard-37.cjs.map +1 -0
- package/dist/icons/generated/shard-37.js +48 -0
- package/dist/icons/generated/shard-37.js.map +1 -0
- package/dist/icons/generated/shard-38.cjs +2 -0
- package/dist/icons/generated/shard-38.cjs.map +1 -0
- package/dist/icons/generated/shard-38.js +48 -0
- package/dist/icons/generated/shard-38.js.map +1 -0
- package/dist/icons/generated/shard-39.cjs +2 -0
- package/dist/icons/generated/shard-39.cjs.map +1 -0
- package/dist/icons/generated/shard-39.js +48 -0
- package/dist/icons/generated/shard-39.js.map +1 -0
- package/dist/icons/generated/shard-40.cjs +2 -0
- package/dist/icons/generated/shard-40.cjs.map +1 -0
- package/dist/icons/generated/shard-40.js +48 -0
- package/dist/icons/generated/shard-40.js.map +1 -0
- package/dist/icons/generated/shard-41.cjs +2 -0
- package/dist/icons/generated/shard-41.cjs.map +1 -0
- package/dist/icons/generated/shard-41.js +48 -0
- package/dist/icons/generated/shard-41.js.map +1 -0
- package/dist/icons/generated/shard-42.cjs +2 -0
- package/dist/icons/generated/shard-42.cjs.map +1 -0
- package/dist/icons/generated/shard-42.js +48 -0
- package/dist/icons/generated/shard-42.js.map +1 -0
- package/dist/icons/generated/shard-43.cjs +2 -0
- package/dist/icons/generated/shard-43.cjs.map +1 -0
- package/dist/icons/generated/shard-43.js +48 -0
- package/dist/icons/generated/shard-43.js.map +1 -0
- package/dist/icons/generated/shard-44.cjs +2 -0
- package/dist/icons/generated/shard-44.cjs.map +1 -0
- package/dist/icons/generated/shard-44.js +15 -0
- package/dist/icons/generated/shard-44.js.map +1 -0
- package/dist/icons/material-symbols.cjs +1 -1
- package/dist/icons/material-symbols.cjs.map +1 -1
- package/dist/icons/material-symbols.js +240 -1
- package/dist/icons/material-symbols.js.map +1 -1
- package/dist/icons/normalize-icon-name.cjs +2 -0
- package/dist/icons/normalize-icon-name.cjs.map +1 -0
- package/dist/icons/normalize-icon-name.js +9 -0
- package/dist/icons/normalize-icon-name.js.map +1 -0
- package/dist/icons/shard-cache.cjs +1 -1
- package/dist/icons/shard-cache.cjs.map +1 -1
- package/dist/icons/shard-cache.js +85 -32
- package/dist/icons/shard-cache.js.map +1 -1
- package/dist/icons/validate-icon-name.cjs +2 -0
- package/dist/icons/validate-icon-name.cjs.map +1 -0
- package/dist/icons/validate-icon-name.js +11 -0
- package/dist/icons/validate-icon-name.js.map +1 -0
- package/dist/icons-virtual-id.d.ts +24 -0
- package/dist/icons-virtual.cjs +2 -0
- package/dist/icons-virtual.cjs.map +1 -0
- package/dist/icons-virtual.d.ts +30 -22
- package/dist/icons-virtual.js +6 -0
- package/dist/icons-virtual.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.d.ts +282 -33
- package/dist/icons.js +11 -7
- package/dist/offline/create-offline-sync.cjs +1 -1
- package/dist/offline/create-offline-sync.cjs.map +1 -1
- package/dist/offline/create-offline-sync.js +17 -9
- package/dist/offline/create-offline-sync.js.map +1 -1
- package/dist/offline/use-offline-sync.cjs +1 -1
- package/dist/offline/use-offline-sync.cjs.map +1 -1
- package/dist/offline/use-offline-sync.js +7 -8
- package/dist/offline/use-offline-sync.js.map +1 -1
- package/dist/push/use-push-subscription.cjs +1 -1
- package/dist/push/use-push-subscription.cjs.map +1 -1
- package/dist/push/use-push-subscription.js +13 -12
- package/dist/push/use-push-subscription.js.map +1 -1
- package/dist/query/retry-policy.cjs +1 -1
- package/dist/query/retry-policy.cjs.map +1 -1
- package/dist/query/retry-policy.js +3 -3
- package/dist/query/retry-policy.js.map +1 -1
- package/dist/sse/use-event-stream.cjs +1 -1
- package/dist/sse/use-event-stream.cjs.map +1 -1
- package/dist/sse/use-event-stream.js +19 -20
- package/dist/sse/use-event-stream.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tabular/use-tabular-predictor.cjs +1 -1
- package/dist/tabular/use-tabular-predictor.cjs.map +1 -1
- package/dist/tabular/use-tabular-predictor.js +20 -17
- package/dist/tabular/use-tabular-predictor.js.map +1 -1
- package/dist/tempest-react-sdk.cjs +1 -1
- package/dist/tempest-react-sdk.d.ts +458 -213
- package/dist/tempest-react-sdk.js +328 -329
- package/dist/theme/ThemeProvider.cjs +1 -1
- package/dist/theme/ThemeProvider.cjs.map +1 -1
- package/dist/theme/ThemeProvider.js +12 -17
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/utils/base64.cjs +2 -0
- package/dist/utils/base64.cjs.map +1 -0
- package/dist/utils/base64.js +16 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/compare-values.cjs +1 -1
- package/dist/utils/compare-values.cjs.map +1 -1
- package/dist/utils/compare-values.js +4 -3
- package/dist/utils/compare-values.js.map +1 -1
- package/dist/utils/compressed-storage.cjs +1 -1
- package/dist/utils/compressed-storage.cjs.map +1 -1
- package/dist/utils/compressed-storage.js +16 -46
- package/dist/utils/compressed-storage.js.map +1 -1
- package/dist/utils/dev-mode.cjs.map +1 -1
- package/dist/utils/dev-mode.js.map +1 -1
- package/dist/utils/storage.cjs +1 -1
- package/dist/utils/storage.cjs.map +1 -1
- package/dist/utils/storage.js +37 -17
- package/dist/utils/storage.js.map +1 -1
- package/dist/vision/use-camera-stream.cjs +1 -1
- package/dist/vision/use-camera-stream.cjs.map +1 -1
- package/dist/vision/use-camera-stream.js +34 -33
- package/dist/vision/use-camera-stream.js.map +1 -1
- package/dist/vite/base-url.cjs +2 -0
- package/dist/vite/base-url.cjs.map +1 -0
- package/dist/vite/base-url.js +8 -0
- package/dist/vite/base-url.js.map +1 -0
- package/dist/vite/tempest-icons.cjs +4 -4
- package/dist/vite/tempest-icons.cjs.map +1 -1
- package/dist/vite/tempest-icons.js +26 -26
- package/dist/vite/tempest-icons.js.map +1 -1
- package/dist/vite/tempest-pwa-dev-sw.cjs +1 -1
- package/dist/vite/tempest-pwa-dev-sw.cjs.map +1 -1
- package/dist/vite/tempest-pwa-dev-sw.js +54 -29
- package/dist/vite/tempest-pwa-dev-sw.js.map +1 -1
- package/dist/vite/tempest-pwa-manifest.cjs +2 -2
- package/dist/vite/tempest-pwa-manifest.cjs.map +1 -1
- package/dist/vite/tempest-pwa-manifest.js +15 -14
- package/dist/vite/tempest-pwa-manifest.js.map +1 -1
- package/dist/vite.d.ts +3 -3
- package/dist/ws/use-web-socket.cjs +1 -1
- package/dist/ws/use-web-socket.cjs.map +1 -1
- package/dist/ws/use-web-socket.js +40 -42
- package/dist/ws/use-web-socket.js.map +1 -1
- package/package.json +5 -2
- package/dist/icons/generated/shard-a.cjs +0 -2
- package/dist/icons/generated/shard-a.cjs.map +0 -1
- package/dist/icons/generated/shard-a.js +0 -114
- package/dist/icons/generated/shard-a.js.map +0 -1
- package/dist/icons/generated/shard-b.cjs +0 -2
- package/dist/icons/generated/shard-b.cjs.map +0 -1
- package/dist/icons/generated/shard-b.js +0 -158
- package/dist/icons/generated/shard-b.js.map +0 -1
- package/dist/icons/generated/shard-c.cjs +0 -2
- package/dist/icons/generated/shard-c.cjs.map +0 -1
- package/dist/icons/generated/shard-c.js +0 -269
- package/dist/icons/generated/shard-c.js.map +0 -1
- package/dist/icons/generated/shard-d.cjs +0 -2
- package/dist/icons/generated/shard-d.cjs.map +0 -1
- package/dist/icons/generated/shard-d.js +0 -62
- package/dist/icons/generated/shard-d.js.map +0 -1
- package/dist/icons/generated/shard-e.cjs +0 -2
- package/dist/icons/generated/shard-e.cjs.map +0 -1
- package/dist/icons/generated/shard-e.js +0 -33
- package/dist/icons/generated/shard-e.js.map +0 -1
- package/dist/icons/generated/shard-f.cjs +0 -2
- package/dist/icons/generated/shard-f.cjs.map +0 -1
- package/dist/icons/generated/shard-f.js +0 -145
- package/dist/icons/generated/shard-f.js.map +0 -1
- package/dist/icons/generated/shard-g.cjs +0 -2
- package/dist/icons/generated/shard-g.cjs.map +0 -1
- package/dist/icons/generated/shard-g.js +0 -61
- package/dist/icons/generated/shard-g.js.map +0 -1
- package/dist/icons/generated/shard-h.cjs +0 -2
- package/dist/icons/generated/shard-h.cjs.map +0 -1
- package/dist/icons/generated/shard-h.js +0 -62
- package/dist/icons/generated/shard-h.js.map +0 -1
- package/dist/icons/generated/shard-i.cjs +0 -2
- package/dist/icons/generated/shard-i.cjs.map +0 -1
- package/dist/icons/generated/shard-i.js +0 -30
- package/dist/icons/generated/shard-i.js.map +0 -1
- package/dist/icons/generated/shard-j.cjs +0 -2
- package/dist/icons/generated/shard-j.cjs.map +0 -1
- package/dist/icons/generated/shard-j.js +0 -10
- package/dist/icons/generated/shard-j.js.map +0 -1
- package/dist/icons/generated/shard-k.cjs +0 -2
- package/dist/icons/generated/shard-k.cjs.map +0 -1
- package/dist/icons/generated/shard-k.js +0 -16
- package/dist/icons/generated/shard-k.js.map +0 -1
- package/dist/icons/generated/shard-l.cjs +0 -2
- package/dist/icons/generated/shard-l.cjs.map +0 -1
- package/dist/icons/generated/shard-l.js +0 -92
- package/dist/icons/generated/shard-l.js.map +0 -1
- package/dist/icons/generated/shard-m.cjs +0 -2
- package/dist/icons/generated/shard-m.cjs.map +0 -1
- package/dist/icons/generated/shard-m.js +0 -143
- package/dist/icons/generated/shard-m.js.map +0 -1
- package/dist/icons/generated/shard-n.cjs +0 -2
- package/dist/icons/generated/shard-n.cjs.map +0 -1
- package/dist/icons/generated/shard-n.js +0 -24
- package/dist/icons/generated/shard-n.js.map +0 -1
- package/dist/icons/generated/shard-o.cjs +0 -2
- package/dist/icons/generated/shard-o.cjs.map +0 -1
- package/dist/icons/generated/shard-o.js +0 -17
- package/dist/icons/generated/shard-o.js.map +0 -1
- package/dist/icons/generated/shard-p.cjs +0 -2
- package/dist/icons/generated/shard-p.cjs.map +0 -1
- package/dist/icons/generated/shard-p.js +0 -114
- package/dist/icons/generated/shard-p.js.map +0 -1
- package/dist/icons/generated/shard-q.cjs +0 -2
- package/dist/icons/generated/shard-q.cjs.map +0 -1
- package/dist/icons/generated/shard-q.js +0 -10
- package/dist/icons/generated/shard-q.js.map +0 -1
- package/dist/icons/generated/shard-r.cjs +0 -2
- package/dist/icons/generated/shard-r.cjs.map +0 -1
- package/dist/icons/generated/shard-r.js +0 -79
- package/dist/icons/generated/shard-r.js.map +0 -1
- package/dist/icons/generated/shard-s.cjs +0 -2
- package/dist/icons/generated/shard-s.cjs.map +0 -1
- package/dist/icons/generated/shard-s.js +0 -256
- package/dist/icons/generated/shard-s.js.map +0 -1
- package/dist/icons/generated/shard-t.cjs +0 -2
- package/dist/icons/generated/shard-t.cjs.map +0 -1
- package/dist/icons/generated/shard-t.js +0 -109
- package/dist/icons/generated/shard-t.js.map +0 -1
- package/dist/icons/generated/shard-u.cjs +0 -2
- package/dist/icons/generated/shard-u.cjs.map +0 -1
- package/dist/icons/generated/shard-u.js +0 -50
- package/dist/icons/generated/shard-u.js.map +0 -1
- package/dist/icons/generated/shard-v.cjs +0 -2
- package/dist/icons/generated/shard-v.cjs.map +0 -1
- package/dist/icons/generated/shard-v.js +0 -30
- package/dist/icons/generated/shard-v.js.map +0 -1
- package/dist/icons/generated/shard-w.cjs +0 -2
- package/dist/icons/generated/shard-w.cjs.map +0 -1
- package/dist/icons/generated/shard-w.js +0 -48
- package/dist/icons/generated/shard-w.js.map +0 -1
- package/dist/icons/generated/shard-x.cjs +0 -2
- package/dist/icons/generated/shard-x.cjs.map +0 -1
- package/dist/icons/generated/shard-x.js +0 -10
- package/dist/icons/generated/shard-x.js.map +0 -1
- package/dist/icons/generated/shard-z.cjs +0 -2
- package/dist/icons/generated/shard-z.cjs.map +0 -1
- package/dist/icons/generated/shard-z.js +0 -25
- package/dist/icons/generated/shard-z.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shard-cache.js","names":[],"sources":["../../src/icons/shard-cache.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\n\nimport { iconAliases } from \"./generated/aliases\";\nimport { shardLoaders } from \"./generated/loaders\";\n\n/**\n * Slugs resolved so far, across every shard already fetched.\n *\n * Module-level and readable **synchronously**, which is the whole point: once a\n * page has rendered one icon whose slug starts with `s`, every other `s` icon is\n * already in memory and paints on its first frame. A cache that could only be\n * read from an effect would flash a fallback for each new icon, which is the\n * behavior `lucide-react`'s own `DynamicIcon` has.\n */\nconst resolved = new Map<string, LucideIcon>();\n\n/** In-flight shard fetches, so N icons from one shard trigger one import. */\nconst inFlight = new Map<string, Promise<void>>();\n\n/**\n * Initial letters whose shard has already settled.\n *\n * Needed to tell \"still loading\" from \"no such icon\": until the shard arrives,\n * absence from `resolved` proves nothing. Only once the letter is in here does a\n * missing slug mean the name is genuinely wrong — which is what lets `Icon` warn\n * about a typo without also warning on every icon mid-flight.\n */\nconst settledLetters = new Set<string>();\n\n/** Callbacks to run after a shard lands, so mounted `<Icon>`s re-render. */\nconst listeners = new Set<() => void>();\n\n/**\n * Map a slug to the canonical slug that owns the icon.\n *\n * Lucide keeps 257 deprecated aliases (`alert-circle` → `circle-alert`), and a\n * slug persisted in a database years ago is exactly the case this feature exists\n * for, so an alias must keep resolving after a lucide bump renames it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The canonical slug.\n */\nexport function resolveIconAlias(slug: string): string {\n return iconAliases[slug] ?? slug;\n}\n\n/**\n * Read an icon out of the cache without triggering a fetch.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The icon component, or `undefined` when its shard is not loaded yet.\n */\nexport function peekIcon(slug: string): LucideIcon | undefined {\n return resolved.get(resolveIconAlias(slug));\n}\n\n/**\n * Load the shard that owns `slug`, if it is not loaded or loading already.\n *\n * Resolves without error for an unknown slug: a name that came from an API is\n * data, not a programming mistake, so the caller renders its fallback instead of\n * seeing an exception thrown mid-render.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns A promise that settles once the shard is in the cache.\n */\nexport function loadIcon(slug: string): Promise<void> {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return Promise.resolve();\n\n const letter = canonical[0] ?? \"\";\n const loader = shardLoaders[letter];\n if (!loader) return Promise.resolve();\n\n const pending = inFlight.get(letter);\n if (pending) return pending;\n\n const promise = loader()\n .then((mod) => {\n for (const [name, icon] of Object.entries(mod.default)) resolved.set(name, icon);\n })\n .catch(() => undefined)\n .finally(() => {\n inFlight.delete(letter);\n settledLetters.add(letter);\n for (const listener of listeners) listener();\n });\n inFlight.set(letter, promise);\n return promise;\n}\n\n/**\n * Whether a slug is ready, still loading, or not an icon at all.\n *\n * `\"missing\"` is only reported once that is actually knowable: either lucide has\n * no icons under that initial letter, or the letter's shard already settled\n * without the slug in it.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The slug's resolution state.\n */\nexport function iconStatus(slug: string): \"ready\" | \"loading\" | \"missing\" {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return \"ready\";\n const letter = canonical[0] ?? \"\";\n if (!shardLoaders[letter]) return \"missing\";\n return settledLetters.has(letter) ? \"missing\" : \"loading\";\n}\n\n/**\n * Warm the cache for slugs you know you are about to render.\n *\n * Useful right before opening a menu or a picker: the shards land while the user\n * is still reaching for it, so nothing flashes a fallback.\n *\n * @param slugs - Icon slugs to preload.\n * @returns A promise that settles when every needed shard is in the cache.\n */\nexport async function preloadIcons(slugs: readonly string[]): Promise<void> {\n await Promise.all(slugs.map(loadIcon));\n}\n\n/**\n * Subscribe to shard arrivals.\n *\n * @param listener - Called after each shard lands.\n * @returns An unsubscribe function.\n */\nexport function subscribeToIcons(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n"],"mappings":";;;AAcA,IAAM,oBAAW,IAAI,IAAwB,GAGvC,oBAAW,IAAI,IAA2B,GAU1C,oBAAiB,IAAI,IAAY,GAGjC,oBAAY,IAAI,IAAgB;AAYtC,SAAgB,EAAiB,GAAsB;CACnD,OAAO,EAAY,MAAS;AAChC;AAQA,SAAgB,EAAS,GAAsC;CAC3D,OAAO,EAAS,IAAI,EAAiB,CAAI,CAAC;AAC9C;AAYA,SAAgB,EAAS,GAA6B;CAClD,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO,QAAQ,QAAQ;CAEpD,IAAM,IAAS,EAAU,MAAM,IACzB,IAAS,EAAa;CAC5B,IAAI,CAAC,GAAQ,OAAO,QAAQ,QAAQ;CAEpC,IAAM,IAAU,EAAS,IAAI,CAAM;CACnC,IAAI,GAAS,OAAO;CAEpB,IAAM,IAAU,EAAO,CAAC,CACnB,MAAM,MAAQ;EACX,KAAK,IAAM,CAAC,GAAM,MAAS,OAAO,QAAQ,EAAI,OAAO,GAAG,EAAS,IAAI,GAAM,CAAI;CACnF,CAAC,CAAC,CACD,YAAY,KAAA,CAAS,CAAC,CACtB,cAAc;EAEX,AADA,EAAS,OAAO,CAAM,GACtB,EAAe,IAAI,CAAM;EACzB,KAAK,IAAM,KAAY,GAAW,EAAS;CAC/C,CAAC;CAEL,OADA,EAAS,IAAI,GAAQ,CAAO,GACrB;AACX;AAYA,SAAgB,EAAW,GAA+C;CACtE,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO;CACpC,IAAM,IAAS,EAAU,MAAM;CAE/B,OADK,EAAa,KACX,EAAe,IAAI,CAAM,IAAI,YAAY,YADd;AAEtC;AAWA,eAAsB,EAAa,GAAyC;CACxE,MAAM,QAAQ,IAAI,EAAM,IAAI,CAAQ,CAAC;AACzC;AAQA,SAAgB,EAAiB,GAAkC;CAE/D,OADA,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;AAC1C"}
|
|
1
|
+
{"version":3,"file":"shard-cache.js","names":[],"sources":["../../src/icons/shard-cache.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\n\nimport { isDevBuild } from \"../utils/dev-mode\";\nimport { resolveIconAlias } from \"./alias\";\nimport { iconShards, type IconShard } from \"./generated/loaders\";\n\n/**\n * Slugs resolved so far, across every shard already fetched.\n *\n * Module-level and readable **synchronously**, which is the whole point: once a\n * page has rendered one icon, every other icon in that shard's range is already in\n * memory and paints on its first frame. A cache that could only be read from an\n * effect would flash a fallback for each new icon, which is the behavior\n * `lucide-react`'s own `DynamicIcon` has.\n */\nconst resolved = new Map<string, LucideIcon>();\n\n/** In-flight shard fetches, so N icons from one shard trigger one import. */\nconst inFlight = new Map<string, Promise<void>>();\n\n/**\n * Find the shard that owns a slug.\n *\n * The shards are contiguous, sorted ranges, so this is a binary search over their\n * lower bounds — 45 entries in the index rather than the 2000-entry slug→chunk map\n * that costs 120 KB in a main chunk.\n *\n * A slug sorting before the first range belongs to no shard, which is knowable\n * without any fetch: `\"0-not-an-icon\"` cannot be a lucide name.\n *\n * @param canonical - A canonical slug, aliases already resolved.\n * @returns The owning shard, or `undefined` when no range can hold it.\n */\nfunction shardFor(canonical: string): IconShard | undefined {\n if (canonical === \"\" || canonical < iconShards[0].from) return undefined;\n\n let low = 0;\n let high = iconShards.length - 1;\n while (low < high) {\n const mid = Math.ceil((low + high) / 2);\n if (iconShards[mid].from <= canonical) low = mid;\n else high = mid - 1;\n }\n return iconShards[low];\n}\n\n/**\n * Shard ids whose chunk actually arrived.\n *\n * Needed to tell \"still loading\" from \"no such icon\": until the shard arrives,\n * absence from `resolved` proves nothing. Only once the shard is in here does a\n * missing slug mean the name is genuinely wrong — which is what lets `Icon` warn\n * about a typo without also warning on every icon mid-flight.\n *\n * A shard that *failed* deliberately does not land here. Collapsing \"the chunk\n * 404'd\" into \"no such icon\" is what made a stale deploy look like a typo.\n */\nconst loadedShards = new Set<string>();\n\n/**\n * Shards whose fetch gave up, and when.\n *\n * The timestamp is what stops a permanent fallback: `useIcon` re-runs its effect\n * on every miss, so a shard is retried on a later render — after a cooldown, so a\n * chunk that is genuinely gone cannot turn into a request loop.\n */\nconst failedShards = new Map<string, number>();\n\n/**\n * Backoff before each retry, in milliseconds.\n *\n * Two retries, both fast, because the failure this exists for is a transient one:\n * a flaky connection, or a chunk whose CDN edge has not caught up. A 404 from a\n * deploy that rotated hashed filenames is *not* fixed by retrying — for that, the\n * error subscription is the signal, and the app reloads.\n */\nconst RETRY_DELAYS = [100, 400] as const;\n\n/** How long a failed shard is left alone before another render may retry it. */\nconst RETRY_COOLDOWN_MS = 10_000;\n\n/** What a shard failure reports to whoever subscribed. */\nexport interface IconLoadError {\n /** The shard key whose chunk could not be fetched. */\n shard: string;\n /** The slug whose render asked for it. */\n slug: string;\n /** Attempts made before giving up, retries included. */\n attempts: number;\n /** The last rejection from the dynamic import. */\n error: unknown;\n}\n\n/** Callbacks to run when a shard fetch gives up. */\nconst errorListeners = new Set<(detail: IconLoadError) => void>();\n\n/** Callbacks to run after a shard lands, so mounted `<Icon>`s re-render. */\nconst listeners = new Set<() => void>();\n\n/**\n * Make icon components resolvable by slug, with no provider and no plugin.\n *\n * Call it once from an entrypoint. The icons land in the same table a fetched\n * shard fills, so every `<Icon>` below — including one that renders before the\n * call, since registering notifies subscribers — resolves them synchronously and\n * never issues a request.\n *\n * This is the whole setup for a closed catalog: an admin panel with twenty known\n * icons pays two lines instead of a build plugin plus a provider. `IconProvider`\n * stays for what is genuinely tree-scoped — the `size`/`strokeWidth` defaults and\n * a registry that must override the global one for one subtree.\n *\n * A slug lucide does not ship is registered as-is, which is how an app adds its\n * own artwork to the same `<Icon name>` call site.\n *\n * @example\n * import { registerIcons } from \"tempest-react-sdk/icons\";\n * import { Save, Trash2 } from \"lucide-react\";\n *\n * registerIcons({ save: Save, \"trash-2\": Trash2 });\n *\n * @param icons - Slug → icon component. Deprecated slugs are stored under the\n * canonical name, so both spellings resolve.\n */\nexport function registerIcons(icons: Readonly<Record<string, LucideIcon>>): void {\n let changed = false;\n for (const [slug, icon] of Object.entries(icons)) {\n const canonical = resolveIconAlias(slug);\n if (resolved.get(canonical) === icon) continue;\n resolved.set(canonical, icon);\n changed = true;\n }\n if (!changed) return;\n for (const listener of listeners) listener();\n}\n\n/**\n * Read an icon out of the cache without triggering a fetch.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The icon component, or `undefined` when its shard is not loaded yet.\n */\nexport function peekIcon(slug: string): LucideIcon | undefined {\n return resolved.get(resolveIconAlias(slug));\n}\n\n/**\n * Load the shard that owns `slug`, if it is not loaded or loading already.\n *\n * Resolves without error for an unknown slug: a name that came from an API is\n * data, not a programming mistake, so the caller renders its fallback instead of\n * seeing an exception thrown mid-render.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns A promise that settles once the shard is in the cache.\n */\nexport function loadIcon(slug: string): Promise<void> {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return Promise.resolve();\n\n const shard = shardFor(canonical);\n if (!shard) return Promise.resolve();\n\n const pending = inFlight.get(shard.id);\n if (pending) return pending;\n\n const failedAt = failedShards.get(shard.id);\n if (failedAt !== undefined && performance.now() - failedAt < RETRY_COOLDOWN_MS) {\n return Promise.resolve();\n }\n\n const promise = fetchShard(shard, canonical).finally(() => {\n inFlight.delete(shard.id);\n for (const listener of listeners) listener();\n });\n inFlight.set(shard.id, promise);\n return promise;\n}\n\n/**\n * Fetch one shard, retrying a couple of times before giving up.\n *\n * Never rejects: an icon whose chunk did not arrive is a rendering outcome, not a\n * programming mistake, so the caller keeps showing its fallback. What it does\n * instead of swallowing the failure is record it — so `iconStatus` can say\n * `\"error\"` rather than lying with `\"missing\"` — and report it to whoever\n * subscribed.\n *\n * @param shard - The shard being fetched.\n * @param slug - The canonical slug whose render asked for it, for the report.\n * @returns A promise that settles once the attempts are done.\n */\nasync function fetchShard(shard: IconShard, slug: string): Promise<void> {\n let lastError: unknown;\n\n for (let attempt = 0; attempt <= RETRY_DELAYS.length; attempt += 1) {\n try {\n const mod = await shard.load();\n for (const [name, icon] of Object.entries(mod.default)) resolved.set(name, icon);\n loadedShards.add(shard.id);\n failedShards.delete(shard.id);\n return;\n } catch (error) {\n lastError = error;\n const backoff = RETRY_DELAYS[attempt];\n if (backoff === undefined) break;\n await sleep(backoff);\n }\n }\n\n failedShards.set(shard.id, performance.now());\n reportIconLoadError({\n shard: shard.id,\n slug,\n attempts: RETRY_DELAYS.length + 1,\n error: lastError,\n });\n}\n\n/**\n * Wait, as a promise.\n *\n * @param ms - Delay in milliseconds.\n * @returns A promise resolved after the delay.\n */\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n/**\n * Hand a shard failure to whoever is listening.\n *\n * With no subscriber the failure would be silent, which is the state this\n * replaces — so in a dev build it warns instead. An app that wired the\n * subscription up owns the reporting from then on and gets no console noise.\n *\n * @param detail - What failed.\n */\nfunction reportIconLoadError(detail: IconLoadError): void {\n if (errorListeners.size === 0) {\n if (isDevBuild()) warnShardFailure(detail);\n return;\n }\n for (const listener of errorListeners) listener(detail);\n}\n\nconst warnedShards = new Set<string>();\n\n/**\n * Warn once per shard that failed to load.\n *\n * Once, because every `<Icon>` under that letter re-triggers the path and a\n * warning per icon would bury the console.\n *\n * @param detail - What failed.\n */\nfunction warnShardFailure({ shard, slug, attempts }: IconLoadError): void {\n if (warnedShards.has(shard)) return;\n warnedShards.add(shard);\n console.warn(\n `[tempest-react-sdk] icon shard \"${shard}\" failed to load after ${attempts} attempts ` +\n `(first asked for by \"${slug}\"). The usual cause is a deploy that rotated hashed ` +\n `chunk names while this tab was open. Subscribe with \\`subscribeToIconErrors\\` to ` +\n `report it and reload.`,\n );\n}\n\n/**\n * Subscribe to shard fetches that gave up.\n *\n * The failure is routine in a long-lived tab: a deploy rotates hashed chunk\n * names, the old asset leaves the CDN, and the next icon that needs it 404s. That\n * used to end in a permanent fallback with no signal — nothing for the user,\n * nothing for observability. Subscribing is what turns it into both.\n *\n * @example\n * import { subscribeToIconErrors } from \"tempest-react-sdk/icons\";\n *\n * subscribeToIconErrors(({ shard, error }) => {\n * Sentry.captureException(error, { tags: { iconShard: shard } });\n * promptReloadForStaleChunks();\n * });\n *\n * @param listener - Called once per shard that gave up.\n * @returns An unsubscribe function.\n */\nexport function subscribeToIconErrors(listener: (detail: IconLoadError) => void): () => void {\n errorListeners.add(listener);\n return () => errorListeners.delete(listener);\n}\n\n/**\n * Whether a slug is ready, loading, unknown, or unreachable.\n *\n * `\"missing\"` is only reported once that is actually knowable: either lucide has\n * no icons under that initial letter, or the letter's shard **arrived** without\n * the slug in it. A shard that failed to load reports `\"error\"` instead — the two\n * used to collapse into `\"missing\"`, which turned a stale deploy into what looked\n * like a typo and made `Icon` warn about a name that is perfectly valid.\n *\n * @param slug - Any icon slug, canonical or deprecated.\n * @returns The slug's resolution state.\n */\nexport function iconStatus(slug: string): \"ready\" | \"loading\" | \"missing\" | \"error\" {\n const canonical = resolveIconAlias(slug);\n if (resolved.has(canonical)) return \"ready\";\n const shard = shardFor(canonical);\n if (!shard) return \"missing\";\n if (loadedShards.has(shard.id)) return \"missing\";\n return failedShards.has(shard.id) ? \"error\" : \"loading\";\n}\n\n/**\n * Warm the cache for slugs you know you are about to render.\n *\n * Useful right before opening a menu or a picker: the shards land while the user\n * is still reaching for it, so nothing flashes a fallback.\n *\n * @param slugs - Icon slugs to preload.\n * @returns A promise that settles when every needed shard is in the cache.\n */\nexport async function preloadIcons(slugs: readonly string[]): Promise<void> {\n await Promise.all(slugs.map(loadIcon));\n}\n\n/**\n * Subscribe to shard arrivals.\n *\n * @param listener - Called after each shard lands.\n * @returns An unsubscribe function.\n */\nexport function subscribeToIcons(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n"],"mappings":";;;;AAeA,IAAM,oBAAW,IAAI,IAAwB,GAGvC,oBAAW,IAAI,IAA2B;AAehD,SAAS,EAAS,GAA0C;CACxD,IAAI,MAAc,MAAM,IAAY,EAAW,EAAE,CAAC,MAAM;CAExD,IAAI,IAAM,GACN,IAAO,EAAW,SAAS;CAC/B,OAAO,IAAM,IAAM;EACf,IAAM,IAAM,KAAK,MAAM,IAAM,KAAQ,CAAC;EACtC,AAAI,EAAW,EAAI,CAAC,QAAQ,IAAW,IAAM,IACxC,IAAO,IAAM;CACtB;CACA,OAAO,EAAW;AACtB;AAaA,IAAM,oBAAe,IAAI,IAAY,GAS/B,oBAAe,IAAI,IAAoB,GAUvC,IAAe,CAAC,KAAK,GAAG,GAGxB,IAAoB,KAepB,oBAAiB,IAAI,IAAqC,GAG1D,oBAAY,IAAI,IAAgB;AA2BtC,SAAgB,EAAc,GAAmD;CAC7E,IAAI,IAAU;CACd,KAAK,IAAM,CAAC,GAAM,MAAS,OAAO,QAAQ,CAAK,GAAG;EAC9C,IAAM,IAAY,EAAiB,CAAI;EACnC,EAAS,IAAI,CAAS,MAAM,MAChC,EAAS,IAAI,GAAW,CAAI,GAC5B,IAAU;CACd;CACK,OACL,KAAK,IAAM,KAAY,GAAW,EAAS;AAC/C;AAQA,SAAgB,EAAS,GAAsC;CAC3D,OAAO,EAAS,IAAI,EAAiB,CAAI,CAAC;AAC9C;AAYA,SAAgB,EAAS,GAA6B;CAClD,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO,QAAQ,QAAQ;CAEpD,IAAM,IAAQ,EAAS,CAAS;CAChC,IAAI,CAAC,GAAO,OAAO,QAAQ,QAAQ;CAEnC,IAAM,IAAU,EAAS,IAAI,EAAM,EAAE;CACrC,IAAI,GAAS,OAAO;CAEpB,IAAM,IAAW,EAAa,IAAI,EAAM,EAAE;CAC1C,IAAI,MAAa,KAAA,KAAa,YAAY,IAAI,IAAI,IAAW,GACzD,OAAO,QAAQ,QAAQ;CAG3B,IAAM,IAAU,EAAW,GAAO,CAAS,CAAC,CAAC,cAAc;EACvD,EAAS,OAAO,EAAM,EAAE;EACxB,KAAK,IAAM,KAAY,GAAW,EAAS;CAC/C,CAAC;CAED,OADA,EAAS,IAAI,EAAM,IAAI,CAAO,GACvB;AACX;AAeA,eAAe,EAAW,GAAkB,GAA6B;CACrE,IAAI;CAEJ,KAAK,IAAI,IAAU,GAAG,KAAW,EAAa,QAAQ,KAAW,GAC7D,IAAI;EACA,IAAM,IAAM,MAAM,EAAM,KAAK;EAC7B,KAAK,IAAM,CAAC,GAAM,MAAS,OAAO,QAAQ,EAAI,OAAO,GAAG,EAAS,IAAI,GAAM,CAAI;EAE/E,AADA,EAAa,IAAI,EAAM,EAAE,GACzB,EAAa,OAAO,EAAM,EAAE;EAC5B;CACJ,SAAS,GAAO;EACZ,IAAY;EACZ,IAAM,IAAU,EAAa;EAC7B,IAAI,MAAY,KAAA,GAAW;EAC3B,MAAM,EAAM,CAAO;CACvB;CAIJ,AADA,EAAa,IAAI,EAAM,IAAI,YAAY,IAAI,CAAC,GAC5C,EAAoB;EAChB,OAAO,EAAM;EACb;EACA,UAAU,EAAa,SAAS;EAChC,OAAO;CACX,CAAC;AACL;AAQA,SAAS,EAAM,GAA2B;CACtC,OAAO,IAAI,SAAS,MAAY,WAAW,GAAS,CAAE,CAAC;AAC3D;AAWA,SAAS,EAAoB,GAA6B;CACtD,IAAI,EAAe,SAAS,GAAG;EAC3B,AAAI,EAAW,KAAG,EAAiB,CAAM;EACzC;CACJ;CACA,KAAK,IAAM,KAAY,GAAgB,EAAS,CAAM;AAC1D;AAEA,IAAM,oBAAe,IAAI,IAAY;AAUrC,SAAS,EAAiB,EAAE,UAAO,SAAM,eAAiC;CAClE,EAAa,IAAI,CAAK,MAC1B,EAAa,IAAI,CAAK,GACtB,QAAQ,KACJ,mCAAmC,EAAM,yBAAyB,EAAS,iCAC/C,EAAK,2JAGrC;AACJ;AAqBA,SAAgB,EAAsB,GAAuD;CAEzF,OADA,EAAe,IAAI,CAAQ,SACd,EAAe,OAAO,CAAQ;AAC/C;AAcA,SAAgB,EAAW,GAAyD;CAChF,IAAM,IAAY,EAAiB,CAAI;CACvC,IAAI,EAAS,IAAI,CAAS,GAAG,OAAO;CACpC,IAAM,IAAQ,EAAS,CAAS;CAGhC,OAFI,CAAC,KACD,EAAa,IAAI,EAAM,EAAE,IAAU,YAChC,EAAa,IAAI,EAAM,EAAE,IAAI,UAAU;AAClD;AAWA,eAAsB,EAAa,GAAyC;CACxE,MAAM,QAAQ,IAAI,EAAM,IAAI,CAAQ,CAAC;AACzC;AAQA,SAAgB,EAAiB,GAAkC;CAE/D,OADA,EAAU,IAAI,CAAQ,SACT,EAAU,OAAO,CAAQ;AAC1C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const e=require("./normalize-icon-name.cjs"),t=require("./is-icon-name.cjs");var n=`Ícone inexistente. Use um slug do lucide, em kebab-case.`;function r(n,r){if(n.trim()!==``)return t.isIconName(e.normalizeIconName(n))?void 0:r??`Ícone inexistente. Use um slug do lucide, em kebab-case.`}exports.DEFAULT_ICON_PICKER_MESSAGE=n,exports.validateIconName=r;
|
|
2
|
+
//# sourceMappingURL=validate-icon-name.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-icon-name.cjs","names":[],"sources":["../../src/icons/validate-icon-name.ts"],"sourcesContent":["import { isIconName } from \"./is-icon-name\";\nimport { normalizeIconName } from \"./normalize-icon-name\";\n\n/** The default message for a slug lucide does not ship. */\nexport const DEFAULT_ICON_PICKER_MESSAGE =\n \"Ícone inexistente. Use um slug do lucide, em kebab-case.\";\n\n/**\n * Validate an icon slug the way `IconPicker` does.\n *\n * Its own module rather than living next to the component: a file that exports\n * both a component and other values breaks Fast Refresh in a consuming dev\n * server, which is what `react-refresh/only-export-components` guards and why\n * `icon-context.ts` is split off from `IconProvider` too.\n *\n * Exported because the picker is not the only place a slug is checked: a form\n * built on react-hook-form or zod validates before submitting, and duplicating\n * the rule there is how the two drift apart.\n *\n * Empty passes — \"no icon chosen\" is a `required` question, not a spelling one,\n * and conflating them would make the field impossible to clear.\n *\n * @example\n * // react-hook-form\n * register(\"icon\", { validate: (value) => validateIconName(value) ?? true });\n *\n * @example\n * // zod\n * z.string().refine((value) => !validateIconName(value), { message: \"Ícone inexistente\" });\n *\n * @param value - The slug to check, in any spelling the picker accepts.\n * @param message - Overrides the default message.\n * @returns The message when the slug does not exist, `undefined` when it is fine.\n */\nexport function validateIconName(value: string, message?: string): string | undefined {\n if (value.trim() === \"\") return undefined;\n return isIconName(normalizeIconName(value))\n ? undefined\n : (message ?? DEFAULT_ICON_PICKER_MESSAGE);\n}\n"],"mappings":"6EAIA,IAAa,EACT,2DA6BJ,SAAgB,EAAiB,EAAe,EAAsC,CAC9E,KAAM,KAAK,IAAM,GACrB,OAAO,EAAA,WAAW,EAAA,kBAAkB,CAAK,CAAC,EACpC,IAAA,GACC,GAAA,0DACX"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { normalizeIconName as e } from "./normalize-icon-name.js";
|
|
2
|
+
import { isIconName as t } from "./is-icon-name.js";
|
|
3
|
+
//#region src/icons/validate-icon-name.ts
|
|
4
|
+
var n = "Ícone inexistente. Use um slug do lucide, em kebab-case.";
|
|
5
|
+
function r(n, r) {
|
|
6
|
+
if (n.trim() !== "") return t(e(n)) ? void 0 : r ?? "Ícone inexistente. Use um slug do lucide, em kebab-case.";
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as DEFAULT_ICON_PICKER_MESSAGE, r as validateIconName };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=validate-icon-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-icon-name.js","names":[],"sources":["../../src/icons/validate-icon-name.ts"],"sourcesContent":["import { isIconName } from \"./is-icon-name\";\nimport { normalizeIconName } from \"./normalize-icon-name\";\n\n/** The default message for a slug lucide does not ship. */\nexport const DEFAULT_ICON_PICKER_MESSAGE =\n \"Ícone inexistente. Use um slug do lucide, em kebab-case.\";\n\n/**\n * Validate an icon slug the way `IconPicker` does.\n *\n * Its own module rather than living next to the component: a file that exports\n * both a component and other values breaks Fast Refresh in a consuming dev\n * server, which is what `react-refresh/only-export-components` guards and why\n * `icon-context.ts` is split off from `IconProvider` too.\n *\n * Exported because the picker is not the only place a slug is checked: a form\n * built on react-hook-form or zod validates before submitting, and duplicating\n * the rule there is how the two drift apart.\n *\n * Empty passes — \"no icon chosen\" is a `required` question, not a spelling one,\n * and conflating them would make the field impossible to clear.\n *\n * @example\n * // react-hook-form\n * register(\"icon\", { validate: (value) => validateIconName(value) ?? true });\n *\n * @example\n * // zod\n * z.string().refine((value) => !validateIconName(value), { message: \"Ícone inexistente\" });\n *\n * @param value - The slug to check, in any spelling the picker accepts.\n * @param message - Overrides the default message.\n * @returns The message when the slug does not exist, `undefined` when it is fine.\n */\nexport function validateIconName(value: string, message?: string): string | undefined {\n if (value.trim() === \"\") return undefined;\n return isIconName(normalizeIconName(value))\n ? undefined\n : (message ?? DEFAULT_ICON_PICKER_MESSAGE);\n}\n"],"mappings":";;;AAIA,IAAa,IACT;AA6BJ,SAAgB,EAAiB,GAAe,GAAsC;CAC9E,MAAM,KAAK,MAAM,IACrB,OAAO,EAAW,EAAkB,CAAK,CAAC,IACpC,KAAA,IACC,KAAA;AACX"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the legacy `virtual:tempest-icons` module id.
|
|
3
|
+
*
|
|
4
|
+
* Kept for apps that already import that spelling. New code should import
|
|
5
|
+
* `tempest-react-sdk/icons/virtual` instead, which is a real module in the
|
|
6
|
+
* package: it needs no ambient declaration, and it resolves outside a Vite build
|
|
7
|
+
* with the plugin — to an empty registry — rather than failing to resolve at all.
|
|
8
|
+
*
|
|
9
|
+
* Reaching this declaration takes no setup: `dist/icons.d.ts` and
|
|
10
|
+
* `dist/icons-virtual.d.ts` both reference it, so importing anything from
|
|
11
|
+
* `tempest-react-sdk/icons` is enough.
|
|
12
|
+
*/
|
|
13
|
+
declare module "virtual:tempest-icons" {
|
|
14
|
+
import type { LucideIcon } from "lucide-react";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Every icon slug found as a literal in the scanned source, mapped to the
|
|
18
|
+
* statically imported lucide component.
|
|
19
|
+
*
|
|
20
|
+
* Pass it to `IconProvider`'s `registry` prop. Slugs resolved from here cost
|
|
21
|
+
* no extra request — they are ordinary imports the bundler tree-shakes.
|
|
22
|
+
*/
|
|
23
|
+
export const staticIcons: Record<string, LucideIcon>;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons-virtual.cjs","names":[],"sources":["../src/icons/virtual.ts"],"sourcesContent":["import type { IconRegistry } from \"./icon-context\";\n\n/**\n * The static icon registry, empty until a build plugin fills it in.\n *\n * `tempestIcons()` resolves this module id to the table it generated from the\n * slugs your source mentions. Every other runner — vitest without the plugin,\n * `tsx`, a Storybook builder, a Node script that imports a component — gets this\n * stub, so the import always resolves and `<Icon>` falls back to fetching shards.\n *\n * That fallback is why the stub exists: before it, an app that imported the\n * registry could not be loaded outside a Vite build with the plugin installed,\n * and the failure was the whole module graph refusing to resolve rather than one\n * icon going missing.\n *\n * @example\n * import { IconProvider } from \"tempest-react-sdk/icons\";\n * import { staticIcons } from \"tempest-react-sdk/icons/virtual\";\n *\n * <IconProvider registry={staticIcons}>\n * <App />\n * </IconProvider>\n */\nexport const staticIcons: IconRegistry = {};\n"],"mappings":"mEAuBA,IAAa,EAA4B,CAAC"}
|
package/dist/icons-virtual.d.ts
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
1
|
+
/// <reference path="./icons-virtual-id.d.ts" />
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
|
|
4
|
+
/** A slug → icon-component table, as produced by `createIconRegistry`. */
|
|
5
|
+
declare type IconRegistry = Readonly<Record<string, LucideIcon>>;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The static icon registry, empty until a build plugin fills it in.
|
|
9
|
+
*
|
|
10
|
+
* `tempestIcons()` resolves this module id to the table it generated from the
|
|
11
|
+
* slugs your source mentions. Every other runner — vitest without the plugin,
|
|
12
|
+
* `tsx`, a Storybook builder, a Node script that imports a component — gets this
|
|
13
|
+
* stub, so the import always resolves and `<Icon>` falls back to fetching shards.
|
|
14
|
+
*
|
|
15
|
+
* That fallback is why the stub exists: before it, an app that imported the
|
|
16
|
+
* registry could not be loaded outside a Vite build with the plugin installed,
|
|
17
|
+
* and the failure was the whole module graph refusing to resolve rather than one
|
|
18
|
+
* icon going missing.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* import { IconProvider } from "tempest-react-sdk/icons";
|
|
22
|
+
* import { staticIcons } from "tempest-react-sdk/icons/virtual";
|
|
23
|
+
*
|
|
24
|
+
* <IconProvider registry={staticIcons}>
|
|
25
|
+
* <App />
|
|
26
|
+
* </IconProvider>
|
|
27
|
+
*/
|
|
28
|
+
export declare const staticIcons: IconRegistry;
|
|
29
|
+
|
|
30
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons-virtual.js","names":[],"sources":["../src/icons/virtual.ts"],"sourcesContent":["import type { IconRegistry } from \"./icon-context\";\n\n/**\n * The static icon registry, empty until a build plugin fills it in.\n *\n * `tempestIcons()` resolves this module id to the table it generated from the\n * slugs your source mentions. Every other runner — vitest without the plugin,\n * `tsx`, a Storybook builder, a Node script that imports a component — gets this\n * stub, so the import always resolves and `<Icon>` falls back to fetching shards.\n *\n * That fallback is why the stub exists: before it, an app that imported the\n * registry could not be loaded outside a Vite build with the plugin installed,\n * and the failure was the whole module graph refusing to resolve rather than one\n * icon going missing.\n *\n * @example\n * import { IconProvider } from \"tempest-react-sdk/icons\";\n * import { staticIcons } from \"tempest-react-sdk/icons/virtual\";\n *\n * <IconProvider registry={staticIcons}>\n * <App />\n * </IconProvider>\n */\nexport const staticIcons: IconRegistry = {};\n"],"mappings":";AAuBA,IAAa,IAA4B,CAAC"}
|
package/dist/icons.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./icons/generated/aliases.cjs"),t=require("./icons/generated/icon-names.cjs"),n=require("./icons/icon-context.cjs"),r=require("./icons/
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./icons/generated/aliases.cjs"),t=require("./icons/generated/icon-names.cjs"),n=require("./icons/icon-context.cjs"),r=require("./icons/alias.cjs"),i=require("./icons/normalize-icon-name.cjs"),a=require("./icons/shard-cache.cjs"),o=require("./icons/use-icon.cjs"),s=require("./icons/Icon.cjs"),c=require("./icons/is-icon-name.cjs"),l=require("./icons/validate-icon-name.cjs"),u=require("./icons/IconPicker.cjs"),d=require("./icons/IconProvider.cjs"),f=require("./icons/material-symbols.cjs");exports.DEFAULT_ICON_PICKER_MESSAGE=l.DEFAULT_ICON_PICKER_MESSAGE,exports.Icon=s.Icon,exports.IconPicker=u.IconPicker,exports.IconProvider=d.IconProvider,exports.MATERIAL_SYMBOL_FALLBACK=f.MATERIAL_SYMBOL_FALLBACK,exports.createIconRegistry=n.createIconRegistry,exports.fromMaterialSymbol=f.fromMaterialSymbol,exports.iconAliases=e.iconAliases,exports.iconNames=t.iconNames,exports.iconStatus=a.iconStatus,exports.isIconName=c.isIconName,exports.loadIcon=a.loadIcon,exports.materialToLucide=f.materialToLucide,exports.normalizeIconName=i.normalizeIconName,exports.peekIcon=a.peekIcon,exports.preloadIcons=a.preloadIcons,exports.registerIcons=a.registerIcons,exports.resolveIconAlias=r.resolveIconAlias,exports.subscribeToIconErrors=a.subscribeToIconErrors,exports.useIcon=o.useIcon,exports.validateIconName=l.validateIconName;
|
package/dist/icons.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference path="./icons-virtual-id.d.ts" />
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
1
3
|
import { LucideIcon } from 'lucide-react';
|
|
2
4
|
import { ReactNode } from 'react';
|
|
3
5
|
import { SVGProps } from 'react';
|
|
@@ -20,6 +22,9 @@ import { SVGProps } from 'react';
|
|
|
20
22
|
*/
|
|
21
23
|
export declare function createIconRegistry(icons: Record<string, LucideIcon>): IconRegistry;
|
|
22
24
|
|
|
25
|
+
/** The default message for a slug lucide does not ship. */
|
|
26
|
+
export declare const DEFAULT_ICON_PICKER_MESSAGE = "\u00CDcone inexistente. Use um slug do lucide, em kebab-case.";
|
|
27
|
+
|
|
23
28
|
/**
|
|
24
29
|
* Translate a Material Symbols code into a lucide slug, always returning one.
|
|
25
30
|
*
|
|
@@ -56,11 +61,16 @@ export declare function fromMaterialSymbol(code: string | null | undefined, fall
|
|
|
56
61
|
* An unknown slug renders `fallback` (nothing, by default) and warns in dev only
|
|
57
62
|
* — it never throws, because a bad name from an API must not take down the tree.
|
|
58
63
|
*
|
|
64
|
+
* `name` is normalized before the lookup, so a stored `icon_code` renders whether
|
|
65
|
+
* it was written `shopping_cart`, `" Save"` or under a slug lucide has since
|
|
66
|
+
* deprecated. Pass `normalize={false}` for a strict lookup.
|
|
67
|
+
*
|
|
59
68
|
* @example
|
|
60
69
|
* <Icon name="save" size={18} />
|
|
61
70
|
* <Icon name={row.iconSlug} fallback={<span className="skeleton" />} />
|
|
71
|
+
* <Icon icon={Wrench} size={18} />
|
|
62
72
|
*/
|
|
63
|
-
export declare function Icon({ name, size, strokeWidth, fallback, ...rest }: IconProps): ReactNode;
|
|
73
|
+
export declare function Icon({ name, icon, size, strokeWidth, fallback, normalize, ...rest }: IconProps): ReactNode;
|
|
64
74
|
|
|
65
75
|
/**
|
|
66
76
|
* Lucide's 257 deprecated slugs, mapped to the canonical slug that
|
|
@@ -72,6 +82,72 @@ export declare function Icon({ name, size, strokeWidth, fallback, ...rest }: Ico
|
|
|
72
82
|
*/
|
|
73
83
|
export declare const iconAliases: Record<string, string>;
|
|
74
84
|
|
|
85
|
+
declare interface IconBaseProps extends Omit<SVGProps<SVGSVGElement>, "ref" | "name"> {
|
|
86
|
+
/** Width and height in px. Defaults to the provider's value, then lucide's `24`. */
|
|
87
|
+
size?: number | string;
|
|
88
|
+
/** Stroke width. Defaults to the provider's value, then lucide's `2`. */
|
|
89
|
+
strokeWidth?: number;
|
|
90
|
+
/**
|
|
91
|
+
* Rendered while the icon's shard is in flight, and for a slug that does not
|
|
92
|
+
* exist at all. Defaults to nothing.
|
|
93
|
+
*
|
|
94
|
+
* Pass a same-sized placeholder when the surrounding layout would otherwise
|
|
95
|
+
* shift. Note that a slug already in the registry or the cache never renders
|
|
96
|
+
* this — it resolves during render.
|
|
97
|
+
*/
|
|
98
|
+
fallback?: ReactNode;
|
|
99
|
+
/**
|
|
100
|
+
* Clean up `name` before looking it up. Default `true`.
|
|
101
|
+
*
|
|
102
|
+
* A stored `icon_code` arrives dirty — `shopping_cart`, `" Save"`, a slug
|
|
103
|
+
* lucide deprecated two releases ago — and normalizing is what makes those
|
|
104
|
+
* render instead of falling back. `false` asks for a strict lookup, for the
|
|
105
|
+
* case where you want an unexpected spelling to be visible rather than
|
|
106
|
+
* quietly repaired.
|
|
107
|
+
*
|
|
108
|
+
* Ignored when the icon is passed as a component.
|
|
109
|
+
*/
|
|
110
|
+
normalize?: boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Address the icon by component, for a call site that already imported it.
|
|
115
|
+
*
|
|
116
|
+
* No lookup, no registry, no shard: the component is rendered as passed. It is
|
|
117
|
+
* there so a screen mixing literal icons with data-driven ones can keep using one
|
|
118
|
+
* component instead of alternating between `<Icon name>` and `<Wrench />`, which
|
|
119
|
+
* is what makes the shared `size`/`strokeWidth` defaults apply to both.
|
|
120
|
+
*/
|
|
121
|
+
declare interface IconByComponentProps extends IconBaseProps {
|
|
122
|
+
icon: LucideIcon;
|
|
123
|
+
name?: never;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Address the icon by slug — the reason this component exists.
|
|
128
|
+
*
|
|
129
|
+
* The slug is typed as the union of every name lucide ships, so a typo is a
|
|
130
|
+
* compile error, while still accepting a plain `string` for the case that
|
|
131
|
+
* motivates the whole module: a name arriving from an API, a CMS or a config
|
|
132
|
+
* table.
|
|
133
|
+
*/
|
|
134
|
+
declare interface IconByNameProps extends IconBaseProps {
|
|
135
|
+
name: IconName | (string & {});
|
|
136
|
+
icon?: never;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/** What a shard failure reports to whoever subscribed. */
|
|
140
|
+
export declare interface IconLoadError {
|
|
141
|
+
/** The shard key whose chunk could not be fetched. */
|
|
142
|
+
shard: string;
|
|
143
|
+
/** The slug whose render asked for it. */
|
|
144
|
+
slug: string;
|
|
145
|
+
/** Attempts made before giving up, retries included. */
|
|
146
|
+
attempts: number;
|
|
147
|
+
/** The last rejection from the dynamic import. */
|
|
148
|
+
error: unknown;
|
|
149
|
+
}
|
|
150
|
+
|
|
75
151
|
/**
|
|
76
152
|
* Every icon slug lucide ships, as a union of string literals.
|
|
77
153
|
*
|
|
@@ -89,30 +165,68 @@ export declare type IconName = "a-arrow-down" | "a-arrow-up" | "a-large-small" |
|
|
|
89
165
|
*/
|
|
90
166
|
export declare const iconNames: readonly IconName[];
|
|
91
167
|
|
|
92
|
-
|
|
168
|
+
/**
|
|
169
|
+
* An icon field: native autocomplete over every lucide slug, plus a preview.
|
|
170
|
+
*
|
|
171
|
+
* Every panel that lets someone choose an icon was rewriting this — filter the
|
|
172
|
+
* list, cap the suggestions, build the `<datalist>`, and block submit when the
|
|
173
|
+
* typed name does not exist. That last step is the one that matters: without it
|
|
174
|
+
* an invalid value reaches the database and only shows up later as a missing icon
|
|
175
|
+
* on every screen that renders the record.
|
|
176
|
+
*
|
|
177
|
+
* Validation is wired to the **native** form: the input carries a custom validity
|
|
178
|
+
* message, so a plain `<form>` refuses to submit and the browser points at the
|
|
179
|
+
* field. `validateIconName` is exported for react-hook-form and zod.
|
|
180
|
+
*
|
|
181
|
+
* Built on `<datalist>` rather than a custom listbox on purpose: keyboard,
|
|
182
|
+
* screen-reader and mobile behaviour come from the platform, and the component
|
|
183
|
+
* stays small enough that its cost is the slug list it has to import — ~7 KB
|
|
184
|
+
* brotli, which only a picker pays.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* const [icon, setIcon] = useState("");
|
|
188
|
+
*
|
|
189
|
+
* <form onSubmit={save}>
|
|
190
|
+
* <IconPicker value={icon} onChange={setIcon} required />
|
|
191
|
+
* <button type="submit">Salvar</button>
|
|
192
|
+
* </form>
|
|
193
|
+
*/
|
|
194
|
+
export declare function IconPicker({ value, onChange, limit, previewSize, invalidMessage, emptyPreview, className, ...rest }: IconPickerProps): ReactNode;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @tempest-limits props-count — value/onChange are the field, limit/placeholder
|
|
198
|
+
* the suggestion list, and previewSize/invalidMessage the two things a form
|
|
199
|
+
* around it needs to restyle or translate.
|
|
200
|
+
*/
|
|
201
|
+
export declare interface IconPickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "list" | "type"> {
|
|
202
|
+
/** The chosen slug. Always canonical — see `onChange`. */
|
|
203
|
+
value: string;
|
|
93
204
|
/**
|
|
94
|
-
*
|
|
205
|
+
* Fires with the **canonical** slug on every keystroke.
|
|
95
206
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
207
|
+
* Legacy spellings are normalized on the way out (`Shopping_Cart` →
|
|
208
|
+
* `shopping-cart`, `alert-circle` → `circle-alert`), so what a form stores is
|
|
209
|
+
* what `<Icon>` resolves without further cleanup.
|
|
99
210
|
*/
|
|
100
|
-
|
|
101
|
-
/** Width and height in px. Defaults to the provider's value, then lucide's `24`. */
|
|
102
|
-
size?: number | string;
|
|
103
|
-
/** Stroke width. Defaults to the provider's value, then lucide's `2`. */
|
|
104
|
-
strokeWidth?: number;
|
|
211
|
+
onChange: (slug: string) => void;
|
|
105
212
|
/**
|
|
106
|
-
*
|
|
107
|
-
* exist at all. Defaults to nothing.
|
|
213
|
+
* How many suggestions to render. Default `40`.
|
|
108
214
|
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
215
|
+
* There are 2024 slugs, and building every one as an `<option>` on each
|
|
216
|
+
* keystroke freezes the datalist — which is the reason this prop exists rather
|
|
217
|
+
* than a "show everything" default.
|
|
112
218
|
*/
|
|
113
|
-
|
|
219
|
+
limit?: number;
|
|
220
|
+
/** Size of the preview glyph, in px. Default `20`. */
|
|
221
|
+
previewSize?: number;
|
|
222
|
+
/** Overrides the message shown for a slug that does not exist. */
|
|
223
|
+
invalidMessage?: string;
|
|
224
|
+
/** Rendered in the preview box while nothing valid is chosen. */
|
|
225
|
+
emptyPreview?: ReactNode;
|
|
114
226
|
}
|
|
115
227
|
|
|
228
|
+
export declare type IconProps = IconByNameProps | IconByComponentProps;
|
|
229
|
+
|
|
116
230
|
/**
|
|
117
231
|
* Provide a static icon registry and shared `<Icon>` defaults to a subtree.
|
|
118
232
|
*
|
|
@@ -151,16 +265,18 @@ export declare interface IconProviderProps {
|
|
|
151
265
|
export declare type IconRegistry = Readonly<Record<string, LucideIcon>>;
|
|
152
266
|
|
|
153
267
|
/**
|
|
154
|
-
* Whether a slug is ready,
|
|
268
|
+
* Whether a slug is ready, loading, unknown, or unreachable.
|
|
155
269
|
*
|
|
156
270
|
* `"missing"` is only reported once that is actually knowable: either lucide has
|
|
157
|
-
* no icons under that initial letter, or the letter's shard
|
|
158
|
-
*
|
|
271
|
+
* no icons under that initial letter, or the letter's shard **arrived** without
|
|
272
|
+
* the slug in it. A shard that failed to load reports `"error"` instead — the two
|
|
273
|
+
* used to collapse into `"missing"`, which turned a stale deploy into what looked
|
|
274
|
+
* like a typo and made `Icon` warn about a name that is perfectly valid.
|
|
159
275
|
*
|
|
160
276
|
* @param slug - Any icon slug, canonical or deprecated.
|
|
161
277
|
* @returns The slug's resolution state.
|
|
162
278
|
*/
|
|
163
|
-
export declare function iconStatus(slug: string): "ready" | "loading" | "missing";
|
|
279
|
+
export declare function iconStatus(slug: string): "ready" | "loading" | "missing" | "error";
|
|
164
280
|
|
|
165
281
|
/**
|
|
166
282
|
* Narrow an arbitrary string to a known icon slug.
|
|
@@ -216,28 +332,77 @@ export declare const MATERIAL_SYMBOL_FALLBACK: IconName;
|
|
|
216
332
|
* empty screen: a handful of codes collide by accident, so roughly one row in
|
|
217
333
|
* ten draws the right icon and the bug reads as "some icons went missing".
|
|
218
334
|
*
|
|
219
|
-
* **
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* **
|
|
335
|
+
* **Still not the full vocabulary.** Material Symbols publishes ~6100 names and
|
|
336
|
+
* almost none of them will ever appear in an `icon_code` of ours, so this grows
|
|
337
|
+
* on demand, one hand-written pair at a time — a map generated by name
|
|
338
|
+
* heuristics gets it badly wrong, starting with `build`, which is a wrench in
|
|
339
|
+
* Material Symbols and nothing to do with construction.
|
|
340
|
+
*
|
|
341
|
+
* **How the codes were chosen.** Two lots, merged. The first was the trades seed
|
|
342
|
+
* the bridge started as. The second is the head of Material Symbols' own
|
|
343
|
+
* published popularity ranking (`fonts.google.com/metadata/icons`), which is
|
|
344
|
+
* measured usage rather than a guess at which names a seed will contain — every
|
|
345
|
+
* key was checked to exist in that vocabulary before landing.
|
|
346
|
+
*
|
|
347
|
+
* **Where the two lots disagreed**, six keys, the tie went to whichever mapping
|
|
348
|
+
* keeps two distinct Material Symbols names distinct in lucide: `error` →
|
|
349
|
+
* `circle-alert` because `cancel` already owns `circle-x`; `payments` →
|
|
350
|
+
* `banknote` because `account_balance_wallet` already owns `wallet`;
|
|
351
|
+
* `receipt_long` → `receipt-text` because `receipt` already owns `receipt`;
|
|
352
|
+
* `construction` → itself because `engineering` already owns `hard-hat`; and
|
|
353
|
+
* `today` → `calendar` with `event` → `calendar-days`, splitting the generic
|
|
354
|
+
* calendar names from the dated one.
|
|
355
|
+
*
|
|
356
|
+
* Every target is checked mechanically against the slug list by
|
|
357
|
+
* `material-symbols.test.ts`, so a pair pointing at a name lucide does not ship
|
|
358
|
+
* — or at one it has since deprecated — fails the suite instead of reaching a
|
|
359
|
+
* grid. What no test can check is whether the *chosen* icon is the right
|
|
360
|
+
* metaphor, which is why pairs go in by hand.
|
|
361
|
+
*
|
|
362
|
+
* **Approximations, deliberate and not one-to-one** (the full list lives in
|
|
363
|
+
* `docs/icons.md`):
|
|
226
364
|
*
|
|
227
365
|
* - `plumbing` → `shower-head`, because lucide has no pipe.
|
|
228
366
|
* - `build`, `handyman` and `hardware` all land on `wrench` — Material Symbols
|
|
229
367
|
* distinguishes the tools, lucide does not.
|
|
230
368
|
* - `pedal_bike`, `two_wheeler` and `delivery_dining` all land on `bike`.
|
|
369
|
+
* - `dentistry` → `face-slightly-smiling`, since lucide ships no tooth.
|
|
370
|
+
* - `iron` → `shirt` and `cleaning_services` → `spray-can`: the activity, not
|
|
371
|
+
* the implement.
|
|
372
|
+
* - `roofing` → `house`, the same glyph as `home`, because lucide has no roof.
|
|
231
373
|
*
|
|
232
|
-
* The
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
374
|
+
* The identity pairs are here on purpose. Their names happen to match in both
|
|
375
|
+
* vocabularies, so they already render today — leaving them out would send them
|
|
376
|
+
* to {@link MATERIAL_SYMBOL_FALLBACK} and make this bridge a regression for
|
|
377
|
+
* exactly the codes that used to work.
|
|
236
378
|
*
|
|
237
379
|
* @see fromMaterialSymbol — the lookup you normally call.
|
|
238
380
|
*/
|
|
239
381
|
export declare const materialToLucide: Readonly<Record<string, IconName>>;
|
|
240
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Clean up an icon code and resolve it to the slug lucide actually ships.
|
|
385
|
+
*
|
|
386
|
+
* Every backend that stores an `icon_code` stores it dirty: `snake_case` left over
|
|
387
|
+
* from an old form, a capital or a stray space from a hand-typed value, and slugs
|
|
388
|
+
* lucide has since deprecated. Each app was writing the same three-step cleanup
|
|
389
|
+
* before rendering — trim, lower-case, `_` → `-`, then `resolveIconAlias` — which
|
|
390
|
+
* is code that should not exist outside the SDK.
|
|
391
|
+
*
|
|
392
|
+
* Note that this does **not** check whether the result is a real icon: the point is
|
|
393
|
+
* to produce the canonical spelling, and deciding what to do with an unknown name
|
|
394
|
+
* belongs to the caller. Pair it with `isIconName` when you need that answer, or
|
|
395
|
+
* let `<Icon>` render its `fallback`.
|
|
396
|
+
*
|
|
397
|
+
* @example
|
|
398
|
+
* normalizeIconName(" Alert_Circle "); // "circle-alert"
|
|
399
|
+
* normalizeIconName("shopping_cart"); // "shopping-cart"
|
|
400
|
+
*
|
|
401
|
+
* @param code - Any stored icon code.
|
|
402
|
+
* @returns The canonical, lucide-spelled slug.
|
|
403
|
+
*/
|
|
404
|
+
export declare function normalizeIconName(code: string): string;
|
|
405
|
+
|
|
241
406
|
/**
|
|
242
407
|
* Read an icon out of the cache without triggering a fetch.
|
|
243
408
|
*
|
|
@@ -257,18 +422,73 @@ export declare function peekIcon(slug: string): LucideIcon | undefined;
|
|
|
257
422
|
*/
|
|
258
423
|
export declare function preloadIcons(slugs: readonly string[]): Promise<void>;
|
|
259
424
|
|
|
425
|
+
/**
|
|
426
|
+
* Make icon components resolvable by slug, with no provider and no plugin.
|
|
427
|
+
*
|
|
428
|
+
* Call it once from an entrypoint. The icons land in the same table a fetched
|
|
429
|
+
* shard fills, so every `<Icon>` below — including one that renders before the
|
|
430
|
+
* call, since registering notifies subscribers — resolves them synchronously and
|
|
431
|
+
* never issues a request.
|
|
432
|
+
*
|
|
433
|
+
* This is the whole setup for a closed catalog: an admin panel with twenty known
|
|
434
|
+
* icons pays two lines instead of a build plugin plus a provider. `IconProvider`
|
|
435
|
+
* stays for what is genuinely tree-scoped — the `size`/`strokeWidth` defaults and
|
|
436
|
+
* a registry that must override the global one for one subtree.
|
|
437
|
+
*
|
|
438
|
+
* A slug lucide does not ship is registered as-is, which is how an app adds its
|
|
439
|
+
* own artwork to the same `<Icon name>` call site.
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* import { registerIcons } from "tempest-react-sdk/icons";
|
|
443
|
+
* import { Save, Trash2 } from "lucide-react";
|
|
444
|
+
*
|
|
445
|
+
* registerIcons({ save: Save, "trash-2": Trash2 });
|
|
446
|
+
*
|
|
447
|
+
* @param icons - Slug → icon component. Deprecated slugs are stored under the
|
|
448
|
+
* canonical name, so both spellings resolve.
|
|
449
|
+
*/
|
|
450
|
+
export declare function registerIcons(icons: Readonly<Record<string, LucideIcon>>): void;
|
|
451
|
+
|
|
260
452
|
/**
|
|
261
453
|
* Map a slug to the canonical slug that owns the icon.
|
|
262
454
|
*
|
|
263
455
|
* Lucide keeps 257 deprecated aliases (`alert-circle` → `circle-alert`), and a
|
|
264
456
|
* slug persisted in a database years ago is exactly the case this feature exists
|
|
265
|
-
* for, so an alias must keep resolving after a lucide bump renames it.
|
|
457
|
+
* for, so an alias must keep resolving after a lucide bump renames it. Resolution
|
|
458
|
+
* happens before the shard lookup, since only canonical slugs are sharded.
|
|
459
|
+
*
|
|
460
|
+
* Its own module, not part of `shard-cache`: everything that merely *names* an
|
|
461
|
+
* icon needs this — `normalizeIconName`, `validateIconName`, a form checking a
|
|
462
|
+
* value before submit — and none of that needs the shard loader index. Sharing a
|
|
463
|
+
* module made a validator that never renders anything drag in all 45 shard
|
|
464
|
+
* modules.
|
|
266
465
|
*
|
|
267
466
|
* @param slug - Any icon slug, canonical or deprecated.
|
|
268
467
|
* @returns The canonical slug.
|
|
269
468
|
*/
|
|
270
469
|
export declare function resolveIconAlias(slug: string): string;
|
|
271
470
|
|
|
471
|
+
/**
|
|
472
|
+
* Subscribe to shard fetches that gave up.
|
|
473
|
+
*
|
|
474
|
+
* The failure is routine in a long-lived tab: a deploy rotates hashed chunk
|
|
475
|
+
* names, the old asset leaves the CDN, and the next icon that needs it 404s. That
|
|
476
|
+
* used to end in a permanent fallback with no signal — nothing for the user,
|
|
477
|
+
* nothing for observability. Subscribing is what turns it into both.
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* import { subscribeToIconErrors } from "tempest-react-sdk/icons";
|
|
481
|
+
*
|
|
482
|
+
* subscribeToIconErrors(({ shard, error }) => {
|
|
483
|
+
* Sentry.captureException(error, { tags: { iconShard: shard } });
|
|
484
|
+
* promptReloadForStaleChunks();
|
|
485
|
+
* });
|
|
486
|
+
*
|
|
487
|
+
* @param listener - Called once per shard that gave up.
|
|
488
|
+
* @returns An unsubscribe function.
|
|
489
|
+
*/
|
|
490
|
+
export declare function subscribeToIconErrors(listener: (detail: IconLoadError) => void): () => void;
|
|
491
|
+
|
|
272
492
|
/**
|
|
273
493
|
* Resolve an icon slug to its component.
|
|
274
494
|
*
|
|
@@ -286,4 +506,33 @@ export declare function resolveIconAlias(slug: string): string;
|
|
|
286
506
|
*/
|
|
287
507
|
export declare function useIcon(slug: string | undefined): LucideIcon | undefined;
|
|
288
508
|
|
|
509
|
+
/**
|
|
510
|
+
* Validate an icon slug the way `IconPicker` does.
|
|
511
|
+
*
|
|
512
|
+
* Its own module rather than living next to the component: a file that exports
|
|
513
|
+
* both a component and other values breaks Fast Refresh in a consuming dev
|
|
514
|
+
* server, which is what `react-refresh/only-export-components` guards and why
|
|
515
|
+
* `icon-context.ts` is split off from `IconProvider` too.
|
|
516
|
+
*
|
|
517
|
+
* Exported because the picker is not the only place a slug is checked: a form
|
|
518
|
+
* built on react-hook-form or zod validates before submitting, and duplicating
|
|
519
|
+
* the rule there is how the two drift apart.
|
|
520
|
+
*
|
|
521
|
+
* Empty passes — "no icon chosen" is a `required` question, not a spelling one,
|
|
522
|
+
* and conflating them would make the field impossible to clear.
|
|
523
|
+
*
|
|
524
|
+
* @example
|
|
525
|
+
* // react-hook-form
|
|
526
|
+
* register("icon", { validate: (value) => validateIconName(value) ?? true });
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* // zod
|
|
530
|
+
* z.string().refine((value) => !validateIconName(value), { message: "Ícone inexistente" });
|
|
531
|
+
*
|
|
532
|
+
* @param value - The slug to check, in any spelling the picker accepts.
|
|
533
|
+
* @param message - Overrides the default message.
|
|
534
|
+
* @returns The message when the slug does not exist, `undefined` when it is fine.
|
|
535
|
+
*/
|
|
536
|
+
export declare function validateIconName(value: string, message?: string): string | undefined;
|
|
537
|
+
|
|
289
538
|
export { }
|
package/dist/icons.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { iconAliases as e } from "./icons/generated/aliases.js";
|
|
2
2
|
import { iconNames as t } from "./icons/generated/icon-names.js";
|
|
3
3
|
import { createIconRegistry as n } from "./icons/icon-context.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
4
|
+
import { resolveIconAlias as r } from "./icons/alias.js";
|
|
5
|
+
import { normalizeIconName as i } from "./icons/normalize-icon-name.js";
|
|
6
|
+
import { iconStatus as a, loadIcon as o, peekIcon as s, preloadIcons as c, registerIcons as l, subscribeToIconErrors as u } from "./icons/shard-cache.js";
|
|
7
|
+
import { useIcon as d } from "./icons/use-icon.js";
|
|
8
|
+
import { Icon as f } from "./icons/Icon.js";
|
|
9
|
+
import { isIconName as p } from "./icons/is-icon-name.js";
|
|
10
|
+
import { DEFAULT_ICON_PICKER_MESSAGE as m, validateIconName as h } from "./icons/validate-icon-name.js";
|
|
11
|
+
import { IconPicker as g } from "./icons/IconPicker.js";
|
|
12
|
+
import { IconProvider as _ } from "./icons/IconProvider.js";
|
|
13
|
+
import { MATERIAL_SYMBOL_FALLBACK as v, fromMaterialSymbol as y, materialToLucide as b } from "./icons/material-symbols.js";
|
|
14
|
+
export { m as DEFAULT_ICON_PICKER_MESSAGE, f as Icon, g as IconPicker, _ as IconProvider, v as MATERIAL_SYMBOL_FALLBACK, n as createIconRegistry, y as fromMaterialSymbol, e as iconAliases, t as iconNames, a as iconStatus, p as isIconName, o as loadIcon, b as materialToLucide, i as normalizeIconName, s as peekIcon, c as preloadIcons, l as registerIcons, r as resolveIconAlias, u as subscribeToIconErrors, d as useIcon, h as validateIconName };
|