@ya-accelerators/nextjs-framework 0.0.99 → 0.0.101
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/constants.d.ts +4 -0
- package/dist/constants.js +4 -0
- package/dist/constants.js.map +1 -1
- package/dist/env.client.d.ts +2 -2
- package/dist/env.client.js +1 -1
- package/dist/env.client.js.map +1 -1
- package/dist/env.d.ts +2 -2
- package/dist/env.js +1 -5
- package/dist/env.js.map +1 -1
- package/dist/hooks/anchor/index.d.ts +13 -0
- package/dist/hooks/anchor/index.js +65 -0
- package/dist/hooks/anchor/index.js.map +1 -0
- package/dist/hooks/date/index.js.map +1 -1
- package/dist/hooks/loading/index.jsx +1 -1
- package/dist/hooks/loading/index.jsx.map +1 -1
- package/dist/hooks/modal/index.d.ts +1 -1
- package/dist/hooks/modal/index.jsx +1 -1
- package/dist/hooks/modal/index.jsx.map +1 -1
- package/dist/hooks/mounted/index.js +0 -4
- package/dist/hooks/mounted/index.js.map +1 -1
- package/dist/hooks/toast/index.d.ts +3 -1
- package/dist/hooks/toast/index.jsx +9 -9
- package/dist/hooks/toast/index.jsx.map +1 -1
- package/dist/hooks/uploads/index.d.ts +41 -0
- package/dist/hooks/uploads/index.js +174 -0
- package/dist/hooks/uploads/index.js.map +1 -0
- package/dist/i18n/get-message-fallback.d.ts +0 -1
- package/dist/i18n/get-message-fallback.js +0 -1
- package/dist/i18n/get-message-fallback.js.map +1 -1
- package/dist/i18n/index.js +1 -4
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/strings/ja-JP.json +12 -4
- package/dist/lib/cookie/index.d.ts +1 -1
- package/dist/lib/cookie/index.js +0 -1
- package/dist/lib/cookie/index.js.map +1 -1
- package/dist/lib/next-auth/index.js +0 -11
- package/dist/lib/next-auth/index.js.map +1 -1
- package/dist/lib/trpc/index.d.ts +3 -2
- package/dist/lib/trpc/index.js +39 -11
- package/dist/lib/trpc/index.js.map +1 -1
- package/dist/lib/uploads/index.js +14 -18
- package/dist/lib/uploads/index.js.map +1 -1
- package/dist/logger/index.d.ts +2 -1
- package/dist/logger/index.js +0 -6
- package/dist/logger/index.js.map +1 -1
- package/dist/styles/globals.css +77 -0
- package/dist/styles/tailwind.config.d.ts +365 -359
- package/dist/styles/tailwind.config.js +25 -20
- package/dist/styles/tailwind.config.js.map +1 -1
- package/dist/styles/tailwind.config.ts +28 -21
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/component/button/base.d.ts +4 -4
- package/dist/ui/component/button/base.jsx +5 -5
- package/dist/ui/component/button/base.jsx.map +1 -1
- package/dist/ui/component/button/colored/index.d.ts +2 -2
- package/dist/ui/component/button/image/index.d.ts +2 -2
- package/dist/ui/component/button/index.d.ts +4 -9
- package/dist/ui/component/button/index.jsx +0 -5
- package/dist/ui/component/button/index.jsx.map +1 -1
- package/dist/ui/component/card/index.jsx +1 -1
- package/dist/ui/component/card/index.jsx.map +1 -1
- package/dist/ui/component/icon/index.d.ts +2 -2
- package/dist/ui/component/index.d.ts +72 -75
- package/dist/ui/component/index.js +4 -4
- package/dist/ui/component/index.js.map +1 -1
- package/dist/ui/component/progressBar/index.d.ts +9 -0
- package/dist/ui/component/progressBar/index.jsx +15 -0
- package/dist/ui/component/progressBar/index.jsx.map +1 -0
- package/dist/ui/component/skeleton/index.d.ts +10 -0
- package/dist/ui/component/skeleton/index.jsx +35 -0
- package/dist/ui/component/skeleton/index.jsx.map +1 -0
- package/dist/ui/component/typography/H1/index.d.ts +2 -3
- package/dist/ui/component/typography/H1/index.jsx +2 -2
- package/dist/ui/component/typography/H1/index.jsx.map +1 -1
- package/dist/ui/component/typography/H2/index.d.ts +2 -3
- package/dist/ui/component/typography/H2/index.jsx +2 -2
- package/dist/ui/component/typography/H2/index.jsx.map +1 -1
- package/dist/ui/component/typography/H3/index.d.ts +2 -3
- package/dist/ui/component/typography/H3/index.jsx +2 -2
- package/dist/ui/component/typography/H3/index.jsx.map +1 -1
- package/dist/ui/component/typography/H4/index.d.ts +2 -3
- package/dist/ui/component/typography/H4/index.jsx +2 -2
- package/dist/ui/component/typography/H4/index.jsx.map +1 -1
- package/dist/ui/component/typography/H5/index.d.ts +2 -3
- package/dist/ui/component/typography/H5/index.jsx +2 -2
- package/dist/ui/component/typography/H5/index.jsx.map +1 -1
- package/dist/ui/component/typography/H6/index.d.ts +2 -3
- package/dist/ui/component/typography/H6/index.jsx +2 -2
- package/dist/ui/component/typography/H6/index.jsx.map +1 -1
- package/dist/ui/component/typography/Label/index.d.ts +2 -3
- package/dist/ui/component/typography/Label/index.jsx +2 -2
- package/dist/ui/component/typography/Label/index.jsx.map +1 -1
- package/dist/ui/component/typography/LinkText/index.d.ts +2 -3
- package/dist/ui/component/typography/LinkText/index.jsx +2 -2
- package/dist/ui/component/typography/LinkText/index.jsx.map +1 -1
- package/dist/ui/component/typography/P/index.d.ts +2 -3
- package/dist/ui/component/typography/P/index.jsx +2 -2
- package/dist/ui/component/typography/P/index.jsx.map +1 -1
- package/dist/ui/component/typography/Pre/index.d.ts +2 -3
- package/dist/ui/component/typography/Pre/index.jsx +2 -2
- package/dist/ui/component/typography/Pre/index.jsx.map +1 -1
- package/dist/ui/component/typography/Span/index.d.ts +6 -0
- package/dist/ui/component/typography/Span/index.jsx +12 -0
- package/dist/ui/component/typography/Span/index.jsx.map +1 -0
- package/dist/ui/component/typography/index.d.ts +26 -32
- package/dist/ui/component/typography/index.jsx +2 -0
- package/dist/ui/component/typography/index.jsx.map +1 -1
- package/dist/ui/composite/accordion/index.d.ts +12 -0
- package/dist/ui/composite/accordion/index.jsx +29 -0
- package/dist/ui/composite/accordion/index.jsx.map +1 -0
- package/dist/ui/composite/alert/index.d.ts +13 -0
- package/dist/ui/composite/alert/index.jsx +35 -0
- package/dist/ui/composite/alert/index.jsx.map +1 -0
- package/dist/ui/composite/avatar/index.d.ts +9 -0
- package/dist/ui/composite/avatar/index.jsx +25 -0
- package/dist/ui/composite/avatar/index.jsx.map +1 -0
- package/dist/ui/composite/dropdown/index.d.ts +2 -2
- package/dist/ui/composite/dropdown/index.jsx +0 -1
- package/dist/ui/composite/dropdown/index.jsx.map +1 -1
- package/dist/ui/composite/emptyState/index.d.ts +9 -0
- package/dist/ui/composite/emptyState/index.jsx +18 -0
- package/dist/ui/composite/emptyState/index.jsx.map +1 -0
- package/dist/ui/{layout → composite}/form/index.d.ts +4 -5
- package/dist/ui/{layout → composite}/form/index.jsx +31 -43
- package/dist/ui/composite/form/index.jsx.map +1 -0
- package/dist/ui/{layout → composite}/form/renderItem.d.ts +1 -2
- package/dist/ui/{layout → composite}/form/renderItem.jsx +25 -30
- package/dist/ui/composite/form/renderItem.jsx.map +1 -0
- package/dist/ui/composite/index.d.ts +490 -233
- package/dist/ui/composite/index.js +30 -0
- package/dist/ui/composite/index.js.map +1 -1
- package/dist/ui/composite/input/attachment/index.d.ts +18 -0
- package/dist/ui/composite/input/attachment/index.jsx +130 -0
- package/dist/ui/composite/input/attachment/index.jsx.map +1 -0
- package/dist/ui/composite/input/checkbox/index.d.ts +2 -2
- package/dist/ui/composite/input/checkbox/index.jsx +2 -2
- package/dist/ui/composite/input/checkbox/index.jsx.map +1 -1
- package/dist/ui/composite/input/datePicker/index.d.ts +1 -1
- package/dist/ui/composite/input/datePicker/index.jsx +5 -16
- package/dist/ui/composite/input/datePicker/index.jsx.map +1 -1
- package/dist/ui/composite/input/dateRange/index.d.ts +1 -1
- package/dist/ui/composite/input/dateRange/index.jsx +1 -3
- package/dist/ui/composite/input/dateRange/index.jsx.map +1 -1
- package/dist/ui/composite/input/dateTimePicker/index.jsx +1 -8
- package/dist/ui/composite/input/dateTimePicker/index.jsx.map +1 -1
- package/dist/ui/composite/input/dateTimeRange/index.d.ts +1 -1
- package/dist/ui/composite/input/dateTimeRange/index.jsx +2 -5
- package/dist/ui/composite/input/dateTimeRange/index.jsx.map +1 -1
- package/dist/ui/composite/input/file/index.d.ts +3 -8
- package/dist/ui/composite/input/file/index.jsx +91 -137
- package/dist/ui/composite/input/file/index.jsx.map +1 -1
- package/dist/ui/composite/input/index.d.ts +144 -128
- package/dist/ui/composite/input/index.js +4 -0
- package/dist/ui/composite/input/index.js.map +1 -1
- package/dist/ui/composite/input/list/index.jsx +3 -11
- package/dist/ui/composite/input/list/index.jsx.map +1 -1
- package/dist/ui/composite/input/radio/index.d.ts +2 -2
- package/dist/ui/composite/input/radio/index.jsx +3 -3
- package/dist/ui/composite/input/radio/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/GroupHeading/index.jsx +1 -1
- package/dist/ui/composite/input/select/GroupHeading/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/Input/index.jsx +1 -4
- package/dist/ui/composite/input/select/Input/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/Option/index.jsx +0 -1
- package/dist/ui/composite/input/select/Option/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/Placeholder/index.jsx +1 -1
- package/dist/ui/composite/input/select/Placeholder/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/SelectContainer/index.jsx +1 -1
- package/dist/ui/composite/input/select/SelectContainer/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/SingleValue/index.jsx +1 -1
- package/dist/ui/composite/input/select/SingleValue/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/index.jsx +0 -2
- package/dist/ui/composite/input/select/index.jsx.map +1 -1
- package/dist/ui/composite/input/switch/index.d.ts +11 -0
- package/dist/ui/composite/input/switch/index.jsx +21 -0
- package/dist/ui/composite/input/switch/index.jsx.map +1 -0
- package/dist/ui/composite/input/text/index.d.ts +1 -1
- package/dist/ui/composite/input/text/index.jsx +1 -1
- package/dist/ui/composite/input/text/index.jsx.map +1 -1
- package/dist/ui/composite/input/textarea/index.d.ts +1 -1
- package/dist/ui/composite/input/textarea/index.jsx +1 -1
- package/dist/ui/composite/input/textarea/index.jsx.map +1 -1
- package/dist/ui/composite/input/timePicker/index.d.ts +1 -1
- package/dist/ui/composite/input/timeRange/index.d.ts +1 -1
- package/dist/ui/composite/input/timeRange/index.jsx +1 -1
- package/dist/ui/composite/input/timeRange/index.jsx.map +1 -1
- package/dist/ui/composite/input/weekDaysSelector/index.d.ts +1 -1
- package/dist/ui/composite/input/weekdayPicker/index.d.ts +1 -1
- package/dist/ui/composite/input/weekdayPicker/index.jsx +1 -1
- package/dist/ui/composite/input/weekdayPicker/index.jsx.map +1 -1
- package/dist/ui/composite/label/index.d.ts +3 -2
- package/dist/ui/composite/label/index.jsx +4 -4
- package/dist/ui/composite/label/index.jsx.map +1 -1
- package/dist/ui/composite/loading/index.jsx.map +1 -0
- package/dist/ui/composite/markdown/codeBlock.d.ts +4 -0
- package/dist/ui/composite/markdown/codeBlock.jsx +67 -0
- package/dist/ui/composite/markdown/codeBlock.jsx.map +1 -0
- package/dist/ui/composite/markdown/index.d.ts +3 -0
- package/dist/ui/composite/markdown/index.jsx +65 -0
- package/dist/ui/composite/markdown/index.jsx.map +1 -0
- package/dist/ui/{component/modal/index.d.ts → composite/modal/card.d.ts} +1 -1
- package/dist/ui/composite/modal/card.jsx +13 -0
- package/dist/ui/composite/modal/card.jsx.map +1 -0
- package/dist/ui/composite/modal/index.d.ts +2 -0
- package/dist/ui/composite/modal/index.jsx +3 -0
- package/dist/ui/composite/modal/index.jsx.map +1 -0
- package/dist/ui/{layout/modal/index.jsx → composite/modal/overlay.jsx} +4 -10
- package/dist/ui/composite/modal/overlay.jsx.map +1 -0
- package/dist/ui/{layout → composite}/object/index.d.ts +2 -3
- package/dist/ui/{layout → composite}/object/index.jsx +50 -24
- package/dist/ui/composite/object/index.jsx.map +1 -0
- package/dist/ui/composite/pageTitle/index.jsx +4 -2
- package/dist/ui/composite/pageTitle/index.jsx.map +1 -1
- package/dist/ui/composite/popover/index.d.ts +12 -0
- package/dist/ui/composite/popover/index.jsx +48 -0
- package/dist/ui/composite/popover/index.jsx.map +1 -0
- package/dist/ui/composite/stepper/index.d.ts +8 -0
- package/dist/ui/composite/stepper/index.jsx +34 -0
- package/dist/ui/composite/stepper/index.jsx.map +1 -0
- package/dist/ui/composite/table/features.d.ts +15 -0
- package/dist/ui/composite/table/features.js +10 -0
- package/dist/ui/composite/table/features.js.map +1 -0
- package/dist/ui/{layout → composite}/table/index.d.ts +4 -9
- package/dist/ui/{layout → composite}/table/index.jsx +10 -23
- package/dist/ui/composite/table/index.jsx.map +1 -0
- package/dist/ui/composite/toast/index.d.ts +18 -0
- package/dist/ui/{layout → composite}/toast/index.jsx +11 -4
- package/dist/ui/composite/toast/index.jsx.map +1 -0
- package/dist/ui/composite/tooltip/index.d.ts +11 -0
- package/dist/ui/composite/tooltip/index.jsx +29 -0
- package/dist/ui/composite/tooltip/index.jsx.map +1 -0
- package/dist/ui/functional/index.d.ts +5 -5
- package/dist/ui/functional/signInForm/index.jsx +1 -1
- package/dist/ui/functional/signInForm/index.jsx.map +1 -1
- package/dist/ui/layout/app/component.jsx +2 -2
- package/dist/ui/layout/app/component.jsx.map +1 -1
- package/dist/ui/layout/drawer/index.d.ts +11 -0
- package/dist/ui/layout/drawer/index.jsx +73 -0
- package/dist/ui/layout/drawer/index.jsx.map +1 -0
- package/dist/ui/layout/index.d.ts +38 -351
- package/dist/ui/layout/index.js +2 -12
- package/dist/ui/layout/index.js.map +1 -1
- package/dist/ui/layout/root/index.d.ts +1 -1
- package/dist/ui/layout/root/index.jsx +1 -2
- package/dist/ui/layout/root/index.jsx.map +1 -1
- package/dist/ui/layout/root/provider/index.jsx +0 -4
- package/dist/ui/layout/root/provider/index.jsx.map +1 -1
- package/dist/ui/layout/tab/component.jsx +3 -3
- package/dist/ui/layout/tab/component.jsx.map +1 -1
- package/dist/ui/layout/tab/content/index.d.ts +1 -1
- package/dist/ui/theme/border/index.d.ts +15 -15
- package/dist/ui/theme/border/index.js.map +1 -1
- package/dist/ui/theme/color/index.d.ts +24 -23
- package/dist/ui/theme/color/index.js +14 -24
- package/dist/ui/theme/color/index.js.map +1 -1
- package/dist/ui/theme/rounded/index.d.ts +6 -5
- package/dist/ui/theme/rounded/index.js +2 -0
- package/dist/ui/theme/rounded/index.js.map +1 -1
- package/dist/ui/theme/size/index.d.ts +8 -8
- package/dist/ui/theme/size/index.js +8 -8
- package/dist/ui/theme/size/index.js.map +1 -1
- package/dist/ui/types/index.d.ts +16 -2
- package/dist/ui/types/index.js +0 -1
- package/dist/ui/types/index.js.map +1 -1
- package/dist/util/date/impl.js +0 -2
- package/dist/util/date/impl.js.map +1 -1
- package/dist/util/date/index.d.ts +7 -7
- package/dist/util/index.js +8 -20
- package/dist/util/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/ui/component/button/text/index.d.ts +0 -11
- package/dist/ui/component/button/text/index.jsx +0 -7
- package/dist/ui/component/button/text/index.jsx.map +0 -1
- package/dist/ui/component/markdown/index.d.ts +0 -4
- package/dist/ui/component/markdown/index.jsx +0 -61
- package/dist/ui/component/markdown/index.jsx.map +0 -1
- package/dist/ui/component/modal/index.jsx +0 -12
- package/dist/ui/component/modal/index.jsx.map +0 -1
- package/dist/ui/layout/form/index.jsx.map +0 -1
- package/dist/ui/layout/form/renderItem.jsx.map +0 -1
- package/dist/ui/layout/loading/index.jsx.map +0 -1
- package/dist/ui/layout/modal/index.jsx.map +0 -1
- package/dist/ui/layout/object/index.jsx.map +0 -1
- package/dist/ui/layout/table/index.jsx.map +0 -1
- package/dist/ui/layout/toast/index.d.ts +0 -7
- package/dist/ui/layout/toast/index.jsx.map +0 -1
- /package/dist/ui/{layout → composite}/loading/index.d.ts +0 -0
- /package/dist/ui/{layout → composite}/loading/index.jsx +0 -0
- /package/dist/ui/{layout/modal/index.d.ts → composite/modal/overlay.d.ts} +0 -0
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export const uiConstants = {
|
|
2
|
+
ANCHOR_OFFSET_PX: 8,
|
|
3
|
+
COPY_FEEDBACK_MS: 1500,
|
|
4
|
+
};
|
|
1
5
|
export const authConstants = {
|
|
2
6
|
// Refresh the access token this many seconds before its declared expiry, so
|
|
3
7
|
// downstream calls never race the expiry window on long-running requests.
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,4EAA4E;IAC5E,0EAA0E;IAC1E,kBAAkB,EAAE,GAAG;CACxB,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,gBAAgB,EAAE,CAAC;IACnB,gBAAgB,EAAE,IAAI;CACvB,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,4EAA4E;IAC5E,0EAA0E;IAC1E,kBAAkB,EAAE,GAAG;CACxB,CAAA"}
|
package/dist/env.client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const defaultClientEnv: {
|
|
2
|
-
NEXT_PUBLIC_DEPLOY_ENV: "dev" | "
|
|
3
|
-
NEXT_PUBLIC_LOG_LEVEL?: "
|
|
2
|
+
NEXT_PUBLIC_DEPLOY_ENV: "dev" | "prd" | "stg";
|
|
3
|
+
NEXT_PUBLIC_LOG_LEVEL?: "debug" | "error" | "info" | "warn" | undefined;
|
|
4
4
|
};
|
package/dist/env.client.js
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
import { Util } from './util/index';
|
|
4
4
|
export const defaultClientEnv = Util.createEnvProxy(false, z.object({
|
|
5
5
|
NEXT_PUBLIC_DEPLOY_ENV: z.enum(['dev', 'stg', 'prd']),
|
|
6
|
-
NEXT_PUBLIC_LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error']).optional(),
|
|
6
|
+
NEXT_PUBLIC_LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error']).optional(),
|
|
7
7
|
}), () => ({
|
|
8
8
|
NEXT_PUBLIC_DEPLOY_ENV: process.env.NEXT_PUBLIC_DEPLOY_ENV,
|
|
9
9
|
NEXT_PUBLIC_LOG_LEVEL: process.env.NEXT_PUBLIC_LOG_LEVEL,
|
package/dist/env.client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.client.js","sourceRoot":"","sources":["../../src/env.client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CACjD,KAAK,EACL,CAAC,CAAC,MAAM,CAAC;IACP,sBAAsB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACrD,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE
|
|
1
|
+
{"version":3,"file":"env.client.js","sourceRoot":"","sources":["../../src/env.client.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CACjD,KAAK,EACL,CAAC,CAAC,MAAM,CAAC;IACP,sBAAsB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACrD,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;CAC7E,CAAC,EACF,GAAG,EAAE,CAAC,CAAC;IACL,sBAAsB,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB;IAC1D,qBAAqB,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;CACzD,CAAC,CACH,CAAA"}
|
package/dist/env.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const defaultServerEnv: {
|
|
2
2
|
NODE_ENV: "development" | "production";
|
|
3
|
-
DEPLOY_ENV: "dev" | "
|
|
3
|
+
DEPLOY_ENV: "dev" | "prd" | "stg";
|
|
4
|
+
LOG_LEVEL?: "debug" | "error" | "info" | "warn" | undefined;
|
|
4
5
|
NEXTAUTH_URL: string;
|
|
5
6
|
NEXTAUTH_SECRET: string;
|
|
6
|
-
LOG_LEVEL?: "error" | "debug" | "info" | "warn" | undefined;
|
|
7
7
|
};
|
package/dist/env.js
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Util } from './util/index';
|
|
3
3
|
export const defaultServerEnv = Util.createEnvProxy(true, z.object({
|
|
4
|
-
// ---- Common
|
|
5
4
|
NODE_ENV: z.enum(['development', 'production']),
|
|
6
5
|
DEPLOY_ENV: z.enum(['dev', 'stg', 'prd']),
|
|
7
|
-
LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error']).optional(),
|
|
8
|
-
// ---- Package
|
|
6
|
+
LOG_LEVEL: z.enum(['debug', 'info', 'warn', 'error']).optional(),
|
|
9
7
|
NEXTAUTH_URL: z.url(),
|
|
10
8
|
NEXTAUTH_SECRET: z.string().min(1),
|
|
11
9
|
}), () => ({
|
|
12
|
-
// --- Common
|
|
13
10
|
NODE_ENV: process.env.NODE_ENV,
|
|
14
11
|
DEPLOY_ENV: process.env.DEPLOY_ENV,
|
|
15
12
|
LOG_LEVEL: process.env.LOG_LEVEL,
|
|
16
|
-
// ---- Package
|
|
17
13
|
NEXTAUTH_URL: process.env.NEXT_PHASE === 'phase-production-build'
|
|
18
14
|
? process.env.NEXTAUTH_URL || 'https://build-only-not-used-at-runtime.invalid'
|
|
19
15
|
: process.env.NEXTAUTH_URL,
|
package/dist/env.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CACjD,IAAI,EACJ,CAAC,CAAC,MAAM,CAAC;IACP,
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,CACjD,IAAI,EACJ,CAAC,CAAC,MAAM,CAAC;IACP,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;IAC/C,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACzC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChE,YAAY,EAAE,CAAC,CAAC,GAAG,EAAE;IACrB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACnC,CAAC,EACF,GAAG,EAAE,CAAC,CAAC;IACL,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC9B,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU;IAClC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;IAChC,YAAY,EACV,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,wBAAwB;QACjD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,gDAAgD;QAC9E,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY;IAC9B,eAAe,EACb,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,wBAAwB;QACjD,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,gCAAgC;QACjE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe;CAClC,CAAC,CACH,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export declare const AnchorPlacement: {
|
|
3
|
+
readonly top: 'top';
|
|
4
|
+
readonly bottom: 'bottom';
|
|
5
|
+
readonly left: 'left';
|
|
6
|
+
readonly right: 'right';
|
|
7
|
+
};
|
|
8
|
+
export type AnchorPlacement = (typeof AnchorPlacement)[keyof typeof AnchorPlacement];
|
|
9
|
+
export declare const useAnchoredPosition: (anchorRef: RefObject<HTMLElement | null>, panelRef: RefObject<HTMLElement | null>, placement: AnchorPlacement, open: boolean) => {
|
|
10
|
+
top: number;
|
|
11
|
+
left: number;
|
|
12
|
+
placement: AnchorPlacement;
|
|
13
|
+
} | undefined;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { uiConstants } from '../../constants';
|
|
4
|
+
export const AnchorPlacement = {
|
|
5
|
+
top: 'top',
|
|
6
|
+
bottom: 'bottom',
|
|
7
|
+
left: 'left',
|
|
8
|
+
right: 'right',
|
|
9
|
+
};
|
|
10
|
+
const opposite = {
|
|
11
|
+
top: AnchorPlacement.bottom,
|
|
12
|
+
bottom: AnchorPlacement.top,
|
|
13
|
+
left: AnchorPlacement.right,
|
|
14
|
+
right: AnchorPlacement.left,
|
|
15
|
+
};
|
|
16
|
+
export const useAnchoredPosition = (anchorRef, panelRef, placement, open) => {
|
|
17
|
+
const [coords, setCoords] = useState();
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (!open) {
|
|
20
|
+
setCoords(undefined);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const update = () => {
|
|
24
|
+
const anchor = anchorRef.current;
|
|
25
|
+
const panel = panelRef.current;
|
|
26
|
+
if (!anchor || !panel) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const a = anchor.getBoundingClientRect();
|
|
30
|
+
const p = panel.getBoundingClientRect();
|
|
31
|
+
const gap = uiConstants.ANCHOR_OFFSET_PX;
|
|
32
|
+
const fits = {
|
|
33
|
+
top: a.top - p.height - gap >= 0,
|
|
34
|
+
bottom: a.bottom + p.height + gap <= window.innerHeight,
|
|
35
|
+
left: a.left - p.width - gap >= 0,
|
|
36
|
+
right: a.right + p.width + gap <= window.innerWidth,
|
|
37
|
+
};
|
|
38
|
+
const resolved = fits[placement] ? placement : fits[opposite[placement]] ? opposite[placement] : placement;
|
|
39
|
+
const top = resolved === 'top'
|
|
40
|
+
? a.top - p.height - gap
|
|
41
|
+
: resolved === 'bottom'
|
|
42
|
+
? a.bottom + gap
|
|
43
|
+
: a.top + a.height / 2 - p.height / 2;
|
|
44
|
+
const left = resolved === 'left'
|
|
45
|
+
? a.left - p.width - gap
|
|
46
|
+
: resolved === 'right'
|
|
47
|
+
? a.right + gap
|
|
48
|
+
: a.left + a.width / 2 - p.width / 2;
|
|
49
|
+
setCoords({
|
|
50
|
+
top: top + window.scrollY,
|
|
51
|
+
left: Math.min(Math.max(left, gap), Math.max(window.innerWidth - p.width - gap, gap)) + window.scrollX,
|
|
52
|
+
placement: resolved,
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
update();
|
|
56
|
+
window.addEventListener('resize', update, { passive: true });
|
|
57
|
+
window.addEventListener('scroll', update, { passive: true, capture: true });
|
|
58
|
+
return () => {
|
|
59
|
+
window.removeEventListener('resize', update);
|
|
60
|
+
window.removeEventListener('scroll', update, { capture: true });
|
|
61
|
+
};
|
|
62
|
+
}, [anchorRef, panelRef, placement, open]);
|
|
63
|
+
return coords;
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/anchor/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACN,CAAA;AAGV,MAAM,QAAQ,GAAG;IACf,GAAG,EAAE,eAAe,CAAC,MAAM;IAC3B,MAAM,EAAE,eAAe,CAAC,GAAG;IAC3B,IAAI,EAAE,eAAe,CAAC,KAAK;IAC3B,KAAK,EAAE,eAAe,CAAC,IAAI;CACnB,CAAA;AAEV,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,SAAwC,EACxC,QAAuC,EACvC,SAA0B,EAC1B,IAAa,EACb,EAAE;IACF,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,EAA6D,CAAA;IACjG,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,SAAS,CAAC,SAAS,CAAC,CAAA;YACpB,OAAM;QACR,CAAC;QACD,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAA;YAChC,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;gBACtB,OA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1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { usePathname } from 'next/navigation';
|
|
3
3
|
import { createContext, useContext, useState } from 'react';
|
|
4
|
-
import { LoadingOverlay } from '../../ui/
|
|
4
|
+
import { LoadingOverlay } from '../../ui/composite/loading';
|
|
5
5
|
const LoadingContext = createContext({ showLoading: () => { }, dismissLoading: () => { } });
|
|
6
6
|
export const useLoadingContext = () => useContext(LoadingContext);
|
|
7
7
|
export const LoadingProvider = ({ children }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/loading/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/loading/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAM3D,MAAM,cAAc,GAAG,aAAa,CAAkB,EAAE,WAAW,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC,CAAA;AAE1G,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAA;AAEjE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAA2B,EAAE,EAAE;IACvE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IAC1C,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAC9C,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1D,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;QAC9B,UAAU,CAAC,KAAK,CAAC,CAAA;QACjB,eAAe,CAAC,QAAQ,CAAC,CAAA;IAC3B,CAAC;IACD,OAAO,CACL,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAC9D;MAAA,CAAC,QAAQ,CACT;MAAA,CAAC,OAAO,IAAI,CAAC,cAAc,CAAC,AAAD,EAAG,CAChC;IAAA,EAAE,cAAc,CAAC,QAAQ,CAAC,CAC3B,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { ModalOverlay } from '../../ui/
|
|
2
|
+
import { ModalOverlay } from '../../ui/composite/modal/overlay';
|
|
3
3
|
export type ModalProps = Omit<Parameters<typeof ModalOverlay>[0]['items'][number], 'id'>;
|
|
4
4
|
interface IModalContext {
|
|
5
5
|
showModal: (props: ModalProps) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { usePathname } from 'next/navigation';
|
|
3
3
|
import { createContext, startTransition, useCallback, useContext, useEffect, useState } from 'react';
|
|
4
|
-
import { ModalOverlay } from '../../ui/
|
|
4
|
+
import { ModalOverlay } from '../../ui/composite/modal/overlay';
|
|
5
5
|
import { Util } from '../../util';
|
|
6
6
|
const ModalContext = createContext({
|
|
7
7
|
showModal: () => { },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/modal/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEpG,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/modal/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEpG,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAOjC,MAAM,YAAY,GAAG,aAAa,CAAgB;IAChD,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;IACnB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACvB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAA2B,EAAE,EAAE;IACrE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAA8C,EAAE,CAAC,CAAA;IACnF,MAAM,SAAS,GAAG,CAAC,KAAiB,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,EAA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. Date/time pickers derive their rendered value from
|
|
4
|
-
// runtime-local Date methods (getHours / getFullYear …), which differ between the UTC server and the
|
|
5
|
-
// browser timezone and cause a hydration mismatch. Gating the value render on this flag makes the server
|
|
6
|
-
// and the first client render agree (both render empty), then the real value fills in after mount.
|
|
7
3
|
export const useMounted = () => {
|
|
8
4
|
const [mounted, setMounted] = useState(false);
|
|
9
5
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/mounted/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/mounted/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC7C,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import { ToastPosition } from '../../ui/composite/toast';
|
|
2
3
|
import { ColorTypes } from '../../ui/theme/color';
|
|
3
4
|
interface IToastContext {
|
|
4
5
|
showToast: (p: {
|
|
5
|
-
|
|
6
|
+
body: string;
|
|
6
7
|
color?: ColorTypes;
|
|
8
|
+
position?: ToastPosition;
|
|
7
9
|
length?: number;
|
|
8
10
|
}) => void;
|
|
9
11
|
dismissToast: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { createContext, useContext, useState } from 'react';
|
|
3
|
-
import { Toast } from '../../ui/
|
|
3
|
+
import { Toast, ToastPosition } from '../../ui/composite/toast';
|
|
4
4
|
import { ColorTypes } from '../../ui/theme/color';
|
|
5
5
|
const ToastContext = createContext({
|
|
6
6
|
showToast: () => { },
|
|
@@ -8,19 +8,21 @@ const ToastContext = createContext({
|
|
|
8
8
|
});
|
|
9
9
|
export const useToastContext = () => useContext(ToastContext);
|
|
10
10
|
export const ToastProvider = ({ children }) => {
|
|
11
|
-
const [
|
|
11
|
+
const [body, setBody] = useState();
|
|
12
12
|
const [color, setColor] = useState(ColorTypes.success);
|
|
13
|
+
const [position, setPosition] = useState(ToastPosition.bottomRight);
|
|
13
14
|
const [h, setH] = useState();
|
|
14
|
-
const showToast = ({
|
|
15
|
-
|
|
15
|
+
const showToast = ({ body, color, position, length, }) => {
|
|
16
|
+
setBody(body);
|
|
16
17
|
setColor(color ?? ColorTypes.success);
|
|
18
|
+
setPosition(position ?? ToastPosition.bottomRight);
|
|
17
19
|
if (h) {
|
|
18
20
|
clearTimeout(h);
|
|
19
21
|
setH(undefined);
|
|
20
22
|
}
|
|
21
23
|
if (length) {
|
|
22
24
|
setH(setTimeout(() => {
|
|
23
|
-
|
|
25
|
+
setBody(undefined);
|
|
24
26
|
setH(undefined);
|
|
25
27
|
}, length));
|
|
26
28
|
}
|
|
@@ -29,14 +31,12 @@ export const ToastProvider = ({ children }) => {
|
|
|
29
31
|
if (h) {
|
|
30
32
|
clearTimeout(h);
|
|
31
33
|
}
|
|
32
|
-
|
|
34
|
+
setBody(undefined);
|
|
33
35
|
setH(undefined);
|
|
34
36
|
};
|
|
35
37
|
return (<ToastContext.Provider value={{ showToast, dismissToast }}>
|
|
36
38
|
{children}
|
|
37
|
-
{
|
|
38
|
-
{content}
|
|
39
|
-
</Toast>)}
|
|
39
|
+
{body !== undefined && <Toast color={color} position={position} onClickClose={dismissToast} body={body}/>}
|
|
40
40
|
</ToastContext.Provider>);
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=index.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/toast/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAGZ,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../src/hooks/toast/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAGZ,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE3D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAMjD,MAAM,YAAY,GAAG,aAAa,CAAgB;IAChD,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;IACnB,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;CACvB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;AAE7D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,QAAQ,EAA2B,EAAE,EAAE;IACrE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,EAAU,CAAA;IAC1C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAa,UAAU,CAAC,OAAO,CAAC,CAAA;IAClE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAgB,aAAa,CAAC,WAAW,CAAC,CAAA;IAClF,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,QAAQ,EAAkB,CAAA;IAC5C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
2
|
+
key: string;
|
|
3
|
+
name: string;
|
|
4
|
+
mimeType: string;
|
|
5
|
+
size: number;
|
|
6
|
+
};
|
|
7
|
+
export type UploadItem = {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
size: number;
|
|
11
|
+
progress: number;
|
|
12
|
+
status: 'uploading' | 'done' | 'error';
|
|
13
|
+
source: File;
|
|
14
|
+
failure?: {
|
|
15
|
+
kind: 'network' | 'invalid-response';
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'server';
|
|
18
|
+
status: number;
|
|
19
|
+
};
|
|
20
|
+
ref?: FileUpload;
|
|
21
|
+
};
|
|
22
|
+
export declare const useUploads: ({ name, multiple, disabled, uploadPath, onChange, }: {
|
|
23
|
+
name: string;
|
|
24
|
+
multiple: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
uploadPath: string;
|
|
27
|
+
onChange?: (value?: FileUpload | FileUpload[]) => void;
|
|
28
|
+
}) => {
|
|
29
|
+
pickerRef: import("react").RefObject<HTMLInputElement | null>;
|
|
30
|
+
committed: FileUpload[];
|
|
31
|
+
committedRef: import("react").RefObject<FileUpload[]>;
|
|
32
|
+
batch: UploadItem[];
|
|
33
|
+
previews: Record<string, string>;
|
|
34
|
+
uploading: boolean;
|
|
35
|
+
valueOf: (list: FileUpload[]) => FileUpload[] | FileUpload | undefined;
|
|
36
|
+
addFiles: (selected: FileList | null) => boolean;
|
|
37
|
+
retryItem: (item: UploadItem) => void;
|
|
38
|
+
removeItem: (item: UploadItem) => void;
|
|
39
|
+
removeCommitted: (key: string) => void;
|
|
40
|
+
openPicker: () => void;
|
|
41
|
+
};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useEffect, useRef, useState } from 'react';
|
|
3
|
+
import { logger } from '../../logger';
|
|
4
|
+
export const useUploads = ({ name, multiple, disabled, uploadPath, onChange, }) => {
|
|
5
|
+
const pickerRef = useRef(null);
|
|
6
|
+
const [committed, setCommitted] = useState([]);
|
|
7
|
+
const [batch, setBatch] = useState([]);
|
|
8
|
+
const [previews, setPreviews] = useState({});
|
|
9
|
+
const previewsRef = useRef({});
|
|
10
|
+
const xhrsRef = useRef(new Map());
|
|
11
|
+
const committedRef = useRef([]);
|
|
12
|
+
const idSeq = useRef(0);
|
|
13
|
+
const uploading = batch.some((it) => it.status === 'uploading');
|
|
14
|
+
useEffect(() => () => {
|
|
15
|
+
xhrsRef.current.forEach((x) => x.abort());
|
|
16
|
+
xhrsRef.current.clear();
|
|
17
|
+
Object.values(previewsRef.current).forEach((url) => URL.revokeObjectURL(url));
|
|
18
|
+
}, []);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
const next = {};
|
|
21
|
+
committed.forEach((c) => {
|
|
22
|
+
if (previewsRef.current[c.key] !== undefined) {
|
|
23
|
+
next[c.key] = previewsRef.current[c.key];
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const source = batch.find((it) => it.ref?.key === c.key)?.source;
|
|
27
|
+
if (source !== undefined && c.mimeType.startsWith('image/')) {
|
|
28
|
+
next[c.key] = URL.createObjectURL(source);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
batch.forEach((it) => {
|
|
32
|
+
if (it.ref !== undefined) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (previewsRef.current[it.id] !== undefined) {
|
|
36
|
+
next[it.id] = previewsRef.current[it.id];
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (it.source.type.startsWith('image/')) {
|
|
40
|
+
next[it.id] = URL.createObjectURL(it.source);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
Object.entries(previewsRef.current).forEach(([key, url]) => {
|
|
44
|
+
if (next[key] === undefined) {
|
|
45
|
+
URL.revokeObjectURL(url);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
previewsRef.current = next;
|
|
49
|
+
setPreviews(next);
|
|
50
|
+
}, [committed, batch]);
|
|
51
|
+
const valueOf = (list) => (list.length === 0 ? undefined : multiple ? list : list[0]);
|
|
52
|
+
const commit = (next) => {
|
|
53
|
+
committedRef.current = next;
|
|
54
|
+
setCommitted(next);
|
|
55
|
+
onChange?.(valueOf(next));
|
|
56
|
+
};
|
|
57
|
+
const patchBatch = (id, next) => setBatch((prev) => prev.map((it) => (it.id === id ? { ...it, ...next } : it)));
|
|
58
|
+
const send = (id, source) => {
|
|
59
|
+
const fail = (failure, error) => {
|
|
60
|
+
xhrsRef.current.delete(id);
|
|
61
|
+
logger.error('upload', { name, error });
|
|
62
|
+
patchBatch(id, { status: 'error', failure });
|
|
63
|
+
};
|
|
64
|
+
try {
|
|
65
|
+
const xhr = new XMLHttpRequest();
|
|
66
|
+
xhrsRef.current.set(id, xhr);
|
|
67
|
+
// Same-origin POST: the app's own route handler resolves the one-time token and the backend URL
|
|
68
|
+
// server-side, so no credential reaches the browser and the page never issues a cross-origin (or,
|
|
69
|
+
// on an https page, mixed-content) request. The original filename goes in a request header, not a
|
|
70
|
+
// query param: a URL's query string is captured verbatim by proxy / CDN / access logs and a
|
|
71
|
+
// filename can be a direct identifier; header values are not written to those request-line logs.
|
|
72
|
+
xhr.open('POST', uploadPath);
|
|
73
|
+
xhr.setRequestHeader('x-upload-filename', encodeURIComponent(source.name));
|
|
74
|
+
xhr.setRequestHeader('content-type', source.type || 'application/octet-stream');
|
|
75
|
+
xhr.upload.onprogress = (e) => {
|
|
76
|
+
if (e.lengthComputable) {
|
|
77
|
+
patchBatch(id, { progress: e.total > 0 ? Math.round((e.loaded / e.total) * 100) : 100 });
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
xhr.onload = () => {
|
|
81
|
+
xhrsRef.current.delete(id);
|
|
82
|
+
if (xhr.status < 200 || xhr.status >= 300) {
|
|
83
|
+
fail({ kind: 'server', status: xhr.status }, new Error(`upload failed (${xhr.status})`));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
let ref;
|
|
87
|
+
try {
|
|
88
|
+
ref = JSON.parse(xhr.responseText);
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
fail({ kind: 'invalid-response' }, err);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
patchBatch(id, { progress: 100, status: 'done', ref });
|
|
95
|
+
commit(multiple ? [...committedRef.current, ref] : [ref]);
|
|
96
|
+
};
|
|
97
|
+
xhr.onerror = () => fail({ kind: 'network' }, new Error('upload failed'));
|
|
98
|
+
xhr.send(source);
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
fail({ kind: 'network' }, e);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const addFiles = (selected) => {
|
|
105
|
+
if (!selected || selected.length === 0) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
const picked = multiple ? Array.from(selected) : Array.from(selected).slice(0, 1);
|
|
109
|
+
const created = picked.map((f) => ({
|
|
110
|
+
id: `u${idSeq.current++}`,
|
|
111
|
+
name: f.name,
|
|
112
|
+
size: f.size,
|
|
113
|
+
progress: 0,
|
|
114
|
+
status: 'uploading',
|
|
115
|
+
source: f,
|
|
116
|
+
}));
|
|
117
|
+
if (multiple) {
|
|
118
|
+
setBatch((prev) => [...prev, ...created]);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
// single-file: a new selection replaces the previous one. Abort any prior XHR so its onload never
|
|
122
|
+
// fires and the superseded file cannot commit.
|
|
123
|
+
batch.forEach((it) => xhrsRef.current.get(it.id)?.abort());
|
|
124
|
+
xhrsRef.current.clear();
|
|
125
|
+
setBatch(created);
|
|
126
|
+
}
|
|
127
|
+
created.forEach((it) => send(it.id, it.source));
|
|
128
|
+
if (pickerRef.current) {
|
|
129
|
+
pickerRef.current.value = '';
|
|
130
|
+
}
|
|
131
|
+
return true;
|
|
132
|
+
};
|
|
133
|
+
const retryItem = (item) => {
|
|
134
|
+
if (xhrsRef.current.has(item.id)) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
patchBatch(item.id, { status: 'uploading', progress: 0, failure: undefined });
|
|
138
|
+
send(item.id, item.source);
|
|
139
|
+
};
|
|
140
|
+
const removeItem = (item) => {
|
|
141
|
+
const xhr = xhrsRef.current.get(item.id);
|
|
142
|
+
if (xhr) {
|
|
143
|
+
xhr.abort();
|
|
144
|
+
xhrsRef.current.delete(item.id);
|
|
145
|
+
}
|
|
146
|
+
setBatch((prev) => prev.filter((it) => it.id !== item.id));
|
|
147
|
+
if (item.ref) {
|
|
148
|
+
commit(committedRef.current.filter((c) => c.key !== item.ref?.key));
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
const removeCommitted = (key) => {
|
|
152
|
+
setBatch((prev) => prev.filter((it) => it.ref?.key !== key));
|
|
153
|
+
commit(committedRef.current.filter((c) => c.key !== key));
|
|
154
|
+
};
|
|
155
|
+
return {
|
|
156
|
+
pickerRef,
|
|
157
|
+
committed,
|
|
158
|
+
committedRef,
|
|
159
|
+
batch,
|
|
160
|
+
previews,
|
|
161
|
+
uploading,
|
|
162
|
+
valueOf,
|
|
163
|
+
addFiles,
|
|
164
|
+
retryItem,
|
|
165
|
+
removeItem,
|
|
166
|
+
removeCommitted,
|
|
167
|
+
openPicker: () => {
|
|
168
|
+
if (!disabled) {
|
|
169
|
+
pickerRef.current?.click();
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/uploads/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAoBrC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,EACJ,QAAQ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MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAA;IAC3D,CAAC,CAAA;IAED,OAAO;QACL,SAAS;QACT,SAAS;QACT,YAAY;QACZ,KAAK;QACL,QAAQ;QACR,SAAS;QACT,OAAO;QACP,QAAQ;QACR,SAAS;QACT,UAAU;QACV,eAAe;QACf,UAAU,EAAE,GAAG,EAAE;YACf,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,SAAS,CAAC,OAAO,EAAE,KAAK,EAAE,CAAA;YAC5B,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IntlErrorCode } from 'next-intl';
|
|
2
|
-
/** When a message id is English copy, missing entries fall back to the id (next-intl default uses `namespace.key`). */
|
|
3
2
|
export const getMessageFallback = ({ namespace, key, error, }) => {
|
|
4
3
|
if (error.code === IntlErrorCode.MISSING_MESSAGE) {
|
|
5
4
|
return namespace != null && namespace !== '' ? `${namespace}.${String(key)}` : String(key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-message-fallback.js","sourceRoot":"","sources":["../../../src/i18n/get-message-fallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,
|
|
1
|
+
{"version":3,"file":"get-message-fallback.js","sourceRoot":"","sources":["../../../src/i18n/get-message-fallback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAEzC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,SAAS,EACT,GAAG,EACH,KAAK,GAKN,EAAE,EAAE;IACH,IAAI,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC,eAAe,EAAE,CAAC;QACjD,OAAO,SAAS,IAAI,IAAI,IAAI,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC5F,CAAC;IACD,OAAO,SAAS,IAAI,IAAI,IAAI,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAC5F,CAAC,CAAA"}
|
package/dist/i18n/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { getRequestConfig } from 'next-intl/server';
|
|
2
2
|
import { getCookieValue } from '../lib/cookie';
|
|
3
3
|
import { getMessageFallback } from './get-message-fallback';
|
|
4
|
-
/** Framework strings: `en-GB.json` is canonical; other locale files supply overrides only. */
|
|
5
4
|
const loadFrameworkMessagesFlat = async (locale) => {
|
|
6
5
|
const { default: base } = (await import('./strings/en-GB.json'));
|
|
7
6
|
if (locale === 'en-GB') {
|
|
@@ -47,9 +46,7 @@ export const createRequestConfig = (getConsumerMessages) => getRequestConfig(asy
|
|
|
47
46
|
new Intl.DateTimeFormat(undefined, { timeZone: rawTimeZone });
|
|
48
47
|
timeZone = rawTimeZone;
|
|
49
48
|
}
|
|
50
|
-
catch {
|
|
51
|
-
// Fall back to UTC on invalid timezone
|
|
52
|
-
}
|
|
49
|
+
catch { }
|
|
53
50
|
}
|
|
54
51
|
const frameworkMessagesFlat = await loadFrameworkMessagesFlat(locale);
|
|
55
52
|
const consumerMessagesFlat = await getConsumerMessages(locale);
|
package/dist/i18n/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAA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