@pharos-ds/core 1.0.4 → 1.0.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pharos-ds/core",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
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(`full re-parse ${size.name} (${size.paragraphs} paragraphs) under ${size.maxMs}ms`, () => {
120
- const text = generateAIResponse(size.paragraphs);
121
- const {elapsed, result} = measureBest(3, () => parseMarkdown(text));
122
- console.log(
123
- ` ${size.name} full parse: ${elapsed.toFixed(2)}ms → ${result.length} blocks`,
124
- );
125
- expect(elapsed).toBeLessThan(size.maxMs);
126
- expect(result.length).toBeGreaterThan(0);
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(`streaming full re-parse ${size.name} under ${size.maxMs}ms`, () => {
136
- const text = generateAIResponse(size.paragraphs);
137
- const chunkSize = 50;
138
- const iterations = Math.ceil(text.length / chunkSize);
139
- const start = performance.now();
140
- const result = simulateStreamingFullReparse(text, chunkSize);
141
- const elapsed = performance.now() - start;
142
- console.log(
143
- ` ${size.name} streaming full re-parse: ${elapsed.toFixed(2)}ms (${iterations} iterations)`,
144
- );
145
- expect(elapsed).toBeLessThan(size.maxMs);
146
- expect(result.length).toBeGreaterThan(0);
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(`streaming incremental ${size.name} under ${size.maxMs}ms`, () => {
156
- const text = generateAIResponse(size.paragraphs);
157
- const chunkSize = 50;
158
- const iterations = Math.ceil(text.length / chunkSize);
159
- const start = performance.now();
160
- const result = simulateStreamingIncremental(text, chunkSize);
161
- const elapsed = performance.now() - start;
162
- console.log(
163
- ` ${size.name} streaming incremental: ${elapsed.toFixed(2)}ms (${iterations} iterations)`,
164
- );
165
- expect(elapsed).toBeLessThan(size.maxMs);
166
- expect(result.length).toBeGreaterThan(0);
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 ---
@@ -39,7 +39,7 @@ describe('parseOutlineFromMarkdown', () => {
39
39
  ),
40
40
  ).toEqual([
41
41
  {
42
- id: 'install-pharosdesign-core',
42
+ id: 'install-pharos-ds-core',
43
43
  label: 'Install @pharos-ds/core',
44
44
  level: 2,
45
45
  },
@@ -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': 'light-dark(#0171E3, #0171E3)',
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-green': 'light-dark(#0B991F, #0B991F)',
25
- '--color-data-categorical-pink': 'light-dark(#F351C0, #F351C0)',
26
- '--color-data-categorical-cyan': 'light-dark(#0171A4, #0171A4)',
27
- '--color-data-categorical-red': 'light-dark(#F5394F, #F5394F)',
28
- '--color-data-categorical-teal': 'light-dark(#08A3A3, #08A3A3)',
29
- '--color-data-categorical-brown': 'light-dark(#965E03, #965E03)',
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 ---