@typespec/html-program-viewer 0.68.0-dev.1 → 0.68.0-dev.2
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/emitter/index.js
CHANGED
|
@@ -353,7 +353,7 @@ function getDebugClassNames(lookupItem, parentLookupItem, parentDebugClassNames,
|
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
function
|
|
356
|
+
function getAtomicDebugSequenceTree(debugSequenceHash, parentNode) {
|
|
357
357
|
const lookupItem = DEFINITION_LOOKUP_TABLE[debugSequenceHash];
|
|
358
358
|
if (lookupItem === undefined) {
|
|
359
359
|
return undefined;
|
|
@@ -369,7 +369,7 @@ function getDebugTree(debugSequenceHash, parentNode) {
|
|
|
369
369
|
const childrenSequences = debugData.getChildrenSequences(node.sequenceHash);
|
|
370
370
|
childrenSequences.reverse() // first process the overriding children that are merged last
|
|
371
371
|
.forEach(sequence => {
|
|
372
|
-
const child =
|
|
372
|
+
const child = getAtomicDebugSequenceTree(sequence, node);
|
|
373
373
|
if (child) {
|
|
374
374
|
node.children.push(child);
|
|
375
375
|
}
|
|
@@ -394,6 +394,53 @@ function getDebugTree(debugSequenceHash, parentNode) {
|
|
|
394
394
|
return node;
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
+
function getResetDebugSequence(debugSequenceHash) {
|
|
398
|
+
const resetClass = DEBUG_RESET_CLASSES[debugSequenceHash];
|
|
399
|
+
if (resetClass === undefined) {
|
|
400
|
+
return undefined;
|
|
401
|
+
}
|
|
402
|
+
const debugClassNames = [{
|
|
403
|
+
className: debugSequenceHash
|
|
404
|
+
}];
|
|
405
|
+
const node = {
|
|
406
|
+
sequenceHash: debugSequenceHash,
|
|
407
|
+
direction: 'ltr',
|
|
408
|
+
children: [],
|
|
409
|
+
debugClassNames
|
|
410
|
+
};
|
|
411
|
+
node.rules = {};
|
|
412
|
+
node.slot = 'makeResetStyles()';
|
|
413
|
+
const [{
|
|
414
|
+
className
|
|
415
|
+
}] = node.debugClassNames;
|
|
416
|
+
const cssRules = debugData.getCSSRules().filter(cssRule => {
|
|
417
|
+
return cssRule.includes(`.${className}`);
|
|
418
|
+
});
|
|
419
|
+
node.rules[className] = cssRules.join('');
|
|
420
|
+
return node;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
function mergeDebugSequence(atomicClases, resetClassName) {
|
|
424
|
+
const debugResultRootAtomic = atomicClases ? getAtomicDebugSequenceTree(atomicClases) : undefined;
|
|
425
|
+
const debugResultRootReset = resetClassName ? getResetDebugSequence(resetClassName) : undefined;
|
|
426
|
+
if (!debugResultRootAtomic && !debugResultRootReset) {
|
|
427
|
+
return undefined;
|
|
428
|
+
}
|
|
429
|
+
if (!debugResultRootAtomic) {
|
|
430
|
+
return debugResultRootReset;
|
|
431
|
+
}
|
|
432
|
+
if (!debugResultRootReset) {
|
|
433
|
+
return debugResultRootAtomic;
|
|
434
|
+
}
|
|
435
|
+
const debugResultRoot = {
|
|
436
|
+
sequenceHash: debugResultRootAtomic.sequenceHash + debugResultRootReset.sequenceHash,
|
|
437
|
+
direction: debugResultRootAtomic.direction,
|
|
438
|
+
children: [debugResultRootAtomic, debugResultRootReset],
|
|
439
|
+
debugClassNames: [...debugResultRootAtomic.debugClassNames, ...debugResultRootReset.debugClassNames]
|
|
440
|
+
};
|
|
441
|
+
return debugResultRoot;
|
|
442
|
+
}
|
|
443
|
+
|
|
397
444
|
function injectDevTools(document) {
|
|
398
445
|
const window = document.defaultView;
|
|
399
446
|
if (!window || window.__GRIFFEL_DEVTOOLS__) {
|
|
@@ -401,11 +448,17 @@ function injectDevTools(document) {
|
|
|
401
448
|
}
|
|
402
449
|
const devtools = {
|
|
403
450
|
getInfo: element => {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
451
|
+
let rootDebugSequenceHash;
|
|
452
|
+
let rootResetDebugClassName;
|
|
453
|
+
for (const className of element.classList) {
|
|
454
|
+
if (className.startsWith(SEQUENCE_PREFIX)) {
|
|
455
|
+
rootDebugSequenceHash = className;
|
|
456
|
+
}
|
|
457
|
+
if (DEBUG_RESET_CLASSES[className]) {
|
|
458
|
+
rootResetDebugClassName = className;
|
|
459
|
+
}
|
|
407
460
|
}
|
|
408
|
-
return
|
|
461
|
+
return mergeDebugSequence(rootDebugSequenceHash, rootResetDebugClassName);
|
|
409
462
|
}
|
|
410
463
|
};
|
|
411
464
|
Object.defineProperty(window, '__GRIFFEL_DEVTOOLS__', {
|
|
@@ -4864,11 +4917,9 @@ const fontWeights = {
|
|
|
4864
4917
|
fontWeightBold: 700
|
|
4865
4918
|
};
|
|
4866
4919
|
const fontFamilies = {
|
|
4867
|
-
fontFamilyBase:
|
|
4868
|
-
"'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif",
|
|
4920
|
+
fontFamilyBase: "'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif",
|
|
4869
4921
|
fontFamilyMonospace: "Consolas, 'Courier New', Courier, monospace",
|
|
4870
|
-
fontFamilyNumeric:
|
|
4871
|
-
"Bahnschrift, 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif"
|
|
4922
|
+
fontFamilyNumeric: "Bahnschrift, 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif"
|
|
4872
4923
|
};
|
|
4873
4924
|
|
|
4874
4925
|
// Intentionally not exported! Use horizontalSpacings and verticalSpacings instead.
|
package/dist/react/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import require$$0, { useRef, useState, useMemo, useCallback, useEffect, useId, c
|
|
|
2
2
|
import { mergeClasses, Breadcrumb, BreadcrumbItem, BreadcrumbButton, BreadcrumbDivider, Combobox, Option, Caption1, Card, CardHeader, Text, Divider } from '@fluentui/react-components';
|
|
3
3
|
import { ChevronDownRegular, ChevronRightRegular, AppsListRegular, DatabaseRegular } from '@fluentui/react-icons';
|
|
4
4
|
import { useHotkeys } from 'react-hotkeys-hook';
|
|
5
|
-
import { List, ListItem } from '@fluentui/react-list
|
|
5
|
+
import { List, ListItem } from '@fluentui/react-list';
|
|
6
6
|
|
|
7
7
|
function getAugmentedNamespace(n) {
|
|
8
|
-
if (n
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(n, '__esModule')) return n;
|
|
9
9
|
var f = n.default;
|
|
10
10
|
if (typeof f == "function") {
|
|
11
11
|
var a = function a () {
|
|
@@ -33584,7 +33584,7 @@ let manifest;
|
|
|
33584
33584
|
try {
|
|
33585
33585
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33586
33586
|
// @ts-ignore
|
|
33587
|
-
manifest = (await import('../manifest-
|
|
33587
|
+
manifest = (await import('../manifest-C60bc4MS.js')).default;
|
|
33588
33588
|
}
|
|
33589
33589
|
catch {
|
|
33590
33590
|
const name = "../dist/manifest.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/html-program-viewer",
|
|
3
|
-
"version": "0.68.0-dev.
|
|
3
|
+
"version": "0.68.0-dev.2",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library for emitting an html view of the program.",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -39,33 +39,33 @@
|
|
|
39
39
|
"@typespec/compiler": "^0.67.1 || >=0.68.0-dev <0.68.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@fluentui/react-components": "~9.
|
|
43
|
-
"@fluentui/react-icons": "^2.0.
|
|
44
|
-
"@fluentui/react-list
|
|
42
|
+
"@fluentui/react-components": "~9.61.2",
|
|
43
|
+
"@fluentui/react-icons": "^2.0.292",
|
|
44
|
+
"@fluentui/react-list": "^9.1.2",
|
|
45
45
|
"react": "~18.3.1",
|
|
46
46
|
"react-dom": "~18.3.1",
|
|
47
47
|
"react-hotkeys-hook": "^4.6.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@babel/core": "^7.26.
|
|
50
|
+
"@babel/core": "^7.26.10",
|
|
51
51
|
"@testing-library/dom": "^10.4.0",
|
|
52
52
|
"@testing-library/jest-dom": "^6.6.3",
|
|
53
53
|
"@testing-library/react": "^16.2.0",
|
|
54
|
-
"@types/node": "~22.13.
|
|
54
|
+
"@types/node": "~22.13.11",
|
|
55
55
|
"@types/react": "~18.3.11",
|
|
56
56
|
"@types/react-dom": "~18.3.0",
|
|
57
57
|
"@typespec/compiler": "^0.67.1 || >=0.68.0-dev <0.68.0",
|
|
58
58
|
"@vitejs/plugin-react": "~4.3.4",
|
|
59
|
-
"@vitest/coverage-v8": "^3.0.
|
|
60
|
-
"@vitest/ui": "^3.0.
|
|
59
|
+
"@vitest/coverage-v8": "^3.0.9",
|
|
60
|
+
"@vitest/ui": "^3.0.9",
|
|
61
61
|
"c8": "^10.1.3",
|
|
62
62
|
"rimraf": "~6.0.1",
|
|
63
63
|
"typescript": "~5.8.2",
|
|
64
|
-
"vite": "^6.2.
|
|
65
|
-
"vite-plugin-checker": "^0.9.
|
|
64
|
+
"vite": "^6.2.2",
|
|
65
|
+
"vite-plugin-checker": "^0.9.1",
|
|
66
66
|
"vite-plugin-dts": "4.5.3",
|
|
67
67
|
"vite-plugin-node-polyfills": "^0.23.0",
|
|
68
|
-
"vitest": "^3.0.
|
|
68
|
+
"vitest": "^3.0.9",
|
|
69
69
|
"@typespec/react-components": "^0.57.0"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|