tempest-react-sdk 0.48.0 → 0.50.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/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 +99 -95
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/use-dev-warnings.cjs +1 -1
- package/dist/components/DataTable/use-dev-warnings.cjs.map +1 -1
- package/dist/components/DataTable/use-dev-warnings.js +5 -3
- 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/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 +11 -16
- 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 +12 -15
- 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 +18 -6
- 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 +125 -118
- 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 +2 -2
- 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/material-symbols.cjs +1 -1
- package/dist/icons/material-symbols.cjs.map +1 -1
- package/dist/icons/material-symbols.js +136 -5
- package/dist/icons/material-symbols.js.map +1 -1
- package/dist/icons.d.ts +17 -5
- 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/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 +381 -143
- package/dist/tempest-react-sdk.js +143 -143
- 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/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-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 +2 -2
- 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 +1 -1
package/dist/http/retry.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","names":[],"sources":["../../src/http/retry.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"retry.js","names":[],"sources":["../../src/http/retry.ts"],"sourcesContent":["import { isApiError, isRetriableStatus } from \"./errors\";\n\nexport interface RetryOptions {\n /** Max attempts (including the first). Default: 3. */\n retries?: number;\n /** Initial backoff in ms. Doubles each attempt, capped at `maxDelay`. Default: 300. */\n initialDelay?: number;\n /** Maximum delay between attempts. Default: 10_000. */\n maxDelay?: number;\n /**\n * Honor a `Retry-After` hint on the thrown error (`error.retryAfter`, in\n * seconds — populated by {@link createApiClient} on `429`/`503`). When\n * present it overrides the exponential backoff for that attempt. The value\n * is capped at `maxDelay`. Default: true.\n */\n respectRetryAfter?: boolean;\n /**\n * Return false to stop retrying for a specific error.\n *\n * Default: replay anything that is not a recognisable API error — a\n * transport failure has no status to judge — and, for one that is, only the\n * statuses {@link isRetriableStatus} accepts. A `403` on an admin-only\n * endpoint and a `404` for a deleted record are the server's final answer;\n * repeating them spends the caller's time to show the same error twice.\n */\n shouldRetry?: (error: unknown, attempt: number) => boolean;\n /** Called before each retry with the upcoming delay. */\n onRetry?: (info: { attempt: number; delay: number; error: unknown }) => void;\n /** Cancel pending retries. */\n signal?: AbortSignal;\n}\n\n/**\n * The default {@link RetryOptions.shouldRetry}.\n *\n * Permissive about what it cannot classify and strict about what it can: an\n * error with no API shape may well be a transport failure, while an API error\n * carrying a deliberate refusal will answer the same on every attempt.\n *\n * @param error - Whatever the attempt threw.\n * @returns Whether the helper should try again.\n */\nfunction defaultShouldRetry(error: unknown): boolean {\n return !isApiError(error) || isRetriableStatus(error.status);\n}\n\nfunction wait(ms: number, signal?: AbortSignal): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n if (signal?.aborted) {\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n return;\n }\n const timer = setTimeout(resolve, ms);\n signal?.addEventListener(\n \"abort\",\n () => {\n clearTimeout(timer);\n reject(new DOMException(\"Aborted\", \"AbortError\"));\n },\n { once: true },\n );\n });\n}\n\n/**\n * Run `factory()` with exponential backoff. Each attempt awaits an\n * increasing delay capped at `maxDelay`. Throws the last error if every\n * attempt fails.\n *\n * @example\n * const data = await retry(() => api.get(\"/flaky\"), { retries: 5 });\n */\nexport async function retry<T>(factory: () => Promise<T>, options: RetryOptions = {}): Promise<T> {\n const {\n retries = 3,\n initialDelay = 300,\n maxDelay = 10_000,\n respectRetryAfter = true,\n shouldRetry = defaultShouldRetry,\n onRetry,\n signal,\n } = options;\n\n let attempt = 0;\n let lastError: unknown;\n\n while (attempt < retries) {\n if (signal?.aborted) throw new DOMException(\"Aborted\", \"AbortError\");\n try {\n return await factory();\n } catch (error) {\n lastError = error;\n attempt += 1;\n if (attempt >= retries || !shouldRetry(error, attempt)) {\n throw error;\n }\n const retryAfter =\n respectRetryAfter &&\n typeof (error as { retryAfter?: unknown })?.retryAfter === \"number\"\n ? (error as { retryAfter: number }).retryAfter * 1000\n : null;\n const delay =\n retryAfter !== null\n ? Math.min(retryAfter, maxDelay)\n : Math.min(initialDelay * 2 ** (attempt - 1), maxDelay);\n onRetry?.({ attempt, delay, error });\n await wait(delay, signal);\n }\n }\n\n throw lastError;\n}\n"],"mappings":";;AA0CA,SAAS,EAAmB,GAAyB;CACjD,OAAO,CAAC,EAAW,CAAK,KAAK,EAAkB,EAAM,MAAM;AAC/D;AAEA,SAAS,EAAK,GAAY,GAAqC;CAC3D,OAAO,IAAI,SAAe,GAAS,MAAW;EAC1C,IAAI,GAAQ,SAAS;GACjB,EAAO,IAAI,aAAa,WAAW,YAAY,CAAC;GAChD;EACJ;EACA,IAAM,IAAQ,WAAW,GAAS,CAAE;EACpC,GAAQ,iBACJ,eACM;GAEF,AADA,aAAa,CAAK,GAClB,EAAO,IAAI,aAAa,WAAW,YAAY,CAAC;EACpD,GACA,EAAE,MAAM,GAAK,CACjB;CACJ,CAAC;AACL;AAUA,eAAsB,EAAS,GAA2B,IAAwB,CAAC,GAAe;CAC9F,IAAM,EACF,aAAU,GACV,kBAAe,KACf,cAAW,KACX,uBAAoB,IACpB,iBAAc,GACd,YACA,cACA,GAEA,IAAU,GACV;CAEJ,OAAO,IAAU,IAAS;EACtB,IAAI,GAAQ,SAAS,MAAM,IAAI,aAAa,WAAW,YAAY;EACnE,IAAI;GACA,OAAO,MAAM,EAAQ;EACzB,SAAS,GAAO;GAGZ,IAFA,IAAY,GACZ,KAAW,GACP,KAAW,KAAW,CAAC,EAAY,GAAO,CAAO,GACjD,MAAM;GAEV,IAAM,IACF,KACA,OAAQ,GAAoC,cAAe,WACpD,EAAiC,aAAa,MAC/C,MACJ,IAGI,KAAK,IAFX,MAAe,OAEA,IAAe,MAAM,IAAU,KAD/B,GACmC,CAAQ;GAE9D,AADA,IAAU;IAAE;IAAS;IAAO;GAAM,CAAC,GACnC,MAAM,EAAK,GAAO,CAAM;EAC5B;CACJ;CAEA,MAAM;AACV"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./describe-api-error.cjs"),t=require("../i18n/I18nProvider.cjs");let n=require("react");function r(t,n,r){let i=t?.(n
|
|
1
|
+
const e=require("./describe-api-error.cjs"),t=require("../i18n/I18nProvider.cjs");let n=require("react");function r(t,n,r){let i=e.DEFAULT_API_ERROR_STRINGS[r];return t?.(n,void 0,{default:i})??i}function i(){let i=t.useOptionalI18n()?.t;return(0,n.useCallback)((t,n)=>e.describeApiError(t,n,{offline:r(i,e.API_ERROR_OFFLINE_KEY,`offline`),validation:r(i,e.API_ERROR_VALIDATION_KEY,`validation`)}),[i])}exports.useDescribeApiError=i;
|
|
2
2
|
//# sourceMappingURL=use-describe-api-error.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-describe-api-error.cjs","names":[],"sources":["../../src/http/use-describe-api-error.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport { useOptionalI18n } from \"../i18n/I18nProvider\";\nimport {\n API_ERROR_OFFLINE_KEY,\n API_ERROR_VALIDATION_KEY,\n DEFAULT_API_ERROR_STRINGS,\n describeApiError,\n} from \"./describe-api-error\";\n\n/**\n * {@link describeApiError} with its fixed sentences resolved through the active\n * `I18nProvider`.\n *\n * The funnel is not duplicated — this hook only supplies the strings and calls\n * the pure function. Which is also why both exist: the pure one runs in an\n * interceptor or a logger, where there is no React tree to read a context from,\n * and this one runs in a component without every caller passing translations\n * down by hand.\n *\n * Works with no provider at all: i18n is opt-in in this SDK, so a missing\n * provider — or a catalog that never defined `tempest.error.offline` — falls\n * back to the pt-BR default rather than crashing or printing the raw key.\n *\n * @example\n * const describe = useDescribeApiError();\n * const { mutate } = useMutation({\n * mutationFn: save,\n * onError: (error) => toast(describe(error, t(\"orders.saveFailed\"))),\n * });\n *\n * @returns A stable `(error, fallback) => string` function.\n */\n/**\n * Look one sentence up in the active catalog, falling back to the pt-BR default.\n *\n * `t`
|
|
1
|
+
{"version":3,"file":"use-describe-api-error.cjs","names":[],"sources":["../../src/http/use-describe-api-error.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport type { I18n } from \"../i18n/create-i18n\";\nimport { useOptionalI18n } from \"../i18n/I18nProvider\";\nimport {\n API_ERROR_OFFLINE_KEY,\n API_ERROR_VALIDATION_KEY,\n DEFAULT_API_ERROR_STRINGS,\n describeApiError,\n} from \"./describe-api-error\";\n\n/**\n * {@link describeApiError} with its fixed sentences resolved through the active\n * `I18nProvider`.\n *\n * The funnel is not duplicated — this hook only supplies the strings and calls\n * the pure function. Which is also why both exist: the pure one runs in an\n * interceptor or a logger, where there is no React tree to read a context from,\n * and this one runs in a component without every caller passing translations\n * down by hand.\n *\n * Works with no provider at all: i18n is opt-in in this SDK, so a missing\n * provider — or a catalog that never defined `tempest.error.offline` — falls\n * back to the pt-BR default rather than crashing or printing the raw key.\n *\n * @example\n * const describe = useDescribeApiError();\n * const { mutate } = useMutation({\n * mutationFn: save,\n * onError: (error) => toast(describe(error, t(\"orders.saveFailed\"))),\n * });\n *\n * @returns A stable `(error, fallback) => string` function.\n */\n/**\n * Look one sentence up in the active catalog, falling back to the pt-BR default.\n *\n * The miss is the i18n layer's answer, through `t`'s `default`. It used to be\n * re-derived here by comparing the result against the key that had just been\n * passed in, which is wrong for a catalog that maps a key to itself —\n * `{ \"tempest.error.offline\": \"tempest.error.offline\" }`, which is what a\n * machine-generated or placeholder catalog produces. There the app's own\n * translation lost to the pt-BR default. Only the catalog's owner can answer\n * \"was this key defined\", and `lookup()` already knows.\n *\n * @param translate - The active catalog's `t`, if any provider is mounted.\n * @param key - The translation key to look up.\n * @param fallbackKey - Which {@link DEFAULT_API_ERROR_STRINGS} entry to use on a miss.\n * @returns The sentence to hand to `describeApiError`.\n */\nfunction resolve(\n translate: I18n[\"t\"] | undefined,\n key: string,\n fallbackKey: keyof typeof DEFAULT_API_ERROR_STRINGS,\n): string {\n const fallback = DEFAULT_API_ERROR_STRINGS[fallbackKey];\n return translate?.(key, undefined, { default: fallback }) ?? fallback;\n}\n\nexport function useDescribeApiError(): (error: unknown, fallback: string) => string {\n const i18n = useOptionalI18n();\n const translate = i18n?.t;\n\n return useCallback(\n (error: unknown, fallback: string) => {\n return describeApiError(error, fallback, {\n offline: resolve(translate, API_ERROR_OFFLINE_KEY, \"offline\"),\n validation: resolve(translate, API_ERROR_VALIDATION_KEY, \"validation\"),\n });\n },\n [translate],\n );\n}\n"],"mappings":"yGAkDA,SAAS,EACL,EACA,EACA,EACM,CACN,IAAM,EAAW,EAAA,0BAA0B,GAC3C,OAAO,IAAY,EAAK,IAAA,GAAW,CAAE,QAAS,CAAS,CAAC,GAAK,CACjE,CAEA,SAAgB,GAAoE,CAEhF,IAAM,EADO,EAAA,gBACK,CAAA,EAAM,EAExB,OAAA,EAAO,EAAA,YAAA,EACF,EAAgB,IACN,EAAA,iBAAiB,EAAO,EAAU,CACrC,QAAS,EAAQ,EAAW,EAAA,sBAAuB,SAAS,EAC5D,WAAY,EAAQ,EAAW,EAAA,yBAA0B,YAAY,CACzE,CAAC,EAEL,CAAC,CAAS,CACd,CACJ"}
|
|
@@ -3,8 +3,8 @@ import { useOptionalI18n as i } from "../i18n/I18nProvider.js";
|
|
|
3
3
|
import { useCallback as a } from "react";
|
|
4
4
|
//#region src/http/use-describe-api-error.ts
|
|
5
5
|
function o(e, t, r) {
|
|
6
|
-
let i =
|
|
7
|
-
return
|
|
6
|
+
let i = n[r];
|
|
7
|
+
return e?.(t, void 0, { default: i }) ?? i;
|
|
8
8
|
}
|
|
9
9
|
function s() {
|
|
10
10
|
let n = i()?.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-describe-api-error.js","names":[],"sources":["../../src/http/use-describe-api-error.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport { useOptionalI18n } from \"../i18n/I18nProvider\";\nimport {\n API_ERROR_OFFLINE_KEY,\n API_ERROR_VALIDATION_KEY,\n DEFAULT_API_ERROR_STRINGS,\n describeApiError,\n} from \"./describe-api-error\";\n\n/**\n * {@link describeApiError} with its fixed sentences resolved through the active\n * `I18nProvider`.\n *\n * The funnel is not duplicated — this hook only supplies the strings and calls\n * the pure function. Which is also why both exist: the pure one runs in an\n * interceptor or a logger, where there is no React tree to read a context from,\n * and this one runs in a component without every caller passing translations\n * down by hand.\n *\n * Works with no provider at all: i18n is opt-in in this SDK, so a missing\n * provider — or a catalog that never defined `tempest.error.offline` — falls\n * back to the pt-BR default rather than crashing or printing the raw key.\n *\n * @example\n * const describe = useDescribeApiError();\n * const { mutate } = useMutation({\n * mutationFn: save,\n * onError: (error) => toast(describe(error, t(\"orders.saveFailed\"))),\n * });\n *\n * @returns A stable `(error, fallback) => string` function.\n */\n/**\n * Look one sentence up in the active catalog, falling back to the pt-BR default.\n *\n * `t`
|
|
1
|
+
{"version":3,"file":"use-describe-api-error.js","names":[],"sources":["../../src/http/use-describe-api-error.ts"],"sourcesContent":["import { useCallback } from \"react\";\n\nimport type { I18n } from \"../i18n/create-i18n\";\nimport { useOptionalI18n } from \"../i18n/I18nProvider\";\nimport {\n API_ERROR_OFFLINE_KEY,\n API_ERROR_VALIDATION_KEY,\n DEFAULT_API_ERROR_STRINGS,\n describeApiError,\n} from \"./describe-api-error\";\n\n/**\n * {@link describeApiError} with its fixed sentences resolved through the active\n * `I18nProvider`.\n *\n * The funnel is not duplicated — this hook only supplies the strings and calls\n * the pure function. Which is also why both exist: the pure one runs in an\n * interceptor or a logger, where there is no React tree to read a context from,\n * and this one runs in a component without every caller passing translations\n * down by hand.\n *\n * Works with no provider at all: i18n is opt-in in this SDK, so a missing\n * provider — or a catalog that never defined `tempest.error.offline` — falls\n * back to the pt-BR default rather than crashing or printing the raw key.\n *\n * @example\n * const describe = useDescribeApiError();\n * const { mutate } = useMutation({\n * mutationFn: save,\n * onError: (error) => toast(describe(error, t(\"orders.saveFailed\"))),\n * });\n *\n * @returns A stable `(error, fallback) => string` function.\n */\n/**\n * Look one sentence up in the active catalog, falling back to the pt-BR default.\n *\n * The miss is the i18n layer's answer, through `t`'s `default`. It used to be\n * re-derived here by comparing the result against the key that had just been\n * passed in, which is wrong for a catalog that maps a key to itself —\n * `{ \"tempest.error.offline\": \"tempest.error.offline\" }`, which is what a\n * machine-generated or placeholder catalog produces. There the app's own\n * translation lost to the pt-BR default. Only the catalog's owner can answer\n * \"was this key defined\", and `lookup()` already knows.\n *\n * @param translate - The active catalog's `t`, if any provider is mounted.\n * @param key - The translation key to look up.\n * @param fallbackKey - Which {@link DEFAULT_API_ERROR_STRINGS} entry to use on a miss.\n * @returns The sentence to hand to `describeApiError`.\n */\nfunction resolve(\n translate: I18n[\"t\"] | undefined,\n key: string,\n fallbackKey: keyof typeof DEFAULT_API_ERROR_STRINGS,\n): string {\n const fallback = DEFAULT_API_ERROR_STRINGS[fallbackKey];\n return translate?.(key, undefined, { default: fallback }) ?? fallback;\n}\n\nexport function useDescribeApiError(): (error: unknown, fallback: string) => string {\n const i18n = useOptionalI18n();\n const translate = i18n?.t;\n\n return useCallback(\n (error: unknown, fallback: string) => {\n return describeApiError(error, fallback, {\n offline: resolve(translate, API_ERROR_OFFLINE_KEY, \"offline\"),\n validation: resolve(translate, API_ERROR_VALIDATION_KEY, \"validation\"),\n });\n },\n [translate],\n );\n}\n"],"mappings":";;;;AAkDA,SAAS,EACL,GACA,GACA,GACM;CACN,IAAM,IAAW,EAA0B;CAC3C,OAAO,IAAY,GAAK,KAAA,GAAW,EAAE,SAAS,EAAS,CAAC,KAAK;AACjE;AAEA,SAAgB,IAAoE;CAEhF,IAAM,IADO,EACK,CAAA,EAAM;CAExB,OAAO,GACF,GAAgB,MACN,EAAiB,GAAO,GAAU;EACrC,SAAS,EAAQ,GAAW,GAAuB,SAAS;EAC5D,YAAY,EAAQ,GAAW,GAA0B,YAAY;CACzE,CAAC,GAEL,CAAC,CAAS,CACd;AACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e,t){return t?e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r===void 0?`{${n}}`:String(r)}):e}function t(e,t,n,r){let i=e[t]?.[r];if(i!==void 0)return i;if(n){let t=e[n]?.[r];if(t!==void 0)return t}return null}function n(r){let{locale:i,fallbackLocale:a=null,messages:o}=r;function s(n,r){let
|
|
1
|
+
function e(e,t){return t?e.replace(/\{(\w+)\}/g,(e,n)=>{let r=t[n];return r===void 0?`{${n}}`:String(r)}):e}function t(e,t,n,r){let i=e[t]?.[r];if(i!==void 0)return i;if(n){let t=e[n]?.[r];if(t!==void 0)return t}return null}function n(r){let{locale:i,fallbackLocale:a=null,messages:o}=r;function s(n,r,s){let c=t(o,i,a,n)??s?.default;return c===void 0?n:e(c,r)}function c(n,r,s,c){let l=t(o,i,a,`${n}${r===1?`_one`:`_other`}`)??t(o,i,a,n)??c?.default;return l===void 0?n:e(l,{count:r,...s??{}})}function l(e,t){return new Intl.NumberFormat(i,t).format(e)}function u(e,t){let n=typeof e==`string`?new Date(e):e;return Number.isNaN(n.getTime())?``:new Intl.DateTimeFormat(i,t).format(n)}return{locale:i,fallbackLocale:a,t:s,plural:c,formatNumber:l,formatDate:u,withLocale:e=>n({locale:e,fallbackLocale:a??void 0,messages:o})}}exports.createI18n=n;
|
|
2
2
|
//# sourceMappingURL=create-i18n.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-i18n.cjs","names":[],"sources":["../../src/i18n/create-i18n.ts"],"sourcesContent":["export type Messages = Record<string, string>;\nexport type Catalog = Record<string, Messages>;\nexport type InterpolationValues = Record<string, string | number>;\n\nexport interface CreateI18nOptions {\n /** Initial locale. */\n locale: string;\n /** Fallback locale used when a key is missing in the active locale. */\n fallbackLocale?: string;\n /** Catalog `{ [locale]: { [key]: \"...\" } }`. */\n messages: Catalog;\n}\n\nexport interface I18n {\n /** Currently active locale. */\n locale: string;\n /** Fallback locale (or `null` when not configured). */\n fallbackLocale: string | null;\n /**\n * Translate `key`, interpolating `{name}` placeholders from `params`.\n * Falls back to the configured fallback locale, then to the key itself.\n */\n t: (key: string, params?: InterpolationValues) => string;\n /**\n * Plural-aware translation. Tries `${key}_one` for `count === 1` and\n * `${key}_other` otherwise, with `{count}` available for interpolation.\n */\n plural: (key: string
|
|
1
|
+
{"version":3,"file":"create-i18n.cjs","names":[],"sources":["../../src/i18n/create-i18n.ts"],"sourcesContent":["export type Messages = Record<string, string>;\nexport type Catalog = Record<string, Messages>;\nexport type InterpolationValues = Record<string, string | number>;\n\nexport interface CreateI18nOptions {\n /** Initial locale. */\n locale: string;\n /** Fallback locale used when a key is missing in the active locale. */\n fallbackLocale?: string;\n /** Catalog `{ [locale]: { [key]: \"...\" } }`. */\n messages: Catalog;\n}\n\n/** Per-call options for {@link I18n.t} and {@link I18n.plural}. */\nexport interface TranslateOptions {\n /**\n * Text to use when the catalog defines neither the key nor its fallback.\n *\n * Without this, a miss returns the key, and a caller that wants its own text\n * instead has to *detect* the miss — which from the outside means comparing\n * the result against the key it just passed in. That heuristic is wrong for a\n * catalog that legitimately maps a key to itself, and it is what every\n * translatable string the SDK ships would otherwise have to copy.\n *\n * Interpolated like any other message, so a default carries `{placeholders}`\n * too and is not second-class.\n */\n default?: string;\n}\n\nexport interface I18n {\n /** Currently active locale. */\n locale: string;\n /** Fallback locale (or `null` when not configured). */\n fallbackLocale: string | null;\n /**\n * Translate `key`, interpolating `{name}` placeholders from `params`.\n * Falls back to the configured fallback locale, then to `options.default`,\n * then to the key itself.\n */\n t: (key: string, params?: InterpolationValues, options?: TranslateOptions) => string;\n /**\n * Plural-aware translation. Tries `${key}_one` for `count === 1` and\n * `${key}_other` otherwise, with `{count}` available for interpolation.\n * Falls back to `options.default`, then to the key itself.\n */\n plural: (\n key: string,\n count: number,\n params?: InterpolationValues,\n options?: TranslateOptions,\n ) => string;\n /** Format a number using `Intl.NumberFormat` on the active locale. */\n formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;\n /** Format a Date using `Intl.DateTimeFormat` on the active locale. */\n formatDate: (value: Date | string, options?: Intl.DateTimeFormatOptions) => string;\n /** Build a new `I18n` instance pointing at a different locale. */\n withLocale: (locale: string) => I18n;\n}\n\nfunction interpolate(template: string, params?: InterpolationValues): string {\n if (!params) return template;\n return template.replace(/\\{(\\w+)\\}/g, (_match, name: string) => {\n const value = params[name];\n return value === undefined ? `{${name}}` : String(value);\n });\n}\n\nfunction lookup(\n catalog: Catalog,\n locale: string,\n fallback: string | null,\n key: string,\n): string | null {\n const direct = catalog[locale]?.[key];\n if (direct !== undefined) return direct;\n if (fallback) {\n const fallbackValue = catalog[fallback]?.[key];\n if (fallbackValue !== undefined) return fallbackValue;\n }\n return null;\n}\n\n/**\n * Create an i18n object with translation, pluralization and Intl helpers.\n *\n * The catalog is a plain `{ [locale]: { [key]: \"...\" } }` map — bring your\n * own keys, namespaces, or nested-key conventions. The SDK does not enforce\n * a schema so you can plug it into any string-loading pipeline.\n *\n * @example\n * const i18n = createI18n({\n * locale: \"pt-BR\",\n * fallbackLocale: \"en\",\n * messages: {\n * \"pt-BR\": {\n * \"greet\": \"Olá, {name}\",\n * \"alos_one\": \"{count} Alô\",\n * \"alos_other\": \"{count} Alôs\",\n * },\n * \"en\": { greet: \"Hi, {name}\", alos_one: \"{count} Alo\", alos_other: \"{count} Alos\" },\n * },\n * });\n * i18n.t(\"greet\", { name: \"Mau\" }); // \"Olá, Mau\"\n * i18n.plural(\"alos\", 3); // \"3 Alôs\"\n *\n * @example\n * // A key the catalog does not define, with text to show instead of the key.\n * i18n.t(\"cart.empty\", undefined, { default: \"Seu carrinho está vazio\" });\n */\nexport function createI18n(options: CreateI18nOptions): I18n {\n const { locale, fallbackLocale = null, messages } = options;\n\n function t(key: string, params?: InterpolationValues, options?: TranslateOptions): string {\n const template = lookup(messages, locale, fallbackLocale, key) ?? options?.default;\n if (template === undefined) return key;\n return interpolate(template, params);\n }\n\n function plural(\n key: string,\n count: number,\n params?: InterpolationValues,\n options?: TranslateOptions,\n ): string {\n const suffix = count === 1 ? \"_one\" : \"_other\";\n const template =\n lookup(messages, locale, fallbackLocale, `${key}${suffix}`) ??\n lookup(messages, locale, fallbackLocale, key) ??\n options?.default;\n if (template === undefined) return key;\n return interpolate(template, { count, ...(params ?? {}) });\n }\n\n function formatNumber(value: number, opts?: Intl.NumberFormatOptions): string {\n return new Intl.NumberFormat(locale, opts).format(value);\n }\n\n function formatDate(value: Date | string, opts?: Intl.DateTimeFormatOptions): string {\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return new Intl.DateTimeFormat(locale, opts).format(date);\n }\n\n return {\n locale,\n fallbackLocale,\n t,\n plural,\n formatNumber,\n formatDate,\n withLocale: (nextLocale) =>\n createI18n({\n locale: nextLocale,\n fallbackLocale: fallbackLocale ?? undefined,\n messages,\n }),\n };\n}\n"],"mappings":"AA4DA,SAAS,EAAY,EAAkB,EAAsC,CAEzE,OADK,EACE,EAAS,QAAQ,cAAe,EAAQ,IAAiB,CAC5D,IAAM,EAAQ,EAAO,GACrB,OAAO,IAAU,IAAA,GAAY,IAAI,EAAK,GAAK,OAAO,CAAK,CAC3D,CAAC,EAJmB,CAKxB,CAEA,SAAS,EACL,EACA,EACA,EACA,EACa,CACb,IAAM,EAAS,EAAQ,EAAO,GAAG,GACjC,GAAI,IAAW,IAAA,GAAW,OAAO,EACjC,GAAI,EAAU,CACV,IAAM,EAAgB,EAAQ,EAAS,GAAG,GAC1C,GAAI,IAAkB,IAAA,GAAW,OAAO,CAC5C,CACA,OAAO,IACX,CA6BA,SAAgB,EAAW,EAAkC,CACzD,GAAM,CAAE,SAAQ,iBAAiB,KAAM,YAAa,EAEpD,SAAS,EAAE,EAAa,EAA8B,EAAoC,CACtF,IAAM,EAAW,EAAO,EAAU,EAAQ,EAAgB,CAAG,GAAK,GAAS,QAE3E,OADI,IAAa,IAAA,GAAkB,EAC5B,EAAY,EAAU,CAAM,CACvC,CAEA,SAAS,EACL,EACA,EACA,EACA,EACM,CAEN,IAAM,EACF,EAAO,EAAU,EAAQ,EAAgB,GAAG,IAFjC,IAAU,EAAI,OAAS,UAEwB,GAC1D,EAAO,EAAU,EAAQ,EAAgB,CAAG,GAC5C,GAAS,QAEb,OADI,IAAa,IAAA,GAAkB,EAC5B,EAAY,EAAU,CAAE,QAAO,GAAI,GAAU,CAAC,CAAG,CAAC,CAC7D,CAEA,SAAS,EAAa,EAAe,EAAyC,CAC1E,OAAO,IAAI,KAAK,aAAa,EAAQ,CAAI,CAAC,CAAC,OAAO,CAAK,CAC3D,CAEA,SAAS,EAAW,EAAsB,EAA2C,CACjF,IAAM,EAAO,OAAO,GAAU,SAAW,IAAI,KAAK,CAAK,EAAI,EAE3D,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,EAAU,GAClC,IAAI,KAAK,eAAe,EAAQ,CAAI,CAAC,CAAC,OAAO,CAAI,CAC5D,CAEA,MAAO,CACH,SACA,iBACA,IACA,SACA,eACA,aACA,WAAa,GACT,EAAW,CACP,OAAQ,EACR,eAAgB,GAAkB,IAAA,GAClC,UACJ,CAAC,CACT,CACJ"}
|
package/dist/i18n/create-i18n.js
CHANGED
|
@@ -16,13 +16,13 @@ function t(e, t, n, r) {
|
|
|
16
16
|
}
|
|
17
17
|
function n(r) {
|
|
18
18
|
let { locale: i, fallbackLocale: a = null, messages: o } = r;
|
|
19
|
-
function s(n, r) {
|
|
20
|
-
let
|
|
21
|
-
return
|
|
19
|
+
function s(n, r, s) {
|
|
20
|
+
let c = t(o, i, a, n) ?? s?.default;
|
|
21
|
+
return c === void 0 ? n : e(c, r);
|
|
22
22
|
}
|
|
23
|
-
function c(n, r, s) {
|
|
24
|
-
let
|
|
25
|
-
return
|
|
23
|
+
function c(n, r, s, c) {
|
|
24
|
+
let l = t(o, i, a, `${n}${r === 1 ? "_one" : "_other"}`) ?? t(o, i, a, n) ?? c?.default;
|
|
25
|
+
return l === void 0 ? n : e(l, {
|
|
26
26
|
count: r,
|
|
27
27
|
...s ?? {}
|
|
28
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-i18n.js","names":[],"sources":["../../src/i18n/create-i18n.ts"],"sourcesContent":["export type Messages = Record<string, string>;\nexport type Catalog = Record<string, Messages>;\nexport type InterpolationValues = Record<string, string | number>;\n\nexport interface CreateI18nOptions {\n /** Initial locale. */\n locale: string;\n /** Fallback locale used when a key is missing in the active locale. */\n fallbackLocale?: string;\n /** Catalog `{ [locale]: { [key]: \"...\" } }`. */\n messages: Catalog;\n}\n\nexport interface I18n {\n /** Currently active locale. */\n locale: string;\n /** Fallback locale (or `null` when not configured). */\n fallbackLocale: string | null;\n /**\n * Translate `key`, interpolating `{name}` placeholders from `params`.\n * Falls back to the configured fallback locale, then to the key itself.\n */\n t: (key: string, params?: InterpolationValues) => string;\n /**\n * Plural-aware translation. Tries `${key}_one` for `count === 1` and\n * `${key}_other` otherwise, with `{count}` available for interpolation.\n */\n plural: (key: string
|
|
1
|
+
{"version":3,"file":"create-i18n.js","names":[],"sources":["../../src/i18n/create-i18n.ts"],"sourcesContent":["export type Messages = Record<string, string>;\nexport type Catalog = Record<string, Messages>;\nexport type InterpolationValues = Record<string, string | number>;\n\nexport interface CreateI18nOptions {\n /** Initial locale. */\n locale: string;\n /** Fallback locale used when a key is missing in the active locale. */\n fallbackLocale?: string;\n /** Catalog `{ [locale]: { [key]: \"...\" } }`. */\n messages: Catalog;\n}\n\n/** Per-call options for {@link I18n.t} and {@link I18n.plural}. */\nexport interface TranslateOptions {\n /**\n * Text to use when the catalog defines neither the key nor its fallback.\n *\n * Without this, a miss returns the key, and a caller that wants its own text\n * instead has to *detect* the miss — which from the outside means comparing\n * the result against the key it just passed in. That heuristic is wrong for a\n * catalog that legitimately maps a key to itself, and it is what every\n * translatable string the SDK ships would otherwise have to copy.\n *\n * Interpolated like any other message, so a default carries `{placeholders}`\n * too and is not second-class.\n */\n default?: string;\n}\n\nexport interface I18n {\n /** Currently active locale. */\n locale: string;\n /** Fallback locale (or `null` when not configured). */\n fallbackLocale: string | null;\n /**\n * Translate `key`, interpolating `{name}` placeholders from `params`.\n * Falls back to the configured fallback locale, then to `options.default`,\n * then to the key itself.\n */\n t: (key: string, params?: InterpolationValues, options?: TranslateOptions) => string;\n /**\n * Plural-aware translation. Tries `${key}_one` for `count === 1` and\n * `${key}_other` otherwise, with `{count}` available for interpolation.\n * Falls back to `options.default`, then to the key itself.\n */\n plural: (\n key: string,\n count: number,\n params?: InterpolationValues,\n options?: TranslateOptions,\n ) => string;\n /** Format a number using `Intl.NumberFormat` on the active locale. */\n formatNumber: (value: number, options?: Intl.NumberFormatOptions) => string;\n /** Format a Date using `Intl.DateTimeFormat` on the active locale. */\n formatDate: (value: Date | string, options?: Intl.DateTimeFormatOptions) => string;\n /** Build a new `I18n` instance pointing at a different locale. */\n withLocale: (locale: string) => I18n;\n}\n\nfunction interpolate(template: string, params?: InterpolationValues): string {\n if (!params) return template;\n return template.replace(/\\{(\\w+)\\}/g, (_match, name: string) => {\n const value = params[name];\n return value === undefined ? `{${name}}` : String(value);\n });\n}\n\nfunction lookup(\n catalog: Catalog,\n locale: string,\n fallback: string | null,\n key: string,\n): string | null {\n const direct = catalog[locale]?.[key];\n if (direct !== undefined) return direct;\n if (fallback) {\n const fallbackValue = catalog[fallback]?.[key];\n if (fallbackValue !== undefined) return fallbackValue;\n }\n return null;\n}\n\n/**\n * Create an i18n object with translation, pluralization and Intl helpers.\n *\n * The catalog is a plain `{ [locale]: { [key]: \"...\" } }` map — bring your\n * own keys, namespaces, or nested-key conventions. The SDK does not enforce\n * a schema so you can plug it into any string-loading pipeline.\n *\n * @example\n * const i18n = createI18n({\n * locale: \"pt-BR\",\n * fallbackLocale: \"en\",\n * messages: {\n * \"pt-BR\": {\n * \"greet\": \"Olá, {name}\",\n * \"alos_one\": \"{count} Alô\",\n * \"alos_other\": \"{count} Alôs\",\n * },\n * \"en\": { greet: \"Hi, {name}\", alos_one: \"{count} Alo\", alos_other: \"{count} Alos\" },\n * },\n * });\n * i18n.t(\"greet\", { name: \"Mau\" }); // \"Olá, Mau\"\n * i18n.plural(\"alos\", 3); // \"3 Alôs\"\n *\n * @example\n * // A key the catalog does not define, with text to show instead of the key.\n * i18n.t(\"cart.empty\", undefined, { default: \"Seu carrinho está vazio\" });\n */\nexport function createI18n(options: CreateI18nOptions): I18n {\n const { locale, fallbackLocale = null, messages } = options;\n\n function t(key: string, params?: InterpolationValues, options?: TranslateOptions): string {\n const template = lookup(messages, locale, fallbackLocale, key) ?? options?.default;\n if (template === undefined) return key;\n return interpolate(template, params);\n }\n\n function plural(\n key: string,\n count: number,\n params?: InterpolationValues,\n options?: TranslateOptions,\n ): string {\n const suffix = count === 1 ? \"_one\" : \"_other\";\n const template =\n lookup(messages, locale, fallbackLocale, `${key}${suffix}`) ??\n lookup(messages, locale, fallbackLocale, key) ??\n options?.default;\n if (template === undefined) return key;\n return interpolate(template, { count, ...(params ?? {}) });\n }\n\n function formatNumber(value: number, opts?: Intl.NumberFormatOptions): string {\n return new Intl.NumberFormat(locale, opts).format(value);\n }\n\n function formatDate(value: Date | string, opts?: Intl.DateTimeFormatOptions): string {\n const date = typeof value === \"string\" ? new Date(value) : value;\n if (Number.isNaN(date.getTime())) return \"\";\n return new Intl.DateTimeFormat(locale, opts).format(date);\n }\n\n return {\n locale,\n fallbackLocale,\n t,\n plural,\n formatNumber,\n formatDate,\n withLocale: (nextLocale) =>\n createI18n({\n locale: nextLocale,\n fallbackLocale: fallbackLocale ?? undefined,\n messages,\n }),\n };\n}\n"],"mappings":";AA4DA,SAAS,EAAY,GAAkB,GAAsC;CAEzE,OADK,IACE,EAAS,QAAQ,eAAe,GAAQ,MAAiB;EAC5D,IAAM,IAAQ,EAAO;EACrB,OAAO,MAAU,KAAA,IAAY,IAAI,EAAK,KAAK,OAAO,CAAK;CAC3D,CAAC,IAJmB;AAKxB;AAEA,SAAS,EACL,GACA,GACA,GACA,GACa;CACb,IAAM,IAAS,EAAQ,EAAO,GAAG;CACjC,IAAI,MAAW,KAAA,GAAW,OAAO;CACjC,IAAI,GAAU;EACV,IAAM,IAAgB,EAAQ,EAAS,GAAG;EAC1C,IAAI,MAAkB,KAAA,GAAW,OAAO;CAC5C;CACA,OAAO;AACX;AA6BA,SAAgB,EAAW,GAAkC;CACzD,IAAM,EAAE,WAAQ,oBAAiB,MAAM,gBAAa;CAEpD,SAAS,EAAE,GAAa,GAA8B,GAAoC;EACtF,IAAM,IAAW,EAAO,GAAU,GAAQ,GAAgB,CAAG,KAAK,GAAS;EAE3E,OADI,MAAa,KAAA,IAAkB,IAC5B,EAAY,GAAU,CAAM;CACvC;CAEA,SAAS,EACL,GACA,GACA,GACA,GACM;EAEN,IAAM,IACF,EAAO,GAAU,GAAQ,GAAgB,GAAG,IAFjC,MAAU,IAAI,SAAS,UAEwB,KAC1D,EAAO,GAAU,GAAQ,GAAgB,CAAG,KAC5C,GAAS;EAEb,OADI,MAAa,KAAA,IAAkB,IAC5B,EAAY,GAAU;GAAE;GAAO,GAAI,KAAU,CAAC;EAAG,CAAC;CAC7D;CAEA,SAAS,EAAa,GAAe,GAAyC;EAC1E,OAAO,IAAI,KAAK,aAAa,GAAQ,CAAI,CAAC,CAAC,OAAO,CAAK;CAC3D;CAEA,SAAS,EAAW,GAAsB,GAA2C;EACjF,IAAM,IAAO,OAAO,KAAU,WAAW,IAAI,KAAK,CAAK,IAAI;EAE3D,OADI,OAAO,MAAM,EAAK,QAAQ,CAAC,IAAU,KAClC,IAAI,KAAK,eAAe,GAAQ,CAAI,CAAC,CAAC,OAAO,CAAI;CAC5D;CAEA,OAAO;EACH;EACA;EACA;EACA;EACA;EACA;EACA,aAAa,MACT,EAAW;GACP,QAAQ;GACR,gBAAgB,KAAkB,KAAA;GAClC;EACJ,CAAC;CACT;AACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=`circle-question-mark`,t={ac_unit:`snowflake`,account_balance:`landmark`,add:`plus`,balance:`scale`,bar_chart:`chart-column`,battery_full:`battery-full`,bluetooth:`bluetooth`,bolt:`zap`,brush:`brush`,build:`wrench`,cake:`cake`,calculate:`calculator`,campaign:`megaphone`,car_repair:`car`,carpenter:`hammer`,chair:`armchair`,chat:`message-circle`,check:`check`,child_care:`baby`,cleaning_services:`spray-can`,close:`x`,cloud:`cloud`,code:`code`,computer:`monitor`,construction:`
|
|
1
|
+
var e=`circle-question-mark`,t={ac_unit:`snowflake`,account_balance:`landmark`,account_balance_wallet:`wallet`,account_box:`square-user`,account_circle:`circle-user`,add:`plus`,add_circle:`circle-plus`,add_circle_outline:`circle-plus`,add_shopping_cart:`shopping-cart`,admin_panel_settings:`shield-user`,analytics:`chart-column`,apps:`layout-grid`,arrow_back:`arrow-left`,arrow_back_ios:`chevron-left`,arrow_back_ios_new:`chevron-left`,arrow_downward:`arrow-down`,arrow_drop_down:`chevron-down`,arrow_forward:`arrow-right`,arrow_forward_ios:`chevron-right`,arrow_right:`chevron-right`,arrow_right_alt:`arrow-right`,arrow_upward:`arrow-up`,article:`newspaper`,assignment:`clipboard-list`,attach_file:`paperclip`,attach_money:`dollar-sign`,autorenew:`refresh-cw`,badge:`id-card`,balance:`scale`,bar_chart:`chart-column`,battery_full:`battery-full`,bluetooth:`bluetooth`,bolt:`zap`,bookmark:`bookmark`,brush:`brush`,build:`wrench`,business:`building-2`,cake:`cake`,calculate:`calculator`,calendar_month:`calendar`,calendar_today:`calendar`,call:`phone`,campaign:`megaphone`,cancel:`circle-x`,car_repair:`car`,carpenter:`hammer`,category:`shapes`,chair:`armchair`,chat:`message-circle`,check:`check`,check_box:`square-check`,check_box_outline_blank:`square`,check_circle:`circle-check`,check_circle_outline:`circle-check`,chevron_left:`chevron-left`,chevron_right:`chevron-right`,child_care:`baby`,circle:`circle`,cleaning_services:`spray-can`,clear:`x`,close:`x`,cloud:`cloud`,code:`code`,computer:`monitor`,construction:`construction`,content_copy:`copy`,content_cut:`scissors`,credit_card:`credit-card`,dark_mode:`moon`,dashboard:`layout-dashboard`,date_range:`calendar-range`,delete:`trash-2`,delete_forever:`trash-2`,delete_outline:`trash-2`,delivery_dining:`bike`,dentistry:`face-slightly-smiling`,description:`file-text`,directions_car:`car`,done:`check`,done_all:`check-check`,door_front:`door-open`,download:`download`,east:`arrow-right`,edit:`pencil`,edit_note:`pencil-line`,electrical_services:`plug-zap`,email:`mail`,emoji_events:`trophy`,engineering:`hard-hat`,error:`circle-alert`,error_outline:`circle-alert`,event:`calendar-days`,expand_less:`chevron-up`,expand_more:`chevron-down`,explore:`compass`,face:`face-slightly-smiling`,fact_check:`clipboard-check`,favorite:`heart`,favorite_border:`heart`,file_download:`download`,file_upload:`upload`,filter_alt:`funnel`,filter_list:`funnel`,fingerprint:`fingerprint-pattern`,fitness_center:`dumbbell`,flight:`plane`,folder:`folder`,format_list_bulleted:`list`,format_paint:`paint-roller`,forum:`messages-square`,gavel:`gavel`,grade:`star`,grass:`sprout`,grid_view:`layout-grid`,group:`users`,groups:`users`,handyman:`wrench`,hardware:`wrench`,help:`circle-question-mark`,help_outline:`circle-question-mark`,highlight_off:`circle-x`,history:`rotate-ccw-clock`,home:`house`,hotel:`bed-double`,image:`image`,info:`info`,insights:`chart-line`,inventory:`package`,inventory_2:`package`,iron:`shirt`,key:`key`,kitchen:`refrigerator`,language:`globe`,laptop:`laptop`,light_mode:`sun`,lightbulb:`lightbulb`,link:`link`,list:`list`,list_alt:`list`,local_bar:`wine`,local_cafe:`coffee`,local_florist:`flower`,local_gas_station:`fuel`,local_laundry_service:`washing-machine`,local_offer:`tag`,local_shipping:`truck`,local_taxi:`car-taxi-front`,location_on:`map-pin`,lock:`lock`,lock_open:`lock-open`,login:`log-in`,logout:`log-out`,mail:`mail`,mail_outline:`mail`,manage_accounts:`user-cog`,map:`map`,medical_services:`stethoscope`,menu:`menu`,menu_book:`book-open`,mic:`mic`,mode_edit:`pencil`,monetization_on:`circle-dollar-sign`,more_horiz:`ellipsis`,more_vert:`ellipsis-vertical`,music_note:`music`,navigate_next:`chevron-right`,note_add:`file-plus`,notifications:`bell`,notifications_active:`bell-ring`,open_in_new:`external-link`,paid:`circle-dollar-sign`,palette:`palette`,pause:`pause`,payments:`banknote`,pedal_bike:`bike`,people:`users`,perm_identity:`user`,person:`user`,person_add:`user-plus`,person_outline:`user`,pest_control:`bug`,pets:`paw-print`,phone:`phone`,phone_iphone:`smartphone`,photo_camera:`camera`,picture_as_pdf:`file-text`,pie_chart:`chart-pie`,place:`map-pin`,play_arrow:`play`,play_circle:`circle-play`,play_circle_filled:`circle-play`,plumbing:`shower-head`,power_settings_new:`power`,print:`printer`,public:`globe`,qr_code_scanner:`scan-line`,question_answer:`messages-square`,radio_button_checked:`circle-dot`,radio_button_unchecked:`circle`,receipt:`receipt`,receipt_long:`receipt-text`,refresh:`refresh-cw`,remove:`minus`,remove_circle_outline:`circle-minus`,reorder:`list`,report_problem:`triangle-alert`,restart_alt:`rotate-ccw`,restaurant:`utensils`,roofing:`house`,room:`map-pin`,router:`router`,save:`save`,savings:`piggy-bank`,schedule:`clock`,school:`graduation-cap`,search:`search`,security:`shield-check`,send:`send`,settings:`settings`,share:`share-2`,shield:`shield`,shopping_bag:`shopping-bag`,shopping_cart:`shopping-cart`,smartphone:`smartphone`,soap:`soap-dispenser-droplet`,sort:`arrow-down-up`,spa:`flower-2`,star:`star`,star_border:`star`,star_rate:`star`,store:`store`,storefront:`store`,support_agent:`headset`,sync:`refresh-cw`,task_alt:`circle-check`,timer:`timer`,today:`calendar`,toggle_on:`toggle-right`,translate:`languages`,trending_up:`trending-up`,tune:`sliders-horizontal`,tv:`tv`,two_wheeler:`bike`,upload:`upload`,upload_file:`upload`,vaccines:`syringe`,verified:`badge-check`,verified_user:`shield-check`,videocam:`video`,view_list:`list`,visibility:`eye`,visibility_off:`eye-off`,vpn_key:`key-round`,warehouse:`warehouse`,warning:`triangle-alert`,warning_amber:`triangle-alert`,watch_later:`clock`,water_drop:`droplet`,wifi:`wifi`,work:`briefcase`,yard:`trees`};function n(n,r=e){return n?t[n.trim().toLowerCase()]??r:r}exports.MATERIAL_SYMBOL_FALLBACK=e,exports.fromMaterialSymbol=n,exports.materialToLucide=t;
|
|
2
2
|
//# sourceMappingURL=material-symbols.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material-symbols.cjs","names":[],"sources":["../../src/icons/material-symbols.ts"],"sourcesContent":["import type { IconName } from \"./generated/icon-name\";\n\n/**\n * The slug `fromMaterialSymbol` falls back to when a code is unknown.\n *\n * A neutral glyph rather than nothing: a category created in an admin with a\n * code this table has not learned yet still has to draw something, or it opens a\n * hole in the grid and the bug reads as a layout problem instead of a missing\n * mapping.\n *\n * Lucide's `circle-help` is a deprecated alias of this slug. `<Icon>` resolves\n * aliases, so both render — but the bridge emits the canonical name, since a\n * value that gets persisted should not be one lucide has already renamed.\n */\nexport const MATERIAL_SYMBOL_FALLBACK: IconName = \"circle-question-mark\";\n\n/**\n * Material Symbols code → lucide slug, for backends that store `icon_code`.\n *\n * Every Python backend we write stores a category icon as a Material Symbol\n * (`build`, `format_paint`, `electrical_services`) — the vocabulary Flutter,\n * Android and the administrative seeds already speak. The SDK speaks lucide in\n * kebab-case. The two lists do not meet, and the failure is nastier than an\n * empty screen: a handful of codes collide by accident, so roughly one row in\n * ten draws the right icon and the bug reads as \"some icons went missing\".\n *\n * **Still not the full vocabulary.** Material Symbols ships ~3600 names and\n * almost none of them will ever appear in an `icon_code` of ours, so this grows\n * on demand, one hand-written pair at a time — a map generated by name\n * heuristics gets it badly wrong, starting with `build`, which is a wrench in\n * Material Symbols and nothing to do with construction. What is here covers the\n * trades lot it started as plus the vocabulary an administrative panel actually\n * uses: navigation, money, dates, media, and the service categories a seed\n * tends to carry.\n *\n * Every target is checked mechanically against the slug list by\n * `material-symbols.test.ts`, so a pair pointing at a name lucide does not ship\n * — or at one it has since deprecated — fails the suite instead of reaching a\n * grid. What no test can check is whether the *chosen* icon is the right\n * metaphor, which is why pairs go in by hand.\n *\n * **Approximations, deliberate and not one-to-one** (the full list lives in\n * `docs/icons.md`):\n *\n * - `plumbing` → `shower-head`, because lucide has no pipe.\n * - `build`, `handyman` and `hardware` all land on `wrench` — Material Symbols\n * distinguishes the tools, lucide does not.\n * - `pedal_bike`, `two_wheeler` and `delivery_dining` all land on `bike`.\n * - `dentistry` → `face-slightly-smiling`, since lucide ships no tooth.\n * - `iron` → `shirt` and `cleaning_services` → `spray-can`: the activity, not\n * the implement.\n * - `roofing` → `house`, the same glyph as `home`, because lucide has no roof.\n *\n * The identity pairs are here on purpose. Their names happen to match in both\n * vocabularies, so they already render today — leaving them out would send them\n * to {@link MATERIAL_SYMBOL_FALLBACK} and make this bridge a regression for\n * exactly the codes that used to work.\n *\n * @see fromMaterialSymbol — the lookup you normally call.\n */\nexport const materialToLucide: Readonly<Record<string, IconName>> = {\n ac_unit: \"snowflake\",\n account_balance: \"landmark\",\n add: \"plus\",\n balance: \"scale\",\n bar_chart: \"chart-column\",\n battery_full: \"battery-full\",\n bluetooth: \"bluetooth\",\n bolt: \"zap\",\n brush: \"brush\",\n build: \"wrench\",\n cake: \"cake\",\n calculate: \"calculator\",\n campaign: \"megaphone\",\n car_repair: \"car\",\n carpenter: \"hammer\",\n chair: \"armchair\",\n chat: \"message-circle\",\n check: \"check\",\n child_care: \"baby\",\n cleaning_services: \"spray-can\",\n close: \"x\",\n cloud: \"cloud\",\n code: \"code\",\n computer: \"monitor\",\n construction: \"hard-hat\",\n content_cut: \"scissors\",\n credit_card: \"credit-card\",\n dashboard: \"layout-dashboard\",\n delete: \"trash-2\",\n delivery_dining: \"bike\",\n dentistry: \"face-slightly-smiling\",\n description: \"file-text\",\n directions_car: \"car\",\n door_front: \"door-open\",\n download: \"download\",\n edit: \"pencil\",\n electrical_services: \"plug-zap\",\n error: \"circle-x\",\n event: \"calendar\",\n favorite: \"heart\",\n fitness_center: \"dumbbell\",\n flight: \"plane\",\n folder: \"folder\",\n format_paint: \"paint-roller\",\n forum: \"messages-square\",\n gavel: \"gavel\",\n grass: \"sprout\",\n group: \"users\",\n groups: \"users\",\n handyman: \"wrench\",\n hardware: \"wrench\",\n help: \"circle-question-mark\",\n history: \"rotate-ccw-clock\",\n home: \"house\",\n hotel: \"bed-double\",\n image: \"image\",\n info: \"info\",\n iron: \"shirt\",\n key: \"key\",\n kitchen: \"refrigerator\",\n laptop: \"laptop\",\n local_bar: \"wine\",\n local_cafe: \"coffee\",\n local_florist: \"flower\",\n local_gas_station: \"fuel\",\n local_laundry_service: \"washing-machine\",\n local_shipping: \"truck\",\n local_taxi: \"car-taxi-front\",\n location_on: \"map-pin\",\n lock: \"lock\",\n lock_open: \"lock-open\",\n login: \"log-in\",\n logout: \"log-out\",\n mail: \"mail\",\n map: \"map\",\n medical_services: \"stethoscope\",\n menu: \"menu\",\n mic: \"mic\",\n music_note: \"music\",\n notifications: \"bell\",\n palette: \"palette\",\n payments: \"banknote\",\n pedal_bike: \"bike\",\n person: \"user\",\n pest_control: \"bug\",\n pets: \"paw-print\",\n phone: \"phone\",\n phone_iphone: \"smartphone\",\n photo_camera: \"camera\",\n pie_chart: \"chart-pie\",\n plumbing: \"shower-head\",\n print: \"printer\",\n receipt_long: \"receipt\",\n restaurant: \"utensils\",\n roofing: \"house\",\n router: \"router\",\n savings: \"piggy-bank\",\n schedule: \"clock\",\n school: \"graduation-cap\",\n search: \"search\",\n security: \"shield-check\",\n settings: \"settings\",\n share: \"share-2\",\n shield: \"shield\",\n shopping_bag: \"shopping-bag\",\n shopping_cart: \"shopping-cart\",\n smartphone: \"smartphone\",\n soap: \"soap-dispenser-droplet\",\n spa: \"flower-2\",\n star: \"star\",\n store: \"store\",\n storefront: \"store\",\n support_agent: \"headset\",\n sync: \"refresh-cw\",\n today: \"calendar-days\",\n translate: \"languages\",\n trending_up: \"trending-up\",\n tv: \"tv\",\n two_wheeler: \"bike\",\n upload: \"upload\",\n vaccines: \"syringe\",\n verified: \"badge-check\",\n videocam: \"video\",\n visibility: \"eye\",\n warehouse: \"warehouse\",\n warning: \"triangle-alert\",\n water_drop: \"droplet\",\n wifi: \"wifi\",\n work: \"briefcase\",\n yard: \"trees\",\n};\n\n/**\n * Translate a Material Symbols code into a lucide slug, always returning one.\n *\n * Never returns `undefined`: an unknown code resolves to `fallback`, so a row\n * whose `icon_code` this table has not learned yet still renders. The input is\n * trimmed and lower-cased before lookup, because a seed written by hand is the\n * kind of source that carries stray whitespace and the odd capital.\n *\n * Nothing else in `/icons` imports this module, so an app that does not store\n * Material Symbols never pays for the table.\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code)} size={20} />\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code, \"folder\")} size={20} />\n *\n * @param code - A Material Symbols name, or `null`/`undefined` for a row that has none.\n * @param fallback - Slug to use when `code` is empty or unknown. Defaults to {@link MATERIAL_SYMBOL_FALLBACK}.\n * @returns A lucide slug `<Icon>` can render.\n */\nexport function fromMaterialSymbol(\n code: string | null | undefined,\n fallback: IconName = MATERIAL_SYMBOL_FALLBACK,\n): IconName {\n if (!code) return fallback;\n return materialToLucide[code.trim().toLowerCase()] ?? fallback;\n}\n"],"mappings":"AAcA,IAAa,EAAqC,uBA8CrC,EAAuD,CAChE,QAAS,YACT,gBAAiB,WACjB,IAAK,OACL,QAAS,QACT,UAAW,eACX,aAAc,eACd,UAAW,YACX,KAAM,MACN,MAAO,QACP,MAAO,SACP,KAAM,OACN,UAAW,aACX,SAAU,YACV,WAAY,MACZ,UAAW,SACX,MAAO,WACP,KAAM,iBACN,MAAO,QACP,WAAY,OACZ,kBAAmB,YACnB,MAAO,IACP,MAAO,QACP,KAAM,OACN,SAAU,UACV,aAAc,WACd,YAAa,WACb,YAAa,cACb,UAAW,mBACX,OAAQ,UACR,gBAAiB,OACjB,UAAW,wBACX,YAAa,YACb,eAAgB,MAChB,WAAY,YACZ,SAAU,WACV,KAAM,SACN,oBAAqB,WACrB,MAAO,WACP,MAAO,WACP,SAAU,QACV,eAAgB,WAChB,OAAQ,QACR,OAAQ,SACR,aAAc,eACd,MAAO,kBACP,MAAO,QACP,MAAO,SACP,MAAO,QACP,OAAQ,QACR,SAAU,SACV,SAAU,SACV,KAAM,uBACN,QAAS,mBACT,KAAM,QACN,MAAO,aACP,MAAO,QACP,KAAM,OACN,KAAM,QACN,IAAK,MACL,QAAS,eACT,OAAQ,SACR,UAAW,OACX,WAAY,SACZ,cAAe,SACf,kBAAmB,OACnB,sBAAuB,kBACvB,eAAgB,QAChB,WAAY,iBACZ,YAAa,UACb,KAAM,OACN,UAAW,YACX,MAAO,SACP,OAAQ,UACR,KAAM,OACN,IAAK,MACL,iBAAkB,cAClB,KAAM,OACN,IAAK,MACL,WAAY,QACZ,cAAe,OACf,QAAS,UACT,SAAU,WACV,WAAY,OACZ,OAAQ,OACR,aAAc,MACd,KAAM,YACN,MAAO,QACP,aAAc,aACd,aAAc,SACd,UAAW,YACX,SAAU,cACV,MAAO,UACP,aAAc,UACd,WAAY,WACZ,QAAS,QACT,OAAQ,SACR,QAAS,aACT,SAAU,QACV,OAAQ,iBACR,OAAQ,SACR,SAAU,eACV,SAAU,WACV,MAAO,UACP,OAAQ,SACR,aAAc,eACd,cAAe,gBACf,WAAY,aACZ,KAAM,yBACN,IAAK,WACL,KAAM,OACN,MAAO,QACP,WAAY,QACZ,cAAe,UACf,KAAM,aACN,MAAO,gBACP,UAAW,YACX,YAAa,cACb,GAAI,KACJ,YAAa,OACb,OAAQ,SACR,SAAU,UACV,SAAU,cACV,SAAU,QACV,WAAY,MACZ,UAAW,YACX,QAAS,iBACT,WAAY,UACZ,KAAM,OACN,KAAM,YACN,KAAM,OACV,EAuBA,SAAgB,EACZ,EACA,EAAqB,EACb,CAER,OADK,EACE,EAAiB,EAAK,KAAK,CAAC,CAAC,YAAY,IAAM,EADpC,CAEtB"}
|
|
1
|
+
{"version":3,"file":"material-symbols.cjs","names":[],"sources":["../../src/icons/material-symbols.ts"],"sourcesContent":["import type { IconName } from \"./generated/icon-name\";\n\n/**\n * The slug `fromMaterialSymbol` falls back to when a code is unknown.\n *\n * A neutral glyph rather than nothing: a category created in an admin with a\n * code this table has not learned yet still has to draw something, or it opens a\n * hole in the grid and the bug reads as a layout problem instead of a missing\n * mapping.\n *\n * Lucide's `circle-help` is a deprecated alias of this slug. `<Icon>` resolves\n * aliases, so both render — but the bridge emits the canonical name, since a\n * value that gets persisted should not be one lucide has already renamed.\n */\nexport const MATERIAL_SYMBOL_FALLBACK: IconName = \"circle-question-mark\";\n\n/**\n * Material Symbols code → lucide slug, for backends that store `icon_code`.\n *\n * Every Python backend we write stores a category icon as a Material Symbol\n * (`build`, `format_paint`, `electrical_services`) — the vocabulary Flutter,\n * Android and the administrative seeds already speak. The SDK speaks lucide in\n * kebab-case. The two lists do not meet, and the failure is nastier than an\n * empty screen: a handful of codes collide by accident, so roughly one row in\n * ten draws the right icon and the bug reads as \"some icons went missing\".\n *\n * **Still not the full vocabulary.** Material Symbols publishes ~6100 names and\n * almost none of them will ever appear in an `icon_code` of ours, so this grows\n * on demand, one hand-written pair at a time — a map generated by name\n * heuristics gets it badly wrong, starting with `build`, which is a wrench in\n * Material Symbols and nothing to do with construction.\n *\n * **How the codes were chosen.** Two lots, merged. The first was the trades seed\n * the bridge started as. The second is the head of Material Symbols' own\n * published popularity ranking (`fonts.google.com/metadata/icons`), which is\n * measured usage rather than a guess at which names a seed will contain — every\n * key was checked to exist in that vocabulary before landing.\n *\n * **Where the two lots disagreed**, six keys, the tie went to whichever mapping\n * keeps two distinct Material Symbols names distinct in lucide: `error` →\n * `circle-alert` because `cancel` already owns `circle-x`; `payments` →\n * `banknote` because `account_balance_wallet` already owns `wallet`;\n * `receipt_long` → `receipt-text` because `receipt` already owns `receipt`;\n * `construction` → itself because `engineering` already owns `hard-hat`; and\n * `today` → `calendar` with `event` → `calendar-days`, splitting the generic\n * calendar names from the dated one.\n *\n * Every target is checked mechanically against the slug list by\n * `material-symbols.test.ts`, so a pair pointing at a name lucide does not ship\n * — or at one it has since deprecated — fails the suite instead of reaching a\n * grid. What no test can check is whether the *chosen* icon is the right\n * metaphor, which is why pairs go in by hand.\n *\n * **Approximations, deliberate and not one-to-one** (the full list lives in\n * `docs/icons.md`):\n *\n * - `plumbing` → `shower-head`, because lucide has no pipe.\n * - `build`, `handyman` and `hardware` all land on `wrench` — Material Symbols\n * distinguishes the tools, lucide does not.\n * - `pedal_bike`, `two_wheeler` and `delivery_dining` all land on `bike`.\n * - `dentistry` → `face-slightly-smiling`, since lucide ships no tooth.\n * - `iron` → `shirt` and `cleaning_services` → `spray-can`: the activity, not\n * the implement.\n * - `roofing` → `house`, the same glyph as `home`, because lucide has no roof.\n *\n * The identity pairs are here on purpose. Their names happen to match in both\n * vocabularies, so they already render today — leaving them out would send them\n * to {@link MATERIAL_SYMBOL_FALLBACK} and make this bridge a regression for\n * exactly the codes that used to work.\n *\n * @see fromMaterialSymbol — the lookup you normally call.\n */\nexport const materialToLucide: Readonly<Record<string, IconName>> = {\n ac_unit: \"snowflake\",\n account_balance: \"landmark\",\n account_balance_wallet: \"wallet\",\n account_box: \"square-user\",\n account_circle: \"circle-user\",\n add: \"plus\",\n add_circle: \"circle-plus\",\n add_circle_outline: \"circle-plus\",\n add_shopping_cart: \"shopping-cart\",\n admin_panel_settings: \"shield-user\",\n analytics: \"chart-column\",\n apps: \"layout-grid\",\n arrow_back: \"arrow-left\",\n arrow_back_ios: \"chevron-left\",\n arrow_back_ios_new: \"chevron-left\",\n arrow_downward: \"arrow-down\",\n arrow_drop_down: \"chevron-down\",\n arrow_forward: \"arrow-right\",\n arrow_forward_ios: \"chevron-right\",\n arrow_right: \"chevron-right\",\n arrow_right_alt: \"arrow-right\",\n arrow_upward: \"arrow-up\",\n article: \"newspaper\",\n assignment: \"clipboard-list\",\n attach_file: \"paperclip\",\n attach_money: \"dollar-sign\",\n autorenew: \"refresh-cw\",\n badge: \"id-card\",\n balance: \"scale\",\n bar_chart: \"chart-column\",\n battery_full: \"battery-full\",\n bluetooth: \"bluetooth\",\n bolt: \"zap\",\n bookmark: \"bookmark\",\n brush: \"brush\",\n build: \"wrench\",\n business: \"building-2\",\n cake: \"cake\",\n calculate: \"calculator\",\n calendar_month: \"calendar\",\n calendar_today: \"calendar\",\n call: \"phone\",\n campaign: \"megaphone\",\n cancel: \"circle-x\",\n car_repair: \"car\",\n carpenter: \"hammer\",\n category: \"shapes\",\n chair: \"armchair\",\n chat: \"message-circle\",\n check: \"check\",\n check_box: \"square-check\",\n check_box_outline_blank: \"square\",\n check_circle: \"circle-check\",\n check_circle_outline: \"circle-check\",\n chevron_left: \"chevron-left\",\n chevron_right: \"chevron-right\",\n child_care: \"baby\",\n circle: \"circle\",\n cleaning_services: \"spray-can\",\n clear: \"x\",\n close: \"x\",\n cloud: \"cloud\",\n code: \"code\",\n computer: \"monitor\",\n construction: \"construction\",\n content_copy: \"copy\",\n content_cut: \"scissors\",\n credit_card: \"credit-card\",\n dark_mode: \"moon\",\n dashboard: \"layout-dashboard\",\n date_range: \"calendar-range\",\n delete: \"trash-2\",\n delete_forever: \"trash-2\",\n delete_outline: \"trash-2\",\n delivery_dining: \"bike\",\n dentistry: \"face-slightly-smiling\",\n description: \"file-text\",\n directions_car: \"car\",\n done: \"check\",\n done_all: \"check-check\",\n door_front: \"door-open\",\n download: \"download\",\n east: \"arrow-right\",\n edit: \"pencil\",\n edit_note: \"pencil-line\",\n electrical_services: \"plug-zap\",\n email: \"mail\",\n emoji_events: \"trophy\",\n engineering: \"hard-hat\",\n error: \"circle-alert\",\n error_outline: \"circle-alert\",\n event: \"calendar-days\",\n expand_less: \"chevron-up\",\n expand_more: \"chevron-down\",\n explore: \"compass\",\n face: \"face-slightly-smiling\",\n fact_check: \"clipboard-check\",\n favorite: \"heart\",\n favorite_border: \"heart\",\n file_download: \"download\",\n file_upload: \"upload\",\n filter_alt: \"funnel\",\n filter_list: \"funnel\",\n fingerprint: \"fingerprint-pattern\",\n fitness_center: \"dumbbell\",\n flight: \"plane\",\n folder: \"folder\",\n format_list_bulleted: \"list\",\n format_paint: \"paint-roller\",\n forum: \"messages-square\",\n gavel: \"gavel\",\n grade: \"star\",\n grass: \"sprout\",\n grid_view: \"layout-grid\",\n group: \"users\",\n groups: \"users\",\n handyman: \"wrench\",\n hardware: \"wrench\",\n help: \"circle-question-mark\",\n help_outline: \"circle-question-mark\",\n highlight_off: \"circle-x\",\n history: \"rotate-ccw-clock\",\n home: \"house\",\n hotel: \"bed-double\",\n image: \"image\",\n info: \"info\",\n insights: \"chart-line\",\n inventory: \"package\",\n inventory_2: \"package\",\n iron: \"shirt\",\n key: \"key\",\n kitchen: \"refrigerator\",\n language: \"globe\",\n laptop: \"laptop\",\n light_mode: \"sun\",\n lightbulb: \"lightbulb\",\n link: \"link\",\n list: \"list\",\n list_alt: \"list\",\n local_bar: \"wine\",\n local_cafe: \"coffee\",\n local_florist: \"flower\",\n local_gas_station: \"fuel\",\n local_laundry_service: \"washing-machine\",\n local_offer: \"tag\",\n local_shipping: \"truck\",\n local_taxi: \"car-taxi-front\",\n location_on: \"map-pin\",\n lock: \"lock\",\n lock_open: \"lock-open\",\n login: \"log-in\",\n logout: \"log-out\",\n mail: \"mail\",\n mail_outline: \"mail\",\n manage_accounts: \"user-cog\",\n map: \"map\",\n medical_services: \"stethoscope\",\n menu: \"menu\",\n menu_book: \"book-open\",\n mic: \"mic\",\n mode_edit: \"pencil\",\n monetization_on: \"circle-dollar-sign\",\n more_horiz: \"ellipsis\",\n more_vert: \"ellipsis-vertical\",\n music_note: \"music\",\n navigate_next: \"chevron-right\",\n note_add: \"file-plus\",\n notifications: \"bell\",\n notifications_active: \"bell-ring\",\n open_in_new: \"external-link\",\n paid: \"circle-dollar-sign\",\n palette: \"palette\",\n pause: \"pause\",\n payments: \"banknote\",\n pedal_bike: \"bike\",\n people: \"users\",\n perm_identity: \"user\",\n person: \"user\",\n person_add: \"user-plus\",\n person_outline: \"user\",\n pest_control: \"bug\",\n pets: \"paw-print\",\n phone: \"phone\",\n phone_iphone: \"smartphone\",\n photo_camera: \"camera\",\n picture_as_pdf: \"file-text\",\n pie_chart: \"chart-pie\",\n place: \"map-pin\",\n play_arrow: \"play\",\n play_circle: \"circle-play\",\n play_circle_filled: \"circle-play\",\n plumbing: \"shower-head\",\n power_settings_new: \"power\",\n print: \"printer\",\n public: \"globe\",\n qr_code_scanner: \"scan-line\",\n question_answer: \"messages-square\",\n radio_button_checked: \"circle-dot\",\n radio_button_unchecked: \"circle\",\n receipt: \"receipt\",\n receipt_long: \"receipt-text\",\n refresh: \"refresh-cw\",\n remove: \"minus\",\n remove_circle_outline: \"circle-minus\",\n reorder: \"list\",\n report_problem: \"triangle-alert\",\n restart_alt: \"rotate-ccw\",\n restaurant: \"utensils\",\n roofing: \"house\",\n room: \"map-pin\",\n router: \"router\",\n save: \"save\",\n savings: \"piggy-bank\",\n schedule: \"clock\",\n school: \"graduation-cap\",\n search: \"search\",\n security: \"shield-check\",\n send: \"send\",\n settings: \"settings\",\n share: \"share-2\",\n shield: \"shield\",\n shopping_bag: \"shopping-bag\",\n shopping_cart: \"shopping-cart\",\n smartphone: \"smartphone\",\n soap: \"soap-dispenser-droplet\",\n sort: \"arrow-down-up\",\n spa: \"flower-2\",\n star: \"star\",\n star_border: \"star\",\n star_rate: \"star\",\n store: \"store\",\n storefront: \"store\",\n support_agent: \"headset\",\n sync: \"refresh-cw\",\n task_alt: \"circle-check\",\n timer: \"timer\",\n today: \"calendar\",\n toggle_on: \"toggle-right\",\n translate: \"languages\",\n trending_up: \"trending-up\",\n tune: \"sliders-horizontal\",\n tv: \"tv\",\n two_wheeler: \"bike\",\n upload: \"upload\",\n upload_file: \"upload\",\n vaccines: \"syringe\",\n verified: \"badge-check\",\n verified_user: \"shield-check\",\n videocam: \"video\",\n view_list: \"list\",\n visibility: \"eye\",\n visibility_off: \"eye-off\",\n vpn_key: \"key-round\",\n warehouse: \"warehouse\",\n warning: \"triangle-alert\",\n warning_amber: \"triangle-alert\",\n watch_later: \"clock\",\n water_drop: \"droplet\",\n wifi: \"wifi\",\n work: \"briefcase\",\n yard: \"trees\",\n};\n\n/**\n * Translate a Material Symbols code into a lucide slug, always returning one.\n *\n * Never returns `undefined`: an unknown code resolves to `fallback`, so a row\n * whose `icon_code` this table has not learned yet still renders. The input is\n * trimmed and lower-cased before lookup, because a seed written by hand is the\n * kind of source that carries stray whitespace and the odd capital.\n *\n * Nothing else in `/icons` imports this module, so an app that does not store\n * Material Symbols never pays for the table.\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code)} size={20} />\n *\n * @example\n * <Icon name={fromMaterialSymbol(category.icon_code, \"folder\")} size={20} />\n *\n * @param code - A Material Symbols name, or `null`/`undefined` for a row that has none.\n * @param fallback - Slug to use when `code` is empty or unknown. Defaults to {@link MATERIAL_SYMBOL_FALLBACK}.\n * @returns A lucide slug `<Icon>` can render.\n */\nexport function fromMaterialSymbol(\n code: string | null | undefined,\n fallback: IconName = MATERIAL_SYMBOL_FALLBACK,\n): IconName {\n if (!code) return fallback;\n return materialToLucide[code.trim().toLowerCase()] ?? fallback;\n}\n"],"mappings":"AAcA,IAAa,EAAqC,uBA0DrC,EAAuD,CAChE,QAAS,YACT,gBAAiB,WACjB,uBAAwB,SACxB,YAAa,cACb,eAAgB,cAChB,IAAK,OACL,WAAY,cACZ,mBAAoB,cACpB,kBAAmB,gBACnB,qBAAsB,cACtB,UAAW,eACX,KAAM,cACN,WAAY,aACZ,eAAgB,eAChB,mBAAoB,eACpB,eAAgB,aAChB,gBAAiB,eACjB,cAAe,cACf,kBAAmB,gBACnB,YAAa,gBACb,gBAAiB,cACjB,aAAc,WACd,QAAS,YACT,WAAY,iBACZ,YAAa,YACb,aAAc,cACd,UAAW,aACX,MAAO,UACP,QAAS,QACT,UAAW,eACX,aAAc,eACd,UAAW,YACX,KAAM,MACN,SAAU,WACV,MAAO,QACP,MAAO,SACP,SAAU,aACV,KAAM,OACN,UAAW,aACX,eAAgB,WAChB,eAAgB,WAChB,KAAM,QACN,SAAU,YACV,OAAQ,WACR,WAAY,MACZ,UAAW,SACX,SAAU,SACV,MAAO,WACP,KAAM,iBACN,MAAO,QACP,UAAW,eACX,wBAAyB,SACzB,aAAc,eACd,qBAAsB,eACtB,aAAc,eACd,cAAe,gBACf,WAAY,OACZ,OAAQ,SACR,kBAAmB,YACnB,MAAO,IACP,MAAO,IACP,MAAO,QACP,KAAM,OACN,SAAU,UACV,aAAc,eACd,aAAc,OACd,YAAa,WACb,YAAa,cACb,UAAW,OACX,UAAW,mBACX,WAAY,iBACZ,OAAQ,UACR,eAAgB,UAChB,eAAgB,UAChB,gBAAiB,OACjB,UAAW,wBACX,YAAa,YACb,eAAgB,MAChB,KAAM,QACN,SAAU,cACV,WAAY,YACZ,SAAU,WACV,KAAM,cACN,KAAM,SACN,UAAW,cACX,oBAAqB,WACrB,MAAO,OACP,aAAc,SACd,YAAa,WACb,MAAO,eACP,cAAe,eACf,MAAO,gBACP,YAAa,aACb,YAAa,eACb,QAAS,UACT,KAAM,wBACN,WAAY,kBACZ,SAAU,QACV,gBAAiB,QACjB,cAAe,WACf,YAAa,SACb,WAAY,SACZ,YAAa,SACb,YAAa,sBACb,eAAgB,WAChB,OAAQ,QACR,OAAQ,SACR,qBAAsB,OACtB,aAAc,eACd,MAAO,kBACP,MAAO,QACP,MAAO,OACP,MAAO,SACP,UAAW,cACX,MAAO,QACP,OAAQ,QACR,SAAU,SACV,SAAU,SACV,KAAM,uBACN,aAAc,uBACd,cAAe,WACf,QAAS,mBACT,KAAM,QACN,MAAO,aACP,MAAO,QACP,KAAM,OACN,SAAU,aACV,UAAW,UACX,YAAa,UACb,KAAM,QACN,IAAK,MACL,QAAS,eACT,SAAU,QACV,OAAQ,SACR,WAAY,MACZ,UAAW,YACX,KAAM,OACN,KAAM,OACN,SAAU,OACV,UAAW,OACX,WAAY,SACZ,cAAe,SACf,kBAAmB,OACnB,sBAAuB,kBACvB,YAAa,MACb,eAAgB,QAChB,WAAY,iBACZ,YAAa,UACb,KAAM,OACN,UAAW,YACX,MAAO,SACP,OAAQ,UACR,KAAM,OACN,aAAc,OACd,gBAAiB,WACjB,IAAK,MACL,iBAAkB,cAClB,KAAM,OACN,UAAW,YACX,IAAK,MACL,UAAW,SACX,gBAAiB,qBACjB,WAAY,WACZ,UAAW,oBACX,WAAY,QACZ,cAAe,gBACf,SAAU,YACV,cAAe,OACf,qBAAsB,YACtB,YAAa,gBACb,KAAM,qBACN,QAAS,UACT,MAAO,QACP,SAAU,WACV,WAAY,OACZ,OAAQ,QACR,cAAe,OACf,OAAQ,OACR,WAAY,YACZ,eAAgB,OAChB,aAAc,MACd,KAAM,YACN,MAAO,QACP,aAAc,aACd,aAAc,SACd,eAAgB,YAChB,UAAW,YACX,MAAO,UACP,WAAY,OACZ,YAAa,cACb,mBAAoB,cACpB,SAAU,cACV,mBAAoB,QACpB,MAAO,UACP,OAAQ,QACR,gBAAiB,YACjB,gBAAiB,kBACjB,qBAAsB,aACtB,uBAAwB,SACxB,QAAS,UACT,aAAc,eACd,QAAS,aACT,OAAQ,QACR,sBAAuB,eACvB,QAAS,OACT,eAAgB,iBAChB,YAAa,aACb,WAAY,WACZ,QAAS,QACT,KAAM,UACN,OAAQ,SACR,KAAM,OACN,QAAS,aACT,SAAU,QACV,OAAQ,iBACR,OAAQ,SACR,SAAU,eACV,KAAM,OACN,SAAU,WACV,MAAO,UACP,OAAQ,SACR,aAAc,eACd,cAAe,gBACf,WAAY,aACZ,KAAM,yBACN,KAAM,gBACN,IAAK,WACL,KAAM,OACN,YAAa,OACb,UAAW,OACX,MAAO,QACP,WAAY,QACZ,cAAe,UACf,KAAM,aACN,SAAU,eACV,MAAO,QACP,MAAO,WACP,UAAW,eACX,UAAW,YACX,YAAa,cACb,KAAM,qBACN,GAAI,KACJ,YAAa,OACb,OAAQ,SACR,YAAa,SACb,SAAU,UACV,SAAU,cACV,cAAe,eACf,SAAU,QACV,UAAW,OACX,WAAY,MACZ,eAAgB,UAChB,QAAS,YACT,UAAW,YACX,QAAS,iBACT,cAAe,iBACf,YAAa,QACb,WAAY,UACZ,KAAM,OACN,KAAM,YACN,KAAM,OACV,EAuBA,SAAgB,EACZ,EACA,EAAqB,EACb,CAER,OADK,EACE,EAAiB,EAAK,KAAK,CAAC,CAAC,YAAY,IAAM,EADpC,CAEtB"}
|
|
@@ -2,70 +2,149 @@
|
|
|
2
2
|
var e = "circle-question-mark", t = {
|
|
3
3
|
ac_unit: "snowflake",
|
|
4
4
|
account_balance: "landmark",
|
|
5
|
+
account_balance_wallet: "wallet",
|
|
6
|
+
account_box: "square-user",
|
|
7
|
+
account_circle: "circle-user",
|
|
5
8
|
add: "plus",
|
|
9
|
+
add_circle: "circle-plus",
|
|
10
|
+
add_circle_outline: "circle-plus",
|
|
11
|
+
add_shopping_cart: "shopping-cart",
|
|
12
|
+
admin_panel_settings: "shield-user",
|
|
13
|
+
analytics: "chart-column",
|
|
14
|
+
apps: "layout-grid",
|
|
15
|
+
arrow_back: "arrow-left",
|
|
16
|
+
arrow_back_ios: "chevron-left",
|
|
17
|
+
arrow_back_ios_new: "chevron-left",
|
|
18
|
+
arrow_downward: "arrow-down",
|
|
19
|
+
arrow_drop_down: "chevron-down",
|
|
20
|
+
arrow_forward: "arrow-right",
|
|
21
|
+
arrow_forward_ios: "chevron-right",
|
|
22
|
+
arrow_right: "chevron-right",
|
|
23
|
+
arrow_right_alt: "arrow-right",
|
|
24
|
+
arrow_upward: "arrow-up",
|
|
25
|
+
article: "newspaper",
|
|
26
|
+
assignment: "clipboard-list",
|
|
27
|
+
attach_file: "paperclip",
|
|
28
|
+
attach_money: "dollar-sign",
|
|
29
|
+
autorenew: "refresh-cw",
|
|
30
|
+
badge: "id-card",
|
|
6
31
|
balance: "scale",
|
|
7
32
|
bar_chart: "chart-column",
|
|
8
33
|
battery_full: "battery-full",
|
|
9
34
|
bluetooth: "bluetooth",
|
|
10
35
|
bolt: "zap",
|
|
36
|
+
bookmark: "bookmark",
|
|
11
37
|
brush: "brush",
|
|
12
38
|
build: "wrench",
|
|
39
|
+
business: "building-2",
|
|
13
40
|
cake: "cake",
|
|
14
41
|
calculate: "calculator",
|
|
42
|
+
calendar_month: "calendar",
|
|
43
|
+
calendar_today: "calendar",
|
|
44
|
+
call: "phone",
|
|
15
45
|
campaign: "megaphone",
|
|
46
|
+
cancel: "circle-x",
|
|
16
47
|
car_repair: "car",
|
|
17
48
|
carpenter: "hammer",
|
|
49
|
+
category: "shapes",
|
|
18
50
|
chair: "armchair",
|
|
19
51
|
chat: "message-circle",
|
|
20
52
|
check: "check",
|
|
53
|
+
check_box: "square-check",
|
|
54
|
+
check_box_outline_blank: "square",
|
|
55
|
+
check_circle: "circle-check",
|
|
56
|
+
check_circle_outline: "circle-check",
|
|
57
|
+
chevron_left: "chevron-left",
|
|
58
|
+
chevron_right: "chevron-right",
|
|
21
59
|
child_care: "baby",
|
|
60
|
+
circle: "circle",
|
|
22
61
|
cleaning_services: "spray-can",
|
|
62
|
+
clear: "x",
|
|
23
63
|
close: "x",
|
|
24
64
|
cloud: "cloud",
|
|
25
65
|
code: "code",
|
|
26
66
|
computer: "monitor",
|
|
27
|
-
construction: "
|
|
67
|
+
construction: "construction",
|
|
68
|
+
content_copy: "copy",
|
|
28
69
|
content_cut: "scissors",
|
|
29
70
|
credit_card: "credit-card",
|
|
71
|
+
dark_mode: "moon",
|
|
30
72
|
dashboard: "layout-dashboard",
|
|
73
|
+
date_range: "calendar-range",
|
|
31
74
|
delete: "trash-2",
|
|
75
|
+
delete_forever: "trash-2",
|
|
76
|
+
delete_outline: "trash-2",
|
|
32
77
|
delivery_dining: "bike",
|
|
33
78
|
dentistry: "face-slightly-smiling",
|
|
34
79
|
description: "file-text",
|
|
35
80
|
directions_car: "car",
|
|
81
|
+
done: "check",
|
|
82
|
+
done_all: "check-check",
|
|
36
83
|
door_front: "door-open",
|
|
37
84
|
download: "download",
|
|
85
|
+
east: "arrow-right",
|
|
38
86
|
edit: "pencil",
|
|
87
|
+
edit_note: "pencil-line",
|
|
39
88
|
electrical_services: "plug-zap",
|
|
40
|
-
|
|
41
|
-
|
|
89
|
+
email: "mail",
|
|
90
|
+
emoji_events: "trophy",
|
|
91
|
+
engineering: "hard-hat",
|
|
92
|
+
error: "circle-alert",
|
|
93
|
+
error_outline: "circle-alert",
|
|
94
|
+
event: "calendar-days",
|
|
95
|
+
expand_less: "chevron-up",
|
|
96
|
+
expand_more: "chevron-down",
|
|
97
|
+
explore: "compass",
|
|
98
|
+
face: "face-slightly-smiling",
|
|
99
|
+
fact_check: "clipboard-check",
|
|
42
100
|
favorite: "heart",
|
|
101
|
+
favorite_border: "heart",
|
|
102
|
+
file_download: "download",
|
|
103
|
+
file_upload: "upload",
|
|
104
|
+
filter_alt: "funnel",
|
|
105
|
+
filter_list: "funnel",
|
|
106
|
+
fingerprint: "fingerprint-pattern",
|
|
43
107
|
fitness_center: "dumbbell",
|
|
44
108
|
flight: "plane",
|
|
45
109
|
folder: "folder",
|
|
110
|
+
format_list_bulleted: "list",
|
|
46
111
|
format_paint: "paint-roller",
|
|
47
112
|
forum: "messages-square",
|
|
48
113
|
gavel: "gavel",
|
|
114
|
+
grade: "star",
|
|
49
115
|
grass: "sprout",
|
|
116
|
+
grid_view: "layout-grid",
|
|
50
117
|
group: "users",
|
|
51
118
|
groups: "users",
|
|
52
119
|
handyman: "wrench",
|
|
53
120
|
hardware: "wrench",
|
|
54
121
|
help: "circle-question-mark",
|
|
122
|
+
help_outline: "circle-question-mark",
|
|
123
|
+
highlight_off: "circle-x",
|
|
55
124
|
history: "rotate-ccw-clock",
|
|
56
125
|
home: "house",
|
|
57
126
|
hotel: "bed-double",
|
|
58
127
|
image: "image",
|
|
59
128
|
info: "info",
|
|
129
|
+
insights: "chart-line",
|
|
130
|
+
inventory: "package",
|
|
131
|
+
inventory_2: "package",
|
|
60
132
|
iron: "shirt",
|
|
61
133
|
key: "key",
|
|
62
134
|
kitchen: "refrigerator",
|
|
135
|
+
language: "globe",
|
|
63
136
|
laptop: "laptop",
|
|
137
|
+
light_mode: "sun",
|
|
138
|
+
lightbulb: "lightbulb",
|
|
139
|
+
link: "link",
|
|
140
|
+
list: "list",
|
|
141
|
+
list_alt: "list",
|
|
64
142
|
local_bar: "wine",
|
|
65
143
|
local_cafe: "coffee",
|
|
66
144
|
local_florist: "flower",
|
|
67
145
|
local_gas_station: "fuel",
|
|
68
146
|
local_laundry_service: "washing-machine",
|
|
147
|
+
local_offer: "tag",
|
|
69
148
|
local_shipping: "truck",
|
|
70
149
|
local_taxi: "car-taxi-front",
|
|
71
150
|
location_on: "map-pin",
|
|
@@ -74,33 +153,71 @@ var e = "circle-question-mark", t = {
|
|
|
74
153
|
login: "log-in",
|
|
75
154
|
logout: "log-out",
|
|
76
155
|
mail: "mail",
|
|
156
|
+
mail_outline: "mail",
|
|
157
|
+
manage_accounts: "user-cog",
|
|
77
158
|
map: "map",
|
|
78
159
|
medical_services: "stethoscope",
|
|
79
160
|
menu: "menu",
|
|
161
|
+
menu_book: "book-open",
|
|
80
162
|
mic: "mic",
|
|
163
|
+
mode_edit: "pencil",
|
|
164
|
+
monetization_on: "circle-dollar-sign",
|
|
165
|
+
more_horiz: "ellipsis",
|
|
166
|
+
more_vert: "ellipsis-vertical",
|
|
81
167
|
music_note: "music",
|
|
168
|
+
navigate_next: "chevron-right",
|
|
169
|
+
note_add: "file-plus",
|
|
82
170
|
notifications: "bell",
|
|
171
|
+
notifications_active: "bell-ring",
|
|
172
|
+
open_in_new: "external-link",
|
|
173
|
+
paid: "circle-dollar-sign",
|
|
83
174
|
palette: "palette",
|
|
175
|
+
pause: "pause",
|
|
84
176
|
payments: "banknote",
|
|
85
177
|
pedal_bike: "bike",
|
|
178
|
+
people: "users",
|
|
179
|
+
perm_identity: "user",
|
|
86
180
|
person: "user",
|
|
181
|
+
person_add: "user-plus",
|
|
182
|
+
person_outline: "user",
|
|
87
183
|
pest_control: "bug",
|
|
88
184
|
pets: "paw-print",
|
|
89
185
|
phone: "phone",
|
|
90
186
|
phone_iphone: "smartphone",
|
|
91
187
|
photo_camera: "camera",
|
|
188
|
+
picture_as_pdf: "file-text",
|
|
92
189
|
pie_chart: "chart-pie",
|
|
190
|
+
place: "map-pin",
|
|
191
|
+
play_arrow: "play",
|
|
192
|
+
play_circle: "circle-play",
|
|
193
|
+
play_circle_filled: "circle-play",
|
|
93
194
|
plumbing: "shower-head",
|
|
195
|
+
power_settings_new: "power",
|
|
94
196
|
print: "printer",
|
|
95
|
-
|
|
197
|
+
public: "globe",
|
|
198
|
+
qr_code_scanner: "scan-line",
|
|
199
|
+
question_answer: "messages-square",
|
|
200
|
+
radio_button_checked: "circle-dot",
|
|
201
|
+
radio_button_unchecked: "circle",
|
|
202
|
+
receipt: "receipt",
|
|
203
|
+
receipt_long: "receipt-text",
|
|
204
|
+
refresh: "refresh-cw",
|
|
205
|
+
remove: "minus",
|
|
206
|
+
remove_circle_outline: "circle-minus",
|
|
207
|
+
reorder: "list",
|
|
208
|
+
report_problem: "triangle-alert",
|
|
209
|
+
restart_alt: "rotate-ccw",
|
|
96
210
|
restaurant: "utensils",
|
|
97
211
|
roofing: "house",
|
|
212
|
+
room: "map-pin",
|
|
98
213
|
router: "router",
|
|
214
|
+
save: "save",
|
|
99
215
|
savings: "piggy-bank",
|
|
100
216
|
schedule: "clock",
|
|
101
217
|
school: "graduation-cap",
|
|
102
218
|
search: "search",
|
|
103
219
|
security: "shield-check",
|
|
220
|
+
send: "send",
|
|
104
221
|
settings: "settings",
|
|
105
222
|
share: "share-2",
|
|
106
223
|
shield: "shield",
|
|
@@ -108,24 +225,38 @@ var e = "circle-question-mark", t = {
|
|
|
108
225
|
shopping_cart: "shopping-cart",
|
|
109
226
|
smartphone: "smartphone",
|
|
110
227
|
soap: "soap-dispenser-droplet",
|
|
228
|
+
sort: "arrow-down-up",
|
|
111
229
|
spa: "flower-2",
|
|
112
230
|
star: "star",
|
|
231
|
+
star_border: "star",
|
|
232
|
+
star_rate: "star",
|
|
113
233
|
store: "store",
|
|
114
234
|
storefront: "store",
|
|
115
235
|
support_agent: "headset",
|
|
116
236
|
sync: "refresh-cw",
|
|
117
|
-
|
|
237
|
+
task_alt: "circle-check",
|
|
238
|
+
timer: "timer",
|
|
239
|
+
today: "calendar",
|
|
240
|
+
toggle_on: "toggle-right",
|
|
118
241
|
translate: "languages",
|
|
119
242
|
trending_up: "trending-up",
|
|
243
|
+
tune: "sliders-horizontal",
|
|
120
244
|
tv: "tv",
|
|
121
245
|
two_wheeler: "bike",
|
|
122
246
|
upload: "upload",
|
|
247
|
+
upload_file: "upload",
|
|
123
248
|
vaccines: "syringe",
|
|
124
249
|
verified: "badge-check",
|
|
250
|
+
verified_user: "shield-check",
|
|
125
251
|
videocam: "video",
|
|
252
|
+
view_list: "list",
|
|
126
253
|
visibility: "eye",
|
|
254
|
+
visibility_off: "eye-off",
|
|
255
|
+
vpn_key: "key-round",
|
|
127
256
|
warehouse: "warehouse",
|
|
128
257
|
warning: "triangle-alert",
|
|
258
|
+
warning_amber: "triangle-alert",
|
|
259
|
+
watch_later: "clock",
|
|
129
260
|
water_drop: "droplet",
|
|
130
261
|
wifi: "wifi",
|
|
131
262
|
work: "briefcase",
|