@carlonicora/nextjs-jsonapi 6.2.0 → 6.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AssistantMessageInterface-S7oyERTT.d.mts → AssistantMessageInterface-0ZQ1EJKO.d.mts} +1 -1
- package/dist/{AssistantMessageInterface-DHJJO_Z_.d.ts → AssistantMessageInterface-CA-hZ5Wj.d.ts} +1 -1
- package/dist/{BlockNoteEditor-Q757ZLCO.js → BlockNoteEditor-CT4XUXPC.js} +19 -19
- package/dist/{BlockNoteEditor-Q757ZLCO.js.map → BlockNoteEditor-CT4XUXPC.js.map} +1 -1
- package/dist/{BlockNoteEditor-D6VMXRZH.mjs → BlockNoteEditor-M6UQRVRK.mjs} +4 -4
- package/dist/{BlockNoteViewer-KG4CIJC5.js → BlockNoteViewer-MFLWF3Y2.js} +3 -3
- package/dist/{BlockNoteViewer-KG4CIJC5.js.map → BlockNoteViewer-MFLWF3Y2.js.map} +1 -1
- package/dist/{BlockNoteViewer-GI5LVQHZ.mjs → BlockNoteViewer-XZJ5Y7WN.mjs} +2 -2
- package/dist/{BlogPostInterface-BB_4wcDR.d.mts → BlogPostInterface-BN2mXc46.d.mts} +1 -1
- package/dist/{BlogPostInterface-bWAT1rfR.d.ts → BlogPostInterface-CTGfsR1I.d.ts} +1 -1
- package/dist/{auth.interface-CSzJ1oP1.d.ts → auth.interface-D5606g19.d.ts} +1 -1
- package/dist/{auth.interface-DD4uQv2K.d.mts → auth.interface-tsOuc0Fi.d.mts} +1 -1
- package/dist/billing/index.d.mts +3 -3
- package/dist/billing/index.d.ts +3 -3
- package/dist/billing/index.js +501 -493
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +13 -5
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-QKDPCZ3G.mjs → chunk-3FD6Y734.mjs} +73 -15
- package/dist/chunk-3FD6Y734.mjs.map +1 -0
- package/dist/{chunk-3P3IYUWQ.js → chunk-DSGP6GC3.js} +8 -8
- package/dist/{chunk-3P3IYUWQ.js.map → chunk-DSGP6GC3.js.map} +1 -1
- package/dist/{chunk-MHBE4KQR.mjs → chunk-DYOSXIEL.mjs} +26 -21
- package/dist/chunk-DYOSXIEL.mjs.map +1 -0
- package/dist/{chunk-S332ZCIE.js → chunk-ELQHE2DK.js} +27 -22
- package/dist/chunk-ELQHE2DK.js.map +1 -0
- package/dist/{chunk-HLW3SUMD.mjs → chunk-O2TEUH5S.mjs} +2 -2
- package/dist/{chunk-UEWDYVLW.js → chunk-QJIDORHM.js} +4 -4
- package/dist/{chunk-UEWDYVLW.js.map → chunk-QJIDORHM.js.map} +1 -1
- package/dist/{chunk-CUNSPLOD.mjs → chunk-RUJCWOJE.mjs} +2 -2
- package/dist/{chunk-6PW3562E.mjs → chunk-TIT4CJYQ.mjs} +1233 -1181
- package/dist/chunk-TIT4CJYQ.mjs.map +1 -0
- package/dist/{chunk-GSHMGL6N.js → chunk-XZCCIKX3.js} +151 -93
- package/dist/chunk-XZCCIKX3.js.map +1 -0
- package/dist/{chunk-XQEYBESH.js → chunk-Y7JIQNM6.js} +922 -870
- package/dist/chunk-Y7JIQNM6.js.map +1 -0
- package/dist/client/index.d.mts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +22 -6
- package/dist/components/index.d.ts +22 -6
- package/dist/components/index.js +10 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +10 -4
- package/dist/contexts/index.d.mts +5 -5
- package/dist/contexts/index.d.ts +5 -5
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +23 -13
- package/dist/core/index.d.ts +23 -13
- package/dist/core/index.js +8 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +7 -1
- package/dist/{currency-DrEVd_Xs.d.mts → currency-BhuEoBOn.d.mts} +2 -115
- package/dist/{currency-8ErEC39n.d.ts → currency-CBgZkS0u.d.ts} +2 -115
- package/dist/email-automations/index.js +92 -92
- package/dist/email-automations/index.mjs +3 -3
- package/dist/features/analytics/index.d.mts +2 -2
- package/dist/features/analytics/index.d.ts +2 -2
- package/dist/features/analytics/index.js +121 -121
- package/dist/features/analytics/index.mjs +4 -4
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/blog/index.d.mts +4 -4
- package/dist/features/blog/index.d.ts +4 -4
- package/dist/features/blog/index.js +150 -150
- package/dist/features/blog/index.mjs +3 -3
- package/dist/features/blog/server.d.mts +4 -4
- package/dist/features/blog/server.d.ts +4 -4
- package/dist/features/blog/server.js +16 -16
- package/dist/features/blog/server.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.d.mts +123 -1
- package/dist/features/tokenusage/index.d.ts +123 -1
- package/dist/features/tokenusage/index.js +130 -127
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +7 -4
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/{notification.interface-BB6GPpZY.d.mts → notification.interface-CF5h90U2.d.mts} +1 -1
- package/dist/{notification.interface-CmAGrijJ.d.ts → notification.interface-DQReXAD7.d.ts} +1 -1
- package/dist/{s3.service-Bz_K-tjz.d.ts → s3.service-BTCpmp5g.d.ts} +11 -4
- package/dist/{s3.service-D5zNCEW3.d.mts → s3.service-CzFBDEuQ.d.mts} +11 -4
- package/dist/server/index.d.mts +5 -5
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/stripe-price.interface-D6mKjAdr.d.mts +132 -0
- package/dist/stripe-price.interface-DGqcklFJ.d.ts +132 -0
- package/dist/{useSocket-B0H9pmmH.d.ts → useSocket-BM3q9A0C.d.ts} +1 -1
- package/dist/{useSocket-B5RQb6v2.d.mts → useSocket-CwSoq6VS.d.mts} +1 -1
- package/dist/{user.interface-CIWGlbqM.d.mts → user.interface-BYnGJ7ss.d.mts} +37 -2
- package/dist/{user.interface-C0ZdsBZj.d.ts → user.interface-BqPjVyJI.d.ts} +37 -2
- package/messages/en.json +8 -0
- package/messages/it.json +8 -0
- package/package.json +1 -1
- package/src/components/containers/RoundPageContainer.tsx +7 -2
- package/src/components/index.ts +5 -0
- package/src/features/billing/components/containers/BillingDashboardContainer.tsx +20 -3
- package/src/features/billing/components/widgets/CreditWarningBanner.tsx +93 -0
- package/src/features/billing/data/credit-warning.spec.ts +96 -0
- package/src/features/billing/data/credit-warning.ts +57 -0
- package/src/features/billing/data/index.ts +3 -0
- package/src/features/billing/i18n-keys.ts +6 -0
- package/src/features/company/data/company.interface.ts +11 -0
- package/src/features/company/data/company.service.ts +17 -0
- package/src/features/company/data/company.spec.ts +29 -0
- package/src/features/company/data/company.ts +31 -0
- package/src/features/tokenusage/index.ts +5 -0
- package/dist/chunk-6PW3562E.mjs.map +0 -1
- package/dist/chunk-GSHMGL6N.js.map +0 -1
- package/dist/chunk-MHBE4KQR.mjs.map +0 -1
- package/dist/chunk-QKDPCZ3G.mjs.map +0 -1
- package/dist/chunk-S332ZCIE.js.map +0 -1
- package/dist/chunk-XQEYBESH.js.map +0 -1
- package/dist/feature.interface-BO25VLlx.d.ts +0 -19
- package/dist/feature.interface-CXb1-vNq.d.mts +0 -19
- /package/dist/{BlockNoteEditor-D6VMXRZH.mjs.map → BlockNoteEditor-M6UQRVRK.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-GI5LVQHZ.mjs.map → BlockNoteViewer-XZJ5Y7WN.mjs.map} +0 -0
- /package/dist/{chunk-HLW3SUMD.mjs.map → chunk-O2TEUH5S.mjs.map} +0 -0
- /package/dist/{chunk-CUNSPLOD.mjs.map → chunk-RUJCWOJE.mjs.map} +0 -0
|
@@ -37,8 +37,8 @@ import {
|
|
|
37
37
|
registerTableGenerator,
|
|
38
38
|
useDataListRetriever,
|
|
39
39
|
usePageUrlGenerator
|
|
40
|
-
} from "../../chunk-
|
|
41
|
-
import "../../chunk-
|
|
40
|
+
} from "../../chunk-TIT4CJYQ.mjs";
|
|
41
|
+
import "../../chunk-RUJCWOJE.mjs";
|
|
42
42
|
import "../../chunk-PW42LRSL.mjs";
|
|
43
43
|
import {
|
|
44
44
|
BLOG_ACTION,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
showToast,
|
|
65
65
|
useI18nLocale,
|
|
66
66
|
useI18nRouter
|
|
67
|
-
} from "../../chunk-
|
|
67
|
+
} from "../../chunk-3FD6Y734.mjs";
|
|
68
68
|
import "../../chunk-V5MI7RNB.mjs";
|
|
69
69
|
import "../../chunk-AUXK7QSA.mjs";
|
|
70
70
|
import "../../chunk-PI56A4DG.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as BlogListLayout, a as BlogCategoryInterface, b as BlogPostInterface } from '../../BlogPostInterface-
|
|
2
|
-
export { c as BLOG_LIST_LAYOUTS } from '../../BlogPostInterface-
|
|
1
|
+
import { B as BlogListLayout, a as BlogCategoryInterface, b as BlogPostInterface } from '../../BlogPostInterface-BN2mXc46.mjs';
|
|
2
|
+
export { c as BLOG_LIST_LAYOUTS } from '../../BlogPostInterface-BN2mXc46.mjs';
|
|
3
3
|
import { P as PublicBlogCategory, a as PublicBlogPost, b as PublicBlogList } from '../../blog-public.types-BbrzsC1c.mjs';
|
|
4
4
|
import '../../ApiDataInterface-BcZeXy5X.mjs';
|
|
5
|
-
import '../../user.interface-
|
|
6
|
-
import '../../
|
|
5
|
+
import '../../user.interface-BYnGJ7ss.mjs';
|
|
6
|
+
import '../../stripe-price.interface-D6mKjAdr.mjs';
|
|
7
7
|
import '@blocknote/core';
|
|
8
8
|
|
|
9
9
|
declare function fetchPublicBlogPosts(params: {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { B as BlogListLayout, a as BlogCategoryInterface, b as BlogPostInterface } from '../../BlogPostInterface-
|
|
2
|
-
export { c as BLOG_LIST_LAYOUTS } from '../../BlogPostInterface-
|
|
1
|
+
import { B as BlogListLayout, a as BlogCategoryInterface, b as BlogPostInterface } from '../../BlogPostInterface-CTGfsR1I.js';
|
|
2
|
+
export { c as BLOG_LIST_LAYOUTS } from '../../BlogPostInterface-CTGfsR1I.js';
|
|
3
3
|
import { P as PublicBlogCategory, a as PublicBlogPost, b as PublicBlogList } from '../../blog-public.types-BbrzsC1c.js';
|
|
4
4
|
import '../../ApiDataInterface-BcZeXy5X.js';
|
|
5
|
-
import '../../user.interface-
|
|
6
|
-
import '../../
|
|
5
|
+
import '../../user.interface-BqPjVyJI.js';
|
|
6
|
+
import '../../stripe-price.interface-DGqcklFJ.js';
|
|
7
7
|
import '@blocknote/core';
|
|
8
8
|
|
|
9
9
|
declare function fetchPublicBlogPosts(params: {
|
|
@@ -9,7 +9,7 @@ require('../../chunk-6TUB7Y6T.js');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkXZCCIKX3js = require('../../chunk-XZCCIKX3.js');
|
|
13
13
|
require('../../chunk-GHE4VT2R.js');
|
|
14
14
|
require('../../chunk-LXKSUWAV.js');
|
|
15
15
|
require('../../chunk-JTPRJNT2.js');
|
|
@@ -50,14 +50,14 @@ _chunk7QVYU63Ejs.__name.call(void 0, toPublicBlogCategory, "toPublicBlogCategory
|
|
|
50
50
|
|
|
51
51
|
// src/features/blog/server/fetchers.ts
|
|
52
52
|
var BLOG_PAGE_SIZE = 12;
|
|
53
|
-
var publicPostsEndpoint = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => `${
|
|
53
|
+
var publicPostsEndpoint = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => `${_chunkXZCCIKX3js.BLOG_PUBLIC_PREFIX}/${_chunkXZCCIKX3js.Modules.BlogPost.name}`, "publicPostsEndpoint");
|
|
54
54
|
var asArray = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => Array.isArray(data) ? data : data ? [data] : [], "asArray");
|
|
55
55
|
async function fetchPublicBlogPosts(params) {
|
|
56
56
|
if (params.all) return { posts: await fetchEveryPublicBlogPost(params), hasMore: false };
|
|
57
57
|
const page = Math.min(10, Math.max(1, Math.floor(params.page || 1)));
|
|
58
58
|
const size = BLOG_PAGE_SIZE * page;
|
|
59
59
|
const res = await _chunkKSYQEKJXjs.ServerJsonApiGet.call(void 0, {
|
|
60
|
-
classKey: { ...
|
|
60
|
+
classKey: { ..._chunkXZCCIKX3js.Modules.BlogPost, cache: "minutes" },
|
|
61
61
|
endpoint: publicPostsListEndpoint({ ...params, size }),
|
|
62
62
|
language: params.language
|
|
63
63
|
});
|
|
@@ -69,7 +69,7 @@ async function fetchPublicBlogPosts(params) {
|
|
|
69
69
|
}
|
|
70
70
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchPublicBlogPosts, "fetchPublicBlogPosts");
|
|
71
71
|
function publicPostsListEndpoint(params) {
|
|
72
|
-
const endpoint = new (0,
|
|
72
|
+
const endpoint = new (0, _chunkXZCCIKX3js.EndpointCreator)({ endpoint: publicPostsEndpoint() });
|
|
73
73
|
endpoint.addAdditionalParam("language", params.language);
|
|
74
74
|
if (params.categorySlug) endpoint.addAdditionalParam("category", encodeURIComponent(params.categorySlug));
|
|
75
75
|
if (params.search) endpoint.addAdditionalParam("search", encodeURIComponent(params.search));
|
|
@@ -84,7 +84,7 @@ async function fetchEveryPublicBlogPost(params) {
|
|
|
84
84
|
const posts = [];
|
|
85
85
|
for (let index = 0; index < MAX_ALL_PAGES; index++) {
|
|
86
86
|
const res = await _chunkKSYQEKJXjs.ServerJsonApiGet.call(void 0, {
|
|
87
|
-
classKey: { ...
|
|
87
|
+
classKey: { ..._chunkXZCCIKX3js.Modules.BlogPost, cache: "minutes" },
|
|
88
88
|
endpoint: publicPostsListEndpoint({
|
|
89
89
|
...params,
|
|
90
90
|
size: PUBLIC_MAX_PAGE_SIZE,
|
|
@@ -101,10 +101,10 @@ async function fetchEveryPublicBlogPost(params) {
|
|
|
101
101
|
}
|
|
102
102
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchEveryPublicBlogPost, "fetchEveryPublicBlogPost");
|
|
103
103
|
async function fetchPublicBlogPost(params) {
|
|
104
|
-
const endpoint = new (0,
|
|
104
|
+
const endpoint = new (0, _chunkXZCCIKX3js.EndpointCreator)({ endpoint: publicPostsEndpoint(), id: encodeURIComponent(params.slug) });
|
|
105
105
|
endpoint.addAdditionalParam("language", params.language);
|
|
106
106
|
const res = await _chunkKSYQEKJXjs.ServerJsonApiGet.call(void 0, {
|
|
107
|
-
classKey: { ...
|
|
107
|
+
classKey: { ..._chunkXZCCIKX3js.Modules.BlogPost, cache: "minutes" },
|
|
108
108
|
endpoint: endpoint.generate(),
|
|
109
109
|
language: params.language
|
|
110
110
|
});
|
|
@@ -114,14 +114,14 @@ async function fetchPublicBlogPost(params) {
|
|
|
114
114
|
}
|
|
115
115
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchPublicBlogPost, "fetchPublicBlogPost");
|
|
116
116
|
async function fetchRelatedBlogPosts(params) {
|
|
117
|
-
const endpoint = new (0,
|
|
117
|
+
const endpoint = new (0, _chunkXZCCIKX3js.EndpointCreator)({
|
|
118
118
|
endpoint: publicPostsEndpoint(),
|
|
119
119
|
id: encodeURIComponent(params.slug),
|
|
120
|
-
childEndpoint:
|
|
120
|
+
childEndpoint: _chunkXZCCIKX3js.BLOG_ACTION.related
|
|
121
121
|
});
|
|
122
122
|
endpoint.addAdditionalParam("language", params.language);
|
|
123
123
|
const res = await _chunkKSYQEKJXjs.ServerJsonApiGet.call(void 0, {
|
|
124
|
-
classKey: { ...
|
|
124
|
+
classKey: { ..._chunkXZCCIKX3js.Modules.BlogPost, cache: "minutes" },
|
|
125
125
|
endpoint: endpoint.generate(),
|
|
126
126
|
language: params.language
|
|
127
127
|
});
|
|
@@ -130,10 +130,10 @@ async function fetchRelatedBlogPosts(params) {
|
|
|
130
130
|
}
|
|
131
131
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchRelatedBlogPosts, "fetchRelatedBlogPosts");
|
|
132
132
|
async function fetchPublicBlogCategories(params) {
|
|
133
|
-
const endpoint = new (0,
|
|
133
|
+
const endpoint = new (0, _chunkXZCCIKX3js.EndpointCreator)({ endpoint: `${_chunkXZCCIKX3js.BLOG_PUBLIC_PREFIX}/${_chunkXZCCIKX3js.Modules.BlogCategory.name}` });
|
|
134
134
|
endpoint.addAdditionalParam("language", params.language);
|
|
135
135
|
const res = await _chunkKSYQEKJXjs.ServerJsonApiGet.call(void 0, {
|
|
136
|
-
classKey: { ...
|
|
136
|
+
classKey: { ..._chunkXZCCIKX3js.Modules.BlogCategory, cache: "minutes" },
|
|
137
137
|
endpoint: endpoint.generate(),
|
|
138
138
|
language: params.language
|
|
139
139
|
});
|
|
@@ -144,13 +144,13 @@ _chunk7QVYU63Ejs.__name.call(void 0, fetchPublicBlogCategories, "fetchPublicBlog
|
|
|
144
144
|
async function fetchBlogSettings() {
|
|
145
145
|
const fallback = { listLayout: "featured" };
|
|
146
146
|
const res = await _chunkKSYQEKJXjs.ServerJsonApiGet.call(void 0, {
|
|
147
|
-
classKey: { ...
|
|
148
|
-
endpoint: new (0,
|
|
147
|
+
classKey: { ..._chunkXZCCIKX3js.Modules.BlogSettings, cache: "minutes" },
|
|
148
|
+
endpoint: new (0, _chunkXZCCIKX3js.EndpointCreator)({ endpoint: `${_chunkXZCCIKX3js.BLOG_PUBLIC_PREFIX}/${_chunkXZCCIKX3js.Modules.BlogSettings.name}` }).generate(),
|
|
149
149
|
language: "en"
|
|
150
150
|
});
|
|
151
151
|
if (!res.ok) return fallback;
|
|
152
152
|
const settings = asArray(res.data)[0];
|
|
153
|
-
if (!settings || !
|
|
153
|
+
if (!settings || !_chunkXZCCIKX3js.BLOG_LIST_LAYOUTS.includes(settings.listLayout)) return fallback;
|
|
154
154
|
return { listLayout: settings.listLayout };
|
|
155
155
|
}
|
|
156
156
|
_chunk7QVYU63Ejs.__name.call(void 0, fetchBlogSettings, "fetchBlogSettings");
|
|
@@ -163,5 +163,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, fetchBlogSettings, "fetchBlogSettings");
|
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
|
|
166
|
-
exports.BLOG_LIST_LAYOUTS =
|
|
166
|
+
exports.BLOG_LIST_LAYOUTS = _chunkXZCCIKX3js.BLOG_LIST_LAYOUTS; exports.fetchBlogSettings = fetchBlogSettings; exports.fetchPublicBlogCategories = fetchPublicBlogCategories; exports.fetchPublicBlogPost = fetchPublicBlogPost; exports.fetchPublicBlogPosts = fetchPublicBlogPosts; exports.fetchRelatedBlogPosts = fetchRelatedBlogPosts; exports.toPublicBlogCategory = toPublicBlogCategory; exports.toPublicBlogPost = toPublicBlogPost;
|
|
167
167
|
//# sourceMappingURL=server.js.map
|
|
@@ -23,14 +23,14 @@ var _chunkYBZVWLPHjs = require('../../chunk-YBZVWLPH.js');
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkY7JIQNM6js = require('../../chunk-Y7JIQNM6.js');
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _chunkDSGP6GC3js = require('../../chunk-DSGP6GC3.js');
|
|
30
30
|
require('../../chunk-G4JR3SFV.js');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkXZCCIKX3js = require('../../chunk-XZCCIKX3.js');
|
|
34
34
|
require('../../chunk-GHE4VT2R.js');
|
|
35
35
|
require('../../chunk-LXKSUWAV.js');
|
|
36
36
|
require('../../chunk-JTPRJNT2.js');
|
|
@@ -44,7 +44,7 @@ var _react = require('react');
|
|
|
44
44
|
var _jsxruntime = require('react/jsx-runtime');
|
|
45
45
|
var HelpContext = _react.createContext.call(void 0, null);
|
|
46
46
|
function HelpProvider({ children }) {
|
|
47
|
-
const cfg =
|
|
47
|
+
const cfg = _chunkDSGP6GC3js._getStaticHelpContent.call(void 0, );
|
|
48
48
|
if (!cfg) {
|
|
49
49
|
throw new Error(
|
|
50
50
|
"Help content not configured \u2014 call configureJsonApi({ helpContent: {...} }) before importing help components."
|
|
@@ -76,29 +76,29 @@ var _lucidereact = require('lucide-react');
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
function HelpAssistantSheet({ open, onOpenChange }) {
|
|
79
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
-
|
|
79
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.Sheet, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
+
_chunkY7JIQNM6js.SheetContent,
|
|
81
81
|
{
|
|
82
82
|
side: "end",
|
|
83
83
|
className: "flex w-full flex-col data-[side=right]:sm:max-w-2xl data-[side=right]:lg:max-w-3xl data-[side=left]:sm:max-w-2xl data-[side=left]:lg:max-w-3xl",
|
|
84
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
84
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.AssistantProvider, { manageUrl: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAssistantSheetBody, {}) })
|
|
85
85
|
}
|
|
86
86
|
) });
|
|
87
87
|
}
|
|
88
88
|
_chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheet, "HelpAssistantSheet");
|
|
89
89
|
function HelpAssistantSheetBody() {
|
|
90
90
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
91
|
-
const ctx =
|
|
91
|
+
const ctx = _chunkY7JIQNM6js.useAssistantContext.call(void 0, );
|
|
92
92
|
const showThread = !!ctx.assistant || ctx.sending || ctx.messages.length > 0;
|
|
93
93
|
const send = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (content) => ctx.sendMessage(content, { howToMode: true }), "send");
|
|
94
94
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
95
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
96
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
97
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
95
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkY7JIQNM6js.SheetHeader, { children: [
|
|
96
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.SheetTitle, { children: t("help.askAi.sheet.title") }),
|
|
97
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.SheetDescription, { children: t("help.askAi.sheet.subtitle") })
|
|
98
98
|
] }),
|
|
99
|
-
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
99
|
+
!showThread ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.AssistantEmptyState, { onSend: send }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
100
100
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
101
|
-
|
|
101
|
+
_chunkY7JIQNM6js.AssistantThread,
|
|
102
102
|
{
|
|
103
103
|
messages: ctx.messages,
|
|
104
104
|
sending: ctx.sending,
|
|
@@ -108,7 +108,7 @@ function HelpAssistantSheetBody() {
|
|
|
108
108
|
onRetry: ctx.retrySend
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
111
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.AssistantComposer, { onSend: send, disabled: ctx.sending })
|
|
112
112
|
] })
|
|
113
113
|
] });
|
|
114
114
|
}
|
|
@@ -118,20 +118,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAssistantSheetBody, "HelpAssistantSheet
|
|
|
118
118
|
|
|
119
119
|
function HelpAskAi() {
|
|
120
120
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
121
|
-
const { currentUser } =
|
|
121
|
+
const { currentUser } = _chunkY7JIQNM6js.useCurrentUserContext.call(void 0, );
|
|
122
122
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
123
123
|
const disabled = !currentUser;
|
|
124
124
|
if (disabled) {
|
|
125
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
126
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
125
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkY7JIQNM6js.Tooltip, { children: [
|
|
126
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkY7JIQNM6js.TooltipTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.Button, { variant: "outline", size: "sm", disabled: true }), children: [
|
|
127
127
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
128
128
|
t("help.askAi.button")
|
|
129
129
|
] }),
|
|
130
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
130
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.TooltipContent, { children: t("help.askAi.loginTooltip") })
|
|
131
131
|
] });
|
|
132
132
|
}
|
|
133
133
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
134
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
134
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkY7JIQNM6js.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
|
|
135
135
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SparklesIcon, { className: "h-4 w-4" }),
|
|
136
136
|
t("help.askAi.button")
|
|
137
137
|
] }),
|
|
@@ -144,7 +144,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpAskAi, "HelpAskAi");
|
|
|
144
144
|
|
|
145
145
|
function HelpHeader() {
|
|
146
146
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
147
|
-
const { currentUser } =
|
|
147
|
+
const { currentUser } = _chunkY7JIQNM6js.useCurrentUserContext.call(void 0, );
|
|
148
148
|
const { brand } = useHelp();
|
|
149
149
|
const logo = _optionalChain([brand, 'optionalAccess', _ => _.logo]);
|
|
150
150
|
const label = _nullishCoalesce(_optionalChain([brand, 'optionalAccess', _2 => _2.label]), () => ( t("help.title")));
|
|
@@ -160,7 +160,7 @@ function HelpHeader() {
|
|
|
160
160
|
] }),
|
|
161
161
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 max-md:shrink-0", children: [
|
|
162
162
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, HelpAskAi, {}),
|
|
163
|
-
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className:
|
|
163
|
+
currentUser ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: appHref, className: _chunkY7JIQNM6js.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.openApp") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _link2.default, { href: "/login", className: _chunkY7JIQNM6js.buttonVariants.call(void 0, { variant: "outline", size: "sm" }), children: t("help.header.login") })
|
|
164
164
|
] })
|
|
165
165
|
] });
|
|
166
166
|
}
|
|
@@ -202,12 +202,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, useHelpFilter, "useHelpFilter");
|
|
|
202
202
|
|
|
203
203
|
function HelpSideNav() {
|
|
204
204
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
205
|
-
const generateUrl =
|
|
205
|
+
const generateUrl = _chunkY7JIQNM6js.usePageUrlGenerator.call(void 0, );
|
|
206
206
|
const pathname = _navigation.usePathname.call(void 0, );
|
|
207
207
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
208
208
|
_react.useEffect.call(void 0, () => {
|
|
209
209
|
let active = true;
|
|
210
|
-
|
|
210
|
+
_chunkXZCCIKX3js.HowToService.findPublished().then((list) => active && setArticles(list)).catch(() => active && setArticles([]));
|
|
211
211
|
return () => {
|
|
212
212
|
active = false;
|
|
213
213
|
};
|
|
@@ -283,7 +283,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpSideNav, "HelpSideNav");
|
|
|
283
283
|
function HelpArticleBody(props) {
|
|
284
284
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
285
285
|
const format = _nextintl.useFormatter.call(void 0, );
|
|
286
|
-
const generateUrl =
|
|
286
|
+
const generateUrl = _chunkY7JIQNM6js.usePageUrlGenerator.call(void 0, );
|
|
287
287
|
const { howToType, title, summary, updatedAt, prev, next, children } = props;
|
|
288
288
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "prose dark:prose-invert max-w-none", children: [
|
|
289
289
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { className: "text-muted-foreground mb-2 text-xs", children: [
|
|
@@ -340,7 +340,7 @@ function HelpTOC({ headings }) {
|
|
|
340
340
|
}, [headings]);
|
|
341
341
|
if (headings.length === 0) return null;
|
|
342
342
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "nav", { "aria-label": t("help.toc.title"), className: "hidden lg:block", children: [
|
|
343
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
343
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.MicroLabel, { className: "mb-2", children: t("help.toc.title") }),
|
|
344
344
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: "space-y-1 text-sm", children: headings.map((h) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { style: { paddingInlineStart: `${(h.depth - 2) * 0.75}rem` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
345
345
|
"a",
|
|
346
346
|
{
|
|
@@ -361,13 +361,13 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpTOC, "HelpTOC");
|
|
|
361
361
|
|
|
362
362
|
function HelpHint({ contextKey }) {
|
|
363
363
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
364
|
-
const generateUrl =
|
|
364
|
+
const generateUrl = _chunkY7JIQNM6js.usePageUrlGenerator.call(void 0, );
|
|
365
365
|
const [open, setOpen] = _react.useState.call(void 0, false);
|
|
366
366
|
const [picked, setPicked] = _react.useState.call(void 0, null);
|
|
367
367
|
const [articles, setArticles] = _react.useState.call(void 0, []);
|
|
368
368
|
_react.useEffect.call(void 0, () => {
|
|
369
369
|
let active2 = true;
|
|
370
|
-
|
|
370
|
+
_chunkXZCCIKX3js.HowToService.findPublished().then((list) => active2 && setArticles(list)).catch(() => active2 && setArticles([]));
|
|
371
371
|
return () => {
|
|
372
372
|
active2 = false;
|
|
373
373
|
};
|
|
@@ -379,7 +379,7 @@ function HelpHint({ contextKey }) {
|
|
|
379
379
|
if (matches.length === 0) return null;
|
|
380
380
|
const active = _nullishCoalesce(picked, () => ( (matches.length === 1 ? matches[0] : null)));
|
|
381
381
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
382
|
-
|
|
382
|
+
_chunkY7JIQNM6js.Sheet,
|
|
383
383
|
{
|
|
384
384
|
open,
|
|
385
385
|
onOpenChange: (o) => {
|
|
@@ -387,11 +387,11 @@ function HelpHint({ contextKey }) {
|
|
|
387
387
|
if (!o) setPicked(null);
|
|
388
388
|
},
|
|
389
389
|
children: [
|
|
390
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
391
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
392
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
393
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
394
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
390
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.SheetTrigger, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.Button, { variant: "ghost", size: "icon-sm", "aria-label": t("help.hint.trigger") }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.HelpCircleIcon, { className: "h-4 w-4" }) }),
|
|
391
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkY7JIQNM6js.SheetContent, { side: "end", className: "w-full max-w-md sm:max-w-lg", children: [
|
|
392
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkY7JIQNM6js.SheetHeader, { children: [
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.SheetTitle, { children: active ? active.name : t("help.hint.pickArticle") }),
|
|
394
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.SheetDescription, { children: _nullishCoalesce(_optionalChain([active, 'optionalAccess', _4 => _4.summary]), () => ( "")) })
|
|
395
395
|
] }),
|
|
396
396
|
active ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mt-4 space-y-3", children: [
|
|
397
397
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: active.summary }),
|
|
@@ -423,18 +423,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, HelpHint, "HelpHint");
|
|
|
423
423
|
|
|
424
424
|
function HelpSearchResultRow({ result, onSelect }) {
|
|
425
425
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
426
|
-
const generateUrl =
|
|
426
|
+
const generateUrl = _chunkY7JIQNM6js.usePageUrlGenerator.call(void 0, );
|
|
427
427
|
const [article, setArticle] = _react.useState.call(void 0, null);
|
|
428
428
|
_react.useEffect.call(void 0, () => {
|
|
429
429
|
let active = true;
|
|
430
|
-
|
|
430
|
+
_chunkXZCCIKX3js.HowToService.findOne({ id: result.id }).then((a) => active && setArticle(a)).catch(() => active && setArticle(null));
|
|
431
431
|
return () => {
|
|
432
432
|
active = false;
|
|
433
433
|
};
|
|
434
434
|
}, [result.id]);
|
|
435
435
|
if (!article) {
|
|
436
436
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
437
|
-
|
|
437
|
+
_chunkY7JIQNM6js.CommandItem,
|
|
438
438
|
{
|
|
439
439
|
value: result.id,
|
|
440
440
|
disabled: true,
|
|
@@ -443,7 +443,7 @@ function HelpSearchResultRow({ result, onSelect }) {
|
|
|
443
443
|
}
|
|
444
444
|
);
|
|
445
445
|
}
|
|
446
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
446
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7JIQNM6js.CommandItem, { value: result.id, onSelect, className: "cursor-pointer p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
447
447
|
_link2.default,
|
|
448
448
|
{
|
|
449
449
|
href: generateUrl({ page: `/help/${article.howToType}/${article.slug}` }),
|
|
@@ -23,14 +23,14 @@ import {
|
|
|
23
23
|
useAssistantContext,
|
|
24
24
|
useCurrentUserContext,
|
|
25
25
|
usePageUrlGenerator
|
|
26
|
-
} from "../../chunk-
|
|
26
|
+
} from "../../chunk-TIT4CJYQ.mjs";
|
|
27
27
|
import {
|
|
28
28
|
_getStaticHelpContent
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-RUJCWOJE.mjs";
|
|
30
30
|
import "../../chunk-PW42LRSL.mjs";
|
|
31
31
|
import {
|
|
32
32
|
HowToService
|
|
33
|
-
} from "../../chunk-
|
|
33
|
+
} from "../../chunk-3FD6Y734.mjs";
|
|
34
34
|
import "../../chunk-V5MI7RNB.mjs";
|
|
35
35
|
import "../../chunk-AUXK7QSA.mjs";
|
|
36
36
|
import "../../chunk-PI56A4DG.mjs";
|
|
@@ -782,4 +782,126 @@ declare function createUsageFormatters(locale: string, currency: string): UsageF
|
|
|
782
782
|
*/
|
|
783
783
|
declare function useUsageFormatters(): UsageFormatters;
|
|
784
784
|
|
|
785
|
-
|
|
785
|
+
/**
|
|
786
|
+
* Chart palette for the administrative token-usage dashboard.
|
|
787
|
+
*
|
|
788
|
+
* Every value here is a documented step of the dataviz skill's reference ramps —
|
|
789
|
+
* nothing was eyeballed, nothing was hand-mixed. The palette was run through the
|
|
790
|
+
* skill's validator against THIS application's real chart surfaces in both modes.
|
|
791
|
+
* The verbatim output is below.
|
|
792
|
+
*
|
|
793
|
+
* The surface is `--card`, NOT `--background`. Every chart that uses this palette
|
|
794
|
+
* is painted inside a `<Card>`, so the card is the surface the marks actually sit
|
|
795
|
+
* on — and in dark mode it is the *lighter* of the two (`oklch(0.205 0 0)` vs the
|
|
796
|
+
* background's `oklch(0.145 0 0)`), which is the harder case for contrast. Taken
|
|
797
|
+
* from `apps/web/src/app/globals.css` (narr8 declares two `:root`/`.dark` pairs;
|
|
798
|
+
* the LATER pair wins, and it is the one read here) — light `oklch(1 0 0)`, dark
|
|
799
|
+
* `oklch(0.205 0 0)`. a360ai declares the same two values.
|
|
800
|
+
*
|
|
801
|
+
* oklch→hex conversion: the algebraic inverse of the Björn Ottosson OKLab
|
|
802
|
+
* matrices — the same matrices the validator applies in the forward direction —
|
|
803
|
+
* giving light `#ffffff` and dark `#171717`. Cross-checked by feeding it the
|
|
804
|
+
* previously recorded background value, which it reproduces exactly:
|
|
805
|
+
* `oklch(0.145 0 0)` → `#0a0a0a`. ✓
|
|
806
|
+
*
|
|
807
|
+
* Light and dark are two SELECTED sets of steps, chosen for their own surface —
|
|
808
|
+
* never one set with its lightness flipped at runtime. Consumers pick a set from
|
|
809
|
+
* the resolved theme (`seriesColor(i, mode)` / `sequentialColor(i, mode)`).
|
|
810
|
+
*
|
|
811
|
+
* ---------------------------------------------------------------------------
|
|
812
|
+
* VALIDATOR OUTPUT — dataviz `scripts/validate_palette.js`, run 2026-08-15
|
|
813
|
+
* ---------------------------------------------------------------------------
|
|
814
|
+
*
|
|
815
|
+
* $ node scripts/validate_palette.js "#2a78d6,#eb6834,#1baf7a,#eda100,#e87ba4,#008300,#4a3aa7" --mode light --surface "#ffffff"
|
|
816
|
+
*
|
|
817
|
+
* Palette (light, surface #ffffff, categorical): 7 slots
|
|
818
|
+
* [PASS] Lightness band all 7 inside L 0.43–0.77
|
|
819
|
+
* [PASS] Chroma floor all 7 >= 0.1
|
|
820
|
+
* [PASS] CVD separation worst adjacent #eda100↔#1baf7a ΔE 9.1 (protan) · tritan 5.8
|
|
821
|
+
* [PASS] Normal-vision floor worst adjacent #e87ba4↔#eda100 ΔE 19.6 (normal)
|
|
822
|
+
* [WARN] Contrast vs surface below 3:1 — relief required (visible labels or table view): [["#1baf7a",2.82],["#eda100",2.17],["#e87ba4",2.69]]
|
|
823
|
+
*
|
|
824
|
+
* → ALL CHECKS PASS (CVD in the 6–8 floor band is legal ONLY with secondary encoding: direct labels, gaps, or texture)
|
|
825
|
+
* scope: categorical palettes only. For a lone status/text color check WCAG text contrast; for a sequential ramp, lightness monotonicity.
|
|
826
|
+
*
|
|
827
|
+
* $ node scripts/validate_palette.js "#3987e5,#d95926,#199e70,#c98500,#d55181,#008300,#9085e9" --mode dark --surface "#171717"
|
|
828
|
+
*
|
|
829
|
+
* Palette (dark, surface #171717, categorical): 7 slots
|
|
830
|
+
* [PASS] Lightness band all 7 inside L 0.48–0.67
|
|
831
|
+
* [PASS] Chroma floor all 7 >= 0.1
|
|
832
|
+
* [PASS] CVD separation worst adjacent #c98500↔#199e70 ΔE 8.4 (protan) · tritan 8.7
|
|
833
|
+
* [PASS] Normal-vision floor worst adjacent #d55181↔#c98500 ΔE 19.3 (normal)
|
|
834
|
+
* [PASS] Contrast vs surface all 7 >= 3:1
|
|
835
|
+
*
|
|
836
|
+
* → ALL CHECKS PASS (CVD in the 6–8 floor band is legal ONLY with secondary encoding: direct labels, gaps, or texture)
|
|
837
|
+
* scope: categorical palettes only. For a lone status/text color check WCAG text contrast; for a sequential ramp, lightness monotonicity.
|
|
838
|
+
*
|
|
839
|
+
* $ node scripts/validate_palette.js "#104281,#1c5cab,#2a78d6,#5598e7,#86b6ef" --mode light --surface "#ffffff" --ordinal
|
|
840
|
+
*
|
|
841
|
+
* Palette (light, surface #ffffff, ordinal ramp): 5 slots
|
|
842
|
+
* [PASS] Lightness monotone steps read light→dark
|
|
843
|
+
* [PASS] Adjacent ΔL all gaps >= 0.06
|
|
844
|
+
* [PASS] Light-end contrast #86b6ef at 2.11:1 vs surface
|
|
845
|
+
* [PASS] Single hue hue spread 3°
|
|
846
|
+
*
|
|
847
|
+
* → ALL CHECKS PASS (ordinal: one hue, monotone L, visible step gaps, light end clears surface)
|
|
848
|
+
*
|
|
849
|
+
* $ node scripts/validate_palette.js "#9ec5f4,#6da7ec,#3987e5,#256abf,#184f95" --mode dark --surface "#171717" --ordinal
|
|
850
|
+
*
|
|
851
|
+
* Palette (dark, surface #171717, ordinal ramp): 5 slots
|
|
852
|
+
* [PASS] Lightness monotone steps read light→dark
|
|
853
|
+
* [PASS] Adjacent ΔL all gaps >= 0.06
|
|
854
|
+
* [PASS] Light-end contrast #184f95 at 2.21:1 vs surface
|
|
855
|
+
* [PASS] Single hue hue spread 3°
|
|
856
|
+
*
|
|
857
|
+
* → ALL CHECKS PASS (ordinal: one hue, monotone L, visible step gaps, light end clears surface)
|
|
858
|
+
*
|
|
859
|
+
* OTHER_COLOR is achromatic, so the categorical checks (which gate hue identity)
|
|
860
|
+
* do not apply to it; it was gated on contrast alone with the validator's own
|
|
861
|
+
* `contrast()` export: 3.59:1 on `#ffffff`, 4.99:1 on `#171717` — both clear 3:1.
|
|
862
|
+
*
|
|
863
|
+
* ---------------------------------------------------------------------------
|
|
864
|
+
* WHAT THE RESULTS OBLIGE US TO DO
|
|
865
|
+
* ---------------------------------------------------------------------------
|
|
866
|
+
*
|
|
867
|
+
* - NO COLOUR VALUE CHANGED in the move from `--background` to `--card`. Every
|
|
868
|
+
* gate that passed on the background still passes on the card, so re-stepping
|
|
869
|
+
* a hue would have been churn, not a fix. Only the recorded surface, the
|
|
870
|
+
* recorded numbers and this prose changed.
|
|
871
|
+
* - The dark set still clears 3:1 on the LIGHTER card surface: the worst slot is
|
|
872
|
+
* green `#008300` at 3.63:1, and the ordinal ramp's surface-nearest step lands
|
|
873
|
+
* at 2.21:1 (down from 2.44:1 on the background) — still above the 2:1 gate.
|
|
874
|
+
* That headroom is thin, so a future card-surface lightening MUST re-run these
|
|
875
|
+
* four commands rather than assume the set still holds.
|
|
876
|
+
* - The light-mode contrast WARN is NOT dismissable. Three slots (aqua, yellow,
|
|
877
|
+
* magenta) sit below 3:1 on white, so every surface that paints with this
|
|
878
|
+
* palette MUST ship the relief channel: a visible legend, direct labels and a
|
|
879
|
+
* tooltip carrying the value in text. The timeline chart and the breakdown
|
|
880
|
+
* table both do. The light card is `#ffffff`, identical to the light
|
|
881
|
+
* background, so this WARN is unchanged rather than newly incurred.
|
|
882
|
+
* - CVD separation is measured on ADJACENT pairs, which is the correct pairlist
|
|
883
|
+
* for stacked bars, grouped bars and lines — the only forms this palette paints.
|
|
884
|
+
* A scatter / bubble / small-multiples chart would need `--pairs all`, which
|
|
885
|
+
* caps the usable slot count at three; do not reuse this array there without
|
|
886
|
+
* re-running the validator with that flag.
|
|
887
|
+
*/
|
|
888
|
+
/** Which surface the colours are being painted on. */
|
|
889
|
+
type ChartMode = "light" | "dark";
|
|
890
|
+
/**
|
|
891
|
+
* The identity colour for series `index`.
|
|
892
|
+
*
|
|
893
|
+
* Never generates a hue and never cycles: anything at or past the ceiling gets
|
|
894
|
+
* `OTHER_COLOR`, because a series past the ceiling should already have been
|
|
895
|
+
* folded into the "other" bucket by the caller.
|
|
896
|
+
*/
|
|
897
|
+
declare function seriesColor(index: number, mode?: ChartMode): string;
|
|
898
|
+
/**
|
|
899
|
+
* Both mode steps for series `index`, shaped for a shadcn `ChartConfig` entry's
|
|
900
|
+
* `theme` field.
|
|
901
|
+
*/
|
|
902
|
+
declare function seriesTheme(index: number): {
|
|
903
|
+
light: string;
|
|
904
|
+
dark: string;
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
export { type ChartMode, type Dimension, type Granularity, type Metric, type ReportDimension, type ReportMetric, type Scope, type StackBy, TOKEN_USAGE_ADMIN_I18N_KEYS, TOKEN_USAGE_REPORT_I18N_KEYS, TokenUsageAdminBreakdown, type TokenUsageAdminBreakdownInput, type TokenUsageAdminBreakdownInterface, TokenUsageAdminContainer, type TokenUsageAdminContextType, TokenUsageAdminFilterBar, type TokenUsageAdminFilterState, type TokenUsageAdminFilters, TokenUsageAdminProvider, TokenUsageAdminService, TokenUsageAdminSummary, type TokenUsageAdminSummaryInput, type TokenUsageAdminSummaryInterface, TokenUsageAdminTiles, TokenUsageAdminTimeline, type TokenUsageAdminTimelineInput, type TokenUsageAdminTimelineInterface, type TokenUsageBalances, TokenUsageBreakdownTable, TokenUsageRankedBar, TokenUsageReportBreakdown, type TokenUsageReportBreakdownInput, type TokenUsageReportBreakdownInterface, TokenUsageReportContainer, type TokenUsageReportContextType, TokenUsageReportFilterBar, type TokenUsageReportFilterState, type TokenUsageReportFilters, TokenUsageReportProvider, TokenUsageReportService, TokenUsageReportSummary, type TokenUsageReportSummaryInput, type TokenUsageReportSummaryInterface, TokenUsageReportTiles, TokenUsageReportTimeline, type TokenUsageReportTimelineInput, type TokenUsageReportTimelineInterface, TokenUsageTimelineChart, type UsageFormatters, createUsageFormatters, seriesColor, seriesTheme, useTokenUsageAdmin, useTokenUsageReport, useUsageFormatters };
|