@typespec/html-program-viewer 0.65.0-dev.0 → 0.65.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 +86 -81
- package/dist/{manifest-QCyH3JiX.js → manifest-BoBSXM5B.js} +1 -1
- package/dist/react/index.js +14586 -13885
- package/package.json +17 -17
package/dist/emitter/index.js
CHANGED
|
@@ -359,7 +359,7 @@ function getDebugTree(debugSequenceHash, parentNode) {
|
|
|
359
359
|
return undefined;
|
|
360
360
|
}
|
|
361
361
|
const parentLookupItem = parentNode ? DEFINITION_LOOKUP_TABLE[parentNode.sequenceHash] : undefined;
|
|
362
|
-
const debugClassNames = getDebugClassNames(lookupItem, parentLookupItem, parentNode === null || parentNode ===
|
|
362
|
+
const debugClassNames = getDebugClassNames(lookupItem, parentLookupItem, parentNode === null || parentNode === undefined ? undefined : parentNode.debugClassNames, parentNode === null || parentNode === undefined ? undefined : parentNode.children);
|
|
363
363
|
const node = {
|
|
364
364
|
sequenceHash: debugSequenceHash,
|
|
365
365
|
direction: lookupItem[1],
|
|
@@ -455,7 +455,7 @@ function createIsomorphicStyleSheet(styleElement, bucketName, priority, elementA
|
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
function insertRule(rule) {
|
|
458
|
-
if (styleElement === null || styleElement ===
|
|
458
|
+
if (styleElement === null || styleElement === undefined ? undefined : styleElement.sheet) {
|
|
459
459
|
return styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);
|
|
460
460
|
}
|
|
461
461
|
return __cssRulesForSSR.push(rule);
|
|
@@ -466,7 +466,7 @@ function createIsomorphicStyleSheet(styleElement, bucketName, priority, elementA
|
|
|
466
466
|
element: styleElement,
|
|
467
467
|
bucketName,
|
|
468
468
|
cssRules() {
|
|
469
|
-
if (styleElement === null || styleElement ===
|
|
469
|
+
if (styleElement === null || styleElement === undefined ? undefined : styleElement.sheet) {
|
|
470
470
|
return Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText);
|
|
471
471
|
}
|
|
472
472
|
return __cssRulesForSSR;
|
|
@@ -522,8 +522,8 @@ function getStyleSheetKey(bucketName, media, priority) {
|
|
|
522
522
|
function getStyleSheetForBucket(bucketName, targetDocument, insertionPoint, renderer, metadata = {}) {
|
|
523
523
|
var _a, _b;
|
|
524
524
|
const isMediaBucket = bucketName === 'm';
|
|
525
|
-
const media = (_a = metadata['m']) !== null && _a !==
|
|
526
|
-
const priority = (_b = metadata['p']) !== null && _b !==
|
|
525
|
+
const media = (_a = metadata['m']) !== null && _a !== undefined ? _a : '0';
|
|
526
|
+
const priority = (_b = metadata['p']) !== null && _b !== undefined ? _b : 0;
|
|
527
527
|
const stylesheetKey = getStyleSheetKey(bucketName, media, priority);
|
|
528
528
|
if (!renderer.stylesheets[stylesheetKey]) {
|
|
529
529
|
const tag = targetDocument && targetDocument.createElement('style');
|
|
@@ -539,8 +539,8 @@ function getStyleSheetForBucket(bucketName, targetDocument, insertionPoint, rend
|
|
|
539
539
|
}
|
|
540
540
|
function isSameInsertionKey(element, bucketName, metadata) {
|
|
541
541
|
var _a, _b;
|
|
542
|
-
const targetKey = bucketName + ((_a = metadata['m']) !== null && _a !==
|
|
543
|
-
const elementKey = element.getAttribute(DATA_BUCKET_ATTR) + ((_b = element.media) !== null && _b !==
|
|
542
|
+
const targetKey = bucketName + ((_a = metadata['m']) !== null && _a !== undefined ? _a : '');
|
|
543
|
+
const elementKey = element.getAttribute(DATA_BUCKET_ATTR) + ((_b = element.media) !== null && _b !== undefined ? _b : '');
|
|
544
544
|
return targetKey === elementKey;
|
|
545
545
|
}
|
|
546
546
|
/**
|
|
@@ -556,8 +556,8 @@ function isSameInsertionKey(element, bucketName, metadata) {
|
|
|
556
556
|
function findInsertionPoint(targetDocument, insertionPoint, targetBucket, renderer, metadata = {}) {
|
|
557
557
|
var _a, _b;
|
|
558
558
|
const targetOrder = styleBucketOrderingMap[targetBucket];
|
|
559
|
-
const media = (_a = metadata['m']) !== null && _a !==
|
|
560
|
-
const priority = (_b = metadata['p']) !== null && _b !==
|
|
559
|
+
const media = (_a = metadata['m']) !== null && _a !== undefined ? _a : '';
|
|
560
|
+
const priority = (_b = metadata['p']) !== null && _b !== undefined ? _b : 0;
|
|
561
561
|
// Similar to javascript sort comparators where
|
|
562
562
|
// a positive value is increasing sort order
|
|
563
563
|
// a negative value is decreasing sort order
|
|
@@ -737,7 +737,7 @@ function getSourceURLfromError() {
|
|
|
737
737
|
return undefined;
|
|
738
738
|
}
|
|
739
739
|
const result = parseStackTraceLine(userMakeStyleCallLine);
|
|
740
|
-
return result === null || result ===
|
|
740
|
+
return result === null || result === undefined ? undefined : result.loc;
|
|
741
741
|
}
|
|
742
742
|
function findUserMakeStyleCallInStacks(stacks) {
|
|
743
743
|
for (let i = stacks.length - 1; i >= 0; --i) {
|
|
@@ -881,7 +881,7 @@ const TextDirectionProvider = ({
|
|
|
881
881
|
};
|
|
882
882
|
if (props && typeof props.children === 'function') {
|
|
883
883
|
propsWithMetadata[SLOT_RENDER_FUNCTION_SYMBOL] = props.children;
|
|
884
|
-
propsWithMetadata.children = defaultProps === null || defaultProps ===
|
|
884
|
+
propsWithMetadata.children = defaultProps === null || defaultProps === undefined ? undefined : defaultProps.children;
|
|
885
885
|
}
|
|
886
886
|
return propsWithMetadata;
|
|
887
887
|
}
|
|
@@ -911,7 +911,7 @@ Slot shorthands can be strings, numbers, arrays or JSX elements`);
|
|
|
911
911
|
* Guard method to ensure a given element is a slot.
|
|
912
912
|
* This is mainly used internally to ensure a slot is being used as a component.
|
|
913
913
|
*/ function isSlot(element) {
|
|
914
|
-
return Boolean(element === null || element ===
|
|
914
|
+
return Boolean(element === null || element === undefined ? undefined : element.hasOwnProperty(SLOT_ELEMENT_TYPE_SYMBOL));
|
|
915
915
|
}
|
|
916
916
|
|
|
917
917
|
/**
|
|
@@ -1192,6 +1192,7 @@ const toObjectMap = (...items)=>{
|
|
|
1192
1192
|
*/ const inputProperties = toObjectMap(buttonProperties, [
|
|
1193
1193
|
'accept',
|
|
1194
1194
|
'alt',
|
|
1195
|
+
'autoCorrect',
|
|
1195
1196
|
'autoCapitalize',
|
|
1196
1197
|
'autoComplete',
|
|
1197
1198
|
'checked',
|
|
@@ -1203,6 +1204,7 @@ const toObjectMap = (...items)=>{
|
|
|
1203
1204
|
'max',
|
|
1204
1205
|
'maxLength',
|
|
1205
1206
|
'min',
|
|
1207
|
+
'minLength',
|
|
1206
1208
|
'multiple',
|
|
1207
1209
|
'pattern',
|
|
1208
1210
|
'placeholder',
|
|
@@ -1371,7 +1373,7 @@ props, allowedPropNames, excludedPropNames) {
|
|
|
1371
1373
|
const keys = Object.keys(props);
|
|
1372
1374
|
for (const key of keys){
|
|
1373
1375
|
const isNativeProp = !isArray && allowedPropNames[key] || isArray && allowedPropNames.indexOf(key) >= 0 || key.indexOf('data-') === 0 || key.indexOf('aria-') === 0;
|
|
1374
|
-
if (isNativeProp && (
|
|
1376
|
+
if (isNativeProp && (true)) {
|
|
1375
1377
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1376
1378
|
result[key] = props[key];
|
|
1377
1379
|
}
|
|
@@ -1416,7 +1418,7 @@ const nativeElementMap = {
|
|
|
1416
1418
|
function getNativeElementProps(tagName, props, excludedPropNames) {
|
|
1417
1419
|
const allowedPropNames = tagName && nativeElementMap[tagName] || htmlElementProperties;
|
|
1418
1420
|
allowedPropNames.as = 1;
|
|
1419
|
-
return getNativeProps(props, allowedPropNames
|
|
1421
|
+
return getNativeProps(props, allowedPropNames);
|
|
1420
1422
|
}
|
|
1421
1423
|
|
|
1422
1424
|
/**
|
|
@@ -1426,8 +1428,8 @@ function getNativeElementProps(tagName, props, excludedPropNames) {
|
|
|
1426
1428
|
* Equivalent to {@link getNativeElementProps}, but more type-safe.
|
|
1427
1429
|
*/ const getIntrinsicElementProps = (/** The slot's default element type (e.g. 'div') */ tagName, /** The component's props object */ props, /** List of native props to exclude from the returned value */ excludedPropNames)=>{
|
|
1428
1430
|
var _props_as;
|
|
1429
|
-
// eslint-disable-next-line
|
|
1430
|
-
return getNativeElementProps((_props_as = props.as) !== null && _props_as !==
|
|
1431
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1432
|
+
return getNativeElementProps((_props_as = props.as) !== null && _props_as !== undefined ? _props_as : tagName, props);
|
|
1431
1433
|
};
|
|
1432
1434
|
|
|
1433
1435
|
/**
|
|
@@ -1466,7 +1468,7 @@ const providerContextDefaultValue = {
|
|
|
1466
1468
|
*/ const Provider = ProviderContext.Provider;
|
|
1467
1469
|
function useFluent() {
|
|
1468
1470
|
var _React_useContext;
|
|
1469
|
-
return (_React_useContext = React.useContext(ProviderContext)) !== null && _React_useContext !==
|
|
1471
|
+
return (_React_useContext = React.useContext(ProviderContext)) !== null && _React_useContext !== undefined ? _React_useContext : providerContextDefaultValue;
|
|
1470
1472
|
}
|
|
1471
1473
|
|
|
1472
1474
|
/**
|
|
@@ -1477,7 +1479,7 @@ function useFluent() {
|
|
|
1477
1479
|
*/ const OverridesProvider = OverridesContext.Provider;
|
|
1478
1480
|
function useOverrides() {
|
|
1479
1481
|
var _React_useContext;
|
|
1480
|
-
return (_React_useContext = React.useContext(OverridesContext)) !== null && _React_useContext !==
|
|
1482
|
+
return (_React_useContext = React.useContext(OverridesContext)) !== null && _React_useContext !== undefined ? _React_useContext : {};
|
|
1481
1483
|
}
|
|
1482
1484
|
|
|
1483
1485
|
/**
|
|
@@ -1490,7 +1492,7 @@ function useOverrides() {
|
|
|
1490
1492
|
/**
|
|
1491
1493
|
* Verifies if an application can use DOM.
|
|
1492
1494
|
*/ function canUseDOM() {
|
|
1493
|
-
return /* eslint-disable @nx/workspace-no-restricted-globals -- expected ignore ( SSR friendly acquisition of globals )*/ typeof window !== 'undefined' && !!(window.document && // eslint-disable-next-line
|
|
1495
|
+
return /* eslint-disable @nx/workspace-no-restricted-globals -- expected ignore ( SSR friendly acquisition of globals )*/ typeof window !== 'undefined' && !!(window.document && // eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
1494
1496
|
window.document.createElement);
|
|
1495
1497
|
}
|
|
1496
1498
|
|
|
@@ -1506,7 +1508,7 @@ const SSRContext = /*#__PURE__*/ React.createContext(undefined);
|
|
|
1506
1508
|
* @internal
|
|
1507
1509
|
*/ function useSSRContext() {
|
|
1508
1510
|
var _React_useContext;
|
|
1509
|
-
return (_React_useContext = React.useContext(SSRContext)) !== null && _React_useContext !==
|
|
1511
|
+
return (_React_useContext = React.useContext(SSRContext)) !== null && _React_useContext !== undefined ? _React_useContext : defaultSSRContextValue;
|
|
1510
1512
|
}
|
|
1511
1513
|
|
|
1512
1514
|
/**
|
|
@@ -1608,7 +1610,7 @@ function useIdPrefix() {
|
|
|
1608
1610
|
var _typedElement_ownerDocument;
|
|
1609
1611
|
const typedElement = element;
|
|
1610
1612
|
var _options_constructorName;
|
|
1611
|
-
return Boolean((typedElement === null || typedElement ===
|
|
1613
|
+
return Boolean((typedElement === null || typedElement === undefined ? undefined : (_typedElement_ownerDocument = typedElement.ownerDocument) === null || _typedElement_ownerDocument === undefined ? undefined : _typedElement_ownerDocument.defaultView) && typedElement instanceof typedElement.ownerDocument.defaultView[(_options_constructorName = undefined ) !== null && _options_constructorName !== undefined ? _options_constructorName : 'HTMLElement']);
|
|
1612
1614
|
}
|
|
1613
1615
|
|
|
1614
1616
|
// TODO:
|
|
@@ -1646,8 +1648,8 @@ function requireReactIs_production_min () {
|
|
|
1646
1648
|
var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
|
|
1647
1649
|
if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
|
|
1648
1650
|
function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
|
|
1649
|
-
reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return
|
|
1650
|
-
reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)
|
|
1651
|
+
reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return false};reactIs_production_min.isConcurrentMode=function(){return false};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
|
|
1652
|
+
reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?true:false};
|
|
1651
1653
|
reactIs_production_min.typeOf=y;
|
|
1652
1654
|
return reactIs_production_min;
|
|
1653
1655
|
}
|
|
@@ -1883,13 +1885,21 @@ function requireReactIs_development () {
|
|
|
1883
1885
|
return reactIs_development;
|
|
1884
1886
|
}
|
|
1885
1887
|
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1888
|
+
var hasRequiredReactIs;
|
|
1889
|
+
|
|
1890
|
+
function requireReactIs () {
|
|
1891
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
1892
|
+
hasRequiredReactIs = 1;
|
|
1893
|
+
|
|
1894
|
+
if (process.env.NODE_ENV === 'production') {
|
|
1895
|
+
reactIs.exports = requireReactIs_production_min();
|
|
1896
|
+
} else {
|
|
1897
|
+
reactIs.exports = requireReactIs_development();
|
|
1898
|
+
}
|
|
1899
|
+
return reactIs.exports;
|
|
1890
1900
|
}
|
|
1891
1901
|
|
|
1892
|
-
var reactIsExports =
|
|
1902
|
+
var reactIsExports = requireReactIs();
|
|
1893
1903
|
|
|
1894
1904
|
function warnIfElementTypeIsInvalid(type) {
|
|
1895
1905
|
if (process.env.NODE_ENV === 'development' && typeof type === 'object' && !reactIsExports.isValidElementType(type)) {
|
|
@@ -1924,7 +1934,7 @@ function createJSX(runtime, slotRuntime) {
|
|
|
1924
1934
|
*/ function getMetadataFromSlotComponent(type) {
|
|
1925
1935
|
const { as, [SLOT_ELEMENT_TYPE_SYMBOL]: baseElementType, [SLOT_RENDER_FUNCTION_SYMBOL]: renderFunction, ...propsWithoutMetadata } = type;
|
|
1926
1936
|
const props = propsWithoutMetadata;
|
|
1927
|
-
const elementType = typeof baseElementType === 'string' ? as !== null && as !==
|
|
1937
|
+
const elementType = typeof baseElementType === 'string' ? as !== null && as !== undefined ? as : baseElementType : baseElementType;
|
|
1928
1938
|
if (typeof elementType !== 'string' && as) {
|
|
1929
1939
|
props.as = as;
|
|
1930
1940
|
}
|
|
@@ -1954,8 +1964,8 @@ var hasRequiredReactJsxRuntime_production_min;
|
|
|
1954
1964
|
function requireReactJsxRuntime_production_min () {
|
|
1955
1965
|
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
1956
1966
|
hasRequiredReactJsxRuntime_production_min = 1;
|
|
1957
|
-
var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key
|
|
1958
|
-
function q(c,a,g){var b,d={},e=null,h=null;
|
|
1967
|
+
var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:true,ref:true,__self:true,__source:true};
|
|
1968
|
+
function q(c,a,g){var b,d={},e=null,h=null;undefined!==g&&(e=""+g);undefined!==a.key&&(e=""+a.key);undefined!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a) undefined===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
1959
1969
|
return reactJsxRuntime_production_min;
|
|
1960
1970
|
}
|
|
1961
1971
|
|
|
@@ -2561,7 +2571,7 @@ function requireReactJsxRuntime_development () {
|
|
|
2561
2571
|
|
|
2562
2572
|
for (var typeSpecName in typeSpecs) {
|
|
2563
2573
|
if (has(typeSpecs, typeSpecName)) {
|
|
2564
|
-
var error$1 =
|
|
2574
|
+
var error$1 = undefined; // Prop type validation may throw. In case they do, we don't want to
|
|
2565
2575
|
// fail the render phase where it didn't fail before. So we log it.
|
|
2566
2576
|
// After these have been cleaned up, we'll let them throw.
|
|
2567
2577
|
|
|
@@ -2685,11 +2695,6 @@ function requireReactJsxRuntime_development () {
|
|
|
2685
2695
|
};
|
|
2686
2696
|
var specialPropKeyWarningShown;
|
|
2687
2697
|
var specialPropRefWarningShown;
|
|
2688
|
-
var didWarnAboutStringRefs;
|
|
2689
|
-
|
|
2690
|
-
{
|
|
2691
|
-
didWarnAboutStringRefs = {};
|
|
2692
|
-
}
|
|
2693
2698
|
|
|
2694
2699
|
function hasValidRef(config) {
|
|
2695
2700
|
{
|
|
@@ -2721,15 +2726,7 @@ function requireReactJsxRuntime_development () {
|
|
|
2721
2726
|
|
|
2722
2727
|
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
2723
2728
|
{
|
|
2724
|
-
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self
|
|
2725
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
2726
|
-
|
|
2727
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
2728
|
-
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
|
2729
|
-
|
|
2730
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
2731
|
-
}
|
|
2732
|
-
}
|
|
2729
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self) ;
|
|
2733
2730
|
}
|
|
2734
2731
|
}
|
|
2735
2732
|
|
|
@@ -3295,13 +3292,21 @@ function requireReactJsxRuntime_development () {
|
|
|
3295
3292
|
return reactJsxRuntime_development;
|
|
3296
3293
|
}
|
|
3297
3294
|
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3295
|
+
var hasRequiredJsxRuntime;
|
|
3296
|
+
|
|
3297
|
+
function requireJsxRuntime () {
|
|
3298
|
+
if (hasRequiredJsxRuntime) return jsxRuntime$1.exports;
|
|
3299
|
+
hasRequiredJsxRuntime = 1;
|
|
3300
|
+
|
|
3301
|
+
if (process.env.NODE_ENV === 'production') {
|
|
3302
|
+
jsxRuntime$1.exports = requireReactJsxRuntime_production_min();
|
|
3303
|
+
} else {
|
|
3304
|
+
jsxRuntime$1.exports = requireReactJsxRuntime_development();
|
|
3305
|
+
}
|
|
3306
|
+
return jsxRuntime$1.exports;
|
|
3302
3307
|
}
|
|
3303
3308
|
|
|
3304
|
-
var jsxRuntimeExports =
|
|
3309
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
3305
3310
|
const jsxRuntime = /*@__PURE__*/getDefaultExportFromCjs(jsxRuntimeExports);
|
|
3306
3311
|
|
|
3307
3312
|
const ReactRuntime = /*#__PURE__*/_mergeNamespaces({
|
|
@@ -3418,13 +3423,13 @@ var WeakRefInstance = class {
|
|
|
3418
3423
|
var _a, _b;
|
|
3419
3424
|
let instance;
|
|
3420
3425
|
if (this._weakRef) {
|
|
3421
|
-
instance = (_a = this._weakRef) == null ?
|
|
3426
|
+
instance = (_a = this._weakRef) == null ? undefined : _a.deref();
|
|
3422
3427
|
if (!instance) {
|
|
3423
3428
|
delete this._weakRef;
|
|
3424
3429
|
}
|
|
3425
3430
|
} else {
|
|
3426
3431
|
instance = this._instance;
|
|
3427
|
-
if ((_b = instance == null ?
|
|
3432
|
+
if ((_b = instance == null ? undefined : instance.isDisposed) == null ? undefined : _b.call(instance)) {
|
|
3428
3433
|
delete this._instance;
|
|
3429
3434
|
}
|
|
3430
3435
|
}
|
|
@@ -3500,7 +3505,7 @@ function setupFocusEvent(win) {
|
|
|
3500
3505
|
}
|
|
3501
3506
|
}
|
|
3502
3507
|
}
|
|
3503
|
-
onFocusIn(target, e.relatedTarget ||
|
|
3508
|
+
onFocusIn(target, e.relatedTarget || undefined);
|
|
3504
3509
|
};
|
|
3505
3510
|
const onFocusIn = (target, relatedTarget, originalEvent) => {
|
|
3506
3511
|
var _a;
|
|
@@ -3529,8 +3534,8 @@ function setupFocusEvent(win) {
|
|
|
3529
3534
|
});
|
|
3530
3535
|
event.details = details;
|
|
3531
3536
|
if (_canOverrideNativeFocus || data.lastFocusedProgrammatically) {
|
|
3532
|
-
details.isFocusedProgrammatically = target === ((_a = data.lastFocusedProgrammatically) == null ?
|
|
3533
|
-
data.lastFocusedProgrammatically =
|
|
3537
|
+
details.isFocusedProgrammatically = target === ((_a = data.lastFocusedProgrammatically) == null ? undefined : _a.deref());
|
|
3538
|
+
data.lastFocusedProgrammatically = undefined;
|
|
3534
3539
|
}
|
|
3535
3540
|
target.dispatchEvent(event);
|
|
3536
3541
|
};
|
|
@@ -3621,7 +3626,7 @@ var KeyborgCore = class {
|
|
|
3621
3626
|
if (!details.relatedTarget) {
|
|
3622
3627
|
return;
|
|
3623
3628
|
}
|
|
3624
|
-
if (details.isFocusedProgrammatically || details.isFocusedProgrammatically ===
|
|
3629
|
+
if (details.isFocusedProgrammatically || details.isFocusedProgrammatically === undefined) {
|
|
3625
3630
|
return;
|
|
3626
3631
|
}
|
|
3627
3632
|
this.isNavigatingWithKeyboard = true;
|
|
@@ -3662,10 +3667,10 @@ var KeyborgCore = class {
|
|
|
3662
3667
|
if (props) {
|
|
3663
3668
|
const triggerKeys = props.triggerKeys;
|
|
3664
3669
|
const dismissKeys = props.dismissKeys;
|
|
3665
|
-
if (triggerKeys == null ?
|
|
3670
|
+
if (triggerKeys == null ? undefined : triggerKeys.length) {
|
|
3666
3671
|
this._triggerKeys = new Set(triggerKeys);
|
|
3667
3672
|
}
|
|
3668
|
-
if (dismissKeys == null ?
|
|
3673
|
+
if (dismissKeys == null ? undefined : dismissKeys.length) {
|
|
3669
3674
|
this._dismissKeys = new Set(dismissKeys);
|
|
3670
3675
|
}
|
|
3671
3676
|
}
|
|
@@ -3691,11 +3696,11 @@ var KeyborgCore = class {
|
|
|
3691
3696
|
if (win) {
|
|
3692
3697
|
if (this._isMouseOrTouchUsedTimer) {
|
|
3693
3698
|
win.clearTimeout(this._isMouseOrTouchUsedTimer);
|
|
3694
|
-
this._isMouseOrTouchUsedTimer =
|
|
3699
|
+
this._isMouseOrTouchUsedTimer = undefined;
|
|
3695
3700
|
}
|
|
3696
3701
|
if (this._dismissTimer) {
|
|
3697
3702
|
win.clearTimeout(this._dismissTimer);
|
|
3698
|
-
this._dismissTimer =
|
|
3703
|
+
this._dismissTimer = undefined;
|
|
3699
3704
|
}
|
|
3700
3705
|
disposeFocusEvent(win);
|
|
3701
3706
|
const doc = win.document;
|
|
@@ -3716,7 +3721,7 @@ var KeyborgCore = class {
|
|
|
3716
3721
|
*/
|
|
3717
3722
|
update() {
|
|
3718
3723
|
var _a, _b;
|
|
3719
|
-
const keyborgs = (_b = (_a = this._win) == null ?
|
|
3724
|
+
const keyborgs = (_b = (_a = this._win) == null ? undefined : _a.__keyborg) == null ? undefined : _b.refs;
|
|
3720
3725
|
if (keyborgs) {
|
|
3721
3726
|
for (const id of Object.keys(keyborgs)) {
|
|
3722
3727
|
Keyborg.update(keyborgs[id], this.isNavigatingWithKeyboard);
|
|
@@ -3731,7 +3736,7 @@ var KeyborgCore = class {
|
|
|
3731
3736
|
if (e.key === "Tab") {
|
|
3732
3737
|
return true;
|
|
3733
3738
|
}
|
|
3734
|
-
const activeElement = (_a = this._win) == null ?
|
|
3739
|
+
const activeElement = (_a = this._win) == null ? undefined : _a.document.activeElement;
|
|
3735
3740
|
const isTriggerKey = !this._triggerKeys || this._triggerKeys.has(e.keyCode);
|
|
3736
3741
|
const isEditable = activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || activeElement.isContentEditable);
|
|
3737
3742
|
return isTriggerKey && !isEditable;
|
|
@@ -3741,18 +3746,18 @@ var KeyborgCore = class {
|
|
|
3741
3746
|
*/
|
|
3742
3747
|
_shouldDismissKeyboardNavigation(e) {
|
|
3743
3748
|
var _a;
|
|
3744
|
-
return (_a = this._dismissKeys) == null ?
|
|
3749
|
+
return (_a = this._dismissKeys) == null ? undefined : _a.has(e.keyCode);
|
|
3745
3750
|
}
|
|
3746
3751
|
_scheduleDismiss() {
|
|
3747
3752
|
const win = this._win;
|
|
3748
3753
|
if (win) {
|
|
3749
3754
|
if (this._dismissTimer) {
|
|
3750
3755
|
win.clearTimeout(this._dismissTimer);
|
|
3751
|
-
this._dismissTimer =
|
|
3756
|
+
this._dismissTimer = undefined;
|
|
3752
3757
|
}
|
|
3753
3758
|
const was = win.document.activeElement;
|
|
3754
3759
|
this._dismissTimer = win.setTimeout(() => {
|
|
3755
|
-
this._dismissTimer =
|
|
3760
|
+
this._dismissTimer = undefined;
|
|
3756
3761
|
const cur = win.document.activeElement;
|
|
3757
3762
|
if (was && cur && was === cur) {
|
|
3758
3763
|
this.isNavigatingWithKeyboard = false;
|
|
@@ -3792,8 +3797,8 @@ var Keyborg = class _Keyborg {
|
|
|
3792
3797
|
}
|
|
3793
3798
|
dispose() {
|
|
3794
3799
|
var _a;
|
|
3795
|
-
const current = (_a = this._win) == null ?
|
|
3796
|
-
if (current == null ?
|
|
3800
|
+
const current = (_a = this._win) == null ? undefined : _a.__keyborg;
|
|
3801
|
+
if (current == null ? undefined : current.refs[this._id]) {
|
|
3797
3802
|
delete current.refs[this._id];
|
|
3798
3803
|
if (Object.keys(current.refs).length === 0) {
|
|
3799
3804
|
current.core.dispose();
|
|
@@ -3813,7 +3818,7 @@ var Keyborg = class _Keyborg {
|
|
|
3813
3818
|
*/
|
|
3814
3819
|
isNavigatingWithKeyboard() {
|
|
3815
3820
|
var _a;
|
|
3816
|
-
return !!((_a = this._core) == null ?
|
|
3821
|
+
return !!((_a = this._core) == null ? undefined : _a.isNavigatingWithKeyboard);
|
|
3817
3822
|
}
|
|
3818
3823
|
/**
|
|
3819
3824
|
* @param callback - Called when the keyboard navigation state changes
|
|
@@ -3920,16 +3925,16 @@ function alreadyInScope(el) {
|
|
|
3920
3925
|
if (el.focusVisible) {
|
|
3921
3926
|
return true;
|
|
3922
3927
|
}
|
|
3923
|
-
return alreadyInScope(el === null || el ===
|
|
3928
|
+
return alreadyInScope(el === null || el === undefined ? undefined : el.parentElement);
|
|
3924
3929
|
}
|
|
3925
3930
|
|
|
3926
3931
|
function useFocusVisible(options = {}) {
|
|
3927
3932
|
const contextValue = useFluent();
|
|
3928
3933
|
const scopeRef = React.useRef(null);
|
|
3929
3934
|
var _options_targetDocument;
|
|
3930
|
-
const targetDocument = (_options_targetDocument = options.targetDocument) !== null && _options_targetDocument !==
|
|
3935
|
+
const targetDocument = (_options_targetDocument = options.targetDocument) !== null && _options_targetDocument !== undefined ? _options_targetDocument : contextValue.targetDocument;
|
|
3931
3936
|
React.useEffect(()=>{
|
|
3932
|
-
if ((targetDocument === null || targetDocument ===
|
|
3937
|
+
if ((targetDocument === null || targetDocument === undefined ? undefined : targetDocument.defaultView) && scopeRef.current) {
|
|
3933
3938
|
return applyFocusVisiblePolyfill(scopeRef.current, targetDocument.defaultView);
|
|
3934
3939
|
}
|
|
3935
3940
|
}, [
|
|
@@ -5107,7 +5112,7 @@ const insertSheet = (tag, rule)=>{
|
|
|
5107
5112
|
useHandleSSRStyleElements(targetDocument, styleTagId);
|
|
5108
5113
|
useInsertionEffect(()=>{
|
|
5109
5114
|
// The style element could already have been created during SSR - no need to recreate it
|
|
5110
|
-
const ssrStyleElement = targetDocument === null || targetDocument ===
|
|
5115
|
+
const ssrStyleElement = targetDocument === null || targetDocument === undefined ? undefined : targetDocument.getElementById(styleTagId);
|
|
5111
5116
|
if (ssrStyleElement) {
|
|
5112
5117
|
styleTag.current = ssrStyleElement;
|
|
5113
5118
|
} else {
|
|
@@ -5121,7 +5126,7 @@ const insertSheet = (tag, rule)=>{
|
|
|
5121
5126
|
}
|
|
5122
5127
|
return ()=>{
|
|
5123
5128
|
var _styleTag_current;
|
|
5124
|
-
(_styleTag_current = styleTag.current) === null || _styleTag_current ===
|
|
5129
|
+
(_styleTag_current = styleTag.current) === null || _styleTag_current === undefined ? undefined : _styleTag_current.remove();
|
|
5125
5130
|
};
|
|
5126
5131
|
}, [
|
|
5127
5132
|
styleTagId,
|
|
@@ -5181,7 +5186,7 @@ const DEFAULT_RENDERER_ATTRIBUTES = {};
|
|
|
5181
5186
|
const { styleTagId, rule } = useFluentProviderThemeStyleTag({
|
|
5182
5187
|
theme: mergedTheme,
|
|
5183
5188
|
targetDocument,
|
|
5184
|
-
rendererAttributes: (_renderer_styleElementAttributes = renderer.styleElementAttributes) !== null && _renderer_styleElementAttributes !==
|
|
5189
|
+
rendererAttributes: (_renderer_styleElementAttributes = renderer.styleElementAttributes) !== null && _renderer_styleElementAttributes !== undefined ? _renderer_styleElementAttributes : DEFAULT_RENDERER_ATTRIBUTES
|
|
5185
5190
|
});
|
|
5186
5191
|
if (process.env.NODE_ENV !== 'production') {
|
|
5187
5192
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -5288,7 +5293,7 @@ const FluentProvider = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
5288
5293
|
FluentProvider.displayName = 'FluentProvider';
|
|
5289
5294
|
|
|
5290
5295
|
function isNamedUnion(union) {
|
|
5291
|
-
return union.name !==
|
|
5296
|
+
return union.name !== undefined;
|
|
5292
5297
|
}
|
|
5293
5298
|
|
|
5294
5299
|
const mono = "_mono_ouyit_1";
|
|
@@ -5503,7 +5508,7 @@ function getPropertyRendering(type, key) {
|
|
|
5503
5508
|
return action;
|
|
5504
5509
|
}
|
|
5505
5510
|
|
|
5506
|
-
const TreeNavigatorContext = createContext(
|
|
5511
|
+
const TreeNavigatorContext = createContext(undefined);
|
|
5507
5512
|
function useTreeNavigatorOptional() {
|
|
5508
5513
|
return useContext(TreeNavigatorContext);
|
|
5509
5514
|
}
|
|
@@ -5567,7 +5572,7 @@ const ParentReference = ({ type }) => {
|
|
|
5567
5572
|
case "Scalar":
|
|
5568
5573
|
case "Model":
|
|
5569
5574
|
case "Union":
|
|
5570
|
-
if (type.name !==
|
|
5575
|
+
if (type.name !== undefined) {
|
|
5571
5576
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(NamedTypeRef, { type });
|
|
5572
5577
|
} else {
|
|
5573
5578
|
return null;
|
|
@@ -5630,8 +5635,8 @@ const SimpleType = ({ type, children }) => {
|
|
|
5630
5635
|
const EntityProperties = ({ entity: type }) => {
|
|
5631
5636
|
const props = Object.entries(type).map(([key, value]) => {
|
|
5632
5637
|
const action = getPropertyRendering(type, key);
|
|
5633
|
-
if (action ===
|
|
5634
|
-
return
|
|
5638
|
+
if (action === undefined || action === "skip") {
|
|
5639
|
+
return undefined;
|
|
5635
5640
|
}
|
|
5636
5641
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(EntityProperty, { name: key, value, action }, key);
|
|
5637
5642
|
}).filter((x) => Boolean(x));
|
|
@@ -5653,7 +5658,7 @@ const EntityPropertyValue = ({ value, action }) => {
|
|
|
5653
5658
|
const renderRef = action === "ref";
|
|
5654
5659
|
return renderRef ? /* @__PURE__ */ jsxRuntimeExports.jsx(EntityReference, { entity: x }) : /* @__PURE__ */ jsxRuntimeExports.jsx(EntityUI, { entity: x });
|
|
5655
5660
|
};
|
|
5656
|
-
if (value ===
|
|
5661
|
+
if (value === undefined) {
|
|
5657
5662
|
return null;
|
|
5658
5663
|
} else if (value.entityKind) {
|
|
5659
5664
|
return render(value);
|