@mgamadeus/ddd-admin-ui 0.0.0-stage → 0.1.0-rc.1
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/.claude/skills/ddd-admin-ui-specialist/SKILL.md +29 -0
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +131 -2
- package/dist/cli/ddd-admin-ui.d.ts +3 -0
- package/dist/cli/ddd-admin-ui.d.ts.map +1 -0
- package/dist/cli/ddd-admin-ui.js +18 -0
- package/dist/cli/ddd-admin-ui.js.map +1 -0
- package/dist/cli/linkSkills.d.ts +25 -0
- package/dist/cli/linkSkills.d.ts.map +1 -0
- package/dist/cli/linkSkills.js +76 -0
- package/dist/cli/linkSkills.js.map +1 -0
- package/dist/components.css +42 -0
- package/dist/data/StatTile.d.ts +8 -0
- package/dist/data/StatTile.d.ts.map +1 -0
- package/dist/data/StatTile.js +6 -0
- package/dist/data/StatTile.js.map +1 -0
- package/dist/data/index.d.ts +2 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/form/Form.d.ts +13 -0
- package/dist/form/Form.d.ts.map +1 -0
- package/dist/form/Form.js +11 -0
- package/dist/form/Form.js.map +1 -0
- package/dist/form/fieldLabels.d.ts +10 -0
- package/dist/form/fieldLabels.d.ts.map +1 -0
- package/dist/form/fieldLabels.js +8 -0
- package/dist/form/fieldLabels.js.map +1 -0
- package/dist/form/index.d.ts +3 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form/index.js +3 -0
- package/dist/form/index.js.map +1 -0
- package/dist/glass/GlassPanel.d.ts +7 -0
- package/dist/glass/GlassPanel.d.ts.map +1 -0
- package/dist/glass/GlassPanel.js +5 -0
- package/dist/glass/GlassPanel.js.map +1 -0
- package/dist/glass/index.d.ts +2 -0
- package/dist/glass/index.d.ts.map +1 -0
- package/dist/glass/index.js +2 -0
- package/dist/glass/index.js.map +1 -0
- package/dist/i18n/Translate.d.ts +7 -0
- package/dist/i18n/Translate.d.ts.map +1 -0
- package/dist/i18n/Translate.js +9 -0
- package/dist/i18n/Translate.js.map +1 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +5 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/m.d.ts +7 -0
- package/dist/i18n/m.d.ts.map +1 -0
- package/dist/i18n/m.js +7 -0
- package/dist/i18n/m.js.map +1 -0
- package/dist/i18n/store.d.ts +24 -0
- package/dist/i18n/store.d.ts.map +1 -0
- package/dist/i18n/store.js +30 -0
- package/dist/i18n/store.js.map +1 -0
- package/dist/i18n/useTranslate.d.ts +9 -0
- package/dist/i18n/useTranslate.d.ts.map +1 -0
- package/dist/i18n/useTranslate.js +12 -0
- package/dist/i18n/useTranslate.js.map +1 -0
- package/dist/i18n-keys.json +32 -0
- package/dist/list/ClearFiltersButton.d.ts +7 -0
- package/dist/list/ClearFiltersButton.d.ts.map +1 -0
- package/dist/list/ClearFiltersButton.js +10 -0
- package/dist/list/ClearFiltersButton.js.map +1 -0
- package/dist/list/DateCell.d.ts +8 -0
- package/dist/list/DateCell.d.ts.map +1 -0
- package/dist/list/DateCell.js +12 -0
- package/dist/list/DateCell.js.map +1 -0
- package/dist/list/index.d.ts +3 -0
- package/dist/list/index.d.ts.map +1 -0
- package/dist/list/index.js +3 -0
- package/dist/list/index.js.map +1 -0
- package/dist/logic/index.d.ts +6 -0
- package/dist/logic/index.d.ts.map +1 -0
- package/dist/logic/index.js +6 -0
- package/dist/logic/index.js.map +1 -0
- package/dist/logic/pure/errors.d.ts +3 -0
- package/dist/logic/pure/errors.d.ts.map +1 -0
- package/dist/logic/pure/errors.js +5 -0
- package/dist/logic/pure/errors.js.map +1 -0
- package/dist/logic/pure/format.d.ts +15 -0
- package/dist/logic/pure/format.d.ts.map +1 -0
- package/dist/logic/pure/format.js +32 -0
- package/dist/logic/pure/format.js.map +1 -0
- package/dist/logic/pure/notify.d.ts +19 -0
- package/dist/logic/pure/notify.d.ts.map +1 -0
- package/dist/logic/pure/notify.js +33 -0
- package/dist/logic/pure/notify.js.map +1 -0
- package/dist/logic/pure/statusMap.d.ts +12 -0
- package/dist/logic/pure/statusMap.d.ts.map +1 -0
- package/dist/logic/pure/statusMap.js +5 -0
- package/dist/logic/pure/statusMap.js.map +1 -0
- package/dist/logic/react/useToggle.d.ts +8 -0
- package/dist/logic/react/useToggle.d.ts.map +1 -0
- package/dist/logic/react/useToggle.js +9 -0
- package/dist/logic/react/useToggle.js.map +1 -0
- package/dist/media/MediaItemField.d.ts +6 -0
- package/dist/media/MediaItemField.d.ts.map +1 -0
- package/dist/media/MediaItemField.js +11 -0
- package/dist/media/MediaItemField.js.map +1 -0
- package/dist/media/index.d.ts +3 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +2 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/types.d.ts +7 -0
- package/dist/media/types.d.ts.map +1 -0
- package/dist/media/types.js +2 -0
- package/dist/media/types.js.map +1 -0
- package/dist/next/index.d.ts +3 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +3 -0
- package/dist/next/index.js.map +1 -0
- package/dist/next/searchParamsWriter.d.ts +7 -0
- package/dist/next/searchParamsWriter.d.ts.map +1 -0
- package/dist/next/searchParamsWriter.js +34 -0
- package/dist/next/searchParamsWriter.js.map +1 -0
- package/dist/next/useNextSearchParam.d.ts +3 -0
- package/dist/next/useNextSearchParam.d.ts.map +1 -0
- package/dist/next/useNextSearchParam.js +16 -0
- package/dist/next/useNextSearchParam.js.map +1 -0
- package/dist/notify-sonner/index.d.ts +2 -0
- package/dist/notify-sonner/index.d.ts.map +1 -0
- package/dist/notify-sonner/index.js +2 -0
- package/dist/notify-sonner/index.js.map +1 -0
- package/dist/notify-sonner/sonnerNotifications.d.ts +4 -0
- package/dist/notify-sonner/sonnerNotifications.d.ts.map +1 -0
- package/dist/notify-sonner/sonnerNotifications.js +12 -0
- package/dist/notify-sonner/sonnerNotifications.js.map +1 -0
- package/dist/page/PageFrame.d.ts +9 -0
- package/dist/page/PageFrame.d.ts.map +1 -0
- package/dist/page/PageFrame.js +5 -0
- package/dist/page/PageFrame.js.map +1 -0
- package/dist/page/index.d.ts +2 -0
- package/dist/page/index.d.ts.map +1 -0
- package/dist/page/index.js +2 -0
- package/dist/page/index.js.map +1 -0
- package/dist/primitives/button.d.ts +10 -0
- package/dist/primitives/button.d.ts.map +1 -0
- package/dist/primitives/button.js +20 -0
- package/dist/primitives/button.js.map +1 -0
- package/dist/primitives/cn.d.ts +4 -0
- package/dist/primitives/cn.d.ts.map +1 -0
- package/dist/primitives/cn.js +5 -0
- package/dist/primitives/cn.js.map +1 -0
- package/dist/primitives/dialog.d.ts +10 -0
- package/dist/primitives/dialog.d.ts.map +1 -0
- package/dist/primitives/dialog.js +19 -0
- package/dist/primitives/dialog.js.map +1 -0
- package/dist/primitives/index.d.ts +7 -0
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +7 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/portalContainer.d.ts +8 -0
- package/dist/primitives/portalContainer.d.ts.map +1 -0
- package/dist/primitives/portalContainer.js +12 -0
- package/dist/primitives/portalContainer.js.map +1 -0
- package/dist/primitives/select.d.ts +9 -0
- package/dist/primitives/select.d.ts.map +1 -0
- package/dist/primitives/select.js +16 -0
- package/dist/primitives/select.js.map +1 -0
- package/dist/primitives/sheet.d.ts +9 -0
- package/dist/primitives/sheet.d.ts.map +1 -0
- package/dist/primitives/sheet.js +15 -0
- package/dist/primitives/sheet.js.map +1 -0
- package/dist/provider/AdminUiProvider.d.ts +7 -0
- package/dist/provider/AdminUiProvider.d.ts.map +1 -0
- package/dist/provider/AdminUiProvider.js +32 -0
- package/dist/provider/AdminUiProvider.js.map +1 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +2 -0
- package/dist/provider/index.js.map +1 -0
- package/dist/provider/types.d.ts +33 -0
- package/dist/provider/types.d.ts.map +1 -0
- package/dist/provider/types.js +2 -0
- package/dist/provider/types.js.map +1 -0
- package/dist/theme.css +44 -0
- package/dist/tokens.json +66 -0
- package/dist/translations/TranslatableInputField.d.ts +8 -0
- package/dist/translations/TranslatableInputField.d.ts.map +1 -0
- package/dist/translations/TranslatableInputField.js +12 -0
- package/dist/translations/TranslatableInputField.js.map +1 -0
- package/dist/translations/index.d.ts +2 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +2 -0
- package/dist/translations/index.js.map +1 -0
- package/docs/README.md +11 -0
- package/package.json +158 -3
- package/scripts/check-tokens.mjs +136 -0
- package/scripts/lib/i18n-manifest.mjs +91 -0
- package/scripts/lib/source-scan.mjs +258 -0
package/dist/i18n/m.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { translateText } from "./store.js";
|
|
2
|
+
/**
|
|
3
|
+
* Translates a text outside React: server components, `export const metadata`, schemas, event handlers.
|
|
4
|
+
* Same lookup as {@link translateText}; the name marks the call for the translation-key manifest.
|
|
5
|
+
*/
|
|
6
|
+
export const m = (text, options) => translateText(text, options);
|
|
7
|
+
//# sourceMappingURL=m.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"m.js","sourceRoot":"","sources":["../../src/i18n/m.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAyB,MAAM,YAAY,CAAC;AAElE;;;GAGG;AACH,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,OAA0B,EAAU,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type WritingStyle = 'FORMAL' | 'INFORMAL';
|
|
2
|
+
export interface TranslationsSnapshot {
|
|
3
|
+
languageCode: string;
|
|
4
|
+
writingStyle: WritingStyle;
|
|
5
|
+
/** Key = `<text>` or `<text>__<context>` (see {@link translationKeyOf}). */
|
|
6
|
+
translations: Readonly<Record<string, string>>;
|
|
7
|
+
}
|
|
8
|
+
export interface TranslateOptions {
|
|
9
|
+
/** Disambiguates equal texts with different meanings. */
|
|
10
|
+
context?: string;
|
|
11
|
+
/** Replaces `%name%` placeholders. */
|
|
12
|
+
replacements?: Readonly<Record<string, string | number>>;
|
|
13
|
+
}
|
|
14
|
+
/** The store key of a text: the text itself, or `<text>__<context>`. */
|
|
15
|
+
export declare const translationKeyOf: (text: string, context?: string) => string;
|
|
16
|
+
/** Replaces the active language and its translations; notifies every subscriber. */
|
|
17
|
+
export declare const setTranslations: (languageCode: string, writingStyle: WritingStyle, translations: Readonly<Record<string, string>>) => void;
|
|
18
|
+
/** The current language, writing style and translations. Stable identity until the next {@link setTranslations}. */
|
|
19
|
+
export declare const getTranslationsSnapshot: () => TranslationsSnapshot;
|
|
20
|
+
/** Subscribes to store changes; returns the unsubscribe function. */
|
|
21
|
+
export declare const subscribeTranslations: (listener: () => void) => (() => void);
|
|
22
|
+
/** Translates a text with the active translations; an untranslated text is returned as written. */
|
|
23
|
+
export declare const translateText: (text: string, options?: TranslateOptions) => string;
|
|
24
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/i18n/store.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEjD,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,YAAY,CAAC;IAC3B,4EAA4E;IAC5E,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,gBAAgB;IAC/B,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,YAAY,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;CAC1D;AAKD,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,UAAU,MAAM,KAAG,MAAkD,CAAC;AAErH,oFAAoF;AACpF,eAAO,MAAM,eAAe,GAC1B,cAAc,MAAM,EACpB,cAAc,YAAY,EAC1B,cAAc,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,KAC7C,IAGF,CAAC;AAEF,oHAAoH;AACpH,eAAO,MAAM,uBAAuB,QAAO,oBAAgC,CAAC;AAE5E,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAKvE,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,UAAS,gBAAqB,KAAG,MAO5E,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// The package's one translation store (module state). It must exist exactly once in a host bundle:
|
|
2
|
+
// every entry imports it from here, and scripts/check-package.mjs fails when a second copy appears.
|
|
3
|
+
let snapshot = { languageCode: 'en', writingStyle: 'FORMAL', translations: {} };
|
|
4
|
+
const listeners = new Set();
|
|
5
|
+
/** The store key of a text: the text itself, or `<text>__<context>`. */
|
|
6
|
+
export const translationKeyOf = (text, context) => (context ? `${text}__${context}` : text);
|
|
7
|
+
/** Replaces the active language and its translations; notifies every subscriber. */
|
|
8
|
+
export const setTranslations = (languageCode, writingStyle, translations) => {
|
|
9
|
+
snapshot = { languageCode, writingStyle, translations };
|
|
10
|
+
for (const listener of listeners)
|
|
11
|
+
listener();
|
|
12
|
+
};
|
|
13
|
+
/** The current language, writing style and translations. Stable identity until the next {@link setTranslations}. */
|
|
14
|
+
export const getTranslationsSnapshot = () => snapshot;
|
|
15
|
+
/** Subscribes to store changes; returns the unsubscribe function. */
|
|
16
|
+
export const subscribeTranslations = (listener) => {
|
|
17
|
+
listeners.add(listener);
|
|
18
|
+
return () => {
|
|
19
|
+
listeners.delete(listener);
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/** Translates a text with the active translations; an untranslated text is returned as written. */
|
|
23
|
+
export const translateText = (text, options = {}) => {
|
|
24
|
+
const message = snapshot.translations[translationKeyOf(text, options.context)] ?? text;
|
|
25
|
+
const replacements = options.replacements;
|
|
26
|
+
if (!replacements)
|
|
27
|
+
return message;
|
|
28
|
+
return message.replace(/%([A-Za-z_]\w*)%/g, (match, name) => name in replacements ? String(replacements[name]) : match);
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/i18n/store.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,oGAAoG;AAkBpG,IAAI,QAAQ,GAAyB,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC;AACtG,MAAM,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;AAExC,wEAAwE;AACxE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,OAAgB,EAAU,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAErH,oFAAoF;AACpF,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,YAAoB,EACpB,YAA0B,EAC1B,YAA8C,EACxC,EAAE;IACR,QAAQ,GAAG,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,CAAC;IACxD,KAAK,MAAM,QAAQ,IAAI,SAAS;QAAE,QAAQ,EAAE,CAAC;AAC/C,CAAC,CAAC;AAEF,oHAAoH;AACpH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAyB,EAAE,CAAC,QAAQ,CAAC;AAE5E,qEAAqE;AACrE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAoB,EAAgB,EAAE;IAC1E,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,OAAO,GAAG,EAAE;QACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,mGAAmG;AACnG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,UAA4B,EAAE,EAAU,EAAE;IACpF,MAAM,OAAO,GAAG,QAAQ,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC;IACvF,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;IAC1C,IAAI,CAAC,YAAY;QAAE,OAAO,OAAO,CAAC;IAClC,OAAO,OAAO,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE,CAClE,IAAI,IAAI,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAC1D,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TranslateOptions, type WritingStyle } from './store.js';
|
|
2
|
+
export interface UseTranslateResult {
|
|
3
|
+
t: (text: string, options?: TranslateOptions) => string;
|
|
4
|
+
languageCode: string;
|
|
5
|
+
writingStyle: WritingStyle;
|
|
6
|
+
}
|
|
7
|
+
/** Re-renders when the active language or its translations change. */
|
|
8
|
+
export declare const useTranslate: () => UseTranslateResult;
|
|
9
|
+
//# sourceMappingURL=useTranslate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranslate.d.ts","sourceRoot":"","sources":["../../src/i18n/useTranslate.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,KAAK,MAAM,CAAC;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,sEAAsE;AACtE,eAAO,MAAM,YAAY,QAAO,kBAM/B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useCallback, useSyncExternalStore } from 'react';
|
|
3
|
+
import { getTranslationsSnapshot, subscribeTranslations, translateText, } from "./store.js";
|
|
4
|
+
/** Re-renders when the active language or its translations change. */
|
|
5
|
+
export const useTranslate = () => {
|
|
6
|
+
const snapshot = useSyncExternalStore(subscribeTranslations, getTranslationsSnapshot, getTranslationsSnapshot);
|
|
7
|
+
// `snapshot` is a dependency on purpose: a new snapshot must give a new `t`.
|
|
8
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9
|
+
const t = useCallback((text, options) => translateText(text, options), [snapshot]);
|
|
10
|
+
return { t, languageCode: snapshot.languageCode, writingStyle: snapshot.writingStyle };
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useTranslate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranslate.js","sourceRoot":"","sources":["../../src/i18n/useTranslate.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,GAGd,MAAM,YAAY,CAAC;AAQpB,sEAAsE;AACtE,MAAM,CAAC,MAAM,YAAY,GAAG,GAAuB,EAAE;IACnD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,CAAC;IAC/G,6EAA6E;IAC7E,uDAAuD;IACvD,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,IAAY,EAAE,OAA0B,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9G,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,CAAC;AACzF,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@mgamadeus/ddd-admin-ui",
|
|
3
|
+
"version": "0.1.0-rc.1",
|
|
4
|
+
"generatedBy": "scripts/build-i18n-manifest.mjs",
|
|
5
|
+
"keys": [
|
|
6
|
+
{
|
|
7
|
+
"key": "Clear filters",
|
|
8
|
+
"text": "Clear filters",
|
|
9
|
+
"hint": "Button in a list toolbar that resets every filter of the list.",
|
|
10
|
+
"files": [
|
|
11
|
+
"list/ClearFiltersButton.tsx"
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"key": "Close__dialog",
|
|
16
|
+
"text": "Close",
|
|
17
|
+
"context": "dialog",
|
|
18
|
+
"hint": "Screen-reader label of the close button of a dialog.",
|
|
19
|
+
"files": [
|
|
20
|
+
"primitives/dialog.tsx"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "The request failed",
|
|
25
|
+
"text": "The request failed",
|
|
26
|
+
"hint": "Fallback message when a failed request carries no message of its own.",
|
|
27
|
+
"files": [
|
|
28
|
+
"logic/pure/errors.ts"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ClearFiltersButtonProps {
|
|
2
|
+
onClear: () => void;
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** Resets the filters of a list. */
|
|
6
|
+
export declare const ClearFiltersButton: ({ onClear, disabled }: ClearFiltersButtonProps) => import("react").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=ClearFiltersButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClearFiltersButton.d.ts","sourceRoot":"","sources":["../../src/list/ClearFiltersButton.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,oCAAoC;AACpC,eAAO,MAAM,kBAAkB,GAAI,uBAAuB,uBAAuB,gCAOhF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslate } from "../i18n/useTranslate.js";
|
|
4
|
+
import { Button } from "../primitives/button.js";
|
|
5
|
+
/** Resets the filters of a list. */
|
|
6
|
+
export const ClearFiltersButton = ({ onClear, disabled }) => {
|
|
7
|
+
const { t } = useTranslate();
|
|
8
|
+
return (_jsx(Button, { variant: "ghost", size: "sm", "data-list-toolbar": "", onClick: onClear, disabled: disabled, children: t('Clear filters') }));
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=ClearFiltersButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClearFiltersButton.js","sourceRoot":"","sources":["../../src/list/ClearFiltersButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAA0B,CAAC;AAOlD,oCAAoC;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAAE,OAAO,EAAE,QAAQ,EAA2B,EAAE,EAAE;IACnF,MAAM,EAAE,CAAC,EAAE,GAAG,YAAY,EAAE,CAAC;IAC7B,OAAO,CACL,KAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,uBAAmB,EAAE,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,YACxF,CAAC,CAAC,eAAe,CAAC,GACZ,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DateCellProps {
|
|
2
|
+
value: Date | string | number | null | undefined;
|
|
3
|
+
/** IANA time zone; pass one for output that is equal on server and client. */
|
|
4
|
+
timeZone?: string;
|
|
5
|
+
}
|
|
6
|
+
/** A table cell value: the date in the active language, or an em dash. Re-renders on a language switch. */
|
|
7
|
+
export declare const DateCell: ({ value, timeZone }: DateCellProps) => import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=DateCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateCell.d.ts","sourceRoot":"","sources":["../../src/list/DateCell.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACjD,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,2GAA2G;AAC3G,eAAO,MAAM,QAAQ,GAAI,qBAAqB,aAAa,gCAQ1D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslate } from "../i18n/useTranslate.js";
|
|
4
|
+
import { formatDate } from "../logic/pure/format.js";
|
|
5
|
+
/** A table cell value: the date in the active language, or an em dash. Re-renders on a language switch. */
|
|
6
|
+
export const DateCell = ({ value, timeZone }) => {
|
|
7
|
+
const { languageCode } = useTranslate();
|
|
8
|
+
if (value === null || value === undefined || value === '')
|
|
9
|
+
return _jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
10
|
+
return (_jsx("time", { "data-slot": "date-cell", className: "tabular-nums", children: formatDate(value, { locale: languageCode, ...(timeZone ? { timeZone } : {}) }) }));
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=DateCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateCell.js","sourceRoot":"","sources":["../../src/list/DateCell.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAQrD,2GAA2G;AAC3G,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAiB,EAAE,EAAE;IAC7D,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAAC;IACxC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,eAAM,SAAS,EAAC,uBAAuB,uBAAS,CAAC;IACnH,OAAO,CACL,4BAAgB,WAAW,EAAC,SAAS,EAAC,cAAc,YACjD,UAAU,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAC1E,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/list/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,eAAgB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAgC,MAAM,yBAA0B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { formatDate, formatDateTime, formatUiNumber, type FormatOptions } from './pure/format.js';
|
|
2
|
+
export { defineStatusMap, statusDefinitionOf, type StatusDefinition, type StatusMap, type StatusTone, } from './pure/statusMap.js';
|
|
3
|
+
export { notify, setNotificationAdapter, type NotificationAdapter, type NotifyOptions } from './pure/notify.js';
|
|
4
|
+
export { describeRequestError } from './pure/errors.js';
|
|
5
|
+
export { useToggle, type UseToggleResult } from './react/useToggle.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAChH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { formatDate, formatDateTime, formatUiNumber } from "./pure/format.js";
|
|
2
|
+
export { defineStatusMap, statusDefinitionOf, } from "./pure/statusMap.js";
|
|
3
|
+
export { notify, setNotificationAdapter } from "./pure/notify.js";
|
|
4
|
+
export { describeRequestError } from "./pure/errors.js";
|
|
5
|
+
export { useToggle } from "./react/useToggle.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,kBAAkB,CAAC;AAClG,OAAO,EACL,eAAe,EACf,kBAAkB,GAInB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,sBAAsB,EAAgD,MAAM,kBAAkB,CAAC;AAChH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAwB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/logic/pure/errors.ts"],"names":[],"mappings":"AAGA,2GAA2G;AAC3G,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,MACiB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { normalizeDddError } from '@mgamadeus/ddd-web/contract';
|
|
2
|
+
import { translateText } from "../../i18n/store.js";
|
|
3
|
+
/** The message of a failed DDD request, ready to show: the backend message, else a translated fallback. */
|
|
4
|
+
export const describeRequestError = (error) => normalizeDddError(error, translateText('The request failed')).message;
|
|
5
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/logic/pure/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,2GAA2G;AAC3G,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAc,EAAU,EAAE,CAC7D,iBAAiB,CAAC,KAAK,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC,OAAO,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface FormatOptions {
|
|
2
|
+
/** BCP 47 locale; default: the active language of the translation store. */
|
|
3
|
+
locale?: string;
|
|
4
|
+
/** IANA time zone; default: the runtime's. Pass one for output that is equal on server and client. */
|
|
5
|
+
timeZone?: string;
|
|
6
|
+
}
|
|
7
|
+
/** A date as `dd.mm.yyyy` / `mm/dd/yyyy` … in the active (or given) locale. Empty for an invalid value. */
|
|
8
|
+
export declare const formatDate: (value: Date | string | number, options?: FormatOptions) => string;
|
|
9
|
+
/** A date with hours and minutes in the active (or given) locale. Empty for an invalid value. */
|
|
10
|
+
export declare const formatDateTime: (value: Date | string | number, options?: FormatOptions) => string;
|
|
11
|
+
/** A number with the grouping and decimal separator of the active (or given) locale. */
|
|
12
|
+
export declare const formatUiNumber: (value: number, options?: FormatOptions & {
|
|
13
|
+
maximumFractionDigits?: number;
|
|
14
|
+
}) => string;
|
|
15
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/logic/pure/format.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD,2GAA2G;AAC3G,eAAO,MAAM,UAAU,GAAI,OAAO,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,UAAS,aAAkB,KAAG,MASvF,CAAC;AAEF,iGAAiG;AACjG,eAAO,MAAM,cAAc,GAAI,OAAO,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,UAAS,aAAkB,KAAG,MAW3F,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,UAAS,aAAa,GAAG;IAAE,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAAO,KAAG,MAG9G,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getTranslationsSnapshot } from "../../i18n/store.js";
|
|
2
|
+
const toDate = (value) => (value instanceof Date ? value : new Date(value));
|
|
3
|
+
const activeLocale = (options) => options.locale ?? getTranslationsSnapshot().languageCode;
|
|
4
|
+
/** A date as `dd.mm.yyyy` / `mm/dd/yyyy` … in the active (or given) locale. Empty for an invalid value. */
|
|
5
|
+
export const formatDate = (value, options = {}) => {
|
|
6
|
+
const date = toDate(value);
|
|
7
|
+
if (Number.isNaN(date.getTime()))
|
|
8
|
+
return '';
|
|
9
|
+
return new Intl.DateTimeFormat(activeLocale(options), {
|
|
10
|
+
day: '2-digit',
|
|
11
|
+
month: '2-digit',
|
|
12
|
+
year: 'numeric',
|
|
13
|
+
...(options.timeZone ? { timeZone: options.timeZone } : {}),
|
|
14
|
+
}).format(date);
|
|
15
|
+
};
|
|
16
|
+
/** A date with hours and minutes in the active (or given) locale. Empty for an invalid value. */
|
|
17
|
+
export const formatDateTime = (value, options = {}) => {
|
|
18
|
+
const date = toDate(value);
|
|
19
|
+
if (Number.isNaN(date.getTime()))
|
|
20
|
+
return '';
|
|
21
|
+
return new Intl.DateTimeFormat(activeLocale(options), {
|
|
22
|
+
day: '2-digit',
|
|
23
|
+
month: '2-digit',
|
|
24
|
+
year: 'numeric',
|
|
25
|
+
hour: '2-digit',
|
|
26
|
+
minute: '2-digit',
|
|
27
|
+
...(options.timeZone ? { timeZone: options.timeZone } : {}),
|
|
28
|
+
}).format(date);
|
|
29
|
+
};
|
|
30
|
+
/** A number with the grouping and decimal separator of the active (or given) locale. */
|
|
31
|
+
export const formatUiNumber = (value, options = {}) => new Intl.NumberFormat(activeLocale(options), { maximumFractionDigits: options.maximumFractionDigits ?? 2 }).format(value);
|
|
32
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/logic/pure/format.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAS9D,MAAM,MAAM,GAAG,CAAC,KAA6B,EAAQ,EAAE,CAAC,CAAC,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAE1G,MAAM,YAAY,GAAG,CAAC,OAAsB,EAAU,EAAE,CAAC,OAAO,CAAC,MAAM,IAAI,uBAAuB,EAAE,CAAC,YAAY,CAAC;AAElH,2GAA2G;AAC3G,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAA6B,EAAE,UAAyB,EAAE,EAAU,EAAE;IAC/F,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5C,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;QACpD,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CAAC;AAEF,iGAAiG;AACjG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA6B,EAAE,UAAyB,EAAE,EAAU,EAAE;IACnG,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5C,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;QACpD,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5D,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC,CAAC;AAEF,wFAAwF;AACxF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,UAA8D,EAAE,EAAU,EAAE,CACxH,IAAI,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE,qBAAqB,EAAE,OAAO,CAAC,qBAAqB,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAChH,KAAK,CACN,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface NotifyOptions {
|
|
2
|
+
id?: string | number;
|
|
3
|
+
description?: string;
|
|
4
|
+
duration?: number;
|
|
5
|
+
}
|
|
6
|
+
/** What `notify` needs from a toast system. `./notify-sonner` provides one for sonner. */
|
|
7
|
+
export interface NotificationAdapter {
|
|
8
|
+
success: (message: string, options?: NotifyOptions) => string | number;
|
|
9
|
+
info: (message: string, options?: NotifyOptions) => string | number;
|
|
10
|
+
error: (message: string, options?: NotifyOptions) => string | number;
|
|
11
|
+
/** The same `id` updates the toast in place. */
|
|
12
|
+
loading: (message: string, options?: NotifyOptions) => string | number;
|
|
13
|
+
dismiss: (id?: string | number) => void;
|
|
14
|
+
}
|
|
15
|
+
/** Registers the toast system (`null` unregisters). The provider calls it; hosts without the provider may too. */
|
|
16
|
+
export declare const setNotificationAdapter: (next: NotificationAdapter | null) => void;
|
|
17
|
+
/** Shows a toast through the registered adapter. Without one it is a no-op that warns once in development. */
|
|
18
|
+
export declare const notify: NotificationAdapter;
|
|
19
|
+
//# sourceMappingURL=notify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.d.ts","sourceRoot":"","sources":["../../../src/logic/pure/notify.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,0FAA0F;AAC1F,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,MAAM,GAAG,MAAM,CAAC;IACvE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,MAAM,GAAG,MAAM,CAAC;IACpE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,MAAM,GAAG,MAAM,CAAC;IACrE,gDAAgD;IAChD,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,MAAM,GAAG,MAAM,CAAC;IACvE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAC;CACzC;AAKD,kHAAkH;AAClH,eAAO,MAAM,sBAAsB,GAAI,MAAM,mBAAmB,GAAG,IAAI,KAAG,IAEzE,CAAC;AAgBF,8GAA8G;AAC9G,eAAO,MAAM,MAAM,EAAE,mBASpB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// The registered notification adapter (module state). Exists once; scripts/check-package.mjs verifies it.
|
|
2
|
+
let adapter = null;
|
|
3
|
+
let hasWarned = false;
|
|
4
|
+
/** Registers the toast system (`null` unregisters). The provider calls it; hosts without the provider may too. */
|
|
5
|
+
export const setNotificationAdapter = (next) => {
|
|
6
|
+
adapter = next;
|
|
7
|
+
};
|
|
8
|
+
const warnOnce = () => {
|
|
9
|
+
if (hasWarned || (typeof process !== 'undefined' && process.env.NODE_ENV === 'production'))
|
|
10
|
+
return;
|
|
11
|
+
hasWarned = true;
|
|
12
|
+
console.warn('[ddd-admin-ui] notify() was called before a notification adapter was registered.');
|
|
13
|
+
};
|
|
14
|
+
const send = (kind) => (message, options) => {
|
|
15
|
+
if (adapter)
|
|
16
|
+
return adapter[kind](message, options);
|
|
17
|
+
warnOnce();
|
|
18
|
+
return options?.id ?? '';
|
|
19
|
+
};
|
|
20
|
+
/** Shows a toast through the registered adapter. Without one it is a no-op that warns once in development. */
|
|
21
|
+
export const notify = {
|
|
22
|
+
success: send('success'),
|
|
23
|
+
info: send('info'),
|
|
24
|
+
error: send('error'),
|
|
25
|
+
loading: send('loading'),
|
|
26
|
+
dismiss: (id) => {
|
|
27
|
+
if (adapter)
|
|
28
|
+
adapter.dismiss(id);
|
|
29
|
+
else
|
|
30
|
+
warnOnce();
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=notify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notify.js","sourceRoot":"","sources":["../../../src/logic/pure/notify.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAkB1G,IAAI,OAAO,GAA+B,IAAI,CAAC;AAC/C,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,kHAAkH;AAClH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,IAAgC,EAAQ,EAAE;IAC/E,OAAO,GAAG,IAAI,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,GAAS,EAAE;IAC1B,IAAI,SAAS,IAAI,CAAC,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;QAAE,OAAO;IACnG,SAAS,GAAG,IAAI,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,kFAAkF,CAAC,CAAC;AACnG,CAAC,CAAC;AAEF,MAAM,IAAI,GACR,CAAC,IAA8C,EAAE,EAAE,CACnD,CAAC,OAAe,EAAE,OAAuB,EAAmB,EAAE;IAC5D,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,EAAE,CAAC;IACX,OAAO,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEJ,8GAA8G;AAC9G,MAAM,CAAC,MAAM,MAAM,GAAwB;IACzC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;IAClB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;IACpB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;IACxB,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE;QACd,IAAI,OAAO;YAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;;YAC5B,QAAQ,EAAE,CAAC;IAClB,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type StatusTone = 'neutral' | 'info' | 'success' | 'warning' | 'destructive';
|
|
2
|
+
export interface StatusDefinition {
|
|
3
|
+
/** Untranslated label; blocks translate it when they render. */
|
|
4
|
+
label: string;
|
|
5
|
+
tone: StatusTone;
|
|
6
|
+
}
|
|
7
|
+
export type StatusMap<Status extends string> = Readonly<Record<Status, StatusDefinition>>;
|
|
8
|
+
/** Declares the label and tone of every value of a status enum (server-safe, no React). */
|
|
9
|
+
export declare const defineStatusMap: <Status extends string>(map: StatusMap<Status>) => StatusMap<Status>;
|
|
10
|
+
/** The definition of a status, or a neutral fallback that shows the raw value. */
|
|
11
|
+
export declare const statusDefinitionOf: <Status extends string>(map: StatusMap<Status>, status: string) => StatusDefinition;
|
|
12
|
+
//# sourceMappingURL=statusMap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusMap.d.ts","sourceRoot":"","sources":["../../../src/logic/pure/statusMap.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAEpF,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,MAAM,SAAS,CAAC,MAAM,SAAS,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE1F,2FAA2F;AAC3F,eAAO,MAAM,eAAe,GAAI,MAAM,SAAS,MAAM,EAAE,KAAK,SAAS,CAAC,MAAM,CAAC,KAAG,SAAS,CAAC,MAAM,CAAuB,CAAC;AAExH,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,GAAI,MAAM,SAAS,MAAM,EAAE,KAAK,SAAS,CAAC,MAAM,CAAC,EAAE,QAAQ,MAAM,KAAG,gBACE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Declares the label and tone of every value of a status enum (server-safe, no React). */
|
|
2
|
+
export const defineStatusMap = (map) => Object.freeze(map);
|
|
3
|
+
/** The definition of a status, or a neutral fallback that shows the raw value. */
|
|
4
|
+
export const statusDefinitionOf = (map, status) => map[status] ?? { label: status, tone: 'neutral' };
|
|
5
|
+
//# sourceMappingURL=statusMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusMap.js","sourceRoot":"","sources":["../../../src/logic/pure/statusMap.ts"],"names":[],"mappings":"AAUA,2FAA2F;AAC3F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAwB,GAAsB,EAAqB,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAExH,kFAAkF;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAwB,GAAsB,EAAE,MAAc,EAAoB,EAAE,CACnH,GAAoD,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface UseToggleResult {
|
|
2
|
+
isOn: boolean;
|
|
3
|
+
setOn: (value: boolean) => void;
|
|
4
|
+
toggle: () => void;
|
|
5
|
+
}
|
|
6
|
+
/** A boolean state with a stable `toggle`. */
|
|
7
|
+
export declare const useToggle: (initial?: boolean) => UseToggleResult;
|
|
8
|
+
//# sourceMappingURL=useToggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToggle.d.ts","sourceRoot":"","sources":["../../../src/logic/react/useToggle.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,8CAA8C;AAC9C,eAAO,MAAM,SAAS,GAAI,iBAAe,KAAG,eAI3C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
/** A boolean state with a stable `toggle`. */
|
|
4
|
+
export const useToggle = (initial = false) => {
|
|
5
|
+
const [isOn, setOn] = useState(initial);
|
|
6
|
+
const toggle = useCallback(() => setOn((value) => !value), []);
|
|
7
|
+
return { isOn, setOn, toggle };
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useToggle.js","sourceRoot":"","sources":["../../../src/logic/react/useToggle.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQ9C,8CAA8C;AAC9C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAO,GAAG,KAAK,EAAmB,EAAE;IAC5D,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAC/D,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface MediaItemFieldProps {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
/** The URL of a media item as a form field; the label comes from the form. */
|
|
5
|
+
export declare const MediaItemField: ({ name }: MediaItemFieldProps) => import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=MediaItemField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaItemField.d.ts","sourceRoot":"","sources":["../../src/media/MediaItemField.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,8EAA8E;AAC9E,eAAO,MAAM,cAAc,GAAI,UAAU,mBAAmB,gCAW3D,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useFormContext } from 'react-hook-form';
|
|
4
|
+
import { useFieldLabel } from "../form/fieldLabels.js";
|
|
5
|
+
/** The URL of a media item as a form field; the label comes from the form. */
|
|
6
|
+
export const MediaItemField = ({ name }) => {
|
|
7
|
+
const label = useFieldLabel(name);
|
|
8
|
+
const { register } = useFormContext();
|
|
9
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", "data-slot": "media-item-field", children: [_jsx("label", { htmlFor: name, className: "text-sm font-medium", children: label }), _jsx("input", { id: name, type: "url", className: "h-9 rounded-md border border-input px-3", ...register(name) })] }));
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=MediaItemField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaItemField.js","sourceRoot":"","sources":["../../src/media/MediaItemField.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAyB,CAAC;AAMxD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,IAAI,EAAuB,EAAE,EAAE;IAC9D,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,EAAE,CAAC;IACtC,OAAO,CACL,eAAK,SAAS,EAAC,qBAAqB,eAAW,kBAAkB,aAC/D,gBAAO,OAAO,EAAE,IAAI,EAAE,SAAS,EAAC,qBAAqB,YAClD,KAAK,GACA,EACR,gBAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAC,KAAK,EAAC,SAAS,EAAC,yCAAyC,KAAK,QAAQ,CAAC,IAAI,CAAC,GAAI,IAClG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/media/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChF,YAAY,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/media/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA4B,MAAM,qBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/media/types.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,KAAK,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/media/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/next/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/next/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,iBAAiB,GAGlB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type SearchParamsUpdate = Readonly<Record<string, string | null>>;
|
|
2
|
+
export type NavigateFn = (href: string) => void;
|
|
3
|
+
/** Registers how the queue navigates (the Next adapter registers `router.replace`). */
|
|
4
|
+
export declare const setSearchParamsNavigator: (next: NavigateFn | null) => void;
|
|
5
|
+
/** Queues parameter changes; all changes of one tick become one navigation. `null` removes a parameter. */
|
|
6
|
+
export declare const writeSearchParams: (update: SearchParamsUpdate) => void;
|
|
7
|
+
//# sourceMappingURL=searchParamsWriter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchParamsWriter.d.ts","sourceRoot":"","sources":["../../src/next/searchParamsWriter.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;AACzE,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAMhD,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,GAAI,MAAM,UAAU,GAAG,IAAI,KAAG,IAElE,CAAC;AAgBF,2GAA2G;AAC3G,eAAO,MAAM,iBAAiB,GAAI,QAAQ,kBAAkB,KAAG,IAK9D,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// The one URL write queue (module state). Every writer of search parameters in a host goes through it, so two
|
|
2
|
+
// writers in the same tick do not drop each other's parameters. Exists once; scripts/check-package.mjs verifies it.
|
|
3
|
+
let pending = {};
|
|
4
|
+
let isScheduled = false;
|
|
5
|
+
let navigate = null;
|
|
6
|
+
/** Registers how the queue navigates (the Next adapter registers `router.replace`). */
|
|
7
|
+
export const setSearchParamsNavigator = (next) => {
|
|
8
|
+
navigate = next;
|
|
9
|
+
};
|
|
10
|
+
const flush = () => {
|
|
11
|
+
isScheduled = false;
|
|
12
|
+
const update = pending;
|
|
13
|
+
pending = {};
|
|
14
|
+
if (!navigate || typeof window === 'undefined')
|
|
15
|
+
return;
|
|
16
|
+
const params = new URLSearchParams(window.location.search);
|
|
17
|
+
for (const [name, value] of Object.entries(update)) {
|
|
18
|
+
if (value === null)
|
|
19
|
+
params.delete(name);
|
|
20
|
+
else
|
|
21
|
+
params.set(name, value);
|
|
22
|
+
}
|
|
23
|
+
const query = params.toString();
|
|
24
|
+
navigate(`${window.location.pathname}${query ? `?${query}` : ''}${window.location.hash}`);
|
|
25
|
+
};
|
|
26
|
+
/** Queues parameter changes; all changes of one tick become one navigation. `null` removes a parameter. */
|
|
27
|
+
export const writeSearchParams = (update) => {
|
|
28
|
+
pending = { ...pending, ...update };
|
|
29
|
+
if (isScheduled)
|
|
30
|
+
return;
|
|
31
|
+
isScheduled = true;
|
|
32
|
+
queueMicrotask(flush);
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=searchParamsWriter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchParamsWriter.js","sourceRoot":"","sources":["../../src/next/searchParamsWriter.ts"],"names":[],"mappings":"AAAA,8GAA8G;AAC9G,oHAAoH;AAKpH,IAAI,OAAO,GAAkC,EAAE,CAAC;AAChD,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB,IAAI,QAAQ,GAAsB,IAAI,CAAC;AAEvC,uFAAuF;AACvF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,IAAuB,EAAQ,EAAE;IACxE,QAAQ,GAAG,IAAI,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,GAAS,EAAE;IACvB,WAAW,GAAG,KAAK,CAAC;IACpB,MAAM,MAAM,GAAG,OAAO,CAAC;IACvB,OAAO,GAAG,EAAE,CAAC;IACb,IAAI,CAAC,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO;IACvD,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3D,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACnD,IAAI,KAAK,KAAK,IAAI;YAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;;YACnC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAChC,QAAQ,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AAC5F,CAAC,CAAC;AAEF,2GAA2G;AAC3G,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAA0B,EAAQ,EAAE;IACpE,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;IACpC,IAAI,WAAW;QAAE,OAAO;IACxB,WAAW,GAAG,IAAI,CAAC;IACnB,cAAc,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNextSearchParam.d.ts","sourceRoot":"","sources":["../../src/next/useNextSearchParam.ts"],"names":[],"mappings":"AAMA,wFAAwF;AACxF,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,CAAC,MAAM,GAAG,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAW/F,CAAC"}
|