@aceshooting/lyra-ui 12.0.0 → 12.1.1
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 +29 -0
- package/custom-elements.json +1 -1
- package/dist/autoloader.js +1 -1
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.d.ts +0 -1
- package/dist/components/agent-tools/tool-param-form/tool-param-form.class.js +1 -1
- package/dist/components/charts/chart/histogram-bin.d.ts +0 -1
- package/dist/components/charts/chart/histogram-bin.js +1 -1
- package/dist/components/charts/chart/lite-chart.class.d.ts +22 -9
- package/dist/components/charts/chart/lite-chart.class.js +6 -6
- package/dist/components/conversation/code-block/code-block-shared.d.ts +4 -54
- package/dist/components/conversation/code-block/code-block-shared.js +1 -1
- package/dist/components/conversation/code-block/shiki-types.d.ts +2 -1
- package/dist/components/conversation/generation-metrics/generation-metrics.class.js +1 -1
- package/dist/components/conversation/model-select/model-select.class.d.ts +0 -3
- package/dist/components/conversation/model-select/model-select.class.js +1 -1
- package/dist/components/conversation/selection-toolbar/selection-toolbar.class.js +1 -1
- package/dist/components/conversation/voice-picker/voice-picker.class.d.ts +0 -1
- package/dist/components/conversation/voice-picker/voice-picker.class.js +1 -1
- package/dist/components/data/data-grid/data-grid.class.js +1 -1
- package/dist/components/data/graph-query-builder/graph-query-builder.class.d.ts +0 -1
- package/dist/components/data/graph-query-builder/graph-query-builder.class.js +1 -1
- package/dist/components/data/heatmap/heatmap.class.d.ts +4 -1
- package/dist/components/data/heatmap/heatmap.class.js +2 -2
- package/dist/components/data/table/table.class.d.ts +18 -4
- package/dist/components/data/table/table.class.js +2 -2
- package/dist/components/data/table/table.styles.js +2 -1
- package/dist/components/data/timeline/timeline-cluster.d.ts +1 -0
- package/dist/components/data/timeline/timeline-cluster.js +1 -0
- package/dist/components/data/timeline/timeline-item.class.d.ts +17 -2
- package/dist/components/data/timeline/timeline-item.class.js +13 -2
- package/dist/components/data/timeline/timeline-item.styles.js +65 -0
- package/dist/components/data/timeline/timeline.class.d.ts +83 -27
- package/dist/components/data/timeline/timeline.class.js +3 -3
- package/dist/components/data/timeline/timeline.d.ts +1 -0
- package/dist/components/data/timeline/timeline.js +1 -1
- package/dist/components/data/timeline/timeline.styles.js +14 -0
- package/dist/components/forms/button/button.class.js +1 -1
- package/dist/components/forms/checkbox/checkbox.class.d.ts +0 -1
- package/dist/components/forms/checkbox/checkbox.class.js +1 -1
- package/dist/components/forms/checkbox-group/checkbox-group.class.d.ts +0 -1
- package/dist/components/forms/checkbox-group/checkbox-group.class.js +1 -1
- package/dist/components/forms/code-editor/code-editor.class.js +1 -1
- package/dist/components/forms/color-picker/color-picker.class.js +1 -1
- package/dist/components/forms/combobox/combobox.class.d.ts +7 -1
- package/dist/components/forms/combobox/combobox.class.js +3 -2
- package/dist/components/forms/combobox/combobox.styles.js +1 -1
- package/dist/components/forms/date-picker/date-input.class.js +1 -1
- package/dist/components/forms/emoji-picker/emoji-data-loader.d.ts +0 -1
- package/dist/components/forms/input/native-time-input.class.js +1 -1
- package/dist/components/forms/input/time-input-shared.d.ts +2 -1
- package/dist/components/forms/input/time-input.class.js +1 -1
- package/dist/components/forms/locale-picker/locale-picker.class.d.ts +0 -1
- package/dist/components/forms/locale-picker/locale-picker.class.js +1 -1
- package/dist/components/forms/radio/radio-button.styles.d.ts +0 -1
- package/dist/components/forms/radio/radio-button.styles.js +1 -1
- package/dist/components/forms/radio/radio-group.class.d.ts +0 -1
- package/dist/components/forms/radio/radio-group.class.js +1 -1
- package/dist/components/forms/radio/radio.class.d.ts +0 -1
- package/dist/components/forms/radio/radio.class.js +1 -1
- package/dist/components/forms/rubric-form/rubric-form.class.d.ts +0 -1
- package/dist/components/forms/rubric-form/rubric-form.class.js +1 -1
- package/dist/components/forms/select/select.class.d.ts +0 -1
- package/dist/components/forms/select/select.class.js +1 -1
- package/dist/components/forms/slider/slider.class.d.ts +0 -1
- package/dist/components/forms/slider/slider.class.js +1 -1
- package/dist/components/forms/switch/switch.class.d.ts +0 -1
- package/dist/components/forms/switch/switch.class.js +1 -1
- package/dist/components/forms/time-range/time-range.class.d.ts +0 -1
- package/dist/components/forms/time-range/time-range.class.js +1 -1
- package/dist/components/forms/token-input/token-input.class.d.ts +0 -1
- package/dist/components/forms/token-input/token-input.class.js +1 -1
- package/dist/components/layout/dashboard-grid/layout-internal.d.ts +0 -1
- package/dist/components/layout/dashboard-grid/layout-internal.js +1 -1
- package/dist/components/layout/details/accordion-owner.d.ts +1 -1
- package/dist/components/layout/filter-bar/filter-bar.class.js +1 -1
- package/dist/components/layout/menu/menu-item.class.js +1 -1
- package/dist/components/layout/virtual-list/virtual-list.class.js +1 -1
- package/dist/components/media/av-player/av-metadata.d.ts +0 -2
- package/dist/components/media/av-player/av-metadata.js +1 -1
- package/dist/components/media/file-input/file-input.class.d.ts +0 -1
- package/dist/components/media/file-input/file-input.class.js +1 -1
- package/dist/components/media/map/map-loader.d.ts +4 -1
- package/dist/components/media/map/map.class.d.ts +50 -12
- package/dist/components/media/map/map.class.js +2 -2
- package/dist/components/overlays/overlay/popover.class.d.ts +7 -1
- package/dist/components/overlays/overlay/popover.class.js +1 -1
- package/dist/components/overlays/overlay/tooltip.class.d.ts +1 -0
- package/dist/components/overlays/overlay/tooltip.class.js +1 -1
- package/dist/components/overlays/progress/progress-shared.d.ts +0 -2
- package/dist/components/overlays/progress/progress-shared.js +1 -1
- package/dist/components/overlays/rating/rating.class.js +1 -1
- package/dist/components/retrieval/graph/graph-canvas.d.ts +10 -9
- package/dist/components/retrieval/mind-map/mind-map-layout.d.ts +0 -4
- package/dist/components/retrieval/mind-map/mind-map-layout.js +1 -1
- package/dist/components/utility/format/format-options.d.ts +0 -2
- package/dist/components/utility/format/format-options.js +1 -1
- package/dist/components/utility/icon/icon-resource.d.ts +0 -2
- package/dist/components/utility/icon/icon-resource.js +1 -1
- package/dist/components/viewers/archive-viewer/zip-resource-guard.d.ts +2 -1
- package/dist/components/viewers/docx-viewer/docx-resource-guard.d.ts +0 -3
- package/dist/components/viewers/docx-viewer/docx-resource-guard.js +1 -1
- package/dist/components/viewers/ebook-viewer/ebook-loader.d.ts +2 -1
- package/dist/components/viewers/ebook-viewer/epub-resource-guard.d.ts +0 -3
- package/dist/components/viewers/ebook-viewer/epub-resource-guard.js +1 -1
- package/dist/components/viewers/pdf-viewer/pdf-loader.d.ts +2 -2
- package/dist/components/viewers/pdf-viewer/pdf-viewer.class.js +2 -2
- package/dist/components/viewers/pptx-viewer/pptx-resource-guard.d.ts +0 -2
- package/dist/components/viewers/pptx-viewer/pptx-resource-guard.js +1 -1
- package/dist/components/viewers/spreadsheet-viewer/xlsx-resource-guard.d.ts +0 -5
- package/dist/components/viewers/spreadsheet-viewer/xlsx-resource-guard.js +1 -1
- package/dist/custom-elements-jsx.d.ts +4 -4
- package/dist/events.d.ts +15 -0
- package/dist/internal/accessibility-visibility.d.ts +1 -1
- package/dist/internal/anchor-target.d.ts +1 -3
- package/dist/internal/anchor-target.js +2 -2
- package/dist/internal/anchored-overlay-runtime.d.ts +7 -0
- package/dist/internal/anchored-overlay-runtime.js +1 -0
- package/dist/internal/announcement-text.d.ts +1 -1
- package/dist/internal/ansi.d.ts +0 -4
- package/dist/internal/ansi.js +1 -1
- package/dist/internal/aria-ownership.d.ts +2 -1
- package/dist/internal/default-strings.generated.d.ts +1 -0
- package/dist/internal/default-strings.generated.js +1 -1
- package/dist/internal/focus-navigation.d.ts +3 -2
- package/dist/internal/form-associated.d.ts +0 -1
- package/dist/internal/form-associated.js +1 -1
- package/dist/internal/form-control-labels.d.ts +0 -3
- package/dist/internal/form-control-labels.js +1 -1
- package/dist/internal/localization-runtime.js +1 -1
- package/dist/internal/localization-types.d.ts +1 -1
- package/dist/internal/localization.js +1 -1
- package/dist/internal/lyra-element.d.ts +0 -13
- package/dist/internal/lyra-element.js +1 -1
- package/dist/internal/nonmodal-overlay-manager.d.ts +9 -0
- package/dist/internal/nonmodal-overlay-manager.js +1 -0
- package/dist/internal/overlay-manager.d.ts +4 -20
- package/dist/internal/overlay-manager.js +1 -1
- package/dist/internal/overlay-stack.d.ts +66 -0
- package/dist/internal/overlay-stack.js +1 -0
- package/dist/internal/package-metadata.d.ts +1 -1
- package/dist/internal/package-metadata.js +1 -1
- package/dist/internal/positioner.js +1 -1
- package/dist/internal/text-quote.d.ts +1 -1
- package/dist/lyra.d.ts +2 -3
- package/dist/svelte.d.ts +4 -4
- package/dist/translations/ar.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/pt-BR.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/zh-CN.js +1 -1
- package/dist/utilities/localization.js +1 -1
- package/dist/vue.d.ts +4 -4
- package/llms/components/lr-combobox.md +42 -0
- package/llms/components/lr-date-input.md +1 -1
- package/llms/components/lr-date-picker.md +1 -1
- package/llms/components/lr-filter-bar.md +2 -2
- package/llms/components/lr-heatmap.md +4 -1
- package/llms/components/lr-lite-chart.md +20 -8
- package/llms/components/lr-map.md +52 -22
- package/llms/components/lr-option.md +42 -0
- package/llms/components/lr-popover.md +39 -0
- package/llms/components/lr-table.md +7 -3
- package/llms/components/lr-timeline-item.md +49 -24
- package/llms/components/lr-timeline.md +49 -24
- package/llms-full.txt +224 -60
- package/package.json +3 -4
- package/vscode-css-data.json +21 -0
- package/vscode-html-data.json +12 -6
- package/web-types.json +47 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
import{deepActiveElementIn}from"./active-element.js";import{collectFocusableElements}from"./overlay-manager.js";import{registerFormControlLabelSupport}from"./lyra-element.js";const EXTERNAL_LABEL_ACTIVATION=Symbol("lr-external-label-activation"),EXTERNAL_LABEL_HOST_SEMANTICS=Symbol("lr-external-label-host-semantics"),attachedInternals=new WeakMap;function captureFormInternals(host,internals){attachedInternals.set(host,internals)}const COMPOSITE_ROLE_SELECTOR='[role="radiogroup"],[role="group"],[role="grid"],[role="tree"]',SEMANTIC_TARGET_SELECTOR=['input:not([type="hidden"]):not([tabindex="-1"])','textarea:not([tabindex="-1"])','select:not([tabindex="-1"])','button:not([tabindex="-1"])','[role]:not([tabindex="-1"])'].join(","),ACTIVATING_ROLES=new Set(["checkbox","switch","radio","menuitemcheckbox","menuitemradio"]),MAX_ASSOCIATION_CANDIDATES_PER_MUTATION=2048,MAX_ASSOCIATION_REFRESHES_PER_TASK=256,associationRootObservations=new WeakMap;function isLabelElement(node){return node!==null&&"nodeType"in node&&node.nodeType===1&&"localName"in node&&node.localName==="label"}function isHtmlElement(node){return node.nodeType===1&&"focus"in node&&"style"in node}function isShadowRootNode(node){return node?.nodeType===11&&"host"in node}function isCurrentlyAssociatedLabel(label,host){const root=host.getRootNode();if(label.getRootNode()!==root)return!1;if(!label.hasAttribute("for")){const control="control"in label?label.control:void 0;return control==null?label.contains(host):control===host}const id=label.htmlFor;return id===""?!1:"getElementById"in root&&typeof root.getElementById=="function"?root.getElementById(id)===host:!("querySelectorAll"in root)||typeof root.querySelectorAll!="function"?!1:[...root.querySelectorAll("[id]")].find(candidate=>candidate.id===id)===host}function addSubscriptionById(observation,subscription){if(!subscription.id)return;const subscribers=observation.subscriptionsById.get(subscription.id)??new Set;subscribers.add(subscription),observation.subscriptionsById.set(subscription.id,subscribers)}function removeSubscriptionById(observation,subscription){if(!subscription.id)return;const subscribers=observation.subscriptionsById.get(subscription.id);subscribers?.delete(subscription),subscribers?.size===0&&observation.subscriptionsById.delete(subscription.id)}function updateSubscriptionId(observation,subscription){const id=subscription.host.id;id!==subscription.id&&(removeSubscriptionById(observation,subscription),subscription.id=id,addSubscriptionById(observation,subscription))}function addImplicitSubscription(observation,label,subscription){const subscriptions=observation.implicitSubscriptionsByLabel.get(label)??new Set;subscriptions.add(subscription),observation.implicitSubscriptionsByLabel.set(label,subscriptions)}function removeImplicitSubscription(observation,label,subscription){const subscriptions=observation.implicitSubscriptionsByLabel.get(label);subscriptions?.delete(subscription),subscriptions?.size===0&&observation.implicitSubscriptionsByLabel.delete(label)}function updateImplicitSubscriptions(observation,subscription,labels){const next=labels.filter(label=>!label.hasAttribute("for"));for(const label of subscription.implicitLabels)next.includes(label)||removeImplicitSubscription(observation,label,subscription);for(const label of next)subscription.implicitLabels.includes(label)||addImplicitSubscription(observation,label,subscription);subscription.implicitLabels=next}function hasAssociationRefreshes(observation){return observation.pending.size>0||observation.fallbackIterator!==void 0}function cancelAssociationContinuation(observation){observation.cancelContinuation?.(),observation.cancelContinuation=void 0}function scheduleAssociationContinuation(observation){if(!hasAssociationRefreshes(observation)||observation.cancelContinuation!==void 0)return;const callback=()=>{observation.cancelContinuation=void 0,drainAssociationRefreshes(observation)};if(observation.ownerWindow){const handle=observation.ownerWindow.setTimeout(callback,0);observation.cancelContinuation=()=>observation.ownerWindow?.clearTimeout(handle)}else{const handle=globalThis.setTimeout(callback,0);observation.cancelContinuation=()=>globalThis.clearTimeout(handle)}}function refreshAssociationSubscription(observation,subscription){subscription.active&&(subscription.listener(),observation.fallbackIterator&&(subscription.fallbackGeneration=observation.fallbackGeneration))}function drainTargetedAssociationRefreshes(observation){let remaining=MAX_ASSOCIATION_REFRESHES_PER_TASK;for(const subscription of observation.pending)if(observation.pending.delete(subscription),refreshAssociationSubscription(observation,subscription),--remaining===0)break;scheduleAssociationContinuation(observation)}function drainAssociationRefreshes(observation){let remaining=MAX_ASSOCIATION_REFRESHES_PER_TASK;for(const subscription of observation.pending)if(observation.pending.delete(subscription),refreshAssociationSubscription(observation,subscription),--remaining===0)break;for(;remaining>0&&observation.fallbackIterator;){const next=observation.fallbackIterator.next();if(next.done){observation.fallbackIterator=void 0;break}next.value.active&&next.value.fallbackGeneration!==observation.fallbackGeneration&&(next.value.listener(),next.value.fallbackGeneration=observation.fallbackGeneration),remaining--}scheduleAssociationContinuation(observation)}function notifyAssociationSubscriptions(observation,subscriptions,fallbackAll=!1){if(fallbackAll){const continuationPending=observation.cancelContinuation!==void 0;observation.pending.clear(),observation.fallbackGeneration++,observation.fallbackIterator=observation.subscriptions.values();for(const subscription of subscriptions)subscription.active&&observation.pending.add(subscription);continuationPending?drainTargetedAssociationRefreshes(observation):drainAssociationRefreshes(observation);return}for(const subscription of subscriptions)subscription.active&&observation.pending.add(subscription);drainTargetedAssociationRefreshes(observation)}function isLabelableElement(element){return element.localName==="input"?element.type!=="hidden":element.localName==="button"||element.localName==="meter"||element.localName==="output"||element.localName==="progress"||element.localName==="select"||element.localName==="textarea"?!0:element.localName.includes("-")&&element.constructor.formAssociated===!0}function collectAssociationElement(element,result){const id=element.getAttribute("id");return id&&result.ids.add(id),isLabelElement(element)&&element.hasAttribute("for")&&element.htmlFor&&result.ids.add(element.htmlFor),isLabelableElement(element)}function nextAssociationNode(root,current){if(current.firstChild)return current.firstChild;let cursor=current;for(;cursor&&cursor!==root;){if(cursor.nextSibling)return cursor.nextSibling;cursor=cursor.parentNode}return null}function collectAssociationCandidates(node,result){let containsLabelable=!1,current=node;for(;current;){if(result.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){result.truncated=!0;break}result.work++,current.nodeType===1&&(containsLabelable=collectAssociationElement(current,result)||containsLabelable),current=nextAssociationNode(node,current)}return containsLabelable}function containingImplicitLabel(node){if(isLabelElement(node))return node.hasAttribute("for")?null:node;if(node.nodeType!==1||!("closest"in node))return null;const label=node.closest("label");return label&&!label.hasAttribute("for")?label:null}function collectFirstImplicitSubscription(observation,label,candidates,affected){let current=label.firstChild;for(;current;){if(candidates.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){candidates.truncated=!0;return}if(candidates.work++,current.nodeType===1&&(isLabelableElement(current)||observation.subscriptionsByHost.has(current))){const subscription=observation.subscriptionsByHost.get(current);subscription&&affected.add(subscription);return}current=nextAssociationNode(label,current)}}function affectedAssociationSubscriptions(observation,mutations){const affected=new Set,candidates={ids:new Set,implicitLabels:new Set,truncated:!1,work:0},addIndexedCandidates=()=>{for(const id of candidates.ids)for(const subscription of observation.subscriptionsById.get(id)??[])affected.add(subscription);for(const label of candidates.implicitLabels)for(const subscription of observation.implicitSubscriptionsByLabel.get(label)??[])affected.add(subscription)};for(const mutation of mutations){if(candidates.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){candidates.truncated=!0;break}if(candidates.work++,mutation.type==="attributes"){const target=mutation.target;if(mutation.attributeName==="id"){const oldId=mutation.oldValue??"",id=target.getAttribute("id")??"";oldId&&candidates.ids.add(oldId),id&&candidates.ids.add(id);const hostSubscription=observation.subscriptionsByHost.get(target);hostSubscription&&(affected.add(hostSubscription),updateSubscriptionId(observation,hostSubscription))}else if(mutation.attributeName==="for"&&isLabelElement(target)){const oldFor=mutation.oldValue;oldFor&&candidates.ids.add(oldFor),target.htmlFor&&candidates.ids.add(target.htmlFor);for(const subscription of observation.implicitSubscriptionsByLabel.get(target)??[])affected.add(subscription);target.hasAttribute("for")||candidates.implicitLabels.add(target)}else if(mutation.attributeName==="type"&&target.localName==="input"){const label=containingImplicitLabel(target);label&&candidates.implicitLabels.add(label)}continue}let changedLabelableShape=!1;for(const node of mutation.addedNodes)if(changedLabelableShape=collectAssociationCandidates(node,candidates)||changedLabelableShape,candidates.truncated)break;if(!candidates.truncated){for(const node of mutation.removedNodes)if(changedLabelableShape=collectAssociationCandidates(node,candidates)||changedLabelableShape,candidates.truncated)break}if(changedLabelableShape){const label=containingImplicitLabel(mutation.target);label&&candidates.implicitLabels.add(label)}if(candidates.truncated)break}if(addIndexedCandidates(),candidates.truncated)return{subscriptions:affected,fallbackAll:!0};for(const label of candidates.implicitLabels)if(collectFirstImplicitSubscription(observation,label,candidates,affected),candidates.truncated)return{subscriptions:affected,fallbackAll:!0};return{subscriptions:affected,fallbackAll:!1}}function observeAssociationRoot(host,listener){const root=host.getRootNode();let observation=associationRootObservations.get(root);if(!observation){const Observer=host.ownerDocument.defaultView?.MutationObserver,subscriptions=new Set,subscriptionsById=new Map,implicitSubscriptionsByLabel=new WeakMap,subscriptionsByHost=new WeakMap,pending=new Set,holder={},observer=Observer===void 0?void 0:new Observer(mutations=>{const current=holder.observation;if(!current)return;const affected=affectedAssociationSubscriptions(current,mutations);notifyAssociationSubscriptions(current,affected.subscriptions,affected.fallbackAll)});observer?.observe(root,{attributes:!0,attributeFilter:["for","id","type"],attributeOldValue:!0,childList:!0,subtree:!0}),observation={subscriptions,subscriptionsById,implicitSubscriptionsByLabel,subscriptionsByHost,pending,observer,ownerWindow:host.ownerDocument.defaultView,fallbackGeneration:0},holder.observation=observation,associationRootObservations.set(root,observation)}const subscription={host,listener,id:host.id,implicitLabels:[],fallbackGeneration:-1,active:!0};return observation.subscriptions.add(subscription),observation.subscriptionsByHost.set(host,subscription),addSubscriptionById(observation,subscription),{update(labels){subscription.active&&(updateSubscriptionId(observation,subscription),updateImplicitSubscriptions(observation,subscription,labels))},disconnect(){if(!subscription.active)return;subscription.active=!1,observation.pending.delete(subscription),observation.subscriptions.delete(subscription),observation.subscriptionsByHost.delete(host);for(const label of subscription.implicitLabels)removeImplicitSubscription(observation,label,subscription);subscription.implicitLabels=[],removeSubscriptionById(observation,subscription);const current=associationRootObservations.get(root);!current||current.subscriptions.size>0||(current.observer?.disconnect(),cancelAssociationContinuation(current),current.pending.clear(),current.fallbackIterator=void 0,associationRootObservations.delete(root))}}}function isComposedDescendant(host,candidate){let current=candidate;for(;current;){if(current===host)return!0;if(current.parentNode){current=current.parentNode;continue}current=isShadowRootNode(current)?current.host:null}return!1}function resolveExternalLabels(host){const native=attachedInternals.get(host)?.labels;if(native)return Array.from(native).filter(isLabelElement).filter(label=>isCurrentlyAssociatedLabel(label,host));const labels=[],ancestor=host.closest("label");ancestor&&isCurrentlyAssociatedLabel(ancestor,host)&&labels.push(ancestor);const root=host.getRootNode();if(host.id&&"querySelectorAll"in root)for(const found of root.querySelectorAll("label[for]"))isLabelElement(found)&&isCurrentlyAssociatedLabel(found,host)&&!labels.includes(found)&&labels.push(found);return labels}function labelText(node,exclude){if(node===exclude)return"";if(node.nodeType===Node.TEXT_NODE)return node.textContent??"";let text="";for(const child of node.childNodes)text+=labelText(child,exclude);return text}function resolveExternalLabelText(labels,host){return labels.map(label=>labelText(label,host).trim()).filter(text=>text!=="").join(" ")}class ExternalLabelController{constructor(host){this.host=host,this.labels=[],this.activating=!1,this.onLabelClick=event=>{if(this.activating||this.barred)return;const source=event.currentTarget;if(!source||!isLabelElement(source)||!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}event.composedPath().includes(this.host)||queueMicrotask(()=>{if(event.defaultPrevented||!this.host.isConnected||this.barred)return;if(!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}const focusTarget=this.resolveFocusTarget(),activation=this.resolveActivation(focusTarget);this.activating=!0;try{this.host.focus(),isComposedDescendant(this.host,deepActiveElementIn(this.host.ownerDocument))||focusTarget?.focus(),activation==="activate"&&focusTarget?.click()}finally{this.activating=!1}})}}hostConnected(){this.associationRootSubscription?.disconnect(),this.associationRootSubscription=observeAssociationRoot(this.host,()=>this.refresh()),this.refresh()}hostUpdated(){this.refresh()}hostDisconnected(){this.release(),this.stopObservingLabels(),this.associationRootSubscription?.disconnect(),this.associationRootSubscription=void 0;for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=[]}refresh(){const next=resolveExternalLabels(this.host);if(next.length!==this.labels.length||next.some((label,index)=>label!==this.labels[index])){for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=next;for(const label of this.labels)label.addEventListener("click",this.onLabelClick);this.observeLabels()}this.associationRootSubscription?.update(next),this.apply()}observeLabels(){this.stopObservingLabels();const Observer=this.host.ownerDocument.defaultView?.MutationObserver;if(this.labels.length===0||Observer===void 0)return;const observer=new Observer(()=>this.refresh());for(const label of this.labels)observer.observe(label,{characterData:!0,childList:!0,subtree:!0});this.labelObserver=observer}stopObservingLabels(){this.labelObserver?.disconnect(),this.labelObserver=void 0}get barred(){return typeof this.host.matches=="function"&&this.host.matches(":disabled")?!0:!!(this.host.effectiveDisabled??this.host.disabled)}resolveNameTarget(focusTarget){if(this.hostSemanticOwner)return this.host;const root=this.ownRoot;if(!root)return focusTarget;if(focusTarget){for(const composite of root.querySelectorAll(COMPOSITE_ROLE_SELECTOR))if(isHtmlElement(composite)&&isComposedDescendant(composite,focusTarget))return composite}if(focusTarget&&focusTarget.getRootNode()===root)return focusTarget;const owned=focusTarget?this.outermostOwnedAncestor(focusTarget):null;if(owned)return owned;const semantic=root.querySelector(SEMANTIC_TARGET_SELECTOR);return semantic&&isHtmlElement(semantic)?semantic:focusTarget}outermostOwnedAncestor(node){const root=this.ownRoot;let owned=null,current=node;for(;current&¤t!==this.host;)isHtmlElement(current)&&(current.getRootNode()===root||current.parentNode===this.host)&&(owned=current),current.parentNode?current=current.parentNode:current=isShadowRootNode(current)?current.host:null;return owned}get ownRoot(){const root=this.host.renderRoot;return isShadowRootNode(root)?root:this.host.shadowRoot}resolveFocusTarget(){return this.hostSemanticOwner?this.host:collectFocusableElements(this.host)[0]??null}get hostSemanticOwner(){const candidate=this.host;return typeof candidate[EXTERNAL_LABEL_HOST_SEMANTICS]=="function"?candidate:null}hostHasAuthoredName(owner){return owner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"has-authored-name"})===!0}resolveActivation(focusTarget){const declared=this.host[EXTERNAL_LABEL_ACTIVATION];if(typeof declared=="function")return declared.call(this.host);if(!focusTarget||focusTarget.getRootNode()!==this.ownRoot)return"focus";const role=focusTarget.getAttribute("role");return role&&ACTIVATING_ROLES.has(role)?"activate":"focus"}apply(){const hostOwner=this.hostSemanticOwner;if(hostOwner&&this.hostHasAuthoredName(hostOwner)||!hostOwner&&this.host.hasAttribute("aria-label")){this.release();return}const name=resolveExternalLabelText(this.labels,this.host);if(name===""){this.release();return}const settled=this.applied;if(settled&&settled.name===name&&settled.target.isConnected&&settled.target.getAttribute("aria-label")===name)return;const target=this.resolveNameTarget(this.resolveFocusTarget());target&&(this.applied&&this.applied.target!==target&&this.release(),this.applied||(this.applied={target,name,had:target.hasAttribute("aria-label"),previous:target.getAttribute("aria-label")}),target===this.host&&hostOwner?hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"apply",name}):target.getAttribute("aria-label")!==name&&target.setAttribute("aria-label",name),this.applied.name=name)}release(){const applied=this.applied;if(this.applied=void 0,!applied)return;const{target,name,had,previous}=applied,hostOwner=target===this.host?this.hostSemanticOwner:null;if(hostOwner){hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"release",appliedName:name,hadPrevious:had,previous});return}target.getAttribute("aria-label")===name&&(had?target.setAttribute("aria-label",previous??""):target.removeAttribute("aria-label"))}}registerFormControlLabelSupport(captureFormInternals,host=>new ExternalLabelController(host));export{EXTERNAL_LABEL_ACTIVATION,EXTERNAL_LABEL_HOST_SEMANTICS,ExternalLabelController,captureFormInternals,resolveExternalLabelText,resolveExternalLabels};
|
|
1
|
+
import{deepActiveElementIn}from"./active-element.js";import{collectComposedFocusTargets}from"./focus-navigation.js";import{registerFormControlLabelSupport}from"./lyra-element.js";const EXTERNAL_LABEL_ACTIVATION=Symbol("lr-external-label-activation"),EXTERNAL_LABEL_HOST_SEMANTICS=Symbol("lr-external-label-host-semantics"),attachedInternals=new WeakMap;function captureFormInternals(host,internals){attachedInternals.set(host,internals)}const COMPOSITE_ROLE_SELECTOR='[role="radiogroup"],[role="group"],[role="grid"],[role="tree"]',SEMANTIC_TARGET_SELECTOR=['input:not([type="hidden"]):not([tabindex="-1"])','textarea:not([tabindex="-1"])','select:not([tabindex="-1"])','button:not([tabindex="-1"])','[role]:not([tabindex="-1"])'].join(","),ACTIVATING_ROLES=new Set(["checkbox","switch","radio","menuitemcheckbox","menuitemradio"]),MAX_ASSOCIATION_CANDIDATES_PER_MUTATION=2048,MAX_ASSOCIATION_REFRESHES_PER_TASK=256,associationRootObservations=new WeakMap;function isLabelElement(node){return node!==null&&"nodeType"in node&&node.nodeType===1&&"localName"in node&&node.localName==="label"}function isHtmlElement(node){return node.nodeType===1&&"focus"in node&&"style"in node}function isShadowRootNode(node){return node?.nodeType===11&&"host"in node}function isCurrentlyAssociatedLabel(label,host){const root=host.getRootNode();if(label.getRootNode()!==root)return!1;if(!label.hasAttribute("for")){const control="control"in label?label.control:void 0;return control==null?label.contains(host):control===host}const id=label.htmlFor;return id===""?!1:"getElementById"in root&&typeof root.getElementById=="function"?root.getElementById(id)===host:!("querySelectorAll"in root)||typeof root.querySelectorAll!="function"?!1:[...root.querySelectorAll("[id]")].find(candidate=>candidate.id===id)===host}function addSubscriptionById(observation,subscription){if(!subscription.id)return;const subscribers=observation.subscriptionsById.get(subscription.id)??new Set;subscribers.add(subscription),observation.subscriptionsById.set(subscription.id,subscribers)}function removeSubscriptionById(observation,subscription){if(!subscription.id)return;const subscribers=observation.subscriptionsById.get(subscription.id);subscribers?.delete(subscription),subscribers?.size===0&&observation.subscriptionsById.delete(subscription.id)}function updateSubscriptionId(observation,subscription){const id=subscription.host.id;id!==subscription.id&&(removeSubscriptionById(observation,subscription),subscription.id=id,addSubscriptionById(observation,subscription))}function addImplicitSubscription(observation,label,subscription){const subscriptions=observation.implicitSubscriptionsByLabel.get(label)??new Set;subscriptions.add(subscription),observation.implicitSubscriptionsByLabel.set(label,subscriptions)}function removeImplicitSubscription(observation,label,subscription){const subscriptions=observation.implicitSubscriptionsByLabel.get(label);subscriptions?.delete(subscription),subscriptions?.size===0&&observation.implicitSubscriptionsByLabel.delete(label)}function updateImplicitSubscriptions(observation,subscription,labels){const next=labels.filter(label=>!label.hasAttribute("for"));for(const label of subscription.implicitLabels)next.includes(label)||removeImplicitSubscription(observation,label,subscription);for(const label of next)subscription.implicitLabels.includes(label)||addImplicitSubscription(observation,label,subscription);subscription.implicitLabels=next}function hasAssociationRefreshes(observation){return observation.pending.size>0||observation.fallbackIterator!==void 0}function cancelAssociationContinuation(observation){observation.cancelContinuation?.(),observation.cancelContinuation=void 0}function scheduleAssociationContinuation(observation){if(!hasAssociationRefreshes(observation)||observation.cancelContinuation!==void 0)return;const callback=()=>{observation.cancelContinuation=void 0,drainAssociationRefreshes(observation)};if(observation.ownerWindow){const handle=observation.ownerWindow.setTimeout(callback,0);observation.cancelContinuation=()=>observation.ownerWindow?.clearTimeout(handle)}else{const handle=globalThis.setTimeout(callback,0);observation.cancelContinuation=()=>globalThis.clearTimeout(handle)}}function refreshAssociationSubscription(observation,subscription){subscription.active&&(subscription.listener(),observation.fallbackIterator&&(subscription.fallbackGeneration=observation.fallbackGeneration))}function drainTargetedAssociationRefreshes(observation){let remaining=MAX_ASSOCIATION_REFRESHES_PER_TASK;for(const subscription of observation.pending)if(observation.pending.delete(subscription),refreshAssociationSubscription(observation,subscription),--remaining===0)break;scheduleAssociationContinuation(observation)}function drainAssociationRefreshes(observation){let remaining=MAX_ASSOCIATION_REFRESHES_PER_TASK;for(const subscription of observation.pending)if(observation.pending.delete(subscription),refreshAssociationSubscription(observation,subscription),--remaining===0)break;for(;remaining>0&&observation.fallbackIterator;){const next=observation.fallbackIterator.next();if(next.done){observation.fallbackIterator=void 0;break}next.value.active&&next.value.fallbackGeneration!==observation.fallbackGeneration&&(next.value.listener(),next.value.fallbackGeneration=observation.fallbackGeneration),remaining--}scheduleAssociationContinuation(observation)}function notifyAssociationSubscriptions(observation,subscriptions,fallbackAll=!1){if(fallbackAll){const continuationPending=observation.cancelContinuation!==void 0;observation.pending.clear(),observation.fallbackGeneration++,observation.fallbackIterator=observation.subscriptions.values();for(const subscription of subscriptions)subscription.active&&observation.pending.add(subscription);continuationPending?drainTargetedAssociationRefreshes(observation):drainAssociationRefreshes(observation);return}for(const subscription of subscriptions)subscription.active&&observation.pending.add(subscription);drainTargetedAssociationRefreshes(observation)}function isLabelableElement(element){return element.localName==="input"?element.type!=="hidden":element.localName==="button"||element.localName==="meter"||element.localName==="output"||element.localName==="progress"||element.localName==="select"||element.localName==="textarea"?!0:element.localName.includes("-")&&element.constructor.formAssociated===!0}function collectAssociationElement(element,result){const id=element.getAttribute("id");return id&&result.ids.add(id),isLabelElement(element)&&element.hasAttribute("for")&&element.htmlFor&&result.ids.add(element.htmlFor),isLabelableElement(element)}function nextAssociationNode(root,current){if(current.firstChild)return current.firstChild;let cursor=current;for(;cursor&&cursor!==root;){if(cursor.nextSibling)return cursor.nextSibling;cursor=cursor.parentNode}return null}function collectAssociationCandidates(node,result){let containsLabelable=!1,current=node;for(;current;){if(result.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){result.truncated=!0;break}result.work++,current.nodeType===1&&(containsLabelable=collectAssociationElement(current,result)||containsLabelable),current=nextAssociationNode(node,current)}return containsLabelable}function containingImplicitLabel(node){if(isLabelElement(node))return node.hasAttribute("for")?null:node;if(node.nodeType!==1||!("closest"in node))return null;const label=node.closest("label");return label&&!label.hasAttribute("for")?label:null}function collectFirstImplicitSubscription(observation,label,candidates,affected){let current=label.firstChild;for(;current;){if(candidates.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){candidates.truncated=!0;return}if(candidates.work++,current.nodeType===1&&(isLabelableElement(current)||observation.subscriptionsByHost.has(current))){const subscription=observation.subscriptionsByHost.get(current);subscription&&affected.add(subscription);return}current=nextAssociationNode(label,current)}}function affectedAssociationSubscriptions(observation,mutations){const affected=new Set,candidates={ids:new Set,implicitLabels:new Set,truncated:!1,work:0},addIndexedCandidates=()=>{for(const id of candidates.ids)for(const subscription of observation.subscriptionsById.get(id)??[])affected.add(subscription);for(const label of candidates.implicitLabels)for(const subscription of observation.implicitSubscriptionsByLabel.get(label)??[])affected.add(subscription)};for(const mutation of mutations){if(candidates.work>=MAX_ASSOCIATION_CANDIDATES_PER_MUTATION){candidates.truncated=!0;break}if(candidates.work++,mutation.type==="attributes"){const target=mutation.target;if(mutation.attributeName==="id"){const oldId=mutation.oldValue??"",id=target.getAttribute("id")??"";oldId&&candidates.ids.add(oldId),id&&candidates.ids.add(id);const hostSubscription=observation.subscriptionsByHost.get(target);hostSubscription&&(affected.add(hostSubscription),updateSubscriptionId(observation,hostSubscription))}else if(mutation.attributeName==="for"&&isLabelElement(target)){const oldFor=mutation.oldValue;oldFor&&candidates.ids.add(oldFor),target.htmlFor&&candidates.ids.add(target.htmlFor);for(const subscription of observation.implicitSubscriptionsByLabel.get(target)??[])affected.add(subscription);target.hasAttribute("for")||candidates.implicitLabels.add(target)}else if(mutation.attributeName==="type"&&target.localName==="input"){const label=containingImplicitLabel(target);label&&candidates.implicitLabels.add(label)}continue}let changedLabelableShape=!1;for(const node of mutation.addedNodes)if(changedLabelableShape=collectAssociationCandidates(node,candidates)||changedLabelableShape,candidates.truncated)break;if(!candidates.truncated){for(const node of mutation.removedNodes)if(changedLabelableShape=collectAssociationCandidates(node,candidates)||changedLabelableShape,candidates.truncated)break}if(changedLabelableShape){const label=containingImplicitLabel(mutation.target);label&&candidates.implicitLabels.add(label)}if(candidates.truncated)break}if(addIndexedCandidates(),candidates.truncated)return{subscriptions:affected,fallbackAll:!0};for(const label of candidates.implicitLabels)if(collectFirstImplicitSubscription(observation,label,candidates,affected),candidates.truncated)return{subscriptions:affected,fallbackAll:!0};return{subscriptions:affected,fallbackAll:!1}}function observeAssociationRoot(host,listener){const root=host.getRootNode();let observation=associationRootObservations.get(root);if(!observation){const Observer=host.ownerDocument.defaultView?.MutationObserver,subscriptions=new Set,subscriptionsById=new Map,implicitSubscriptionsByLabel=new WeakMap,subscriptionsByHost=new WeakMap,pending=new Set,holder={},observer=Observer===void 0?void 0:new Observer(mutations=>{const current=holder.observation;if(!current)return;const affected=affectedAssociationSubscriptions(current,mutations);notifyAssociationSubscriptions(current,affected.subscriptions,affected.fallbackAll)});observer?.observe(root,{attributes:!0,attributeFilter:["for","id","type"],attributeOldValue:!0,childList:!0,subtree:!0}),observation={subscriptions,subscriptionsById,implicitSubscriptionsByLabel,subscriptionsByHost,pending,observer,ownerWindow:host.ownerDocument.defaultView,fallbackGeneration:0},holder.observation=observation,associationRootObservations.set(root,observation)}const subscription={host,listener,id:host.id,implicitLabels:[],fallbackGeneration:-1,active:!0};return observation.subscriptions.add(subscription),observation.subscriptionsByHost.set(host,subscription),addSubscriptionById(observation,subscription),{update(labels){subscription.active&&(updateSubscriptionId(observation,subscription),updateImplicitSubscriptions(observation,subscription,labels))},disconnect(){if(!subscription.active)return;subscription.active=!1,observation.pending.delete(subscription),observation.subscriptions.delete(subscription),observation.subscriptionsByHost.delete(host);for(const label of subscription.implicitLabels)removeImplicitSubscription(observation,label,subscription);subscription.implicitLabels=[],removeSubscriptionById(observation,subscription);const current=associationRootObservations.get(root);!current||current.subscriptions.size>0||(current.observer?.disconnect(),cancelAssociationContinuation(current),current.pending.clear(),current.fallbackIterator=void 0,associationRootObservations.delete(root))}}}function isComposedDescendant(host,candidate){let current=candidate;for(;current;){if(current===host)return!0;if(current.parentNode){current=current.parentNode;continue}current=isShadowRootNode(current)?current.host:null}return!1}function resolveExternalLabels(host){const native=attachedInternals.get(host)?.labels;if(native)return Array.from(native).filter(isLabelElement).filter(label=>isCurrentlyAssociatedLabel(label,host));const labels=[],ancestor=host.closest("label");ancestor&&isCurrentlyAssociatedLabel(ancestor,host)&&labels.push(ancestor);const root=host.getRootNode();if(host.id&&"querySelectorAll"in root)for(const found of root.querySelectorAll("label[for]"))isLabelElement(found)&&isCurrentlyAssociatedLabel(found,host)&&!labels.includes(found)&&labels.push(found);return labels}function labelText(node,exclude){if(node===exclude)return"";if(node.nodeType===Node.TEXT_NODE)return node.textContent??"";let text="";for(const child of node.childNodes)text+=labelText(child,exclude);return text}function resolveExternalLabelText(labels,host){return labels.map(label=>labelText(label,host).trim()).filter(text=>text!=="").join(" ")}class ExternalLabelController{constructor(host){this.host=host,this.labels=[],this.activating=!1,this.onLabelClick=event=>{if(this.activating||this.barred)return;const source=event.currentTarget;if(!source||!isLabelElement(source)||!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}event.composedPath().includes(this.host)||queueMicrotask(()=>{if(event.defaultPrevented||!this.host.isConnected||this.barred)return;if(!isCurrentlyAssociatedLabel(source,this.host)){this.refresh();return}const focusTarget=this.resolveFocusTarget(),activation=this.resolveActivation(focusTarget);this.activating=!0;try{this.host.focus(),isComposedDescendant(this.host,deepActiveElementIn(this.host.ownerDocument))||focusTarget?.focus(),activation==="activate"&&focusTarget?.click()}finally{this.activating=!1}})}}hostConnected(){this.associationRootSubscription?.disconnect(),this.associationRootSubscription=observeAssociationRoot(this.host,()=>this.refresh()),this.refresh()}hostUpdated(){this.refresh()}hostDisconnected(){this.release(),this.stopObservingLabels(),this.associationRootSubscription?.disconnect(),this.associationRootSubscription=void 0;for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=[]}refresh(){const next=resolveExternalLabels(this.host);if(next.length!==this.labels.length||next.some((label,index)=>label!==this.labels[index])){for(const label of this.labels)label.removeEventListener("click",this.onLabelClick);this.labels=next;for(const label of this.labels)label.addEventListener("click",this.onLabelClick);this.observeLabels()}this.associationRootSubscription?.update(next),this.apply()}observeLabels(){this.stopObservingLabels();const Observer=this.host.ownerDocument.defaultView?.MutationObserver;if(this.labels.length===0||Observer===void 0)return;const observer=new Observer(()=>this.refresh());for(const label of this.labels)observer.observe(label,{characterData:!0,childList:!0,subtree:!0});this.labelObserver=observer}stopObservingLabels(){this.labelObserver?.disconnect(),this.labelObserver=void 0}get barred(){return typeof this.host.matches=="function"&&this.host.matches(":disabled")?!0:!!(this.host.effectiveDisabled??this.host.disabled)}resolveNameTarget(focusTarget){if(this.hostSemanticOwner)return this.host;const root=this.ownRoot;if(!root)return focusTarget;if(focusTarget){for(const composite of root.querySelectorAll(COMPOSITE_ROLE_SELECTOR))if(isHtmlElement(composite)&&isComposedDescendant(composite,focusTarget))return composite}if(focusTarget&&focusTarget.getRootNode()===root)return focusTarget;const owned=focusTarget?this.outermostOwnedAncestor(focusTarget):null;if(owned)return owned;const semantic=root.querySelector(SEMANTIC_TARGET_SELECTOR);return semantic&&isHtmlElement(semantic)?semantic:focusTarget}outermostOwnedAncestor(node){const root=this.ownRoot;let owned=null,current=node;for(;current&¤t!==this.host;)isHtmlElement(current)&&(current.getRootNode()===root||current.parentNode===this.host)&&(owned=current),current.parentNode?current=current.parentNode:current=isShadowRootNode(current)?current.host:null;return owned}get ownRoot(){const root=this.host.renderRoot;return isShadowRootNode(root)?root:this.host.shadowRoot}resolveFocusTarget(){return this.hostSemanticOwner?this.host:collectComposedFocusTargets(this.host).elements[0]??null}get hostSemanticOwner(){const candidate=this.host;return typeof candidate[EXTERNAL_LABEL_HOST_SEMANTICS]=="function"?candidate:null}hostHasAuthoredName(owner){return owner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"has-authored-name"})===!0}resolveActivation(focusTarget){const declared=this.host[EXTERNAL_LABEL_ACTIVATION];if(typeof declared=="function")return declared.call(this.host);if(!focusTarget||focusTarget.getRootNode()!==this.ownRoot)return"focus";const role=focusTarget.getAttribute("role");return role&&ACTIVATING_ROLES.has(role)?"activate":"focus"}apply(){const hostOwner=this.hostSemanticOwner;if(hostOwner&&this.hostHasAuthoredName(hostOwner)||!hostOwner&&this.host.hasAttribute("aria-label")){this.release();return}const name=resolveExternalLabelText(this.labels,this.host);if(name===""){this.release();return}const settled=this.applied;if(settled&&settled.name===name&&settled.target.isConnected&&settled.target.getAttribute("aria-label")===name)return;const target=this.resolveNameTarget(this.resolveFocusTarget());target&&(this.applied&&this.applied.target!==target&&this.release(),this.applied||(this.applied={target,name,had:target.hasAttribute("aria-label"),previous:target.getAttribute("aria-label")}),target===this.host&&hostOwner?hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"apply",name}):target.getAttribute("aria-label")!==name&&target.setAttribute("aria-label",name),this.applied.name=name)}release(){const applied=this.applied;if(this.applied=void 0,!applied)return;const{target,name,had,previous}=applied,hostOwner=target===this.host?this.hostSemanticOwner:null;if(hostOwner){hostOwner[EXTERNAL_LABEL_HOST_SEMANTICS]({type:"release",appliedName:name,hadPrevious:had,previous});return}target.getAttribute("aria-label")===name&&(had?target.setAttribute("aria-label",previous??""):target.removeAttribute("aria-label"))}}let supportInstalled=!1;function installFormControlLabelSupport(){supportInstalled||(supportInstalled=!0,registerFormControlLabelSupport(captureFormInternals,host=>new ExternalLabelController(host)))}export{EXTERNAL_LABEL_ACTIVATION,EXTERNAL_LABEL_HOST_SEMANTICS,ExternalLabelController,captureFormInternals,installFormControlLabelSupport,resolveExternalLabelText,resolveExternalLabels};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getPluralRules}from"./intl-cache.js";const MAX_LOCALE_CANDIDATES=64,MAX_LOCALE_SUBTAGS=32,MAX_LOCALE_TAG_LENGTH=255,MAX_LOCALE_CACHE_ENTRIES=128,MAX_CACHEABLE_LOCALE_LENGTH=512,LEGACY_LOCALE_PATTERN=/^[a-z0-9]{1,32}(?:-[a-z0-9]{1,32})*$/,locales=new Map,localePublicTags=new Map,localeMeta=new Map,wellFormedLocales=new Set,exactOnlyLocales=new Set,localeCatalogRevisions=new Map,listeners=new Set,hostLocaleListeners=new Set,hostLocaleFinalizer=new FinalizationRegistry(subscription=>{hostLocaleListeners.delete(subscription)}),ownerDocumentsWithBrowsingContext=new WeakSet,registryListeners=new Set;let activeLocale="",catalogRevision=0;const localeIdentityCache=new Map,localeCandidateCache=new Map;function cacheBounded(cache,key,value){cache.size>=MAX_LOCALE_CACHE_ENTRIES&&cache.clear(),cache.set(key,value)}function subtagCountWithinBounds(tag){if(tag.length>MAX_LOCALE_TAG_LENGTH)return!1;let count=tag?1:0;for(let index=0;index<tag.length;index+=1)if(tag.charCodeAt(index)===45&&++count>MAX_LOCALE_SUBTAGS)return!1;return!0}function localeIdentity(locale){const normalized=typeof locale=="string"?locale.trim().replace(/_/g,"-"):"";if(!normalized)return{publicTag:"",lookupKey:"",wellFormed:!1,candidateBounded:!0,storable:!1};const cached=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeIdentityCache.get(normalized):void 0;if(cached)return cached;let publicTag=normalized.toLowerCase(),wellFormed=!1;try{const canonical=Intl.getCanonicalLocales(normalized)[0];canonical&&(publicTag=canonical,wellFormed=!0)}catch{}const lookupKey=publicTag.toLowerCase(),candidateBounded=subtagCountWithinBounds(lookupKey),identity={publicTag,lookupKey,wellFormed,candidateBounded,storable:wellFormed||candidateBounded&&LEGACY_LOCALE_PATTERN.test(lookupKey)};return normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeIdentityCache,normalized,identity),identity}function storedLocaleIdentity(locale,required){if(typeof locale!="string")throw new TypeError("A locale must be a string.");const identity=localeIdentity(locale);if(!identity.publicTag){if(!required)return identity;throw new TypeError("A locale is required.")}if(!identity.storable)throw new TypeError("The locale must be BCP-47 or a bounded alphanumeric custom tag.");return identity}function canonicalizeLyraLocale(locale){const identity=localeIdentity(locale);return identity.storable?identity.publicTag:"en"}function regionalFallbacks(requestedKey,limit,wellFormed){if(limit<=0||!wellFormed)return[];const separator=requestedKey.indexOf("-"),language=separator===-1?requestedKey:requestedKey.slice(0,separator);if(!language)return[];const requested=new Set(requestedKey.split("-")),score=key=>key.split("-").filter(subtag=>requested.has(subtag)).length;return[...locales.keys()].filter(key=>wellFormedLocales.has(key)&&!exactOnlyLocales.has(key)&&(key===language||key.startsWith(`${language}-`))&&!isPrefixOf(key,requestedKey)).sort((a,b)=>score(b)-score(a)||(a<b?-1:a>b?1:0)).slice(0,limit)}function isPrefixOf(key,requestedKey){return key===requestedKey||requestedKey.startsWith(`${key}-`)}function localeCandidates(locale){const identity=localeIdentity(locale),normalized=identity.lookupKey;if(!normalized)return["en"];const cached=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeCandidateCache.get(normalized):void 0;if(cached)return[...cached];const candidates=[];if((identity.wellFormed||identity.candidateBounded)&&candidates.push(normalized),identity.candidateBounded){for(let index=normalized.length-1;index>=0;index-=1)normalized.charCodeAt(index)===45&&index>0&&candidates.push(normalized.slice(0,index));const regionalBudget=Math.max(0,MAX_LOCALE_CANDIDATES-candidates.length-1);candidates.push(...regionalFallbacks(normalized,regionalBudget,identity.wellFormed))}else if(identity.wellFormed){const separator=normalized.indexOf("-");separator>0&&candidates.push(normalized.slice(0,separator))}candidates.includes("en")||candidates.push("en"),candidates.length>MAX_LOCALE_CANDIDATES&&candidates.splice(MAX_LOCALE_CANDIDATES-1,candidates.length,"en");const frozen=Object.freeze([...candidates]);return normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeCandidateCache,normalized,frozen),candidates}function lyraLocaleCatalogVersion(locale){return localeCandidates(locale).map(candidate=>localeCatalogRevisions.get(candidate)??0).join(",")}function getRegisteredLyraLocales(){const keys=new Set(["en",...localePublicTags.values()]);return Object.freeze([...keys].sort())}function subscribeLyraLocaleRegistry(listener){return registryListeners.add(listener),()=>registryListeners.delete(listener)}const MAX_CATALOG_MESSAGES=4096,MAX_MESSAGE_KEY_LENGTH=256,PLURAL_CATEGORIES=new Set(["zero","one","two","few","many","other"]),trustedMessageRecords=new WeakSet;function isPlainRecord(value){if(value===null||typeof value!="object"||Array.isArray(value))return!1;try{const prototype=Object.getPrototypeOf(value);return prototype===Object.prototype||prototype===null}catch{return!1}}function ownDataValue(record,key){try{const descriptor=Object.getOwnPropertyDescriptor(record,key);return!descriptor||!("value"in descriptor)?{found:!1}:{found:!0,value:descriptor.value}}catch{return{found:!1}}}function snapshotPluralMessage(value){if(!isPlainRecord(value))return;const snapshot=Object.create(null);let count=0;try{for(const key in value){if(++count>PLURAL_CATEGORIES.size||!PLURAL_CATEGORIES.has(key)||!Object.prototype.hasOwnProperty.call(value,key))return;const entry=ownDataValue(value,key);if(!entry.found||typeof entry.value!="string")return;snapshot[key]=entry.value}}catch{return}if(typeof snapshot.other!="string")return;const frozen=Object.freeze(snapshot);return trustedMessageRecords.add(frozen),frozen}function snapshotMessage(value){return typeof value=="string"?value:snapshotPluralMessage(value)}function snapshotCatalog(strings){const snapshot=Object.create(null);if(!isPlainRecord(strings)){const frozen2=Object.freeze(snapshot);return trustedMessageRecords.add(frozen2),frozen2}let count=0;try{for(const key in strings){if(count>=MAX_CATALOG_MESSAGES)break;if(count+=1,!Object.prototype.hasOwnProperty.call(strings,key)||!key||key.length>MAX_MESSAGE_KEY_LENGTH)continue;const entry=ownDataValue(strings,key);if(!entry.found)continue;const message=snapshotMessage(entry.value);message!==void 0&&(snapshot[key]=message)}}catch{}const frozen=Object.freeze(snapshot);return trustedMessageRecords.add(frozen),frozen}function mergeCatalogs(current,incoming){const merged=Object.assign(Object.create(null),current??{},incoming);return Object.freeze(merged),trustedMessageRecords.add(merged),merged}function snapshotLocaleMeta(meta){if(meta===void 0)return;if(!isPlainRecord(meta))return Object.freeze({});const snapshot={},dir=ownDataValue(meta,"dir");dir.found&&(dir.value==="ltr"||dir.value==="rtl")&&(snapshot.dir=dir.value);const name=ownDataValue(meta,"name");return name.found&&typeof name.value=="string"&&(snapshot.name=name.value),Object.freeze(snapshot)}function snapshotLyraLocaleStrings(strings){return snapshotCatalog(strings)}function safeMessageAt(source,key){if(!isPlainRecord(source))return;if(trustedMessageRecords.has(source))return source[key];const entry=ownDataValue(source,key);return entry.found?snapshotMessage(entry.value):void 0}function deliverLocaleListeners(groups,operation){const errors=[];for(const group of groups)for(const listener of group)try{listener()}catch(error){errors.push(error)}if(errors.length>0)throw new AggregateError(errors,`${operation} committed, but ${errors.length} locale subscriber${errors.length===1?"":"s"} failed.`)}function localeUsesCatalog(locale,lookupKey){return localeCandidates(locale).includes(lookupKey)}function ownerView(host){try{return host.ownerDocument.defaultView}catch{return}}function recordLyraOwnerDocumentConnection(host){ownerView(host)&&ownerDocumentsWithBrowsingContext.add(host.ownerDocument)}function forgetHostLocaleSubscription(subscription){hostLocaleListeners.delete(subscription),hostLocaleFinalizer.unregister(subscription)}function liveHostLocaleSubscriptions(){const live=[];for(const subscription of[...hostLocaleListeners]){const host=subscription.host.deref();if(!host||!host.isConnected||ownerDocumentsWithBrowsingContext.has(host.ownerDocument)&&ownerView(host)===null){forgetHostLocaleSubscription(subscription);continue}live.push({host})}return live}function registerLocale(locale,strings,meta,exactOnly){const identity=storedLocaleIdentity(locale,!0),key=identity.lookupKey,incomingStrings=snapshotCatalog(strings),incomingMeta=snapshotLocaleMeta(meta),isNewLocale=!locales.has(key),candidateTopologyChanged=isNewLocale||exactOnly&&!exactOnlyLocales.has(key)||identity.wellFormed&&!wellFormedLocales.has(key);exactOnly&&exactOnlyLocales.add(key),identity.wellFormed&&wellFormedLocales.add(key),locales.set(key,mergeCatalogs(locales.get(key),incomingStrings)),localePublicTags.set(key,identity.publicTag),incomingMeta&&localeMeta.set(key,Object.freeze({...localeMeta.get(key)??{},...incomingMeta})),localeCatalogRevisions.set(key,++catalogRevision),candidateTopologyChanged&&(pluralLocaleCache.clear(),localeCandidateCache.clear());const activeSnapshot=activeLocale&&localeUsesCatalog(activeLocale,key)?[...listeners]:[],hostSnapshot=liveHostLocaleSubscriptions().filter(({host})=>localeUsesCatalog(inheritedLocale(host),key)).map(({host})=>()=>host.requestUpdate()),registrySnapshot=isNewLocale?[...registryListeners]:[];deliverLocaleListeners([activeSnapshot,hostSnapshot,registrySnapshot],`registerLyraLocale(${JSON.stringify(identity.publicTag)})`)}function registerLyraLocale(locale,strings,meta){registerLocale(locale,strings,meta,!1)}function registerLyraExactLocale(locale,strings,meta){registerLocale(locale,strings,meta,!0)}function getLyraLocaleDirection(locale){const identity=localeIdentity(locale);if(!identity.publicTag)return"ltr";for(const candidate of localeCandidates(identity.publicTag)){const declared=localeMeta.get(candidate)?.dir;if(declared)return declared}try{const resolved=new Intl.Locale(identity.publicTag);return(resolved.textInfo?.direction??resolved.getTextInfo?.().direction)==="rtl"?"rtl":"ltr"}catch{return"ltr"}}function setLyraLocale(locale){const next=storedLocaleIdentity(locale,!1).publicTag;if(activeLocale===next)return;const hostSnapshot=liveHostLocaleSubscriptions(),previousHostLocales=hostSnapshot.map(({host})=>inheritedLocale(host));activeLocale=next;const affectedHostListeners=hostSnapshot.filter(({host},index)=>inheritedLocale(host)!==previousHostLocales[index]).map(({host})=>()=>host.requestUpdate());deliverLocaleListeners([[...listeners],affectedHostListeners],`setLyraLocale(${JSON.stringify(next)})`)}function getLyraLocale(){return activeLocale}function subscribeLyraLocale(listener){return listeners.add(listener),()=>listeners.delete(listener)}function subscribeLyraLocaleForHost(host){recordLyraOwnerDocumentConnection(host);const subscription={host:new WeakRef(host)};return hostLocaleListeners.add(subscription),hostLocaleFinalizer.register(host,subscription,subscription),()=>forgetHostLocaleSubscription(subscription)}function composedParentElement(element){if(element.parentElement)return element.parentElement;const root=element.getRootNode(),candidate=root.host;return root.nodeType===11&&candidate!==null&&typeof candidate=="object"&&typeof candidate.getAttribute=="function"?candidate:null}function flattenedParentElement(element){const slot=element.assignedSlot;return slot!==null&&typeof slot=="object"&&typeof slot.getAttribute=="function"?slot:composedParentElement(element)}function inheritedLocale(host){const explicit=host.getAttribute("locale")||host.getAttribute("lang");if(explicit)return canonicalizeLyraLocale(explicit);if(host.getAttribute("lang")==="")return activeLocale||"en";const documentElement=host.ownerDocument?.documentElement;let parent=composedParentElement(host);for(;parent;){const isDocumentElement=parent===documentElement,locale=isDocumentElement?parent.getAttribute("locale"):parent.getAttribute("locale")||parent.getAttribute("lang");if(locale)return canonicalizeLyraLocale(locale);if(!isDocumentElement&&parent.getAttribute("lang")==="")return activeLocale||"en";parent=composedParentElement(parent)}if(activeLocale)return activeLocale;const documentLocale=documentElement?.getAttribute("lang");return documentLocale?canonicalizeLyraLocale(documentLocale):"en"}const cacheableLocaleHosts=new WeakSet,resolvedLocaleCache=new WeakMap,resolvedDirectionCache=new WeakMap;function enableLyraLocaleCache(host){cacheableLocaleHosts.add(host)}function invalidateLyraLocaleCache(host){resolvedLocaleCache.delete(host),resolvedDirectionCache.delete(host)}function resolveLyraLocale(host){if(!cacheableLocaleHosts.has(host))return inheritedLocale(host);let locale=resolvedLocaleCache.get(host);return locale===void 0&&(locale=inheritedLocale(host),resolvedLocaleCache.set(host,locale)),locale}function inheritedDirection(host){const explicit=host.getAttribute("dir")?.toLowerCase();if(explicit==="rtl"||explicit==="ltr")return explicit;const view=ownerView(host);if(view)try{const getComputedStyle=view.getComputedStyle;if(typeof getComputedStyle=="function"){const computed=getComputedStyle.call(view,host).direction;if(computed==="rtl"||computed==="ltr")return computed}}catch{}let parent=flattenedParentElement(host);for(;parent;){const inherited=parent.getAttribute("dir")?.toLowerCase();if(inherited==="rtl"||inherited==="ltr")return inherited;parent=flattenedParentElement(parent)}return"ltr"}function resolveLyraDirection(host){if(!cacheableLocaleHosts.has(host))return inheritedDirection(host);let direction=resolvedDirectionCache.get(host);return direction===void 0&&(direction=inheritedDirection(host),resolvedDirectionCache.set(host,direction)),direction}function peekLyraLocale(host){return resolvedLocaleCache.get(host)}function peekLyraDirection(host){return resolvedDirectionCache.get(host)}const PLURAL_CATEGORY_FALLBACKS={zero:["zero","other"],one:["one","other"],two:["two","few","many","other"],few:["few","many","other"],many:["many","few","other"],other:["other"]};function pluralSelector(values){let raw;try{raw=values.pluralCount??values.count}catch{return}return typeof raw=="number"&&Number.isFinite(raw)?raw:void 0}const pluralLocaleCache=new Map,MAX_PLURAL_LOCALE_ENTRIES=64;function pluralLocale(locale){const cached=pluralLocaleCache.get(locale);if(cached!==void 0||pluralLocaleCache.has(locale))return cached;let resolved;for(const candidate of localeCandidates(locale))try{getPluralRules(candidate),resolved=candidate;break}catch{}return pluralLocaleCache.size>=MAX_PLURAL_LOCALE_ENTRIES&&pluralLocaleCache.clear(),pluralLocaleCache.set(locale,resolved),resolved}function selectPluralMessage(message,locale,count){if(count===void 0)return message.other;const tag=pluralLocale(locale);if(tag===void 0)return message.other;const category=getPluralRules(tag).select(count);for(const candidate of PLURAL_CATEGORY_FALLBACKS[category]??PLURAL_CATEGORY_FALLBACKS.other){const text=message[candidate];if(text!==void 0)return text}return message.other}function resolveLyraString(host,key,overrides,fallback,values,defaults){let message=safeMessageAt(overrides,key);message===void 0&&typeof fallback=="string"&&(message=fallback);let locale;if(message===void 0){locale=resolveLyraLocale(host);for(const candidate of localeCandidates(locale)){const registered=safeMessageAt(locales.get(candidate),key);if(registered!==void 0){message=registered;break}}}message??=safeMessageAt(defaults,key)??key;let text;return typeof message!="string"?(locale??=resolveLyraLocale(host),text=selectPluralMessage(message,locale,values?pluralSelector(values):void 0)):text=message,values?text.replace(/\{(\w+)\}/g,(match,name)=>{try{const value=values[name];return typeof value=="string"||typeof value=="number"?String(value):match}catch{return match}}):text}function resolveLocalizedParts(template,interpolate){const privateUse=new Set;for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);code>=57344&&code<=63743&&privateUse.add(code)}let marker="";for(let code=57344;code<=63743;code+=1)if(!privateUse.has(code)){marker=String.fromCharCode(code);break}if(!marker){const counts=new Uint32Array(65536);for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);counts[code]=(counts[code]??0)+1}let leastCode=0,leastCount=Number.POSITIVE_INFINITY;for(let code=0;code<counts.length;code+=1){const count=counts[code]??0;if(count===0){marker=String.fromCharCode(code);break}count<leastCount&&(leastCode=code,leastCount=count)}if(!marker){const followers=new Uint8Array(65536);for(let index=0;index+1<template.length;index+=1)template.charCodeAt(index)===leastCode&&(followers[template.charCodeAt(index+1)]=1);let follower=0;for(;follower<followers.length&&followers[follower]!==0;)follower+=1;marker=String.fromCharCode(leastCode,follower<followers.length?follower:leastCode)}}return interpolate(marker).split(marker)}export{canonicalizeLyraLocale,enableLyraLocaleCache,getLyraLocale,getLyraLocaleDirection,getRegisteredLyraLocales,invalidateLyraLocaleCache,lyraLocaleCatalogVersion,peekLyraDirection,peekLyraLocale,recordLyraOwnerDocumentConnection,registerLyraExactLocale,registerLyraLocale,resolveLocalizedParts,resolveLyraDirection,resolveLyraLocale,resolveLyraString,setLyraLocale,snapshotLyraLocaleStrings,subscribeLyraLocale,subscribeLyraLocaleForHost,subscribeLyraLocaleRegistry};
|
|
1
|
+
import{getPluralRules}from"./intl-cache.js";const MAX_LOCALE_CANDIDATES=64,MAX_LOCALE_SUBTAGS=32,MAX_LOCALE_TAG_LENGTH=255,MAX_LOCALE_CACHE_ENTRIES=128,MAX_CACHEABLE_LOCALE_LENGTH=512,LEGACY_LOCALE_PATTERN=/^[a-z0-9]{1,32}(?:-[a-z0-9]{1,32})*$/,locales=new Map,localePublicTags=new Map,localeMeta=new Map,wellFormedLocales=new Set,exactOnlyLocales=new Set,localeCatalogRevisions=new Map,listeners=new Set,hostLocaleListeners=new Set,hostLocaleFinalizer=new FinalizationRegistry(subscription=>{hostLocaleListeners.delete(subscription)}),ownerDocumentsWithBrowsingContext=new WeakSet,registryListeners=new Set;let activeLocale="",catalogRevision=0;const localeIdentityCache=new Map,localeCandidateCache=new Map;function cacheBounded(cache,key,value){cache.size>=MAX_LOCALE_CACHE_ENTRIES&&cache.clear(),cache.set(key,value)}function subtagCountWithinBounds(tag){if(tag.length>MAX_LOCALE_TAG_LENGTH)return!1;let count=tag?1:0;for(let index=0;index<tag.length;index+=1)if(tag.charCodeAt(index)===45&&++count>MAX_LOCALE_SUBTAGS)return!1;return!0}function localeIdentity(locale){const normalized=typeof locale=="string"?locale.trim().replace(/_/g,"-"):"";if(!normalized)return{publicTag:"",lookupKey:"",wellFormed:!1,candidateBounded:!0,storable:!1};const cached=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeIdentityCache.get(normalized):void 0;if(cached)return cached;let publicTag=normalized.toLowerCase(),wellFormed=!1;try{const canonical=Intl.getCanonicalLocales(normalized)[0];canonical&&(publicTag=canonical,wellFormed=!0)}catch{}const lookupKey=publicTag.toLowerCase(),candidateBounded=subtagCountWithinBounds(lookupKey),identity={publicTag,lookupKey,wellFormed,candidateBounded,storable:wellFormed||candidateBounded&&LEGACY_LOCALE_PATTERN.test(lookupKey)};return normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeIdentityCache,normalized,identity),identity}function storedLocaleIdentity(locale,required){if(typeof locale!="string")throw new TypeError("A locale must be a string.");const identity=localeIdentity(locale);if(!identity.publicTag){if(!required)return identity;throw new TypeError("A locale is required.")}if(!identity.storable)throw new TypeError("The locale must be BCP-47 or a bounded alphanumeric custom tag.");return identity}function canonicalizeLyraLocale(locale){const identity=localeIdentity(locale);return identity.storable?identity.publicTag:"en"}function regionalFallbacks(requestedKey,limit,wellFormed){if(limit<=0||!wellFormed)return[];const separator=requestedKey.indexOf("-"),language=separator===-1?requestedKey:requestedKey.slice(0,separator);if(!language)return[];const requested=new Set(requestedKey.split("-")),score=key=>key.split("-").filter(subtag=>requested.has(subtag)).length;return[...locales.keys()].filter(key=>wellFormedLocales.has(key)&&!exactOnlyLocales.has(key)&&(key===language||key.startsWith(`${language}-`))&&!isPrefixOf(key,requestedKey)).sort((a,b)=>score(b)-score(a)||(a<b?-1:a>b?1:0)).slice(0,limit)}function isPrefixOf(key,requestedKey){return key===requestedKey||requestedKey.startsWith(`${key}-`)}function localeCandidates(locale){const identity=localeIdentity(locale),normalized=identity.lookupKey;if(!normalized)return["en"];const cached=normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH?localeCandidateCache.get(normalized):void 0;if(cached)return[...cached];const candidates=[];if((identity.wellFormed||identity.candidateBounded)&&candidates.push(normalized),identity.candidateBounded){for(let index=normalized.length-1;index>=0;index-=1)normalized.charCodeAt(index)===45&&index>0&&candidates.push(normalized.slice(0,index));const regionalBudget=Math.max(0,MAX_LOCALE_CANDIDATES-candidates.length-1);candidates.push(...regionalFallbacks(normalized,regionalBudget,identity.wellFormed))}else if(identity.wellFormed){const separator=normalized.indexOf("-");separator>0&&candidates.push(normalized.slice(0,separator))}candidates.includes("en")||candidates.push("en");const frozen=Object.freeze([...candidates]);return normalized.length<=MAX_CACHEABLE_LOCALE_LENGTH&&cacheBounded(localeCandidateCache,normalized,frozen),candidates}function lyraLocaleCatalogVersion(locale){return localeCandidates(locale).map(candidate=>localeCatalogRevisions.get(candidate)??0).join(",")}function getRegisteredLyraLocales(){const keys=new Set(["en",...localePublicTags.values()]);return Object.freeze([...keys].sort())}function subscribeLyraLocaleRegistry(listener){return registryListeners.add(listener),()=>registryListeners.delete(listener)}const MAX_CATALOG_MESSAGES=4096,MAX_CATALOG_PROPERTY_READS=MAX_CATALOG_MESSAGES*2,MAX_MESSAGE_KEY_LENGTH=256,PLURAL_CATEGORIES=new Set(["zero","one","two","few","many","other"]),trustedMessageRecords=new WeakSet;function isPlainRecord(value){if(value===null||typeof value!="object"||Array.isArray(value))return!1;try{const prototype=Object.getPrototypeOf(value);return prototype===Object.prototype||prototype===null}catch{return!1}}function ownDataValue(record,key){try{const descriptor=Object.getOwnPropertyDescriptor(record,key);return!descriptor||!("value"in descriptor)?{found:!1}:{found:!0,value:descriptor.value}}catch{return{found:!1}}}function snapshotPluralMessage(value){if(!isPlainRecord(value))return;const snapshot=Object.create(null);let count=0;try{for(const key in value){if(++count>PLURAL_CATEGORIES.size||!PLURAL_CATEGORIES.has(key)||!Object.prototype.hasOwnProperty.call(value,key))return;const entry=ownDataValue(value,key);if(!entry.found||typeof entry.value!="string")return;snapshot[key]=entry.value}}catch{return}if(typeof snapshot.other!="string")return;const frozen=Object.freeze(snapshot);return trustedMessageRecords.add(frozen),frozen}function snapshotMessage(value){return typeof value=="string"?value:snapshotPluralMessage(value)}function snapshotCatalog(strings){const snapshot=Object.create(null);if(!isPlainRecord(strings)){const frozen2=Object.freeze(snapshot);return trustedMessageRecords.add(frozen2),frozen2}let keys;try{keys=Reflect.ownKeys(strings).slice(0,MAX_CATALOG_PROPERTY_READS)}catch{const frozen2=Object.freeze(snapshot);return trustedMessageRecords.add(frozen2),frozen2}let count=0;for(const key of keys){if(count>=MAX_CATALOG_MESSAGES)break;if(typeof key!="string"||!key||key.length>MAX_MESSAGE_KEY_LENGTH)continue;let descriptor;try{descriptor=Reflect.getOwnPropertyDescriptor(strings,key)}catch{continue}if(!descriptor?.enumerable||!("value"in descriptor))continue;count+=1;const message=snapshotMessage(descriptor.value);message!==void 0&&(snapshot[key]=message)}const frozen=Object.freeze(snapshot);return trustedMessageRecords.add(frozen),frozen}function mergeCatalogs(current,incoming){const merged=Object.assign(Object.create(null),current??{},incoming);return Object.freeze(merged),trustedMessageRecords.add(merged),merged}function snapshotLocaleMeta(meta){if(meta===void 0)return;if(!isPlainRecord(meta))return Object.freeze({});const snapshot={},dir=ownDataValue(meta,"dir");dir.found&&(dir.value==="ltr"||dir.value==="rtl")&&(snapshot.dir=dir.value);const name=ownDataValue(meta,"name");return name.found&&typeof name.value=="string"&&(snapshot.name=name.value),Object.freeze(snapshot)}function snapshotLyraLocaleStrings(strings){return snapshotCatalog(strings)}function safeMessageAt(source,key){if(!isPlainRecord(source))return;if(trustedMessageRecords.has(source))return source[key];const entry=ownDataValue(source,key);return entry.found?snapshotMessage(entry.value):void 0}function deliverLocaleListeners(groups,operation){const errors=[];for(const group of groups)for(const listener of group)try{listener()}catch(error){errors.push(error)}if(errors.length>0)throw new AggregateError(errors,`${operation} committed, but ${errors.length} locale subscriber${errors.length===1?"":"s"} failed.`)}function localeUsesCatalog(locale,lookupKey){return localeCandidates(locale).includes(lookupKey)}function ownerView(host){try{return host.ownerDocument.defaultView}catch{return}}function recordLyraOwnerDocumentConnection(host){ownerView(host)&&ownerDocumentsWithBrowsingContext.add(host.ownerDocument)}function forgetHostLocaleSubscription(subscription){hostLocaleListeners.delete(subscription),hostLocaleFinalizer.unregister(subscription)}function liveHostLocaleSubscriptions(){const live=[];for(const subscription of[...hostLocaleListeners]){const host=subscription.host.deref();if(!host||!host.isConnected||ownerDocumentsWithBrowsingContext.has(host.ownerDocument)&&ownerView(host)===null){forgetHostLocaleSubscription(subscription);continue}live.push({host})}return live}function registerLocale(locale,strings,meta,exactOnly){const identity=storedLocaleIdentity(locale,!0),key=identity.lookupKey,incomingStrings=snapshotCatalog(strings),incomingMeta=snapshotLocaleMeta(meta),isNewLocale=!locales.has(key),candidateTopologyChanged=isNewLocale||exactOnly&&!exactOnlyLocales.has(key)||identity.wellFormed&&!wellFormedLocales.has(key);exactOnly&&exactOnlyLocales.add(key),identity.wellFormed&&wellFormedLocales.add(key),locales.set(key,mergeCatalogs(locales.get(key),incomingStrings)),localePublicTags.set(key,identity.publicTag),incomingMeta&&localeMeta.set(key,Object.freeze({...localeMeta.get(key)??{},...incomingMeta})),localeCatalogRevisions.set(key,++catalogRevision),candidateTopologyChanged&&(pluralLocaleCache.clear(),localeCandidateCache.clear());const activeSnapshot=activeLocale&&localeUsesCatalog(activeLocale,key)?[...listeners]:[],hostSnapshot=liveHostLocaleSubscriptions().filter(({host})=>localeUsesCatalog(inheritedLocale(host),key)).map(({host})=>()=>host.requestUpdate()),registrySnapshot=isNewLocale?[...registryListeners]:[];deliverLocaleListeners([activeSnapshot,hostSnapshot,registrySnapshot],`registerLyraLocale(${JSON.stringify(identity.publicTag)})`)}function registerLyraLocale(locale,strings,meta){registerLocale(locale,strings,meta,!1)}function registerLyraExactLocale(locale,strings,meta){registerLocale(locale,strings,meta,!0)}function getLyraLocaleDirection(locale){const identity=localeIdentity(locale);if(!identity.publicTag)return"ltr";for(const candidate of localeCandidates(identity.publicTag)){const declared=localeMeta.get(candidate)?.dir;if(declared)return declared}try{const resolved=new Intl.Locale(identity.publicTag);return(resolved.textInfo?.direction??resolved.getTextInfo?.().direction)==="rtl"?"rtl":"ltr"}catch{return"ltr"}}function setLyraLocale(locale){const next=storedLocaleIdentity(locale,!1).publicTag;if(activeLocale===next)return;const hostSnapshot=liveHostLocaleSubscriptions(),previousHostLocales=hostSnapshot.map(({host})=>inheritedLocale(host));activeLocale=next;const affectedHostListeners=hostSnapshot.filter(({host},index)=>inheritedLocale(host)!==previousHostLocales[index]).map(({host})=>()=>host.requestUpdate());deliverLocaleListeners([[...listeners],affectedHostListeners],`setLyraLocale(${JSON.stringify(next)})`)}function getLyraLocale(){return activeLocale}function subscribeLyraLocale(listener){return listeners.add(listener),()=>listeners.delete(listener)}function subscribeLyraLocaleForHost(host){recordLyraOwnerDocumentConnection(host);const subscription={host:new WeakRef(host)};return hostLocaleListeners.add(subscription),hostLocaleFinalizer.register(host,subscription,subscription),()=>forgetHostLocaleSubscription(subscription)}function composedParentElement(element){if(element.parentElement)return element.parentElement;const root=element.getRootNode(),candidate=root.host;return root.nodeType===11&&candidate!==null&&typeof candidate=="object"&&typeof candidate.getAttribute=="function"?candidate:null}function flattenedParentElement(element){const slot=element.assignedSlot;return slot!==null&&typeof slot=="object"&&typeof slot.getAttribute=="function"?slot:composedParentElement(element)}function inheritedLocale(host){const explicit=host.getAttribute("locale")||host.getAttribute("lang");if(explicit)return canonicalizeLyraLocale(explicit);if(host.getAttribute("lang")==="")return activeLocale||"en";const documentElement=host.ownerDocument?.documentElement;let parent=composedParentElement(host);for(;parent;){const isDocumentElement=parent===documentElement,locale=isDocumentElement?parent.getAttribute("locale"):parent.getAttribute("locale")||parent.getAttribute("lang");if(locale)return canonicalizeLyraLocale(locale);if(!isDocumentElement&&parent.getAttribute("lang")==="")return activeLocale||"en";parent=composedParentElement(parent)}if(activeLocale)return activeLocale;const documentLocale=documentElement?.getAttribute("lang");return documentLocale?canonicalizeLyraLocale(documentLocale):"en"}const cacheableLocaleHosts=new WeakSet,resolvedLocaleCache=new WeakMap,resolvedDirectionCache=new WeakMap;function enableLyraLocaleCache(host){cacheableLocaleHosts.add(host)}function invalidateLyraLocaleCache(host){resolvedLocaleCache.delete(host),resolvedDirectionCache.delete(host)}function resolveLyraLocale(host){if(!cacheableLocaleHosts.has(host))return inheritedLocale(host);let locale=resolvedLocaleCache.get(host);return locale===void 0&&(locale=inheritedLocale(host),resolvedLocaleCache.set(host,locale)),locale}function inheritedDirection(host){const explicit=host.getAttribute("dir")?.toLowerCase();if(explicit==="rtl"||explicit==="ltr")return explicit;const view=ownerView(host);if(view)try{const getComputedStyle=view.getComputedStyle;if(typeof getComputedStyle=="function"){const computed=getComputedStyle.call(view,host).direction;if(computed==="rtl"||computed==="ltr")return computed}}catch{}let parent=flattenedParentElement(host);for(;parent;){const inherited=parent.getAttribute("dir")?.toLowerCase();if(inherited==="rtl"||inherited==="ltr")return inherited;parent=flattenedParentElement(parent)}return"ltr"}function resolveLyraDirection(host){if(!cacheableLocaleHosts.has(host))return inheritedDirection(host);let direction=resolvedDirectionCache.get(host);return direction===void 0&&(direction=inheritedDirection(host),resolvedDirectionCache.set(host,direction)),direction}function peekLyraLocale(host){return resolvedLocaleCache.get(host)}function peekLyraDirection(host){return resolvedDirectionCache.get(host)}const PLURAL_CATEGORY_FALLBACKS={zero:["zero","other"],one:["one","other"],two:["two","few","many","other"],few:["few","many","other"],many:["many","few","other"],other:["other"]};function pluralSelector(values){let raw;try{raw=values.pluralCount??values.count}catch{return}return typeof raw=="number"&&Number.isFinite(raw)?raw:void 0}const pluralLocaleCache=new Map,MAX_PLURAL_LOCALE_ENTRIES=64;function pluralLocale(locale){const cached=pluralLocaleCache.get(locale);if(cached!==void 0)return cached;const resolved=localeCandidates(locale)[0];return pluralLocaleCache.size>=MAX_PLURAL_LOCALE_ENTRIES&&pluralLocaleCache.clear(),pluralLocaleCache.set(locale,resolved),resolved}function selectPluralMessage(message,locale,count){if(count===void 0)return message.other;const tag=pluralLocale(locale),category=getPluralRules(tag).select(count);for(const candidate of PLURAL_CATEGORY_FALLBACKS[category]??PLURAL_CATEGORY_FALLBACKS.other){const text=message[candidate];if(text!==void 0)return text}return message.other}function resolveLyraString(host,key,overrides,fallback,values,defaults){let message=safeMessageAt(overrides,key);message===void 0&&typeof fallback=="string"&&(message=fallback);let locale;if(message===void 0){locale=resolveLyraLocale(host);for(const candidate of localeCandidates(locale)){const registered=safeMessageAt(locales.get(candidate),key);if(registered!==void 0){message=registered;break}}}message??=safeMessageAt(defaults,key)??key;let text;return typeof message!="string"?(locale??=resolveLyraLocale(host),text=selectPluralMessage(message,locale,values?pluralSelector(values):void 0)):text=message,values?text.replace(/\{(\w+)\}/g,(match,name)=>{try{const value=values[name];return typeof value=="string"||typeof value=="number"?String(value):match}catch{return match}}):text}function resolveLocalizedParts(template,interpolate){const privateUse=new Set;for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);code>=57344&&code<=63743&&privateUse.add(code)}let marker="";for(let code=57344;code<=63743;code+=1)if(!privateUse.has(code)){marker=String.fromCharCode(code);break}if(!marker){const counts=new Uint32Array(65536);for(let index=0;index<template.length;index+=1){const code=template.charCodeAt(index);counts[code]=(counts[code]??0)+1}let leastCode=0,leastCount=Number.POSITIVE_INFINITY;for(let code=0;code<counts.length;code+=1){const count=counts[code]??0;if(count===0){marker=String.fromCharCode(code);break}count<leastCount&&(leastCode=code,leastCount=count)}if(!marker){const followers=new Uint8Array(65536);for(let index=0;index+1<template.length;index+=1)template.charCodeAt(index)===leastCode&&(followers[template.charCodeAt(index+1)]=1);let follower=0;for(;follower<followers.length&&followers[follower]!==0;)follower+=1;marker=String.fromCharCode(leastCode,follower<followers.length?follower:leastCode)}}return interpolate(marker).split(marker)}export{canonicalizeLyraLocale,enableLyraLocaleCache,getLyraLocale,getLyraLocaleDirection,getRegisteredLyraLocales,invalidateLyraLocaleCache,lyraLocaleCatalogVersion,peekLyraDirection,peekLyraLocale,recordLyraOwnerDocumentConnection,registerLyraExactLocale,registerLyraLocale,resolveLocalizedParts,resolveLyraDirection,resolveLyraLocale,resolveLyraString,setLyraLocale,snapshotLyraLocaleStrings,subscribeLyraLocale,subscribeLyraLocaleForHost,subscribeLyraLocaleRegistry};
|
|
@@ -28,7 +28,7 @@ export type LyraMessage = string | LyraPluralMessage;
|
|
|
28
28
|
* additional keys as well; components may use a component-specific key when
|
|
29
29
|
* a message is not part of this common set.
|
|
30
30
|
*/
|
|
31
|
-
export type LyraMessageKey = 'noData' | 'graphLegendLabel' | 'legendTypeShown' | 'legendTypeHidden' | 'entityChipWithType' | 'jumpToLatest' | 'terminalLabel' | 'terminalDownload' | 'terminalHighlightLine' | 'schemaViewerIssueLimit' | 'toolParamMissingProperty' | 'toolParamBooleanUnset' | 'toolParamBooleanTrue' | 'toolParamBooleanFalse' | 'toolParamSchemaLimit' | 'testResultsLimit' | 'toolTimelineLimit' | 'toolSelectLimit' | 'sequenceStripEmpty' | 'sequenceStripCategoryCount' | 'sequenceStripUnnamedCategory' | 'noColumns' | 'dataGridColumnMenu' | 'dataGridPinStart' | 'dataGridPinEnd' | 'dataGridUnpin' | 'dataGridRowsPerPage' | 'dataGridTreeLimitReached' | 'loadMore' | 'viewerSearchMatchCount' | 'viewerSearchNoMatches' | 'viewerSearchActiveMatch' | 'viewerHighlightLabel' | 'tableFilterLabel' | 'tableFilterPlaceholder' | 'tableLoading' | 'tableEditCell' | 'carousel' | 'carouselLabel' | 'carouselSlide' | 'carouselSlidePosition' | 'carouselSlideAnnouncement' | 'carouselSlideAnnouncementSeparator' | 'carouselIndicators' | 'carouselGoTo' | 'imageComparerLabel' | 'zoomableFrameLabel' | 'zoomControls' | 'zoomOut' | 'zoomIn' | 'lightboxLabel' | 'lightboxImagePosition' | 'scrollerLabel' | 'chatViewportLabel' | 'newMessageCount' | 'newMessagesCount' | 'newMessages' | 'scrollPrevious' | 'scrollNext' | 'showAllColumns' | 'showFewerColumns' | 'clear' | 'openCalendar' | 'open' | 'close' | 'closeNavigation' | 'openNavigation' | 'resizeNavigation' | 'resizeColumn' | 'copy' | 'copyJson' | 'copied' | 'expand' | 'collapse' | 'expandMessage' | 'collapseMessage' | 'messageActionsLabel' | 'regenerateResponse' | 'editMessage' | 'showMore' | 'showMoreCount' | 'showLess' | 'retry' | 'remove' | 'removeWithContext' | 'playWithContext' | 'pauseWithContext' | 'loading' | 'loadingDocument' | 'calendarPreviousMonth' | 'calendarNextMonth' | 'noMatches' | 'previous' | 'next' | 'paginationLabel' | 'paginationPage' | 'paginationJumpToPage' | 'branchPickerLabel' | 'branchPrevious' | 'branchNext' | 'branchPosition' | 'paginationSummary' | 'paginationEmptySummary' | 'paginationApplied' | 'cancel' | 'confirm' | 'search' | 'circularReference' | 'items' | 'item' | 'trendOf' | 'wordCloud' | 'wordCloudLegend' | 'wordCloudWordAnnouncement' | 'comboboxLoadError' | 'comboboxSelectedOverflow' | 'promptQueueItemLabel' | 'promptQueueActionLabel' | 'notInCatalog' | 'sendMessage' | 'stopGenerating' | 'dropzoneReleaseToAdd' | 'dropzoneRejectedType' | 'fileSizeUnitB' | 'fileSizeUnitKb' | 'fileSizeUnitMb' | 'fileSizeUnitGb' | 'fileSizeUnitTb' | 'chartCategory' | 'chartTotal' | 'chartAxisTotal' | 'chartPrimaryAxis' | 'chartSecondaryAxis' | 'chartPointLabel' | 'chartPointCoordinates' | 'chartBubblePointCoordinates' | 'chartLabeledPoint' | 'resetZoom' | 'chatSending' | 'chatResponding' | 'chatFailedToSend' | 'chatFailedAnnounce' | 'chatCompleteAnnounce' | 'showMoreCollapsed' | 'expandCode' | 'collapseCode' | 'copyCode' | 'copiedToClipboard' | 'codeRegion' | 'codeRegionWithLanguage' | 'codeBlockLineLabel' | 'copyDiff' | 'diffViewOldLabel' | 'diffViewNewLabel' | 'diffViewHiddenLines' | 'diffViewTooLarge' | 'jsonArray' | 'jsonObject' | 'jsonValue' | 'jsonCopyLabel' | 'jsonExpandLabel' | 'jsonCollapseLabel' | 'jsonItemCount' | 'jsonKeyCount' | 'jsonViewerLimit' | 'untitledSource' | 'sourcePageSuffix' | 'toolCall' | 'statusPending' | 'statusRunning' | 'statusSuccess' | 'statusError' | 'statusDenied' | 'maximize' | 'restore' | 'wordCloudWord' | 'wordCloudWords' | 'promptStudioVariableName' | 'promptStudioVariableValue' | 'schemaViewerLimit' | 'subagentPanelLimit' | 'pollPause' | 'pollResume' | 'pollInactive' | 'pollRefreshing' | 'pollPaused' | 'pollPausedAnnounce' | 'pollResumedAnnounce' | 'pollRefreshingAnnounce' | 'randomContentPause' | 'randomContentResume' | 'attachmentAdd' | 'attachmentTriggerFiles' | 'attachmentTriggerImage' | 'attachmentTriggerCamera' | 'attachmentMenuFiles' | 'attachmentMenuImage' | 'attachmentMenuCamera' | 'checkboxRequired' | 'checkboxGroupRequired' | 'tokenInputRequired' | 'tokenInputEditWithContext' | 'commandPaletteLabel' | 'commandPalettePlaceholder' | 'commandPaletteEmpty' | 'commandPaletteResults' | 'iconButtonLabel' | 'codeEditorLabel' | 'calendarLabel' | 'calendarEmpty' | 'switchRequired' | 'citationHighConfidence' | 'citationMediumConfidence' | 'citationLowConfidence' | 'citationVerified' | 'citationUnverified' | 'contextMeterUsed' | 'contextMeterUsedOfTotal' | 'contextMeterLabeledSummary' | 'contextMeterSegmentLabel' | 'gaugeLabel' | 'gaugeValueLabel' | 'untitledConversation' | 'dockPanelCollapse' | 'dockPanelExpand' | 'dockPanelResize' | 'documentPreviewAlt' | 'documentPreviewUrlNotAllowed' | 'documentPreviewFailedToLoad' | 'documentPreviewResourceTooLarge' | 'documentPreviewGenericError' | 'ebookViewerLoadError' | 'ebookViewerRegionLabel' | 'ebookViewerPreviousChapter' | 'ebookViewerNextChapter' | 'fileTypeFile' | 'fileTypePdf' | 'fileTypeWord' | 'fileTypeSpreadsheet' | 'fileTypePresentation' | 'fileTypeText' | 'fileTypeCode' | 'fileTypeArchive' | 'fileTypeImage' | 'fileTypeAudio' | 'fileTypeVideo' | 'fileTypeWithSize' | 'pptxViewerLabel' | 'pptxViewerFidelityNotice' | 'pptxViewerRenderError' | 'pptxViewerPreviousSlide' | 'pptxViewerNextSlide' | 'pptxViewerSlideOf' | 'documentViewerLabel' | 'attachmentPreviewName' | 'attachmentPreviewFile' | 'documentViewerMissingSanitizer' | 'docxViewerLabel' | 'docxViewerMissingConverter' | 'svgViewerLabel' | 'htmlViewerLabel' | 'datasetViewerMissingParser' | 'datasetViewerEmpty' | 'datasetViewerCaption' | 'datasetViewerCaptionNamed' | 'contactViewerLabel' | 'contactViewerNoContacts' | 'contactViewerUnnamedContact' | 'contactViewerPhoneLabel' | 'contactViewerEmailLabel' | 'contactViewerAddressLabel' | 'contactViewerOrganization' | 'contactViewerTypedValue' | 'contactViewerAddressFormat' | 'contactViewerTypeHome' | 'contactViewerTypeWork' | 'contactViewerTypeCell' | 'contactViewerTypeVoice' | 'contactViewerTypeFax' | 'contactViewerTypeInternet' | 'contactViewerTypePreferred' | 'exportButtonLabel' | 'generationStatusElapsedSeconds' | 'generationStatusTokenCount' | 'generationStatusTokensCount' | 'generationStatusThroughput' | 'graphDataList' | 'graphItemAnnouncement' | 'navigation' | 'attachmentRetryWithContext' | 'attachmentUploadingWithContext' | 'attachmentUploadingProgress' | 'attachmentUploadingIndeterminate' | 'attachmentUploadFailed' | 'attachmentUntitledFile' | 'chartTrendIncreasing' | 'chartTrendDecreasing' | 'chartTrendFlat' | 'chartSummary' | 'chartSeriesNoData' | 'chartSummaryWithData' | 'chartSummaryEmpty' | 'chartSummarySeparator' | 'chartData' | 'chartDataSampled' | 'chartZoomUnavailable' | 'chartDataLabelsUnavailable' | 'chartStackTotalsUnavailable' | 'chart' | 'chartTypeLine' | 'chartTypeBar' | 'chartTypeScatter' | 'chartTypePie' | 'chartTypeDoughnut' | 'chartTypeRadar' | 'chartTypePolarArea' | 'chartTypeBubble' | 'boxPlotSeriesSummary' | 'boxPlotSummaryWithData' | 'boxPlotSummaryEmpty' | 'boxPlotData' | 'chartSeriesLabel' | 'boxPlotMin' | 'boxPlotQ1' | 'boxPlotMedian' | 'boxPlotQ3' | 'boxPlotMax' | 'boxPlot' | 'histogramFrequency' | 'liteChartMarkSummary' | 'liteChartBarLabel' | 'chartValueLabel' | 'liteChartCustomMarkSummary' | 'composerLabel' | 'composerPlaceholder' | 'textareaLabel' | 'citation' | 'citationWithStatus' | 'citationWithCustomLabel' | 'comboboxOverflow' | 'comboboxRequired' | 'comboboxCreate' | 'comboboxLabel' | 'rename' | 'previousMonth' | 'nextMonth' | 'chooseDate' | 'date' | 'dateInputMinMessage' | 'dateInputMaxMessage' | 'dateInputPastDisabled' | 'dateInputFutureDisabled' | 'dateInputInvalid' | 'timeInputLabel' | 'timeInputHour' | 'timeInputMinute' | 'timeInputSecond' | 'timeInputDayPeriod' | 'timeInputEmptySegment' | 'timeInputOpen' | 'timeInputPopup' | 'timeInputNow' | 'timeInputInvalid' | 'timeInputMinMessage' | 'timeInputMaxMessage' | 'timeInputRangeMessage' | 'timeInputStepMessage' | 'documentPreviewEmpty' | 'convertingDocument' | 'documentPreviewNotAvailable' | 'documentPreviewGenericFile' | 'documentPreviewTypeDocument' | 'documentPreviewTypeImage' | 'documentPreviewTypeEmail' | 'documentPreviewTypeCalendar' | 'archiveViewerEmpty' | 'archiveViewerFolder' | 'archiveViewerFile' | 'documentPreviewTypeDataset' | 'documentPreviewTypeContact' | 'download' | 'exportFormatMenuLabel' | 'fileInputDefaultLabel' | 'fileInputAcceptedOne' | 'fileInputAcceptedMany' | 'fileInputRejectedOne' | 'fileInputRejectedMany' | 'fileInputFolderRejected' | 'fileInputRejectedType' | 'fileInputRejectedSize' | 'fileInputRejectedCount' | 'fileInputRejectedRead' | 'fileInputRejectedLimit' | 'elapsedMinutesSecondsTemplate' | 'graphNode' | 'graphLink' | 'graphDiagram' | 'graphTypedNode' | 'graphExpandableItem' | 'graphNodeFocused' | 'graphSelectionCount' | 'graphNodesHidden' | 'graphCommunity' | 'heatmapValueLabel' | 'heatmapMatrixCellLabel' | 'heatmapCalendarLabel' | 'heatmapMatrixLabel' | 'heatmapCalendarCellLabel' | 'heatmapNoDataValue' | 'heatmapDefaultRowLabel' | 'heatmapDefaultColLabel' | 'heatmapSelectedCellLabel' | 'heatmapProjectionLimit' | 'heatmapDecorationLimit' | 'inputLabel' | 'showPassword' | 'hidePassword' | 'radioRequired' | 'progress' | 'responsivePanel' | 'popover' | 'details' | 'breadcrumb' | 'timeline' | 'rating' | 'sliderLabel' | 'feedbackPositive' | 'feedbackNegative' | 'feedbackReasonsLabel' | 'feedbackCommentLabel' | 'feedbackCommentPlaceholder' | 'feedbackSubmit' | 'feedbackSubmitted' | 'colorPicker' | 'mediaCardUntitledFile' | 'mediaCardOpenName' | 'mediaCardOpenImageAttachment' | 'mediaCardOpenVideoAttachment' | 'mediaCardOpenFileAttachment' | 'mediaCardImageAttachment' | 'mediaCardVideoAttachment' | 'animatedImageDefaultAlt' | 'mentionSuggestions' | 'suggestionsLabel' | 'map' | 'model' | 'selectModel' | 'modelSelectNoModels' | 'modelSelectRequired' | 'temperature' | 'play' | 'playbackPosition' | 'playbackStepPosition' | 'videoPlayerLabel' | 'videoMute' | 'videoUnmute' | 'videoVolume' | 'videoCaptions' | 'videoCaptionsOff' | 'videoPlaybackSpeed' | 'videoPictureInPicture' | 'videoExitPictureInPicture' | 'videoEnterFullscreen' | 'videoExitFullscreen' | 'videoPlaylistLabel' | 'videoPlaylistUntitled' | 'selectValueMissing' | 'select' | 'sourceListDefaultLabel' | 'threadListLabel' | 'threadGroupPinned' | 'threadGroupToday' | 'threadGroupYesterday' | 'threadGroupPrevious7Days' | 'threadGroupPrevious30Days' | 'threadGroupArchived' | 'threadGroupExpand' | 'threadGroupCollapse' | 'pinConversation' | 'unpinConversation' | 'archiveConversation' | 'unarchiveConversation' | 'deleteConversation' | 'searchThreads' | 'threadListMatchAnnounce' | 'threadListEmpty' | 'agentWorkspaceLabel' | 'agentWorkspaceConversation' | 'agentWorkspaceDetails' | 'agentWorkspaceRun' | 'agentWorkspaceTools' | 'agentWorkspaceRetrieval' | 'agentWorkspaceGrounding' | 'agentWorkspaceContext' | 'agentWorkspaceEmpty' | 'ragAnswerLabel' | 'ragAnswerCitations' | 'ragAnswerSources' | 'ragAnswerRetry' | 'evaluationDashboardLabel' | 'evaluationDashboardRunsLabel' | 'evaluationDashboardNoRuns' | 'approvalQueueLabel' | 'approvalQueueEmpty' | 'approvalQueueOpen' | 'approvalQueuePendingCount' | 'approvalQueuePending' | 'embeddingExplorerLabel' | 'embeddingExplorerEmpty' | 'embeddingExplorerPoint' | 'knowledgeBaseAdminLabel' | 'knowledgeBaseAdminSourcesTab' | 'knowledgeBaseAdminIngestionTab' | 'resizeDivider' | 'trendUnchanged' | 'statTrendIncreased' | 'statTrendDecreased' | 'statTrendGood' | 'statTrendBad' | 'statTrendAnnouncement' | 'streamStalled' | 'streamStallAnnounce' | 'streamRecoverAnnounce' | 'streamStallClearedAnnounce' | 'thinkingPanelLabel' | 'messagePartsLabel' | 'messagePartError' | 'messagePartRetry' | 'promptQueueLabel' | 'promptQueueEmpty' | 'promptQueueSendNow' | 'selectionToolbarLabel' | 'selectionAsk' | 'selectionQuote' | 'selectionCite' | 'promptInputLabel' | 'promptInputControls' | 'promptInputSources' | 'promptInputAttachments' | 'mcpAppLabel' | 'mcpAppUnavailable' | 'mcpAppLoading' | 'taskListLabel' | 'taskListCompletedOfTotal' | 'taskListStepStartedAnnounce' | 'taskListStepCompletedAnnounce' | 'taskListStepFailedAnnounce' | 'activityFeedLabel' | 'activityFeedCompletedSteps' | 'activityFeedCompletedStep' | 'handoffLabel' | 'handoffToAgent' | 'handoffFromToAgent' | 'usageBadgeLabel' | 'usageBadgeTokensIn' | 'usageBadgeTokensOut' | 'usageBadgeTokensInLabel' | 'usageBadgeTokensOutLabel' | 'usageBadgeTotalTokensLabel' | 'usageBadgeCostLabel' | 'usageBadgeLatencyLabel' | 'checkpointLabel' | 'checkpointRestore' | 'checkpointRestoreWithContext' | 'checkpointRestoring' | 'checkpointConfirmPrompt' | 'thoughtFor' | 'thinking' | 'rangeStart' | 'rangeEnd' | 'calloutAnnouncementWithContext' | 'closeWithContext' | 'closeWithTruncatedContext' | 'toastContentIncomplete' | 'toastOverflow' | 'toolApprovalHeading' | 'toolApprovalGenericTool' | 'toolApprovalArgsLabel' | 'confirmApproved' | 'confirmDenied' | 'confirmApprovedAnnounce' | 'confirmDeniedAnnounce' | 'deny' | 'edit' | 'approve' | 'invalidJson' | 'fieldRequired' | 'fieldMustBeString' | 'fieldMustBeNumber' | 'fieldMustBeInteger' | 'fieldMustBeBoolean' | 'unsupportedFieldType' | 'fieldMustBeOneOf' | 'fieldMustEqual' | 'schemaMustBeObject' | 'schemaPropertiesMustBeFlat' | 'valueMustBeSerializable' | 'valueInvalid' | 'phoneInputLabel' | 'phoneInputIncomplete' | 'otpInputIncomplete' | 'otpInputLabel' | 'numberInputIncrease' | 'numberInputDecrease' | 'textareaCharacterCount' | 'textareaCharactersRemaining' | 'copyFailed' | 'colorPickerSaturationBrightness' | 'colorPickerSaturationBrightnessValue' | 'colorPickerHue' | 'colorPickerHueValue' | 'colorPickerOpacity' | 'colorPickerOpacityValue' | 'colorPickerValueField' | 'colorPickerToggleFormat' | 'colorPickerEyeDropper' | 'colorPickerSwatches' | 'colorPickerSwatch' | 'colorPickerCurrentValue' | 'selectSelectedOverflow' | 'iconLoadError' | 'iconTooLarge' | 'iconSanitizerMissing' | 'paginationFirstPage' | 'paginationLastPage' | 'accessibleLabelSeparator' | 'durationMilliseconds' | 'durationSeconds' | 'selectTools' | 'searchToolsPlaceholder' | 'useDefaultTools' | 'toolSelectCustomizeHint' | 'noMatchesQuery' | 'toolSelectNoneAvailable' | 'toolSelectSummary' | 'toolCount' | 'otherCategory' | 'widgetFullscreenPanel' | 'widgetViewGroup' | 'widgetExitFullscreen' | 'widgetExpandToFullscreen' | 'widgetCollapse' | 'widgetExpand' | 'menuLabel' | 'pause' | 'kbdEscapeVisual' | 'kbdEscapeWord' | 'kbdTabWord' | 'kbdSpaceWord' | 'kbdDeleteVisual' | 'kbdDeleteWord' | 'kbdHomeWord' | 'kbdEndWord' | 'kbdPageUpVisual' | 'kbdPageUpWord' | 'kbdPageDownVisual' | 'kbdPageDownWord' | 'kbdEnterWord' | 'kbdBackspaceWord' | 'kbdArrowUpWord' | 'kbdArrowDownWord' | 'kbdArrowLeftWord' | 'kbdArrowRightWord' | 'kbdPlusWord' | 'kbdMinusWord' | 'kbdCommandWord' | 'kbdControlVisual' | 'kbdControlWord' | 'kbdOptionWord' | 'kbdAltWord' | 'kbdShiftWord' | 'emailViewerLabel' | 'emailViewerMissingParser' | 'emailViewerFrom' | 'emailViewerTo' | 'emailViewerSubject' | 'emailViewerDate' | 'emailViewerAttachments' | 'emailViewerNoSubject' | 'emailViewerOpenAttachment' | 'emailViewerShowQuoted' | 'emailViewerHideQuoted' | 'emailViewerGroupAddress' | 'calendarViewerLabel' | 'calendarViewerMissingParser' | 'calendarViewerEmpty' | 'calendarViewerNoSummary' | 'pdfViewerLabel' | 'pdfViewerMissingLibrary' | 'qrCodeMissingLibrary' | 'qrCodeGenerationFailed' | 'mapMissingLibrary' | 'mapStyleRequired' | 'mapWebglUnavailable' | 'mapInitializationFailed' | 'mapLegend' | 'chartMissingLibrary' | 'boxPlotMissingLibrary' | 'graphMissingLibrary' | 'pdfViewerPageOf' | 'pdfViewerZoomIn' | 'pdfViewerZoomOut' | 'pdfViewerCurrentZoom' | 'pdfViewerPreviousPage' | 'pdfViewerNextPage' | 'anchorJumped' | 'anchorJumpedToPage' | 'anchorNotFound' | 'highlightLayerLabel' | 'highlightWithLabel' | 'cellHighlightWithLabel' | 'highlightOfTotal' | 'pageRailLabel' | 'pageRailPage' | 'pageRailPageHighlighted' | 'spreadsheetViewerUnavailable' | 'csvViewerUnavailable' | 'csvViewerLabel' | 'spreadsheetViewerLabel' | 'knownDateDay' | 'knownDateMonth' | 'knownDateYear' | 'skipToContent' | 'tourSkip' | 'tourDone' | 'tourStepOf' | 'emojiPickerSearchLabel' | 'emojiPickerGridLabel' | 'emojiPickerEmpty' | 'emojiPickerLoadError' | 'emojiPickerGroupSmileysEmotion' | 'emojiPickerGroupPeopleBody' | 'emojiPickerGroupComponent' | 'emojiPickerGroupAnimalsNature' | 'emojiPickerGroupFoodDrink' | 'emojiPickerGroupTravelPlaces' | 'emojiPickerGroupActivities' | 'emojiPickerGroupObjects' | 'emojiPickerGroupSymbols' | 'emojiPickerGroupFlags' | 'emojiPickerGroupUnknown' | 'pushToTalkRequesting' | 'pushToTalkDenied' | 'pushToTalkError' | 'pushToTalkUnsupported' | 'pushToTalkStarted' | 'pushToTalkStopped' | 'pushToTalkCancelled' | 'pushToTalkHold' | 'pushToTalkStart' | 'pushToTalkStop' | 'traceTree' | 'traceTreeSpanStatus' | 'traceTreeMetricLabel' | 'spanProjectionLimit' | 'agentTraceFilterLabel' | 'spanKindAgent' | 'spanKindLlm' | 'spanKindTool' | 'spanKindRetriever' | 'spanKindEmbedding' | 'spanKindOther' | 'tokensIn' | 'tokensOut' | 'cost' | 'duration' | 'spanWaterfall' | 'spanStartedAtOffset' | 'rubricSubmit' | 'rubricSubmitAndNext' | 'rubricSkip' | 'compareResponseA' | 'compareResponseB' | 'compareVoteLabel' | 'compareVoteBetter' | 'compareVoteTie' | 'compareVoteBothBad' | 'compareVoteRecorded' | 'comparePanel' | 'audioVisualizerLabel' | 'audioVisualizerIdle' | 'audioVisualizerListening' | 'audioVisualizerThinking' | 'audioVisualizerSpeaking' | 'treeNodeMoved' | 'fileTreeLabel' | 'fileTreeDiffSummary' | 'gitStatusAdded' | 'gitStatusModified' | 'gitStatusDeleted' | 'gitStatusRenamed' | 'gitStatusUntracked' | 'gitStatusConflicted' | 'gitStatusIgnored' | 'imageViewerLabel' | 'imageViewerFailedToLoad' | 'imageViewerRotate' | 'imageViewerFitLabel' | 'imageViewerFitContain' | 'imageViewerFitWidth' | 'imageViewerFitActual' | 'imageViewerAnnotate' | 'imageViewerHighlightsLabel' | 'imageViewerUnlabeledHighlight' | 'imageViewerAnnotationHint' | 'imageViewerAnnotationBoxPosition' | 'imageViewerAnnotationAdded' | 'imageViewerAnnotationCancelled' | 'transcriptFeedLabel' | 'transcriptFeedEmpty' | 'transcriptFeedInterim' | 'commitCardLabel' | 'commitCardCopyHash' | 'commitCardDiffSummary' | 'commitCardShowFiles' | 'commitCardHideFiles' | 'stackTraceLabel' | 'stackTraceLimit' | 'stackTraceShowFrames' | 'stackTraceHideFrames' | 'statusSkipped' | 'testResultsLabel' | 'testResultsPassed' | 'testResultsFailed' | 'testResultsSkipped' | 'testResultsRunning' | 'testResultsFilterLabel' | 'testResultsCompleteAnnounce' | 'testResultsExpandTest' | 'testResultsCollapseTest' | 'envListLabel' | 'envListReveal' | 'envListHide' | 'envListValueHidden' | 'envListCopy' | 'voice' | 'voicePickerNoVoices' | 'voicePickerRequired' | 'voicePickerPreview' | 'voicePickerStopPreview' | 'avPlayerLabel' | 'avPlayerFailedToLoad' | 'avPlayerTranscript' | 'avPlayerTimeline' | 'avPlayerPlaybackRate' | 'avPlayerRateOption' | 'avPlayerPosition' | 'attachmentTriggerAudio' | 'attachmentMenuAudio' | 'browserFrameLabel' | 'browserFrameUrlLabel' | 'browserFrameViewOf' | 'browserFrameTakeOver' | 'browserFrameHandBack' | 'browserFrameStop' | 'browserFrameStatusIdle' | 'browserFrameStatusConnecting' | 'browserFrameStatusLive' | 'browserFrameStatusStalled' | 'browserFrameControllerAgent' | 'browserFrameControllerUser' | 'notebookViewerLabel' | 'notebookViewerInvalid' | 'notebookViewerUnsupportedVersion' | 'notebookViewerTooManyCells' | 'notebookViewerInPrompt' | 'notebookViewerInPromptEmpty' | 'notebookViewerCodeCell' | 'notebookViewerMarkdownCell' | 'notebookViewerRawCell' | 'notebookViewerErrorOutput' | 'notebookViewerShowAllOutput' | 'notebookViewerCollapseOutput' | 'notebookViewerUnrenderedOutput' | 'xmlViewerLabel' | 'xmlViewerParseError' | 'xmlViewerTooManyNodes' | 'xmlViewerChildCount' | 'xmlViewerCopyDocument' | 'xmlViewerCopyNode' | 'xmlViewerExpandNode' | 'xmlViewerCollapseNode' | 'artifactPanelLabel' | 'artifactPanelPreview' | 'artifactPanelCode' | 'artifactPanelPreviousVersion' | 'artifactPanelNextVersion' | 'artifactPanelVersionPosition' | 'artifactPanelRestore' | 'artifactPanelGenerating' | 'resultFieldLabel' | 'geojsonViewLabel' | 'geojsonViewInvalid' | 'geojsonViewFeatureCount' | 'geojsonViewMissingMapLibrary' | 'mindMapLabel' | 'mindMapTopicStatus' | 'mindMapLeafStatus' | 'mindMapExpanded' | 'mindMapCollapsed' | 'entityDegree' | 'entityCommunity' | 'focusInGraph' | 'untitledEntity' | 'untitledCommunity' | 'communityMemberCount' | 'communityDrillIn' | 'selectAllSources' | 'sourcePickerSelection' | 'provenancePanelLabel' | 'provenanceEntities' | 'provenanceRelationships' | 'provenanceCommunities' | 'provenanceChunks' | 'provenanceEmpty' | 'chunkInspectorLabel' | 'chunkScore' | 'scoreTierHigh' | 'scoreTierMedium' | 'scoreTierLow' | 'chunkInspectorEmpty' | 'flowCanvasLabel' | 'flowCanvasLayoutLimit' | 'flowCanvasSummary' | 'flowNode' | 'flowEdge' | 'flowEdgeWithLabel' | 'flowItemAnnouncement' | 'dashboardGridLabel' | 'dashboardCellCollisionRejected' | 'dashboardCellMoved' | 'dashboardCellResized' | 'flowEdgeList' | 'flowNodeSelected' | 'flowNodeDeselected' | 'flowSelectionCleared' | 'flowNodeMoved' | 'flowConnectStarted' | 'flowConnectTarget' | 'flowConnectCommitted' | 'flowConnectCancelled' | 'zoomToFit' | 'flowLockCanvas' | 'flowControlsLabel' | 'flowMinimapLabel' | 'flowMinimapViewport' | 'flowMinimapInstructions' | 'flowMinimapViewportChanged' | 'nodePaletteLabel' | 'nodePalettePlaceholder' | 'nodePaletteEmpty' | 'nodePaletteDragHint' | 'nodePaletteResultCount' | 'retrievalResultsSelectRow' | 'pathStripLabel' | 'pathNodeStatus' | 'pathRelationStatus' | 'flowInputHandle' | 'flowOutputHandle' | 'flowStatusWithDuration' | 'flowStatusWithDetail' | 'neighborListLabel' | 'neighborRowLabel' | 'neighborDirectionIn' | 'neighborDirectionOut' | 'neighborDirectionBoth' | 'neighborExpand' | 'neighborListEmpty' | 'neighborGroupHeader' | 'flowRunStatusLabel' | 'flowRunSummary' | 'flowRunStepStatus' | 'flowRunStatusCount' | 'policySummaryLabel' | 'policySummaryAllowCount' | 'policySummaryDenyCount' | 'policySummaryNeedsReviewCount' | 'policySummaryStateAllow' | 'policySummaryStateDeny' | 'policySummaryStateNeedsReview' | 'policySummaryCategoryGuardrail' | 'policySummaryCategoryPermission' | 'policySummaryCategoryPrivacy' | 'policySummaryCategoryTool' | 'policySummaryDetailLabel' | 'evalDatasetLabel' | 'evalDatasetAddExample' | 'evalDatasetRemoveExample' | 'evalDatasetImportLabel' | 'evalDatasetSearchLabel' | 'evalDatasetTagFilterLabel' | 'evalDatasetEmpty' | 'evalDatasetNoMatches' | 'evalDatasetColumnInput' | 'evalDatasetColumnExpectedOutput' | 'evalDatasetColumnTags' | 'queryBuilderLabel' | 'queryBuilderEmpty' | 'queryBuilderNoFields' | 'queryBuilderAddCondition' | 'queryBuilderRemoveCondition' | 'queryBuilderFieldLabel' | 'queryBuilderFieldPlaceholder' | 'queryBuilderOperatorLabel' | 'queryBuilderOperatorPlaceholder' | 'queryBuilderValueLabel' | 'queryBuilderValuePlaceholder' | 'queryBuilderCombinatorLabel' | 'queryBuilderCombinatorAnd' | 'queryBuilderCombinatorOr' | 'queryBuilderBooleanTrue' | 'queryBuilderBooleanFalse' | 'queryBuilderOperatorEquals' | 'queryBuilderOperatorNotEquals' | 'queryBuilderOperatorGreaterThan' | 'queryBuilderOperatorGreaterThanOrEqual' | 'queryBuilderOperatorLessThan' | 'queryBuilderOperatorLessThanOrEqual' | 'queryBuilderOperatorAfter' | 'queryBuilderOperatorOnOrAfter' | 'queryBuilderOperatorBefore' | 'queryBuilderOperatorOnOrBefore' | 'queryBuilderOperatorContains' | 'queryBuilderOperatorStartsWith' | 'queryBuilderOperatorEndsWith' | 'queryBuilderOperatorIn' | 'queryBuilderOperatorNotIn' | 'queryBuilderOperatorIsEmpty' | 'queryBuilderOperatorIsNotEmpty' | 'memoryPanelLabel' | 'memoryPanelShortTermHeading' | 'memoryPanelLongTermHeading' | 'memoryPanelAdd' | 'memoryPanelAddWithContext' | 'memoryPanelForgetAll' | 'memoryPanelConfirmAddHeading' | 'memoryPanelConfirmRemoveHeading' | 'memoryPanelConfirmForgetHeading' | 'memoryPanelConfirmForgetBody' | 'graphExplorerLabel' | 'graphExplorerSearchPlaceholder' | 'graphExplorerSearchResultsLabel' | 'graphExplorerPin' | 'graphExplorerUnpin' | 'graphExplorerPinned' | 'graphExplorerUnpinned' | 'graphExplorerPinnedHeading' | 'graphExplorerFindPath' | 'retrievalModeVector' | 'retrievalModeKeyword' | 'retrievalModeHybrid' | 'retrievalSearchLabel' | 'retrievalModeLabel' | 'retrievalFiltersLabel' | 'groundingSummaryLabel' | 'groundingSummaryEmpty' | 'groundingSummarySupportedLabel' | 'groundingSummaryUnsupportedLabel' | 'groundingSummaryCoverageLabel' | 'groundingSummaryConfidenceLabel' | 'groundingSummaryWarningsHeading' | 'groundingSummaryEvidenceHeading' | 'claimEvidenceLabel' | 'claimEvidenceEmpty' | 'claimEvidenceSupported' | 'claimEvidencePartiallySupported' | 'claimEvidenceUnsupported' | 'claimEvidenceContradicted' | 'claimEvidenceConfidence' | 'retrievalCompareLabel' | 'retrievalCompareEmpty' | 'retrievalCompareOverlap' | 'retrievalCompareRank' | 'retrievalCompareDenseScore' | 'retrievalCompareSparseScore' | 'retrievalCompareRerankScore' | 'retrievalCompareFinalScore' | 'ragEvalDashboardLabel' | 'ragEvalDashboardEmpty' | 'ragEvalDashboardRuns' | 'ragEvalDashboardSlices' | 'ragEvalDashboardAllSlices' | 'ragEvalDashboardSliceUnavailable' | 'promptStudioLabel' | 'promptStudioMessages' | 'promptStudioVariables' | 'promptStudioVersions' | 'promptStudioPreview' | 'promptStudioRun' | 'promptStudioSave' | 'promptStudioAddMessage' | 'promptStudioRemoveMessage' | 'promptStudioMessageRole' | 'promptStudioMessageContent' | 'promptStudioRoleSystem' | 'promptStudioRoleUser' | 'promptStudioRoleAssistant' | 'promptStudioRoleTool' | 'schemaViewerLabel' | 'schemaViewerEmpty' | 'schemaViewerRequired' | 'schemaViewerCircular' | 'schemaViewerType' | 'subagentPanelLabel' | 'subagentPanelEmpty' | 'subagentPanelRetry' | 'subagentPanelCancelRun' | 'subagentPanelRetryRun' | 'toolTimelineDetailsFor' | 'realtimeSessionLabel' | 'realtimeSessionDisconnected' | 'realtimeSessionConnecting' | 'realtimeSessionConnected' | 'realtimeSessionReconnecting' | 'realtimeSessionError' | 'realtimeSessionConnect' | 'realtimeSessionDisconnect' | 'realtimeSessionMute' | 'realtimeSessionUnmute' | 'realtimeSessionInterrupt' | 'realtimeSessionConnectionFailed' | 'contextInspectorRedacted' | 'contextInspectorTruncated' | 'contextInspectorLabel' | 'contextInspectorEmpty' | 'contextInspectorCopyLabel' | 'knowledgeBaseSyncIdle' | 'knowledgeBaseSyncSyncing' | 'knowledgeBaseSyncPaused' | 'knowledgeBaseSyncSynced' | 'knowledgeBaseSyncError' | 'knowledgeBaseHealthHealthy' | 'knowledgeBaseHealthDegraded' | 'knowledgeBaseHealthFailed' | 'knowledgeBaseHealthUnknown' | 'knowledgeBasePermissionOwner' | 'knowledgeBasePermissionEditor' | 'knowledgeBasePermissionViewer' | 'knowledgeBasePermissionRestricted' | 'knowledgeBaseNeverSynced' | 'knowledgeBaseSyncAction' | 'knowledgeBasePauseAction' | 'knowledgeBaseDeleteAction' | 'knowledgeBaseNameColumn' | 'knowledgeBaseSyncColumn' | 'knowledgeBaseHealthColumn' | 'knowledgeBasePermissionColumn' | 'knowledgeBaseActionsColumn' | 'knowledgeBaseTotalSources' | 'knowledgeBaseSyncedSources' | 'knowledgeBaseSyncingSources' | 'knowledgeBaseNeedsAttention' | 'knowledgeBaseHeading' | 'knowledgeBaseCreateSource' | 'knowledgeBaseEmptyHeading' | 'ingestionStageQueued' | 'ingestionStageUploading' | 'ingestionStageExtracting' | 'ingestionStageChunking' | 'ingestionStageEmbedding' | 'ingestionStageIndexing' | 'ingestionStageDone' | 'ingestionStageFailed' | 'ingestionStageCancelled' | 'ingestionQueueLabel' | 'ingestionQueueEmpty' | 'documentLibraryFreshnessFresh' | 'documentLibraryFreshnessAging' | 'documentLibraryFreshnessStale' | 'documentLibrarySelectAll' | 'documentLibrarySelectColumn' | 'documentLibraryTypeColumn' | 'documentLibraryNameColumn' | 'documentLibraryVersionColumn' | 'documentLibraryOwnerColumn' | 'documentLibraryTagsColumn' | 'documentLibraryFreshnessColumn' | 'documentLibraryUpdatedColumn' | 'documentLibraryLabel' | 'documentLibraryEmptyHeading' | 'documentLibraryNoMatchesHeading' | 'documentLibrarySearchPlaceholder' | 'documentLibraryFilterByTag' | 'documentLibraryClearSelection' | 'documentLibrarySelectedCount' | 'documentCompareNoVersion' | 'documentCompareLabel' | 'agentRunCurrentStepLabel' | 'graphQueryHopRangeInvalid' | 'graphQueryRelationshipTypeLabel' | 'graphQueryNodeTypeLabel' | 'graphQueryBuilderLabel' | 'graphQueryStartLabel' | 'graphQueryEndLabel' | 'graphQueryMinHopsLabel' | 'graphQueryMaxHopsLabel' | 'graphQueryDirectionLabel' | 'graphQueryRun' | 'graphQuerySavedQueriesLabel' | 'graphQuerySaveNameLabel' | 'graphQuerySaveButton' | 'graphQueryLoadWithContext' | 'filterBarReset' | 'filterBarActiveFilters' | 'drilldownDocuments' | 'drilldownRuns' | 'drilldownEmpty' | 'evaluationRunStatusIdle' | 'evaluationRunStatusWaitingInput' | 'evaluationRunStatusWaitingApproval' | 'evaluationRunStatusCancelled' | 'evaluationRunGroundingHeading' | 'evaluationRunToolTraceHeading' | 'evaluationRunInputHeading' | 'evaluationRunOutputHeading' | 'evaluationRunLabel' | 'evaluationRunProgressLabel' | 'retrievalFilterChipLabel' | 'retrievalSearchEmptyDescription' | 'groundingSummaryEvidenceSpan' | 'contextInspectorTruncatedCount' | 'contextInspectorSegmentTokens' | 'knowledgeBaseDocumentCount' | 'knowledgeBaseRowActionsLabel' | 'knowledgeBaseEmptyDescription' | 'ingestionChunkCount' | 'ingestionItemProgressLabel' | 'ingestionEmbeddedOfTotal' | 'ingestionAttemptCount' | 'ingestionRetryWithContext' | 'ingestionCancelWithContext' | 'documentLibrarySelectDocument' | 'agentRunStatusAnnounce' | 'graphQueryDeleteWithContext' | 'evaluationRunExampleLabel' | 'evaluationRunExampleStartedAnnounce' | 'evaluationRunExampleCompletedAnnounce' | 'evaluationRunExampleFailedAnnounce' | 'evaluationRunExampleCancelledAnnounce' | 'evaluationRunExampleWaitingInputAnnounce' | 'evaluationRunExampleWaitingApprovalAnnounce' | 'evaluationRunProgressSummary' | 'evaluationRunRunningCount' | 'evaluationRunFailedCount' | 'retrievalStageQueryRewrite' | 'retrievalStageEmbed' | 'retrievalStageRetrieve' | 'retrievalStageRerank' | 'retrievalStageFilter' | 'retrievalTraceEvidenceToggle' | 'documentCompareOldVersion' | 'documentCompareNewVersion' | 'agentRunStatusIdle' | 'agentRunStatusQueued' | 'agentRunStatusCollecting' | 'agentRunStatusWaitingInput' | 'agentRunStatusWaitingApproval' | 'agentRunStatusDone' | 'agentRunStatusCancelled' | 'localePickerLabel' | 'localePickerRequired' | 'flagLoadError' | 'moveUp' | 'moveDown' | 'reorderMovePending' | 'reorderMoveCancelled' | 'reorderItemMoved';
|
|
31
|
+
export type LyraMessageKey = 'noData' | 'graphLegendLabel' | 'legendTypeShown' | 'legendTypeHidden' | 'entityChipWithType' | 'jumpToLatest' | 'terminalLabel' | 'terminalDownload' | 'terminalHighlightLine' | 'schemaViewerIssueLimit' | 'toolParamMissingProperty' | 'toolParamBooleanUnset' | 'toolParamBooleanTrue' | 'toolParamBooleanFalse' | 'toolParamSchemaLimit' | 'testResultsLimit' | 'toolTimelineLimit' | 'toolSelectLimit' | 'sequenceStripEmpty' | 'sequenceStripCategoryCount' | 'sequenceStripUnnamedCategory' | 'noColumns' | 'dataGridColumnMenu' | 'dataGridPinStart' | 'dataGridPinEnd' | 'dataGridUnpin' | 'dataGridRowsPerPage' | 'dataGridTreeLimitReached' | 'loadMore' | 'viewerSearchMatchCount' | 'viewerSearchNoMatches' | 'viewerSearchActiveMatch' | 'viewerHighlightLabel' | 'tableFilterLabel' | 'tableFilterPlaceholder' | 'tableLoading' | 'tableEditCell' | 'carousel' | 'carouselLabel' | 'carouselSlide' | 'carouselSlidePosition' | 'carouselSlideAnnouncement' | 'carouselSlideAnnouncementSeparator' | 'carouselIndicators' | 'carouselGoTo' | 'imageComparerLabel' | 'zoomableFrameLabel' | 'zoomControls' | 'zoomOut' | 'zoomIn' | 'lightboxLabel' | 'lightboxImagePosition' | 'scrollerLabel' | 'chatViewportLabel' | 'newMessageCount' | 'newMessagesCount' | 'newMessages' | 'scrollPrevious' | 'scrollNext' | 'showAllColumns' | 'showFewerColumns' | 'clear' | 'openCalendar' | 'open' | 'close' | 'closeNavigation' | 'openNavigation' | 'resizeNavigation' | 'resizeColumn' | 'copy' | 'copyJson' | 'copied' | 'expand' | 'collapse' | 'expandMessage' | 'collapseMessage' | 'messageActionsLabel' | 'regenerateResponse' | 'editMessage' | 'showMore' | 'showMoreCount' | 'showLess' | 'retry' | 'remove' | 'removeWithContext' | 'playWithContext' | 'pauseWithContext' | 'loading' | 'loadingDocument' | 'calendarPreviousMonth' | 'calendarNextMonth' | 'noMatches' | 'previous' | 'next' | 'paginationLabel' | 'paginationPage' | 'paginationJumpToPage' | 'branchPickerLabel' | 'branchPrevious' | 'branchNext' | 'branchPosition' | 'paginationSummary' | 'paginationEmptySummary' | 'paginationApplied' | 'cancel' | 'confirm' | 'search' | 'circularReference' | 'items' | 'item' | 'trendOf' | 'wordCloud' | 'wordCloudLegend' | 'wordCloudWordAnnouncement' | 'comboboxLoadError' | 'comboboxSelectedOverflow' | 'promptQueueItemLabel' | 'promptQueueActionLabel' | 'notInCatalog' | 'sendMessage' | 'stopGenerating' | 'dropzoneReleaseToAdd' | 'dropzoneRejectedType' | 'fileSizeUnitB' | 'fileSizeUnitKb' | 'fileSizeUnitMb' | 'fileSizeUnitGb' | 'fileSizeUnitTb' | 'chartCategory' | 'chartTotal' | 'chartAxisTotal' | 'chartPrimaryAxis' | 'chartSecondaryAxis' | 'chartPointLabel' | 'chartPointCoordinates' | 'chartBubblePointCoordinates' | 'chartLabeledPoint' | 'resetZoom' | 'chatSending' | 'chatResponding' | 'chatFailedToSend' | 'chatFailedAnnounce' | 'chatCompleteAnnounce' | 'showMoreCollapsed' | 'expandCode' | 'collapseCode' | 'copyCode' | 'copiedToClipboard' | 'codeRegion' | 'codeRegionWithLanguage' | 'codeBlockLineLabel' | 'copyDiff' | 'diffViewOldLabel' | 'diffViewNewLabel' | 'diffViewHiddenLines' | 'diffViewTooLarge' | 'jsonArray' | 'jsonObject' | 'jsonValue' | 'jsonCopyLabel' | 'jsonExpandLabel' | 'jsonCollapseLabel' | 'jsonItemCount' | 'jsonKeyCount' | 'jsonViewerLimit' | 'untitledSource' | 'sourcePageSuffix' | 'toolCall' | 'statusPending' | 'statusRunning' | 'statusSuccess' | 'statusError' | 'statusDenied' | 'maximize' | 'restore' | 'wordCloudWord' | 'wordCloudWords' | 'promptStudioVariableName' | 'promptStudioVariableValue' | 'schemaViewerLimit' | 'subagentPanelLimit' | 'pollPause' | 'pollResume' | 'pollInactive' | 'pollRefreshing' | 'pollPaused' | 'pollPausedAnnounce' | 'pollResumedAnnounce' | 'pollRefreshingAnnounce' | 'randomContentPause' | 'randomContentResume' | 'attachmentAdd' | 'attachmentTriggerFiles' | 'attachmentTriggerImage' | 'attachmentTriggerCamera' | 'attachmentMenuFiles' | 'attachmentMenuImage' | 'attachmentMenuCamera' | 'checkboxRequired' | 'checkboxGroupRequired' | 'tokenInputRequired' | 'tokenInputEditWithContext' | 'commandPaletteLabel' | 'commandPalettePlaceholder' | 'commandPaletteEmpty' | 'commandPaletteResults' | 'iconButtonLabel' | 'codeEditorLabel' | 'calendarLabel' | 'calendarEmpty' | 'switchRequired' | 'citationHighConfidence' | 'citationMediumConfidence' | 'citationLowConfidence' | 'citationVerified' | 'citationUnverified' | 'contextMeterUsed' | 'contextMeterUsedOfTotal' | 'contextMeterLabeledSummary' | 'contextMeterSegmentLabel' | 'gaugeLabel' | 'gaugeValueLabel' | 'untitledConversation' | 'dockPanelCollapse' | 'dockPanelExpand' | 'dockPanelResize' | 'documentPreviewAlt' | 'documentPreviewUrlNotAllowed' | 'documentPreviewFailedToLoad' | 'documentPreviewResourceTooLarge' | 'documentPreviewGenericError' | 'ebookViewerLoadError' | 'ebookViewerRegionLabel' | 'ebookViewerPreviousChapter' | 'ebookViewerNextChapter' | 'fileTypeFile' | 'fileTypePdf' | 'fileTypeWord' | 'fileTypeSpreadsheet' | 'fileTypePresentation' | 'fileTypeText' | 'fileTypeCode' | 'fileTypeArchive' | 'fileTypeImage' | 'fileTypeAudio' | 'fileTypeVideo' | 'fileTypeWithSize' | 'pptxViewerLabel' | 'pptxViewerFidelityNotice' | 'pptxViewerRenderError' | 'pptxViewerPreviousSlide' | 'pptxViewerNextSlide' | 'pptxViewerSlideOf' | 'documentViewerLabel' | 'attachmentPreviewName' | 'attachmentPreviewFile' | 'documentViewerMissingSanitizer' | 'docxViewerLabel' | 'docxViewerMissingConverter' | 'svgViewerLabel' | 'htmlViewerLabel' | 'datasetViewerMissingParser' | 'datasetViewerEmpty' | 'datasetViewerCaption' | 'datasetViewerCaptionNamed' | 'contactViewerLabel' | 'contactViewerNoContacts' | 'contactViewerUnnamedContact' | 'contactViewerPhoneLabel' | 'contactViewerEmailLabel' | 'contactViewerAddressLabel' | 'contactViewerOrganization' | 'contactViewerTypedValue' | 'contactViewerAddressFormat' | 'contactViewerTypeHome' | 'contactViewerTypeWork' | 'contactViewerTypeCell' | 'contactViewerTypeVoice' | 'contactViewerTypeFax' | 'contactViewerTypeInternet' | 'contactViewerTypePreferred' | 'exportButtonLabel' | 'generationStatusElapsedSeconds' | 'generationStatusTokenCount' | 'generationStatusTokensCount' | 'generationStatusThroughput' | 'graphDataList' | 'graphItemAnnouncement' | 'navigation' | 'attachmentRetryWithContext' | 'attachmentUploadingWithContext' | 'attachmentUploadingProgress' | 'attachmentUploadingIndeterminate' | 'attachmentUploadFailed' | 'attachmentUntitledFile' | 'chartTrendIncreasing' | 'chartTrendDecreasing' | 'chartTrendFlat' | 'chartSummary' | 'chartSeriesNoData' | 'chartSummaryWithData' | 'chartSummaryEmpty' | 'chartSummarySeparator' | 'chartData' | 'chartDataSampled' | 'chartZoomUnavailable' | 'chartDataLabelsUnavailable' | 'chartStackTotalsUnavailable' | 'chart' | 'chartTypeLine' | 'chartTypeBar' | 'chartTypeScatter' | 'chartTypePie' | 'chartTypeDoughnut' | 'chartTypeRadar' | 'chartTypePolarArea' | 'chartTypeBubble' | 'boxPlotSeriesSummary' | 'boxPlotSummaryWithData' | 'boxPlotSummaryEmpty' | 'boxPlotData' | 'chartSeriesLabel' | 'boxPlotMin' | 'boxPlotQ1' | 'boxPlotMedian' | 'boxPlotQ3' | 'boxPlotMax' | 'boxPlot' | 'histogramFrequency' | 'liteChartMarkSummary' | 'liteChartBarLabel' | 'chartValueLabel' | 'liteChartCustomMarkSummary' | 'composerLabel' | 'composerPlaceholder' | 'textareaLabel' | 'citation' | 'citationWithStatus' | 'citationWithCustomLabel' | 'comboboxOverflow' | 'comboboxRequired' | 'comboboxCreate' | 'comboboxLabel' | 'rename' | 'previousMonth' | 'nextMonth' | 'chooseDate' | 'date' | 'dateInputMinMessage' | 'dateInputMaxMessage' | 'dateInputPastDisabled' | 'dateInputFutureDisabled' | 'dateInputInvalid' | 'timeInputLabel' | 'timeInputHour' | 'timeInputMinute' | 'timeInputSecond' | 'timeInputDayPeriod' | 'timeInputEmptySegment' | 'timeInputOpen' | 'timeInputPopup' | 'timeInputNow' | 'timeInputInvalid' | 'timeInputMinMessage' | 'timeInputMaxMessage' | 'timeInputRangeMessage' | 'timeInputStepMessage' | 'documentPreviewEmpty' | 'convertingDocument' | 'documentPreviewNotAvailable' | 'documentPreviewGenericFile' | 'documentPreviewTypeDocument' | 'documentPreviewTypeImage' | 'documentPreviewTypeEmail' | 'documentPreviewTypeCalendar' | 'archiveViewerEmpty' | 'archiveViewerFolder' | 'archiveViewerFile' | 'documentPreviewTypeDataset' | 'documentPreviewTypeContact' | 'download' | 'exportFormatMenuLabel' | 'fileInputDefaultLabel' | 'fileInputAcceptedOne' | 'fileInputAcceptedMany' | 'fileInputRejectedOne' | 'fileInputRejectedMany' | 'fileInputFolderRejected' | 'fileInputRejectedType' | 'fileInputRejectedSize' | 'fileInputRejectedCount' | 'fileInputRejectedRead' | 'fileInputRejectedLimit' | 'elapsedMinutesSecondsTemplate' | 'graphNode' | 'graphLink' | 'graphDiagram' | 'graphTypedNode' | 'graphExpandableItem' | 'graphNodeFocused' | 'graphSelectionCount' | 'graphNodesHidden' | 'graphCommunity' | 'heatmapValueLabel' | 'heatmapMatrixCellLabel' | 'heatmapCalendarLabel' | 'heatmapMatrixLabel' | 'heatmapCalendarCellLabel' | 'heatmapNoDataValue' | 'heatmapDefaultRowLabel' | 'heatmapDefaultColLabel' | 'heatmapSelectedCellLabel' | 'heatmapProjectionLimit' | 'heatmapDecorationLimit' | 'inputLabel' | 'showPassword' | 'hidePassword' | 'radioRequired' | 'progress' | 'responsivePanel' | 'popover' | 'details' | 'breadcrumb' | 'timeline' | 'timelineClusterCount' | 'rating' | 'sliderLabel' | 'feedbackPositive' | 'feedbackNegative' | 'feedbackReasonsLabel' | 'feedbackCommentLabel' | 'feedbackCommentPlaceholder' | 'feedbackSubmit' | 'feedbackSubmitted' | 'colorPicker' | 'mediaCardUntitledFile' | 'mediaCardOpenName' | 'mediaCardOpenImageAttachment' | 'mediaCardOpenVideoAttachment' | 'mediaCardOpenFileAttachment' | 'mediaCardImageAttachment' | 'mediaCardVideoAttachment' | 'animatedImageDefaultAlt' | 'mentionSuggestions' | 'suggestionsLabel' | 'map' | 'model' | 'selectModel' | 'modelSelectNoModels' | 'modelSelectRequired' | 'temperature' | 'play' | 'playbackPosition' | 'playbackStepPosition' | 'videoPlayerLabel' | 'videoMute' | 'videoUnmute' | 'videoVolume' | 'videoCaptions' | 'videoCaptionsOff' | 'videoPlaybackSpeed' | 'videoPictureInPicture' | 'videoExitPictureInPicture' | 'videoEnterFullscreen' | 'videoExitFullscreen' | 'videoPlaylistLabel' | 'videoPlaylistUntitled' | 'selectValueMissing' | 'select' | 'sourceListDefaultLabel' | 'threadListLabel' | 'threadGroupPinned' | 'threadGroupToday' | 'threadGroupYesterday' | 'threadGroupPrevious7Days' | 'threadGroupPrevious30Days' | 'threadGroupArchived' | 'threadGroupExpand' | 'threadGroupCollapse' | 'pinConversation' | 'unpinConversation' | 'archiveConversation' | 'unarchiveConversation' | 'deleteConversation' | 'searchThreads' | 'threadListMatchAnnounce' | 'threadListEmpty' | 'agentWorkspaceLabel' | 'agentWorkspaceConversation' | 'agentWorkspaceDetails' | 'agentWorkspaceRun' | 'agentWorkspaceTools' | 'agentWorkspaceRetrieval' | 'agentWorkspaceGrounding' | 'agentWorkspaceContext' | 'agentWorkspaceEmpty' | 'ragAnswerLabel' | 'ragAnswerCitations' | 'ragAnswerSources' | 'ragAnswerRetry' | 'evaluationDashboardLabel' | 'evaluationDashboardRunsLabel' | 'evaluationDashboardNoRuns' | 'approvalQueueLabel' | 'approvalQueueEmpty' | 'approvalQueueOpen' | 'approvalQueuePendingCount' | 'approvalQueuePending' | 'embeddingExplorerLabel' | 'embeddingExplorerEmpty' | 'embeddingExplorerPoint' | 'knowledgeBaseAdminLabel' | 'knowledgeBaseAdminSourcesTab' | 'knowledgeBaseAdminIngestionTab' | 'resizeDivider' | 'trendUnchanged' | 'statTrendIncreased' | 'statTrendDecreased' | 'statTrendGood' | 'statTrendBad' | 'statTrendAnnouncement' | 'streamStalled' | 'streamStallAnnounce' | 'streamRecoverAnnounce' | 'streamStallClearedAnnounce' | 'thinkingPanelLabel' | 'messagePartsLabel' | 'messagePartError' | 'messagePartRetry' | 'promptQueueLabel' | 'promptQueueEmpty' | 'promptQueueSendNow' | 'selectionToolbarLabel' | 'selectionAsk' | 'selectionQuote' | 'selectionCite' | 'promptInputLabel' | 'promptInputControls' | 'promptInputSources' | 'promptInputAttachments' | 'mcpAppLabel' | 'mcpAppUnavailable' | 'mcpAppLoading' | 'taskListLabel' | 'taskListCompletedOfTotal' | 'taskListStepStartedAnnounce' | 'taskListStepCompletedAnnounce' | 'taskListStepFailedAnnounce' | 'activityFeedLabel' | 'activityFeedCompletedSteps' | 'activityFeedCompletedStep' | 'handoffLabel' | 'handoffToAgent' | 'handoffFromToAgent' | 'usageBadgeLabel' | 'usageBadgeTokensIn' | 'usageBadgeTokensOut' | 'usageBadgeTokensInLabel' | 'usageBadgeTokensOutLabel' | 'usageBadgeTotalTokensLabel' | 'usageBadgeCostLabel' | 'usageBadgeLatencyLabel' | 'checkpointLabel' | 'checkpointRestore' | 'checkpointRestoreWithContext' | 'checkpointRestoring' | 'checkpointConfirmPrompt' | 'thoughtFor' | 'thinking' | 'rangeStart' | 'rangeEnd' | 'calloutAnnouncementWithContext' | 'closeWithContext' | 'closeWithTruncatedContext' | 'toastContentIncomplete' | 'toastOverflow' | 'toolApprovalHeading' | 'toolApprovalGenericTool' | 'toolApprovalArgsLabel' | 'confirmApproved' | 'confirmDenied' | 'confirmApprovedAnnounce' | 'confirmDeniedAnnounce' | 'deny' | 'edit' | 'approve' | 'invalidJson' | 'fieldRequired' | 'fieldMustBeString' | 'fieldMustBeNumber' | 'fieldMustBeInteger' | 'fieldMustBeBoolean' | 'unsupportedFieldType' | 'fieldMustBeOneOf' | 'fieldMustEqual' | 'schemaMustBeObject' | 'schemaPropertiesMustBeFlat' | 'valueMustBeSerializable' | 'valueInvalid' | 'phoneInputLabel' | 'phoneInputIncomplete' | 'otpInputIncomplete' | 'otpInputLabel' | 'numberInputIncrease' | 'numberInputDecrease' | 'textareaCharacterCount' | 'textareaCharactersRemaining' | 'copyFailed' | 'colorPickerSaturationBrightness' | 'colorPickerSaturationBrightnessValue' | 'colorPickerHue' | 'colorPickerHueValue' | 'colorPickerOpacity' | 'colorPickerOpacityValue' | 'colorPickerValueField' | 'colorPickerToggleFormat' | 'colorPickerEyeDropper' | 'colorPickerSwatches' | 'colorPickerSwatch' | 'colorPickerCurrentValue' | 'selectSelectedOverflow' | 'iconLoadError' | 'iconTooLarge' | 'iconSanitizerMissing' | 'paginationFirstPage' | 'paginationLastPage' | 'accessibleLabelSeparator' | 'durationMilliseconds' | 'durationSeconds' | 'selectTools' | 'searchToolsPlaceholder' | 'useDefaultTools' | 'toolSelectCustomizeHint' | 'noMatchesQuery' | 'toolSelectNoneAvailable' | 'toolSelectSummary' | 'toolCount' | 'otherCategory' | 'widgetFullscreenPanel' | 'widgetViewGroup' | 'widgetExitFullscreen' | 'widgetExpandToFullscreen' | 'widgetCollapse' | 'widgetExpand' | 'menuLabel' | 'pause' | 'kbdEscapeVisual' | 'kbdEscapeWord' | 'kbdTabWord' | 'kbdSpaceWord' | 'kbdDeleteVisual' | 'kbdDeleteWord' | 'kbdHomeWord' | 'kbdEndWord' | 'kbdPageUpVisual' | 'kbdPageUpWord' | 'kbdPageDownVisual' | 'kbdPageDownWord' | 'kbdEnterWord' | 'kbdBackspaceWord' | 'kbdArrowUpWord' | 'kbdArrowDownWord' | 'kbdArrowLeftWord' | 'kbdArrowRightWord' | 'kbdPlusWord' | 'kbdMinusWord' | 'kbdCommandWord' | 'kbdControlVisual' | 'kbdControlWord' | 'kbdOptionWord' | 'kbdAltWord' | 'kbdShiftWord' | 'emailViewerLabel' | 'emailViewerMissingParser' | 'emailViewerFrom' | 'emailViewerTo' | 'emailViewerSubject' | 'emailViewerDate' | 'emailViewerAttachments' | 'emailViewerNoSubject' | 'emailViewerOpenAttachment' | 'emailViewerShowQuoted' | 'emailViewerHideQuoted' | 'emailViewerGroupAddress' | 'calendarViewerLabel' | 'calendarViewerMissingParser' | 'calendarViewerEmpty' | 'calendarViewerNoSummary' | 'pdfViewerLabel' | 'pdfViewerMissingLibrary' | 'qrCodeMissingLibrary' | 'qrCodeGenerationFailed' | 'mapMissingLibrary' | 'mapStyleRequired' | 'mapWebglUnavailable' | 'mapInitializationFailed' | 'mapLegend' | 'chartMissingLibrary' | 'boxPlotMissingLibrary' | 'graphMissingLibrary' | 'pdfViewerPageOf' | 'pdfViewerZoomIn' | 'pdfViewerZoomOut' | 'pdfViewerCurrentZoom' | 'pdfViewerPreviousPage' | 'pdfViewerNextPage' | 'anchorJumped' | 'anchorJumpedToPage' | 'anchorNotFound' | 'highlightLayerLabel' | 'highlightWithLabel' | 'cellHighlightWithLabel' | 'highlightOfTotal' | 'pageRailLabel' | 'pageRailPage' | 'pageRailPageHighlighted' | 'spreadsheetViewerUnavailable' | 'csvViewerUnavailable' | 'csvViewerLabel' | 'spreadsheetViewerLabel' | 'knownDateDay' | 'knownDateMonth' | 'knownDateYear' | 'skipToContent' | 'tourSkip' | 'tourDone' | 'tourStepOf' | 'emojiPickerSearchLabel' | 'emojiPickerGridLabel' | 'emojiPickerEmpty' | 'emojiPickerLoadError' | 'emojiPickerGroupSmileysEmotion' | 'emojiPickerGroupPeopleBody' | 'emojiPickerGroupComponent' | 'emojiPickerGroupAnimalsNature' | 'emojiPickerGroupFoodDrink' | 'emojiPickerGroupTravelPlaces' | 'emojiPickerGroupActivities' | 'emojiPickerGroupObjects' | 'emojiPickerGroupSymbols' | 'emojiPickerGroupFlags' | 'emojiPickerGroupUnknown' | 'pushToTalkRequesting' | 'pushToTalkDenied' | 'pushToTalkError' | 'pushToTalkUnsupported' | 'pushToTalkStarted' | 'pushToTalkStopped' | 'pushToTalkCancelled' | 'pushToTalkHold' | 'pushToTalkStart' | 'pushToTalkStop' | 'traceTree' | 'traceTreeSpanStatus' | 'traceTreeMetricLabel' | 'spanProjectionLimit' | 'agentTraceFilterLabel' | 'spanKindAgent' | 'spanKindLlm' | 'spanKindTool' | 'spanKindRetriever' | 'spanKindEmbedding' | 'spanKindOther' | 'tokensIn' | 'tokensOut' | 'cost' | 'duration' | 'spanWaterfall' | 'spanStartedAtOffset' | 'rubricSubmit' | 'rubricSubmitAndNext' | 'rubricSkip' | 'compareResponseA' | 'compareResponseB' | 'compareVoteLabel' | 'compareVoteBetter' | 'compareVoteTie' | 'compareVoteBothBad' | 'compareVoteRecorded' | 'comparePanel' | 'audioVisualizerLabel' | 'audioVisualizerIdle' | 'audioVisualizerListening' | 'audioVisualizerThinking' | 'audioVisualizerSpeaking' | 'treeNodeMoved' | 'fileTreeLabel' | 'fileTreeDiffSummary' | 'gitStatusAdded' | 'gitStatusModified' | 'gitStatusDeleted' | 'gitStatusRenamed' | 'gitStatusUntracked' | 'gitStatusConflicted' | 'gitStatusIgnored' | 'imageViewerLabel' | 'imageViewerFailedToLoad' | 'imageViewerRotate' | 'imageViewerFitLabel' | 'imageViewerFitContain' | 'imageViewerFitWidth' | 'imageViewerFitActual' | 'imageViewerAnnotate' | 'imageViewerHighlightsLabel' | 'imageViewerUnlabeledHighlight' | 'imageViewerAnnotationHint' | 'imageViewerAnnotationBoxPosition' | 'imageViewerAnnotationAdded' | 'imageViewerAnnotationCancelled' | 'transcriptFeedLabel' | 'transcriptFeedEmpty' | 'transcriptFeedInterim' | 'commitCardLabel' | 'commitCardCopyHash' | 'commitCardDiffSummary' | 'commitCardShowFiles' | 'commitCardHideFiles' | 'stackTraceLabel' | 'stackTraceLimit' | 'stackTraceShowFrames' | 'stackTraceHideFrames' | 'statusSkipped' | 'testResultsLabel' | 'testResultsPassed' | 'testResultsFailed' | 'testResultsSkipped' | 'testResultsRunning' | 'testResultsFilterLabel' | 'testResultsCompleteAnnounce' | 'testResultsExpandTest' | 'testResultsCollapseTest' | 'envListLabel' | 'envListReveal' | 'envListHide' | 'envListValueHidden' | 'envListCopy' | 'voice' | 'voicePickerNoVoices' | 'voicePickerRequired' | 'voicePickerPreview' | 'voicePickerStopPreview' | 'avPlayerLabel' | 'avPlayerFailedToLoad' | 'avPlayerTranscript' | 'avPlayerTimeline' | 'avPlayerPlaybackRate' | 'avPlayerRateOption' | 'avPlayerPosition' | 'attachmentTriggerAudio' | 'attachmentMenuAudio' | 'browserFrameLabel' | 'browserFrameUrlLabel' | 'browserFrameViewOf' | 'browserFrameTakeOver' | 'browserFrameHandBack' | 'browserFrameStop' | 'browserFrameStatusIdle' | 'browserFrameStatusConnecting' | 'browserFrameStatusLive' | 'browserFrameStatusStalled' | 'browserFrameControllerAgent' | 'browserFrameControllerUser' | 'notebookViewerLabel' | 'notebookViewerInvalid' | 'notebookViewerUnsupportedVersion' | 'notebookViewerTooManyCells' | 'notebookViewerInPrompt' | 'notebookViewerInPromptEmpty' | 'notebookViewerCodeCell' | 'notebookViewerMarkdownCell' | 'notebookViewerRawCell' | 'notebookViewerErrorOutput' | 'notebookViewerShowAllOutput' | 'notebookViewerCollapseOutput' | 'notebookViewerUnrenderedOutput' | 'xmlViewerLabel' | 'xmlViewerParseError' | 'xmlViewerTooManyNodes' | 'xmlViewerChildCount' | 'xmlViewerCopyDocument' | 'xmlViewerCopyNode' | 'xmlViewerExpandNode' | 'xmlViewerCollapseNode' | 'artifactPanelLabel' | 'artifactPanelPreview' | 'artifactPanelCode' | 'artifactPanelPreviousVersion' | 'artifactPanelNextVersion' | 'artifactPanelVersionPosition' | 'artifactPanelRestore' | 'artifactPanelGenerating' | 'resultFieldLabel' | 'geojsonViewLabel' | 'geojsonViewInvalid' | 'geojsonViewFeatureCount' | 'geojsonViewMissingMapLibrary' | 'mindMapLabel' | 'mindMapTopicStatus' | 'mindMapLeafStatus' | 'mindMapExpanded' | 'mindMapCollapsed' | 'entityDegree' | 'entityCommunity' | 'focusInGraph' | 'untitledEntity' | 'untitledCommunity' | 'communityMemberCount' | 'communityDrillIn' | 'selectAllSources' | 'sourcePickerSelection' | 'provenancePanelLabel' | 'provenanceEntities' | 'provenanceRelationships' | 'provenanceCommunities' | 'provenanceChunks' | 'provenanceEmpty' | 'chunkInspectorLabel' | 'chunkScore' | 'scoreTierHigh' | 'scoreTierMedium' | 'scoreTierLow' | 'chunkInspectorEmpty' | 'flowCanvasLabel' | 'flowCanvasLayoutLimit' | 'flowCanvasSummary' | 'flowNode' | 'flowEdge' | 'flowEdgeWithLabel' | 'flowItemAnnouncement' | 'dashboardGridLabel' | 'dashboardCellCollisionRejected' | 'dashboardCellMoved' | 'dashboardCellResized' | 'flowEdgeList' | 'flowNodeSelected' | 'flowNodeDeselected' | 'flowSelectionCleared' | 'flowNodeMoved' | 'flowConnectStarted' | 'flowConnectTarget' | 'flowConnectCommitted' | 'flowConnectCancelled' | 'zoomToFit' | 'flowLockCanvas' | 'flowControlsLabel' | 'flowMinimapLabel' | 'flowMinimapViewport' | 'flowMinimapInstructions' | 'flowMinimapViewportChanged' | 'nodePaletteLabel' | 'nodePalettePlaceholder' | 'nodePaletteEmpty' | 'nodePaletteDragHint' | 'nodePaletteResultCount' | 'retrievalResultsSelectRow' | 'pathStripLabel' | 'pathNodeStatus' | 'pathRelationStatus' | 'flowInputHandle' | 'flowOutputHandle' | 'flowStatusWithDuration' | 'flowStatusWithDetail' | 'neighborListLabel' | 'neighborRowLabel' | 'neighborDirectionIn' | 'neighborDirectionOut' | 'neighborDirectionBoth' | 'neighborExpand' | 'neighborListEmpty' | 'neighborGroupHeader' | 'flowRunStatusLabel' | 'flowRunSummary' | 'flowRunStepStatus' | 'flowRunStatusCount' | 'policySummaryLabel' | 'policySummaryAllowCount' | 'policySummaryDenyCount' | 'policySummaryNeedsReviewCount' | 'policySummaryStateAllow' | 'policySummaryStateDeny' | 'policySummaryStateNeedsReview' | 'policySummaryCategoryGuardrail' | 'policySummaryCategoryPermission' | 'policySummaryCategoryPrivacy' | 'policySummaryCategoryTool' | 'policySummaryDetailLabel' | 'evalDatasetLabel' | 'evalDatasetAddExample' | 'evalDatasetRemoveExample' | 'evalDatasetImportLabel' | 'evalDatasetSearchLabel' | 'evalDatasetTagFilterLabel' | 'evalDatasetEmpty' | 'evalDatasetNoMatches' | 'evalDatasetColumnInput' | 'evalDatasetColumnExpectedOutput' | 'evalDatasetColumnTags' | 'queryBuilderLabel' | 'queryBuilderEmpty' | 'queryBuilderNoFields' | 'queryBuilderAddCondition' | 'queryBuilderRemoveCondition' | 'queryBuilderFieldLabel' | 'queryBuilderFieldPlaceholder' | 'queryBuilderOperatorLabel' | 'queryBuilderOperatorPlaceholder' | 'queryBuilderValueLabel' | 'queryBuilderValuePlaceholder' | 'queryBuilderCombinatorLabel' | 'queryBuilderCombinatorAnd' | 'queryBuilderCombinatorOr' | 'queryBuilderBooleanTrue' | 'queryBuilderBooleanFalse' | 'queryBuilderOperatorEquals' | 'queryBuilderOperatorNotEquals' | 'queryBuilderOperatorGreaterThan' | 'queryBuilderOperatorGreaterThanOrEqual' | 'queryBuilderOperatorLessThan' | 'queryBuilderOperatorLessThanOrEqual' | 'queryBuilderOperatorAfter' | 'queryBuilderOperatorOnOrAfter' | 'queryBuilderOperatorBefore' | 'queryBuilderOperatorOnOrBefore' | 'queryBuilderOperatorContains' | 'queryBuilderOperatorStartsWith' | 'queryBuilderOperatorEndsWith' | 'queryBuilderOperatorIn' | 'queryBuilderOperatorNotIn' | 'queryBuilderOperatorIsEmpty' | 'queryBuilderOperatorIsNotEmpty' | 'memoryPanelLabel' | 'memoryPanelShortTermHeading' | 'memoryPanelLongTermHeading' | 'memoryPanelAdd' | 'memoryPanelAddWithContext' | 'memoryPanelForgetAll' | 'memoryPanelConfirmAddHeading' | 'memoryPanelConfirmRemoveHeading' | 'memoryPanelConfirmForgetHeading' | 'memoryPanelConfirmForgetBody' | 'graphExplorerLabel' | 'graphExplorerSearchPlaceholder' | 'graphExplorerSearchResultsLabel' | 'graphExplorerPin' | 'graphExplorerUnpin' | 'graphExplorerPinned' | 'graphExplorerUnpinned' | 'graphExplorerPinnedHeading' | 'graphExplorerFindPath' | 'retrievalModeVector' | 'retrievalModeKeyword' | 'retrievalModeHybrid' | 'retrievalSearchLabel' | 'retrievalModeLabel' | 'retrievalFiltersLabel' | 'groundingSummaryLabel' | 'groundingSummaryEmpty' | 'groundingSummarySupportedLabel' | 'groundingSummaryUnsupportedLabel' | 'groundingSummaryCoverageLabel' | 'groundingSummaryConfidenceLabel' | 'groundingSummaryWarningsHeading' | 'groundingSummaryEvidenceHeading' | 'claimEvidenceLabel' | 'claimEvidenceEmpty' | 'claimEvidenceSupported' | 'claimEvidencePartiallySupported' | 'claimEvidenceUnsupported' | 'claimEvidenceContradicted' | 'claimEvidenceConfidence' | 'retrievalCompareLabel' | 'retrievalCompareEmpty' | 'retrievalCompareOverlap' | 'retrievalCompareRank' | 'retrievalCompareDenseScore' | 'retrievalCompareSparseScore' | 'retrievalCompareRerankScore' | 'retrievalCompareFinalScore' | 'ragEvalDashboardLabel' | 'ragEvalDashboardEmpty' | 'ragEvalDashboardRuns' | 'ragEvalDashboardSlices' | 'ragEvalDashboardAllSlices' | 'ragEvalDashboardSliceUnavailable' | 'promptStudioLabel' | 'promptStudioMessages' | 'promptStudioVariables' | 'promptStudioVersions' | 'promptStudioPreview' | 'promptStudioRun' | 'promptStudioSave' | 'promptStudioAddMessage' | 'promptStudioRemoveMessage' | 'promptStudioMessageRole' | 'promptStudioMessageContent' | 'promptStudioRoleSystem' | 'promptStudioRoleUser' | 'promptStudioRoleAssistant' | 'promptStudioRoleTool' | 'schemaViewerLabel' | 'schemaViewerEmpty' | 'schemaViewerRequired' | 'schemaViewerCircular' | 'schemaViewerType' | 'subagentPanelLabel' | 'subagentPanelEmpty' | 'subagentPanelRetry' | 'subagentPanelCancelRun' | 'subagentPanelRetryRun' | 'toolTimelineDetailsFor' | 'realtimeSessionLabel' | 'realtimeSessionDisconnected' | 'realtimeSessionConnecting' | 'realtimeSessionConnected' | 'realtimeSessionReconnecting' | 'realtimeSessionError' | 'realtimeSessionConnect' | 'realtimeSessionDisconnect' | 'realtimeSessionMute' | 'realtimeSessionUnmute' | 'realtimeSessionInterrupt' | 'realtimeSessionConnectionFailed' | 'contextInspectorRedacted' | 'contextInspectorTruncated' | 'contextInspectorLabel' | 'contextInspectorEmpty' | 'contextInspectorCopyLabel' | 'knowledgeBaseSyncIdle' | 'knowledgeBaseSyncSyncing' | 'knowledgeBaseSyncPaused' | 'knowledgeBaseSyncSynced' | 'knowledgeBaseSyncError' | 'knowledgeBaseHealthHealthy' | 'knowledgeBaseHealthDegraded' | 'knowledgeBaseHealthFailed' | 'knowledgeBaseHealthUnknown' | 'knowledgeBasePermissionOwner' | 'knowledgeBasePermissionEditor' | 'knowledgeBasePermissionViewer' | 'knowledgeBasePermissionRestricted' | 'knowledgeBaseNeverSynced' | 'knowledgeBaseSyncAction' | 'knowledgeBasePauseAction' | 'knowledgeBaseDeleteAction' | 'knowledgeBaseNameColumn' | 'knowledgeBaseSyncColumn' | 'knowledgeBaseHealthColumn' | 'knowledgeBasePermissionColumn' | 'knowledgeBaseActionsColumn' | 'knowledgeBaseTotalSources' | 'knowledgeBaseSyncedSources' | 'knowledgeBaseSyncingSources' | 'knowledgeBaseNeedsAttention' | 'knowledgeBaseHeading' | 'knowledgeBaseCreateSource' | 'knowledgeBaseEmptyHeading' | 'ingestionStageQueued' | 'ingestionStageUploading' | 'ingestionStageExtracting' | 'ingestionStageChunking' | 'ingestionStageEmbedding' | 'ingestionStageIndexing' | 'ingestionStageDone' | 'ingestionStageFailed' | 'ingestionStageCancelled' | 'ingestionQueueLabel' | 'ingestionQueueEmpty' | 'documentLibraryFreshnessFresh' | 'documentLibraryFreshnessAging' | 'documentLibraryFreshnessStale' | 'documentLibrarySelectAll' | 'documentLibrarySelectColumn' | 'documentLibraryTypeColumn' | 'documentLibraryNameColumn' | 'documentLibraryVersionColumn' | 'documentLibraryOwnerColumn' | 'documentLibraryTagsColumn' | 'documentLibraryFreshnessColumn' | 'documentLibraryUpdatedColumn' | 'documentLibraryLabel' | 'documentLibraryEmptyHeading' | 'documentLibraryNoMatchesHeading' | 'documentLibrarySearchPlaceholder' | 'documentLibraryFilterByTag' | 'documentLibraryClearSelection' | 'documentLibrarySelectedCount' | 'documentCompareNoVersion' | 'documentCompareLabel' | 'agentRunCurrentStepLabel' | 'graphQueryHopRangeInvalid' | 'graphQueryRelationshipTypeLabel' | 'graphQueryNodeTypeLabel' | 'graphQueryBuilderLabel' | 'graphQueryStartLabel' | 'graphQueryEndLabel' | 'graphQueryMinHopsLabel' | 'graphQueryMaxHopsLabel' | 'graphQueryDirectionLabel' | 'graphQueryRun' | 'graphQuerySavedQueriesLabel' | 'graphQuerySaveNameLabel' | 'graphQuerySaveButton' | 'graphQueryLoadWithContext' | 'filterBarReset' | 'filterBarActiveFilters' | 'drilldownDocuments' | 'drilldownRuns' | 'drilldownEmpty' | 'evaluationRunStatusIdle' | 'evaluationRunStatusWaitingInput' | 'evaluationRunStatusWaitingApproval' | 'evaluationRunStatusCancelled' | 'evaluationRunGroundingHeading' | 'evaluationRunToolTraceHeading' | 'evaluationRunInputHeading' | 'evaluationRunOutputHeading' | 'evaluationRunLabel' | 'evaluationRunProgressLabel' | 'retrievalFilterChipLabel' | 'retrievalSearchEmptyDescription' | 'groundingSummaryEvidenceSpan' | 'contextInspectorTruncatedCount' | 'contextInspectorSegmentTokens' | 'knowledgeBaseDocumentCount' | 'knowledgeBaseRowActionsLabel' | 'knowledgeBaseEmptyDescription' | 'ingestionChunkCount' | 'ingestionItemProgressLabel' | 'ingestionEmbeddedOfTotal' | 'ingestionAttemptCount' | 'ingestionRetryWithContext' | 'ingestionCancelWithContext' | 'documentLibrarySelectDocument' | 'agentRunStatusAnnounce' | 'graphQueryDeleteWithContext' | 'evaluationRunExampleLabel' | 'evaluationRunExampleStartedAnnounce' | 'evaluationRunExampleCompletedAnnounce' | 'evaluationRunExampleFailedAnnounce' | 'evaluationRunExampleCancelledAnnounce' | 'evaluationRunExampleWaitingInputAnnounce' | 'evaluationRunExampleWaitingApprovalAnnounce' | 'evaluationRunProgressSummary' | 'evaluationRunRunningCount' | 'evaluationRunFailedCount' | 'retrievalStageQueryRewrite' | 'retrievalStageEmbed' | 'retrievalStageRetrieve' | 'retrievalStageRerank' | 'retrievalStageFilter' | 'retrievalTraceEvidenceToggle' | 'documentCompareOldVersion' | 'documentCompareNewVersion' | 'agentRunStatusIdle' | 'agentRunStatusQueued' | 'agentRunStatusCollecting' | 'agentRunStatusWaitingInput' | 'agentRunStatusWaitingApproval' | 'agentRunStatusDone' | 'agentRunStatusCancelled' | 'localePickerLabel' | 'localePickerRequired' | 'flagLoadError' | 'moveUp' | 'moveDown' | 'reorderMovePending' | 'reorderMoveCancelled' | 'reorderItemMoved';
|
|
32
32
|
/**
|
|
33
33
|
* Message-catalog input. Registration and per-instance `.strings` assignment snapshot eligible
|
|
34
34
|
* own data properties; retained catalogs are immutable, so reassign or re-register to publish a
|