@pharos-ds/core 1.0.4 → 1.0.5-canary.8905b54
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/CHANGELOG.md +14 -0
- package/dist/pharos.umd.js +1 -1
- package/dist/pharos.umd.js.map +2 -2
- package/dist/theme/domainTokens/dataTokens.d.ts +2 -0
- package/dist/theme/domainTokens/dataTokens.d.ts.map +1 -1
- package/dist/theme/domainTokens/dataTokens.js +2 -0
- package/locales/pt-BR.json +878 -0
- package/package.json +1 -1
- package/src/Markdown/parser.perf.test.ts +47 -35
- package/src/Outline/Outline.test.tsx +1 -1
- package/src/theme/domainTokens/dataTokens.ts +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pharos-ds/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5-canary.8905b54",
|
|
4
4
|
"displayName": "Pharos Core",
|
|
5
5
|
"description": "Pharos component library. Accessible, themeable React components with spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Caio Silvestre",
|
|
@@ -116,15 +116,19 @@ describe('parseMarkdown performance', () => {
|
|
|
116
116
|
|
|
117
117
|
// Full re-parse benchmarks
|
|
118
118
|
for (const size of sizes) {
|
|
119
|
-
it(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
it(
|
|
120
|
+
`full re-parse ${size.name} (${size.paragraphs} paragraphs) under ${size.maxMs}ms`,
|
|
121
|
+
() => {
|
|
122
|
+
const text = generateAIResponse(size.paragraphs);
|
|
123
|
+
const {elapsed, result} = measureBest(3, () => parseMarkdown(text));
|
|
124
|
+
console.log(
|
|
125
|
+
` ${size.name} full parse: ${elapsed.toFixed(2)}ms → ${result.length} blocks`,
|
|
126
|
+
);
|
|
127
|
+
expect(elapsed).toBeLessThan(size.maxMs);
|
|
128
|
+
expect(result.length).toBeGreaterThan(0);
|
|
129
|
+
},
|
|
130
|
+
size.maxMs + 5000,
|
|
131
|
+
);
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
// Streaming with full re-parse
|
|
@@ -132,19 +136,23 @@ describe('parseMarkdown performance', () => {
|
|
|
132
136
|
{name: 'Medium', paragraphs: 50, maxMs: 5000},
|
|
133
137
|
{name: 'XL', paragraphs: 500, maxMs: 30000},
|
|
134
138
|
]) {
|
|
135
|
-
it(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
139
|
+
it(
|
|
140
|
+
`streaming full re-parse ${size.name} under ${size.maxMs}ms`,
|
|
141
|
+
() => {
|
|
142
|
+
const text = generateAIResponse(size.paragraphs);
|
|
143
|
+
const chunkSize = 50;
|
|
144
|
+
const iterations = Math.ceil(text.length / chunkSize);
|
|
145
|
+
const start = performance.now();
|
|
146
|
+
const result = simulateStreamingFullReparse(text, chunkSize);
|
|
147
|
+
const elapsed = performance.now() - start;
|
|
148
|
+
console.log(
|
|
149
|
+
` ${size.name} streaming full re-parse: ${elapsed.toFixed(2)}ms (${iterations} iterations)`,
|
|
150
|
+
);
|
|
151
|
+
expect(elapsed).toBeLessThan(size.maxMs);
|
|
152
|
+
expect(result.length).toBeGreaterThan(0);
|
|
153
|
+
},
|
|
154
|
+
size.maxMs + 5000,
|
|
155
|
+
);
|
|
148
156
|
}
|
|
149
157
|
|
|
150
158
|
// Streaming with incremental parse
|
|
@@ -152,19 +160,23 @@ describe('parseMarkdown performance', () => {
|
|
|
152
160
|
{name: 'Medium', paragraphs: 50, maxMs: 5000},
|
|
153
161
|
{name: 'XL', paragraphs: 500, maxMs: 30000},
|
|
154
162
|
]) {
|
|
155
|
-
it(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
it(
|
|
164
|
+
`streaming incremental ${size.name} under ${size.maxMs}ms`,
|
|
165
|
+
() => {
|
|
166
|
+
const text = generateAIResponse(size.paragraphs);
|
|
167
|
+
const chunkSize = 50;
|
|
168
|
+
const iterations = Math.ceil(text.length / chunkSize);
|
|
169
|
+
const start = performance.now();
|
|
170
|
+
const result = simulateStreamingIncremental(text, chunkSize);
|
|
171
|
+
const elapsed = performance.now() - start;
|
|
172
|
+
console.log(
|
|
173
|
+
` ${size.name} streaming incremental: ${elapsed.toFixed(2)}ms (${iterations} iterations)`,
|
|
174
|
+
);
|
|
175
|
+
expect(elapsed).toBeLessThan(size.maxMs);
|
|
176
|
+
expect(result.length).toBeGreaterThan(0);
|
|
177
|
+
},
|
|
178
|
+
size.maxMs + 5000,
|
|
179
|
+
);
|
|
168
180
|
}
|
|
169
181
|
|
|
170
182
|
// --- Incremental vs Full speedup benchmark ---
|
|
@@ -18,15 +18,17 @@
|
|
|
18
18
|
|
|
19
19
|
export const dataTokenDefaults = {
|
|
20
20
|
// --- Categorical palette (single accent color per category) ---
|
|
21
|
-
'--color-data-categorical-blue':
|
|
21
|
+
'--color-data-categorical-blue': 'light-dark(#0171E3, #0171E3)',
|
|
22
22
|
'--color-data-categorical-orange': 'light-dark(#EB6E00, #EB6E00)',
|
|
23
23
|
'--color-data-categorical-purple': 'light-dark(#6B1EFD, #6B1EFD)',
|
|
24
|
-
'--color-data-categorical-
|
|
25
|
-
'--color-data-categorical-
|
|
26
|
-
'--color-data-categorical-
|
|
27
|
-
'--color-data-categorical-
|
|
28
|
-
'--color-data-categorical-
|
|
29
|
-
'--color-data-categorical-
|
|
24
|
+
'--color-data-categorical-yellow': 'light-dark(#E0A800, #E0A800)',
|
|
25
|
+
'--color-data-categorical-gray': 'light-dark(#6B7280, #9CA3AF)',
|
|
26
|
+
'--color-data-categorical-green': 'light-dark(#0B991F, #0B991F)',
|
|
27
|
+
'--color-data-categorical-pink': 'light-dark(#F351C0, #F351C0)',
|
|
28
|
+
'--color-data-categorical-cyan': 'light-dark(#0171A4, #0171A4)',
|
|
29
|
+
'--color-data-categorical-red': 'light-dark(#F5394F, #F5394F)',
|
|
30
|
+
'--color-data-categorical-teal': 'light-dark(#08A3A3, #08A3A3)',
|
|
31
|
+
'--color-data-categorical-brown': 'light-dark(#965E03, #965E03)',
|
|
30
32
|
'--color-data-categorical-indigo': 'light-dark(#6F8AFF, #6F8AFF)',
|
|
31
33
|
|
|
32
34
|
// --- Neutral ---
|