@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
|
@@ -23,8 +23,6 @@
|
|
|
23
23
|
"Back": "戻る",
|
|
24
24
|
"Previous": "前へ",
|
|
25
25
|
"Next": "次へ",
|
|
26
|
-
"Yes": "はい",
|
|
27
|
-
"No": "いいえ",
|
|
28
26
|
"Email": "メールアドレス",
|
|
29
27
|
"Password": "パスワード",
|
|
30
28
|
"Sign in": "サインイン",
|
|
@@ -37,8 +35,18 @@
|
|
|
37
35
|
"Could not display this page. Please try again later.": "ページを表示できませんでした。しばらくしてからもう一度お試しください。",
|
|
38
36
|
"Retry": "再試行",
|
|
39
37
|
"Search": "検索",
|
|
40
|
-
"Drag & drop to upload": "ドラッグ&ドロップでアップロード",
|
|
38
|
+
"Drag & drop a file to upload": "ドラッグ&ドロップでアップロード",
|
|
39
|
+
"Drag & drop files to upload": "ドラッグ&ドロップでアップロード",
|
|
41
40
|
"or browse": "またはファイルを選択",
|
|
41
|
+
"Drop a file to upload": "ここにドロップしてアップロード",
|
|
42
|
+
"Drop files to upload": "ここにドロップしてアップロード",
|
|
43
|
+
"Accepted file types": "対応ファイル形式",
|
|
42
44
|
"Upload": "アップロード",
|
|
43
|
-
"
|
|
45
|
+
"Upload failed": "アップロードに失敗しました",
|
|
46
|
+
"Upload failed — network error": "アップロードに失敗しました — 通信エラー",
|
|
47
|
+
"Upload failed — invalid response": "アップロードに失敗しました — 不正なレスポンス",
|
|
48
|
+
"Remove": "削除",
|
|
49
|
+
"Done": "完了",
|
|
50
|
+
"Copy": "コピー",
|
|
51
|
+
"Copied": "コピーしました"
|
|
44
52
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const setCookieValue: (cookieName: string, value: string, options?: {
|
|
2
2
|
httpOnly?: boolean;
|
|
3
3
|
secure?: boolean;
|
|
4
|
-
sameSite?:
|
|
4
|
+
sameSite?: 'strict' | 'lax' | 'none';
|
|
5
5
|
maxAge?: number;
|
|
6
6
|
}) => Promise<void>;
|
|
7
7
|
export declare const getCookieValue: (cookieName: string) => Promise<string | undefined>;
|
package/dist/lib/cookie/index.js
CHANGED
|
@@ -20,7 +20,6 @@ export const setCookieValue = async (cookieName, value, options) => {
|
|
|
20
20
|
if (options?.maxAge) {
|
|
21
21
|
cookieOptions.push(`Max-Age=${options.maxAge}`);
|
|
22
22
|
}
|
|
23
|
-
// httpOnly cannot be set from the client side
|
|
24
23
|
const cookieString = `${cookieName}=${encodeURIComponent(value)}; ${cookieOptions.join('; ')}; Path=/`;
|
|
25
24
|
document.cookie = cookieString;
|
|
26
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/cookie/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,UAAkB,EAClB,KAAa,EACb,OAKC,EACD,EAAE;IACF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAA;QAChD,MAAM,WAAW,GAAG,MAAM,OAAO,EAAE,CAAA;QACnC,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE;YACjC,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;YACnC,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;YAC/B,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,KAAK;YACpC,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB,CAAC,CAAA;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,aAAa,GAAa,EAAE,CAAA;QAClC,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC9B,CAAC;QACD,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC;YACtB,aAAa,CAAC,IAAI,CAAC,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;QACpD,CAAC;QACD,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,aAAa,CAAC,IAAI,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;QACjD,CAAC;QACD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/cookie/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,c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,MAAM,WAAW,GAAG,MAAM,OAAO,EAAE,CAAA;QACnC,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1D,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC/F,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -41,9 +41,6 @@ export const options = (authorize, refresh, externalAuthorize) => {
|
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
43
|
try {
|
|
44
|
-
// Route an app-supplied opaque credential (e.g. a MicroHub OIDC broker
|
|
45
|
-
// one-time code) through externalAuthorize; otherwise fall back to the
|
|
46
|
-
// email/password path. Either callback maps to a TokenSet or undefined.
|
|
47
44
|
let tokenSet;
|
|
48
45
|
if (credentials.credential && externalAuthorize) {
|
|
49
46
|
tokenSet = await externalAuthorize(credentials.credential);
|
|
@@ -59,9 +56,6 @@ export const options = (authorize, refresh, externalAuthorize) => {
|
|
|
59
56
|
};
|
|
60
57
|
}
|
|
61
58
|
catch (error) {
|
|
62
|
-
// NextAuth swallows authorize() exceptions silently and returns null —
|
|
63
|
-
// operationally indistinguishable from "wrong password". Log the throw so
|
|
64
|
-
// server-side bugs in the consumer's authorize callback are visible.
|
|
65
59
|
logger.error('auth', { op: 'authorize', error });
|
|
66
60
|
return null;
|
|
67
61
|
}
|
|
@@ -70,9 +64,6 @@ export const options = (authorize, refresh, externalAuthorize) => {
|
|
|
70
64
|
],
|
|
71
65
|
callbacks: {
|
|
72
66
|
session: ({ session, token }) => {
|
|
73
|
-
// The access token is deliberately NOT copied onto the session: the session is serialized to the
|
|
74
|
-
// browser via /api/auth/session (SessionProvider), so exposing the bearer there hands any client
|
|
75
|
-
// script a usable credential. The server reads it from the JWT via getToken (see Lib.trpc).
|
|
76
67
|
if (token?.scope) {
|
|
77
68
|
session.scope = token.scope;
|
|
78
69
|
}
|
|
@@ -82,8 +73,6 @@ export const options = (authorize, refresh, externalAuthorize) => {
|
|
|
82
73
|
return session;
|
|
83
74
|
},
|
|
84
75
|
jwt: async ({ token, user }) => {
|
|
85
|
-
// New sign-in path: authorize() returned a TokenSet; CredentialsProvider
|
|
86
|
-
// hands it to us on `user.tokenSet`.
|
|
87
76
|
if (user?.tokenSet) {
|
|
88
77
|
token.accessToken = user.tokenSet.accessToken;
|
|
89
78
|
token.refreshToken = user.tokenSet.refreshToken;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/next-auth/index.ts"],"names":[],"mappings":"AACA,OAAO,mBAAmB,MAAM,iCAAiC,CAAA;AAEjE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AASrC,+EAA+E;AAC/E,+EAA+E;AAC/E,iFAAiF;AACjF,8EAA8E;AAC9E,+DAA+D;AAC/D,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAyC,CAAA;AAE1E,MAAM,cAAc,GAAG,CACrB,YAAoB,EACpB,OAAgE,EACjC,EAAE;IACjC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;IACpD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,CAAA;IACjB,CAAC;IACD,MAAM,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC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AE,CAAC;oBACxB,OAAO,GAAG,OAAO,GAAG,GAAG,EAAE,CAAA;gBAC3B,CAAC;gBACD,MAAM,YAAY,GAAG,IAAI,eAAe,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;gBAC7D,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;gBACxE,OAAO,QAAQ,CAAC,MAAM,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CAAA;YACpF,CAAC;SACF;KACF,CAAA;AACH,CAAC,CAAA"}
|
package/dist/lib/trpc/index.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { HTTPHeaders } from '@trpc/client';
|
|
|
2
2
|
export declare const setHeaderValues: (headers: HTTPHeaders, options?: {
|
|
3
3
|
httpOnly?: boolean;
|
|
4
4
|
secure?: boolean;
|
|
5
|
-
sameSite?:
|
|
5
|
+
sameSite?: 'strict' | 'lax' | 'none';
|
|
6
6
|
maxAge?: number;
|
|
7
7
|
}) => Promise<void>;
|
|
8
|
-
export declare const mergeDefaultHeaders: (extra
|
|
8
|
+
export declare const mergeDefaultHeaders: (extra: HTTPHeaders | undefined, allowed: readonly string[]) => Promise<HTTPHeaders>;
|
|
9
|
+
export declare const mergeServerHeaders: (extra: HTTPHeaders | undefined, allowed: readonly string[]) => Promise<HTTPHeaders>;
|
package/dist/lib/trpc/index.js
CHANGED
|
@@ -6,13 +6,32 @@ export const setHeaderValues = async (headers, options) => setCookieValue('heade
|
|
|
6
6
|
// The real authorization is applied server-side from the JWT (getToken) below.
|
|
7
7
|
const SENSITIVE_HEADER_NAMES = new Set([
|
|
8
8
|
'authorization',
|
|
9
|
+
'proxy-authorization',
|
|
9
10
|
'cookie',
|
|
10
11
|
'x-forwarded-for',
|
|
11
12
|
'x-forwarded-host',
|
|
12
13
|
'x-forwarded-proto',
|
|
13
14
|
'x-real-ip',
|
|
15
|
+
'user-agent',
|
|
16
|
+
'host',
|
|
17
|
+
'content-type',
|
|
18
|
+
'content-length',
|
|
14
19
|
]);
|
|
15
|
-
const
|
|
20
|
+
const pickAllowedHeaders = (headers, allowed) => {
|
|
21
|
+
const admitted = allowed.map((name) => name.trim().toLowerCase());
|
|
22
|
+
const picked = {};
|
|
23
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
24
|
+
const name = key.toLowerCase();
|
|
25
|
+
if (SENSITIVE_HEADER_NAMES.has(name)) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (admitted.includes(name)) {
|
|
29
|
+
picked[key] = value;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return picked;
|
|
33
|
+
};
|
|
34
|
+
const createDefaultHeaders = async (extra, allowed, own) => {
|
|
16
35
|
let baseHeaders = {};
|
|
17
36
|
let authorization;
|
|
18
37
|
if (typeof window === 'undefined') {
|
|
@@ -20,7 +39,7 @@ const createDefaultHeaders = async (defaultHeaders = {}) => {
|
|
|
20
39
|
const headersList = await nextHeaders();
|
|
21
40
|
baseHeaders = { 'user-agent': headersList.get('user-agent') || 'unknown' };
|
|
22
41
|
// Read the access token from the server-side JWT (getToken decodes the same session cookie
|
|
23
|
-
// getServerSession does) rather than the session — the session
|
|
42
|
+
// getServerSession does) rather than the session — the session does not carry the bearer, so it is
|
|
24
43
|
// never exposed to client JS. Do NOT refresh here: the RSC / server-action path cannot persist a
|
|
25
44
|
// rotated session cookie, so an inline refresh consumes a (possibly rotating) refresh token out of
|
|
26
45
|
// band and poisons the next-auth jwt-callback refresh (which is the only place that can persist the
|
|
@@ -40,22 +59,31 @@ const createDefaultHeaders = async (defaultHeaders = {}) => {
|
|
|
40
59
|
if (headersCookie) {
|
|
41
60
|
try {
|
|
42
61
|
const parsedHeaders = JSON.parse(headersCookie);
|
|
43
|
-
for (const [key, value] of Object.entries(parsedHeaders)) {
|
|
44
|
-
|
|
45
|
-
savedHeaders[key] = value;
|
|
46
|
-
}
|
|
62
|
+
for (const [key, value] of Object.entries(pickAllowedHeaders(parsedHeaders, allowed))) {
|
|
63
|
+
savedHeaders[key] = value;
|
|
47
64
|
}
|
|
48
65
|
}
|
|
49
|
-
catch {
|
|
50
|
-
// Ignore if JSON parse fails
|
|
51
|
-
}
|
|
66
|
+
catch { }
|
|
52
67
|
}
|
|
53
68
|
return {
|
|
54
69
|
...baseHeaders,
|
|
55
70
|
...savedHeaders,
|
|
56
71
|
...(authorization ? { authorization } : {}),
|
|
57
|
-
...
|
|
72
|
+
...(own ? extra : pickAllowedHeaders(extra, allowed)),
|
|
58
73
|
};
|
|
59
74
|
};
|
|
60
|
-
|
|
75
|
+
// Which function the call site picks is what says whether the bag is the caller's or the server's own.
|
|
76
|
+
// Both take the allow-list, so the browser-held `headers` cookie is narrowed by it on either path.
|
|
77
|
+
export const mergeDefaultHeaders = async (extra, allowed) => {
|
|
78
|
+
if (allowed === undefined) {
|
|
79
|
+
throw new Error('mergeDefaultHeaders requires the allowedConsumerHeaders the generated client carries as its second argument. Reaching this means a generated client was built before that export existed; treating the bag as unrestricted would put caller-controlled headers on the request.');
|
|
80
|
+
}
|
|
81
|
+
return createDefaultHeaders(extra ?? {}, allowed, false);
|
|
82
|
+
};
|
|
83
|
+
export const mergeServerHeaders = async (extra, allowed) => {
|
|
84
|
+
if (allowed === undefined) {
|
|
85
|
+
throw new Error('mergeServerHeaders requires the allowedConsumerHeaders the generated client carries as its second argument: the bag it is given is unfiltered, and the cookie-held one is narrowed by that list.');
|
|
86
|
+
}
|
|
87
|
+
return createDefaultHeaders(extra ?? {}, allowed, true);
|
|
88
|
+
};
|
|
61
89
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/trpc/index.ts"],"names":[],"mappings":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,CAAC;IACD,OAAO,oBAAoB,CAAC,KAAK,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;AAC1D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,KAA8B,EAC9B,OAA0B,EACJ,EAAE;IACxB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kMAAkM,CACnM,CAAA;IACH,CAAC;IACD,OAAO,oBAAoB,CAAC,KAAK,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;AACzD,CAAC,CAAA"}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { logger } from '../../logger';
|
|
2
|
-
// Same-origin upload relay. The browser POSTs the file bytes to the app's own origin and this route
|
|
3
|
-
// forwards them to the backend's `/_uploads` sink: the one-time token and the target URL are resolved
|
|
4
|
-
// server-side by `uploadAction`, so the token never reaches the browser and the page never makes a
|
|
5
|
-
// cross-origin request (no CORS preflight, and no mixed content when the page is served over https while
|
|
6
|
-
// the backend is plain http in dev). The destination is not caller-supplied, so this is not an open relay.
|
|
7
2
|
export const createUploadRoute = (uploadAction) => async (request) => {
|
|
8
|
-
// Unlike a Server Action, a route handler gets no framework CSRF protection, and this one is
|
|
9
|
-
// cookie-authenticated: without this check an attacker's page could POST a body cross-site and have the
|
|
10
|
-
// victim's session mint a token and store the object. Two accept conditions, because neither covers both
|
|
11
|
-
// deployments on its own: `Sec-Fetch-Site` is browser-set and a forbidden header name (unforgeable) but
|
|
12
|
-
// is only attached to trustworthy origins, so it is absent on the plain-http dev hosts; the Origin/Host
|
|
13
|
-
// comparison covers those, and compares against `Host` alone — `x-forwarded-host` is caller-settable, so
|
|
14
|
-
// trusting it would let an attacker match its own Origin.
|
|
15
3
|
const origin = request.headers.get('origin');
|
|
16
4
|
if (request.headers.get('sec-fetch-site') !== 'same-origin' &&
|
|
17
5
|
(origin === null || URL.parse(origin)?.host !== request.headers.get('host'))) {
|
|
@@ -36,14 +24,9 @@ export const createUploadRoute = (uploadAction) => async (request) => {
|
|
|
36
24
|
method: 'POST',
|
|
37
25
|
headers: {
|
|
38
26
|
authorization: `Bearer ${token}`,
|
|
39
|
-
// Forwarded only when present — the backend falls back to its own default name for an absent header,
|
|
40
|
-
// but an empty string would be taken as the real filename.
|
|
41
27
|
...(filename === null ? {} : { 'x-upload-filename': filename }),
|
|
42
28
|
'content-type': request.headers.get('content-type') ?? 'application/octet-stream',
|
|
43
29
|
},
|
|
44
|
-
// The body is buffered rather than streamed: passing `request.body` through requires the
|
|
45
|
-
// `duplex: 'half'` init option, which the DOM `RequestInit` type Next.js compiles against does not
|
|
46
|
-
// declare. The backend caps a single upload at its own ceiling, so the buffer stays bounded.
|
|
47
30
|
body: await request.arrayBuffer(),
|
|
48
31
|
}).catch((error) => {
|
|
49
32
|
logger.error('upload', { url, error });
|
|
@@ -57,7 +40,20 @@ export const createUploadRoute = (uploadAction) => async (request) => {
|
|
|
57
40
|
}
|
|
58
41
|
const body = await response.text();
|
|
59
42
|
if (!response.ok) {
|
|
60
|
-
|
|
43
|
+
// The status and the body's SHAPE, never the body itself. This route exists to keep the uploaded
|
|
44
|
+
// filename out of proxy / access logs (it travels in a header, not the query string), and a backend
|
|
45
|
+
// validation error commonly echoes the rejected filename back in its message — logging the raw text
|
|
46
|
+
// would put it in the log stream anyway. `Util.sanitize` cannot help: the whole response collapses
|
|
47
|
+
// into one string value, so there are no keys for it to match on.
|
|
48
|
+
let bodyKeys;
|
|
49
|
+
try {
|
|
50
|
+
const parsed = JSON.parse(body);
|
|
51
|
+
bodyKeys = typeof parsed === 'object' && parsed !== null ? Object.keys(parsed) : undefined;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
bodyKeys = undefined;
|
|
55
|
+
}
|
|
56
|
+
logger.error('upload', { status: response.status, bodyKeys, bodyLength: body.length });
|
|
61
57
|
}
|
|
62
58
|
return new Response(body, { status: response.status, headers: { 'content-type': 'application/json' } });
|
|
63
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/uploads/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/uploads/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,MAAM,CAAC,MAAM,iBAAiB,GAC5B,CAAC,YAA2D,EAAE,EAAE,CAAC,KAAK,EAAE,OAAgB,EAAE,EAAE;IAC1F,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAC5C,IACE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,KAAK,aAAa;QACvD,CAAC,MAAM,KAAK,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC5E,CAAC;QACD,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC,EAAE;YAC7E,MAAM,EAAE,GAAG;YACX,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAChD,CAAC,CAAA;IACJ,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;IACzD,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAClD,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QACjC,OAAO,SAAS,CAAA;IAClB,CAAC,CAAC,CAAA;IACF,IAAI,MAAM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;QACjG,oGAAoG;QACpG,oGAAoG;QACpG,mGAAmG;QACnG,kEAAkE;QAClE,IAAI,QAA8B,CAAA;QAClC,IAAI,CAAC;YACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACxC,QAAQ,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAC5F,CAAC;QAAC,MAAM,CAAC;YACP,QAAQ,GAAG,SAAS,CAAA;QACtB,CAAC;QACD,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAA;AACzG,CAAC,CAAA"}
|
package/dist/logger/index.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ declare const LEVEL_ORDER: {
|
|
|
5
5
|
readonly error: 40;
|
|
6
6
|
};
|
|
7
7
|
type LogLevel = keyof typeof LEVEL_ORDER;
|
|
8
|
+
declare const enabled: (level: LogLevel) => boolean;
|
|
8
9
|
export declare const logger: {
|
|
9
|
-
enabled:
|
|
10
|
+
enabled: typeof enabled;
|
|
10
11
|
debug: (tag: string, payload: Record<string, unknown>) => void;
|
|
11
12
|
info: (tag: string, payload: Record<string, unknown>) => void;
|
|
12
13
|
warn: (tag: string, payload: Record<string, unknown>) => void;
|
package/dist/logger/index.js
CHANGED
|
@@ -11,8 +11,6 @@ const getThreshold = () => {
|
|
|
11
11
|
return defaultClientEnv.NEXT_PUBLIC_LOG_LEVEL ?? DEFAULT_BY_DEPLOY_ENV[defaultClientEnv.NEXT_PUBLIC_DEPLOY_ENV];
|
|
12
12
|
};
|
|
13
13
|
const enabled = (level) => LEVEL_ORDER[level] >= LEVEL_ORDER[getThreshold()];
|
|
14
|
-
// Service identifier: host on both sides (no env var). Falls back to 'unknown' when
|
|
15
|
-
// `os.hostname()` is unavailable (e.g. Edge runtime in middleware).
|
|
16
14
|
const getService = () => {
|
|
17
15
|
if (isServer) {
|
|
18
16
|
try {
|
|
@@ -24,10 +22,6 @@ const getService = () => {
|
|
|
24
22
|
}
|
|
25
23
|
return window.location.host;
|
|
26
24
|
};
|
|
27
|
-
// Path: auto-injected on client from `window.location.pathname`. Not auto-injected on
|
|
28
|
-
// server side in v1 — Next.js middleware can't wrap downstream calls in AsyncLocalStorage
|
|
29
|
-
// the way Express middleware does, and `headers()` is async (would force the logger API
|
|
30
|
-
// to be async). Server callers include `path` in `payload` when relevant.
|
|
31
25
|
const getAutoPath = () => (isServer ? undefined : window.location.pathname);
|
|
32
26
|
const isDevFormat = () => isServer ? defaultServerEnv.NODE_ENV === 'development' : defaultClientEnv.NEXT_PUBLIC_DEPLOY_ENV === 'dev';
|
|
33
27
|
const emit = (level, tag, payload) => {
|
package/dist/logger/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/logger/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAEpC,MAAM,WAAW,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAW,CAAA;AAGzE,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,WAAW,CAAA;AAE9C,MAAM,qBAAqB,GAAG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 +24,80 @@
|
|
|
24
24
|
@apply cursor-pointer hover:opacity-80 disabled:cursor-default disabled:opacity-50;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
@layer components {
|
|
29
|
+
.hljs {
|
|
30
|
+
color: light-dark(#24292f, #c9d1d9);
|
|
31
|
+
}
|
|
32
|
+
.hljs-doctag,
|
|
33
|
+
.hljs-keyword,
|
|
34
|
+
.hljs-meta .hljs-keyword,
|
|
35
|
+
.hljs-template-tag,
|
|
36
|
+
.hljs-template-variable,
|
|
37
|
+
.hljs-type,
|
|
38
|
+
.hljs-variable.language_ {
|
|
39
|
+
color: light-dark(#cf222e, #ff7b72);
|
|
40
|
+
}
|
|
41
|
+
.hljs-title,
|
|
42
|
+
.hljs-title.class_,
|
|
43
|
+
.hljs-title.class_.inherited__,
|
|
44
|
+
.hljs-title.function_ {
|
|
45
|
+
color: light-dark(#8250df, #d2a8ff);
|
|
46
|
+
}
|
|
47
|
+
.hljs-attr,
|
|
48
|
+
.hljs-attribute,
|
|
49
|
+
.hljs-literal,
|
|
50
|
+
.hljs-meta,
|
|
51
|
+
.hljs-number,
|
|
52
|
+
.hljs-operator,
|
|
53
|
+
.hljs-selector-attr,
|
|
54
|
+
.hljs-selector-class,
|
|
55
|
+
.hljs-selector-id,
|
|
56
|
+
.hljs-variable {
|
|
57
|
+
color: light-dark(#0550ae, #79c0ff);
|
|
58
|
+
}
|
|
59
|
+
.hljs-meta .hljs-string,
|
|
60
|
+
.hljs-regexp,
|
|
61
|
+
.hljs-string {
|
|
62
|
+
color: light-dark(#0a3069, #a5d6ff);
|
|
63
|
+
}
|
|
64
|
+
.hljs-built_in,
|
|
65
|
+
.hljs-symbol {
|
|
66
|
+
color: light-dark(#953800, #ffa657);
|
|
67
|
+
}
|
|
68
|
+
.hljs-code,
|
|
69
|
+
.hljs-comment,
|
|
70
|
+
.hljs-formula {
|
|
71
|
+
color: light-dark(#6e7781, #8b949e);
|
|
72
|
+
}
|
|
73
|
+
.hljs-name,
|
|
74
|
+
.hljs-quote,
|
|
75
|
+
.hljs-selector-pseudo,
|
|
76
|
+
.hljs-selector-tag {
|
|
77
|
+
color: light-dark(#116329, #7ee787);
|
|
78
|
+
}
|
|
79
|
+
.hljs-subst {
|
|
80
|
+
color: light-dark(#24292f, #c9d1d9);
|
|
81
|
+
}
|
|
82
|
+
.hljs-section {
|
|
83
|
+
color: light-dark(#0550ae, #1f6feb);
|
|
84
|
+
font-weight: bold;
|
|
85
|
+
}
|
|
86
|
+
.hljs-bullet {
|
|
87
|
+
color: light-dark(#953800, #f2cc60);
|
|
88
|
+
}
|
|
89
|
+
.hljs-emphasis {
|
|
90
|
+
font-style: italic;
|
|
91
|
+
}
|
|
92
|
+
.hljs-strong {
|
|
93
|
+
font-weight: bold;
|
|
94
|
+
}
|
|
95
|
+
.hljs-addition {
|
|
96
|
+
color: light-dark(#116329, #aff5b4);
|
|
97
|
+
background-color: light-dark(#dafbe1, #033a16);
|
|
98
|
+
}
|
|
99
|
+
.hljs-deletion {
|
|
100
|
+
color: light-dark(#82071e, #ffdcd7);
|
|
101
|
+
background-color: light-dark(#ffebe9, #67060c);
|
|
102
|
+
}
|
|
103
|
+
}
|