#
tokens: 49772/50000 4/1630 files (page 84/186)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 84 of 186. Use http://codebase.md/xmlui-org/xmlui/xmlui/tools/vscode/resources/xmlui-markup-syntax-highlighting.png?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .changeset
│   ├── config.json
│   └── cyan-tools-design.md
├── .eslintrc.cjs
├── .github
│   ├── build-checklist.png
│   ├── ISSUE_TEMPLATE
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   └── workflows
│       ├── deploy-blog-optimized.yml
│       ├── deploy-blog-swa.yml
│       ├── deploy-blog.yml
│       ├── deploy-docs-optimized.yml
│       ├── deploy-docs-swa.yml
│       ├── deploy-docs.yml
│       ├── prepare-versions.yml
│       ├── release-packages.yml
│       ├── run-all-tests.yml
│       └── run-smoke-tests.yml
├── .gitignore
├── .prettierrc.js
├── .vscode
│   ├── launch.json
│   └── settings.json
├── blog
│   ├── .gitignore
│   ├── .gitkeep
│   ├── CHANGELOG.md
│   ├── extensions.ts
│   ├── index.html
│   ├── index.ts
│   ├── package.json
│   ├── public
│   │   ├── blog
│   │   │   ├── images
│   │   │   │   ├── an-advanced-codefence.gif
│   │   │   │   ├── an-advanced-codefence.mp4
│   │   │   │   ├── blog-page-component.png
│   │   │   │   ├── blog-scrabble.png
│   │   │   │   ├── codefence-runner.png
│   │   │   │   ├── integrated-blog-search.png
│   │   │   │   ├── lorem-ipsum.png
│   │   │   │   ├── playground-checkbox-source.png
│   │   │   │   ├── playground.png
│   │   │   │   ├── use-xmlui-mcp-to-find-a-howto.png
│   │   │   │   └── xmlui-demo-gallery.png
│   │   │   ├── introducing-xmlui.md
│   │   │   ├── lorem-ipsum.md
│   │   │   ├── newest-post.md
│   │   │   ├── older-post.md
│   │   │   ├── xmlui-playground.md
│   │   │   └── xmlui-powered-blog.md
│   │   ├── mockServiceWorker.js
│   │   ├── resources
│   │   │   ├── favicon.ico
│   │   │   ├── files
│   │   │   │   └── for-download
│   │   │   │       └── xmlui
│   │   │   │           └── xmlui-standalone.umd.js
│   │   │   ├── github.svg
│   │   │   ├── llms.txt
│   │   │   ├── logo-dark.svg
│   │   │   ├── logo.svg
│   │   │   ├── pg-popout.svg
│   │   │   ├── rss.svg
│   │   │   └── xmlui-logo.svg
│   │   ├── serve.json
│   │   ├── staticwebapp.config.json
│   │   └── web.config
│   ├── scripts
│   │   ├── download-latest-xmlui.js
│   │   ├── generate-rss.js
│   │   ├── get-releases.js
│   │   └── utils.js
│   ├── src
│   │   ├── components
│   │   │   ├── BlogOverview.xmlui
│   │   │   ├── BlogPage.xmlui
│   │   │   └── PageNotFound.xmlui
│   │   ├── config.ts
│   │   ├── Main.xmlui
│   │   └── themes
│   │       └── blog-theme.ts
│   └── tsconfig.json
├── CONTRIBUTING.md
├── docs
│   ├── .gitignore
│   ├── CHANGELOG.md
│   ├── ComponentRefLinks.txt
│   ├── content
│   │   ├── _meta.json
│   │   ├── components
│   │   │   ├── _meta.json
│   │   │   ├── _overview.md
│   │   │   ├── APICall.md
│   │   │   ├── App.md
│   │   │   ├── AppHeader.md
│   │   │   ├── AppState.md
│   │   │   ├── AutoComplete.md
│   │   │   ├── Avatar.md
│   │   │   ├── Backdrop.md
│   │   │   ├── Badge.md
│   │   │   ├── BarChart.md
│   │   │   ├── Bookmark.md
│   │   │   ├── Breakout.md
│   │   │   ├── Button.md
│   │   │   ├── Card.md
│   │   │   ├── Carousel.md
│   │   │   ├── ChangeListener.md
│   │   │   ├── Checkbox.md
│   │   │   ├── CHStack.md
│   │   │   ├── ColorPicker.md
│   │   │   ├── Column.md
│   │   │   ├── ContentSeparator.md
│   │   │   ├── CVStack.md
│   │   │   ├── DataSource.md
│   │   │   ├── DateInput.md
│   │   │   ├── DatePicker.md
│   │   │   ├── DonutChart.md
│   │   │   ├── DropdownMenu.md
│   │   │   ├── EmojiSelector.md
│   │   │   ├── ExpandableItem.md
│   │   │   ├── FileInput.md
│   │   │   ├── FileUploadDropZone.md
│   │   │   ├── FlowLayout.md
│   │   │   ├── Footer.md
│   │   │   ├── Form.md
│   │   │   ├── FormItem.md
│   │   │   ├── FormSection.md
│   │   │   ├── Fragment.md
│   │   │   ├── H1.md
│   │   │   ├── H2.md
│   │   │   ├── H3.md
│   │   │   ├── H4.md
│   │   │   ├── H5.md
│   │   │   ├── H6.md
│   │   │   ├── Heading.md
│   │   │   ├── HSplitter.md
│   │   │   ├── HStack.md
│   │   │   ├── Icon.md
│   │   │   ├── IFrame.md
│   │   │   ├── Image.md
│   │   │   ├── Items.md
│   │   │   ├── LabelList.md
│   │   │   ├── Legend.md
│   │   │   ├── LineChart.md
│   │   │   ├── Link.md
│   │   │   ├── List.md
│   │   │   ├── Logo.md
│   │   │   ├── Markdown.md
│   │   │   ├── MenuItem.md
│   │   │   ├── MenuSeparator.md
│   │   │   ├── ModalDialog.md
│   │   │   ├── NavGroup.md
│   │   │   ├── NavLink.md
│   │   │   ├── NavPanel.md
│   │   │   ├── NoResult.md
│   │   │   ├── NumberBox.md
│   │   │   ├── Option.md
│   │   │   ├── Page.md
│   │   │   ├── PageMetaTitle.md
│   │   │   ├── Pages.md
│   │   │   ├── Pagination.md
│   │   │   ├── PasswordInput.md
│   │   │   ├── PieChart.md
│   │   │   ├── ProgressBar.md
│   │   │   ├── Queue.md
│   │   │   ├── RadioGroup.md
│   │   │   ├── RealTimeAdapter.md
│   │   │   ├── Redirect.md
│   │   │   ├── Select.md
│   │   │   ├── Slider.md
│   │   │   ├── Slot.md
│   │   │   ├── SpaceFiller.md
│   │   │   ├── Spinner.md
│   │   │   ├── Splitter.md
│   │   │   ├── Stack.md
│   │   │   ├── StickyBox.md
│   │   │   ├── SubMenuItem.md
│   │   │   ├── Switch.md
│   │   │   ├── TabItem.md
│   │   │   ├── Table.md
│   │   │   ├── TableOfContents.md
│   │   │   ├── Tabs.md
│   │   │   ├── Text.md
│   │   │   ├── TextArea.md
│   │   │   ├── TextBox.md
│   │   │   ├── Theme.md
│   │   │   ├── TimeInput.md
│   │   │   ├── Timer.md
│   │   │   ├── ToneChangerButton.md
│   │   │   ├── ToneSwitch.md
│   │   │   ├── Tooltip.md
│   │   │   ├── Tree.md
│   │   │   ├── VSplitter.md
│   │   │   ├── VStack.md
│   │   │   ├── xmlui-animations
│   │   │   │   ├── _meta.json
│   │   │   │   ├── _overview.md
│   │   │   │   ├── Animation.md
│   │   │   │   ├── FadeAnimation.md
│   │   │   │   ├── FadeInAnimation.md
│   │   │   │   ├── FadeOutAnimation.md
│   │   │   │   ├── ScaleAnimation.md
│   │   │   │   └── SlideInAnimation.md
│   │   │   ├── xmlui-pdf
│   │   │   │   ├── _meta.json
│   │   │   │   ├── _overview.md
│   │   │   │   └── Pdf.md
│   │   │   ├── xmlui-spreadsheet
│   │   │   │   ├── _meta.json
│   │   │   │   ├── _overview.md
│   │   │   │   └── Spreadsheet.md
│   │   │   └── xmlui-website-blocks
│   │   │       ├── _meta.json
│   │   │       ├── _overview.md
│   │   │       ├── Carousel.md
│   │   │       ├── HelloMd.md
│   │   │       ├── HeroSection.md
│   │   │       └── ScrollToTop.md
│   │   └── extensions
│   │       ├── _meta.json
│   │       ├── xmlui-animations
│   │       │   ├── _meta.json
│   │       │   ├── _overview.md
│   │       │   ├── Animation.md
│   │       │   ├── FadeAnimation.md
│   │       │   ├── FadeInAnimation.md
│   │       │   ├── FadeOutAnimation.md
│   │       │   ├── ScaleAnimation.md
│   │       │   └── SlideInAnimation.md
│   │       └── xmlui-website-blocks
│   │           ├── _meta.json
│   │           ├── _overview.md
│   │           ├── Carousel.md
│   │           ├── FancyButton.md
│   │           ├── HeroSection.md
│   │           └── ScrollToTop.md
│   ├── extensions.ts
│   ├── index.html
│   ├── index.ts
│   ├── package.json
│   ├── public
│   │   ├── feed.rss
│   │   ├── mockServiceWorker.js
│   │   ├── pages
│   │   │   ├── _meta.json
│   │   │   ├── app-structure.md
│   │   │   ├── build-editor-component.md
│   │   │   ├── build-hello-world-component.md
│   │   │   ├── components-intro.md
│   │   │   ├── context-variables.md
│   │   │   ├── forms.md
│   │   │   ├── globals.md
│   │   │   ├── glossary.md
│   │   │   ├── helper-tags.md
│   │   │   ├── hosted-deployment.md
│   │   │   ├── howto
│   │   │   │   ├── assign-a-complex-json-literal-to-a-component-variable.md
│   │   │   │   ├── chain-a-refetch.md
│   │   │   │   ├── control-cache-invalidation.md
│   │   │   │   ├── debounce-user-input-for-api-calls.md
│   │   │   │   ├── debounce-with-changelistener.md
│   │   │   │   ├── debug-a-component.md
│   │   │   │   ├── delay-a-datasource-until-another-datasource-is-ready.md
│   │   │   │   ├── delegate-a-method.md
│   │   │   │   ├── do-custom-form-validation.md
│   │   │   │   ├── expose-a-method-from-a-component.md
│   │   │   │   ├── filter-and-transform-data-from-an-api.md
│   │   │   │   ├── group-items-in-list-by-a-property.md
│   │   │   │   ├── handle-background-operations.md
│   │   │   │   ├── hide-an-element-until-its-datasource-is-ready.md
│   │   │   │   ├── make-a-set-of-equal-width-cards.md
│   │   │   │   ├── make-a-table-responsive.md
│   │   │   │   ├── make-navpanel-width-responsive.md
│   │   │   │   ├── modify-a-value-reported-in-a-column.md
│   │   │   │   ├── paginate-a-list.md
│   │   │   │   ├── pass-data-to-a-modal-dialog.md
│   │   │   │   ├── react-to-button-click-not-keystrokes.md
│   │   │   │   ├── set-the-initial-value-of-a-select-from-fetched-data.md
│   │   │   │   ├── share-a-modaldialog-across-components.md
│   │   │   │   ├── sync-selections-between-table-and-list-views.md
│   │   │   │   ├── update-ui-optimistically.md
│   │   │   │   ├── use-built-in-form-validation.md
│   │   │   │   └── use-the-same-modaldialog-to-add-or-edit.md
│   │   │   ├── howto.md
│   │   │   ├── intro.md
│   │   │   ├── layout.md
│   │   │   ├── markup.md
│   │   │   ├── mcp.md
│   │   │   ├── modal-dialogs.md
│   │   │   ├── news-and-reviews.md
│   │   │   ├── reactive-intro.md
│   │   │   ├── refactoring.md
│   │   │   ├── routing-and-links.md
│   │   │   ├── samples
│   │   │   │   ├── color-palette.xmlui
│   │   │   │   ├── color-values.xmlui
│   │   │   │   ├── shadow-sizes.xmlui
│   │   │   │   ├── spacing-sizes.xmlui
│   │   │   │   ├── swatch.xmlui
│   │   │   │   ├── theme-gallery-brief.xmlui
│   │   │   │   └── theme-gallery.xmlui
│   │   │   ├── scoping.md
│   │   │   ├── scripting.md
│   │   │   ├── styles-and-themes
│   │   │   │   ├── common-units.md
│   │   │   │   ├── layout-props.md
│   │   │   │   ├── theme-variable-defaults.md
│   │   │   │   ├── theme-variables.md
│   │   │   │   └── themes.md
│   │   │   ├── template-properties.md
│   │   │   ├── test.md
│   │   │   ├── tutorial-01.md
│   │   │   ├── tutorial-02.md
│   │   │   ├── tutorial-03.md
│   │   │   ├── tutorial-04.md
│   │   │   ├── tutorial-05.md
│   │   │   ├── tutorial-06.md
│   │   │   ├── tutorial-07.md
│   │   │   ├── tutorial-08.md
│   │   │   ├── tutorial-09.md
│   │   │   ├── tutorial-10.md
│   │   │   ├── tutorial-11.md
│   │   │   ├── tutorial-12.md
│   │   │   ├── universal-properties.md
│   │   │   ├── user-defined-components.md
│   │   │   ├── vscode.md
│   │   │   ├── working-with-markdown.md
│   │   │   ├── working-with-text.md
│   │   │   ├── xmlui-animations
│   │   │   │   ├── _meta.json
│   │   │   │   ├── _overview.md
│   │   │   │   ├── Animation.md
│   │   │   │   ├── FadeAnimation.md
│   │   │   │   ├── FadeInAnimation.md
│   │   │   │   ├── FadeOutAnimation.md
│   │   │   │   ├── ScaleAnimation.md
│   │   │   │   └── SlideInAnimation.md
│   │   │   ├── xmlui-charts
│   │   │   │   ├── _meta.json
│   │   │   │   ├── _overview.md
│   │   │   │   ├── BarChart.md
│   │   │   │   ├── DonutChart.md
│   │   │   │   ├── LabelList.md
│   │   │   │   ├── Legend.md
│   │   │   │   ├── LineChart.md
│   │   │   │   └── PieChart.md
│   │   │   ├── xmlui-pdf
│   │   │   │   ├── _meta.json
│   │   │   │   ├── _overview.md
│   │   │   │   └── Pdf.md
│   │   │   └── xmlui-spreadsheet
│   │   │       ├── _meta.json
│   │   │       ├── _overview.md
│   │   │       └── Spreadsheet.md
│   │   ├── resources
│   │   │   ├── devdocs
│   │   │   │   ├── debug-proxy-object-2.png
│   │   │   │   ├── debug-proxy-object.png
│   │   │   │   ├── table_editor_01.png
│   │   │   │   ├── table_editor_02.png
│   │   │   │   ├── table_editor_03.png
│   │   │   │   ├── table_editor_04.png
│   │   │   │   ├── table_editor_05.png
│   │   │   │   ├── table_editor_06.png
│   │   │   │   ├── table_editor_07.png
│   │   │   │   ├── table_editor_08.png
│   │   │   │   ├── table_editor_09.png
│   │   │   │   ├── table_editor_10.png
│   │   │   │   ├── table_editor_11.png
│   │   │   │   ├── table-editor-01.png
│   │   │   │   ├── table-editor-02.png
│   │   │   │   ├── table-editor-03.png
│   │   │   │   ├── table-editor-04.png
│   │   │   │   ├── table-editor-06.png
│   │   │   │   ├── table-editor-07.png
│   │   │   │   ├── table-editor-08.png
│   │   │   │   ├── table-editor-09.png
│   │   │   │   └── xmlui-rendering-of-tiptap-markdown.png
│   │   │   ├── favicon.ico
│   │   │   ├── files
│   │   │   │   ├── clients.json
│   │   │   │   ├── daily-revenue.json
│   │   │   │   ├── dashboard-stats.json
│   │   │   │   ├── demo.xmlui
│   │   │   │   ├── demo.xmlui.xs
│   │   │   │   ├── downloads
│   │   │   │   │   └── downloads.json
│   │   │   │   ├── for-download
│   │   │   │   │   ├── index-with-api.html
│   │   │   │   │   ├── index.html
│   │   │   │   │   ├── mockApi.js
│   │   │   │   │   ├── start-darwin.sh
│   │   │   │   │   ├── start-linux.sh
│   │   │   │   │   ├── start.bat
│   │   │   │   │   └── xmlui
│   │   │   │   │       └── xmlui-standalone.umd.js
│   │   │   │   ├── getting-started
│   │   │   │   │   ├── cl-tutorial-final.zip
│   │   │   │   │   ├── cl-tutorial.zip
│   │   │   │   │   ├── cl-tutorial2.zip
│   │   │   │   │   ├── cl-tutorial3.zip
│   │   │   │   │   ├── cl-tutorial4.zip
│   │   │   │   │   ├── cl-tutorial5.zip
│   │   │   │   │   ├── cl-tutorial6.zip
│   │   │   │   │   ├── getting-started.zip
│   │   │   │   │   ├── hello-xmlui.zip
│   │   │   │   │   ├── xmlui-empty.zip
│   │   │   │   │   └── xmlui-starter.zip
│   │   │   │   ├── howto
│   │   │   │   │   └── component-icons
│   │   │   │   │       └── up-arrow.svg
│   │   │   │   ├── invoices.json
│   │   │   │   ├── monthly-status.json
│   │   │   │   ├── news-and-reviews.json
│   │   │   │   ├── products.json
│   │   │   │   ├── releases.json
│   │   │   │   ├── tutorials
│   │   │   │   │   ├── datasource
│   │   │   │   │   │   └── api.ts
│   │   │   │   │   └── p2do
│   │   │   │   │       ├── api.ts
│   │   │   │   │       └── todo-logo.svg
│   │   │   │   └── xmlui.json
│   │   │   ├── github.svg
│   │   │   ├── images
│   │   │   │   ├── apiaction-tutorial
│   │   │   │   │   ├── add-success.png
│   │   │   │   │   ├── apiaction-param.png
│   │   │   │   │   ├── change-completed.png
│   │   │   │   │   ├── change-in-progress.png
│   │   │   │   │   ├── confirm-delete.png
│   │   │   │   │   ├── data-error.png
│   │   │   │   │   ├── data-progress.png
│   │   │   │   │   ├── data-success.png
│   │   │   │   │   ├── display-1.png
│   │   │   │   │   ├── item-deleted.png
│   │   │   │   │   ├── item-updated.png
│   │   │   │   │   ├── missing-api-key.png
│   │   │   │   │   ├── new-item-added.png
│   │   │   │   │   └── test-message.png
│   │   │   │   ├── chat-api
│   │   │   │   │   └── domain-model.svg
│   │   │   │   ├── components
│   │   │   │   │   ├── image
│   │   │   │   │   │   └── breakfast.jpg
│   │   │   │   │   ├── markdown
│   │   │   │   │   │   └── colors.png
│   │   │   │   │   └── modal
│   │   │   │   │       ├── deep_link_dialog_1.jpg
│   │   │   │   │       └── deep_link_dialog_2.jpg
│   │   │   │   ├── create-apps
│   │   │   │   │   ├── collapsed-vertical.png
│   │   │   │   │   ├── using-forms-warning-dialog.png
│   │   │   │   │   └── using-forms.png
│   │   │   │   ├── datasource-tutorial
│   │   │   │   │   ├── data-with-header.png
│   │   │   │   │   ├── filtered-data.png
│   │   │   │   │   ├── filtered-items.png
│   │   │   │   │   ├── initial-page-items.png
│   │   │   │   │   ├── list-items.png
│   │   │   │   │   ├── next-page-items.png
│   │   │   │   │   ├── no-data.png
│   │   │   │   │   ├── pagination-1.jpg
│   │   │   │   │   ├── pagination-1.png
│   │   │   │   │   ├── polling-1.png
│   │   │   │   │   ├── refetch-data.png
│   │   │   │   │   ├── slow-loading.png
│   │   │   │   │   ├── test-message.png
│   │   │   │   │   ├── Thumbs.db
│   │   │   │   │   ├── unconventional-data.png
│   │   │   │   │   └── unfiltered-items.png
│   │   │   │   ├── flower.jpg
│   │   │   │   ├── get-started
│   │   │   │   │   ├── add-new-contact.png
│   │   │   │   │   ├── app-modified.png
│   │   │   │   │   ├── app-start.png
│   │   │   │   │   ├── app-with-boxes.png
│   │   │   │   │   ├── app-with-toast.png
│   │   │   │   │   ├── boilerplate-structure.png
│   │   │   │   │   ├── cl-initial.png
│   │   │   │   │   ├── cl-start.png
│   │   │   │   │   ├── contact-counts.png
│   │   │   │   │   ├── contact-dialog-title.png
│   │   │   │   │   ├── contact-dialog.png
│   │   │   │   │   ├── contact-menus.png
│   │   │   │   │   ├── contact-predicates.png
│   │   │   │   │   ├── context-menu.png
│   │   │   │   │   ├── dashboard-numbers.png
│   │   │   │   │   ├── default-contact-list.png
│   │   │   │   │   ├── delete-contact.png
│   │   │   │   │   ├── delete-task.png
│   │   │   │   │   ├── detailed-template.png
│   │   │   │   │   ├── edit-contact-details.png
│   │   │   │   │   ├── edited-contact-saved.png
│   │   │   │   │   ├── empty-sections.png
│   │   │   │   │   ├── filter-completed.png
│   │   │   │   │   ├── fullwidth-desktop.png
│   │   │   │   │   ├── fullwidth-mobile.png
│   │   │   │   │   ├── initial-table.png
│   │   │   │   │   ├── items-and-badges.png
│   │   │   │   │   ├── loading-message.png
│   │   │   │   │   ├── new-contact-button.png
│   │   │   │   │   ├── new-contact-saved.png
│   │   │   │   │   ├── no-empty-sections.png
│   │   │   │   │   ├── personal-todo-initial.png
│   │   │   │   │   ├── piechart.png
│   │   │   │   │   ├── review-today.png
│   │   │   │   │   ├── rudimentary-dashboard.png
│   │   │   │   │   ├── section-collapsed.png
│   │   │   │   │   ├── sectioned-items.png
│   │   │   │   │   ├── sections-ordered.png
│   │   │   │   │   ├── spacex-list-with-links.png
│   │   │   │   │   ├── spacex-list.png
│   │   │   │   │   ├── start-personal-todo-1.png
│   │   │   │   │   ├── submit-new-contact.png
│   │   │   │   │   ├── submit-new-task.png
│   │   │   │   │   ├── syntax-highlighting.png
│   │   │   │   │   ├── table-with-badge.png
│   │   │   │   │   ├── template-with-card.png
│   │   │   │   │   ├── test-emulated-api.png
│   │   │   │   │   ├── Thumbs.db
│   │   │   │   │   ├── todo-logo.png
│   │   │   │   │   └── xmlui-tools.png
│   │   │   │   ├── HelloApp.png
│   │   │   │   ├── HelloApp2.png
│   │   │   │   ├── logos
│   │   │   │   │   ├── xmlui1.svg
│   │   │   │   │   ├── xmlui2.svg
│   │   │   │   │   ├── xmlui3.svg
│   │   │   │   │   ├── xmlui4.svg
│   │   │   │   │   ├── xmlui5.svg
│   │   │   │   │   ├── xmlui6.svg
│   │   │   │   │   └── xmlui7.svg
│   │   │   │   ├── pdf
│   │   │   │   │   └── dummy-pdf.jpg
│   │   │   │   ├── rendering-engine
│   │   │   │   │   ├── AppEngine-flow.svg
│   │   │   │   │   ├── Component.svg
│   │   │   │   │   ├── CompoundComponent.svg
│   │   │   │   │   ├── RootComponent.svg
│   │   │   │   │   └── tree-with-containers.svg
│   │   │   │   ├── reviewers-guide
│   │   │   │   │   ├── AppEngine-flow.svg
│   │   │   │   │   └── incbutton-in-action.png
│   │   │   │   ├── tools
│   │   │   │   │   └── boilerplate-structure.png
│   │   │   │   ├── try.svg
│   │   │   │   ├── tutorial
│   │   │   │   │   ├── app-chat-history.png
│   │   │   │   │   ├── app-content-placeholder.png
│   │   │   │   │   ├── app-header-and-content.png
│   │   │   │   │   ├── app-links-channel-selected.png
│   │   │   │   │   ├── app-links-click.png
│   │   │   │   │   ├── app-navigation.png
│   │   │   │   │   ├── finished-ex01.png
│   │   │   │   │   ├── finished-ex02.png
│   │   │   │   │   ├── hello.png
│   │   │   │   │   ├── splash-screen-advanced.png
│   │   │   │   │   ├── splash-screen-after-click.png
│   │   │   │   │   ├── splash-screen-centered.png
│   │   │   │   │   ├── splash-screen-events.png
│   │   │   │   │   ├── splash-screen-expression.png
│   │   │   │   │   ├── splash-screen-reuse-after.png
│   │   │   │   │   ├── splash-screen-reuse-before.png
│   │   │   │   │   └── splash-screen.png
│   │   │   │   └── tutorial-01.png
│   │   │   ├── llms.txt
│   │   │   ├── logo-dark.svg
│   │   │   ├── logo.svg
│   │   │   ├── pg-popout.svg
│   │   │   └── xmlui-logo.svg
│   │   ├── serve.json
│   │   └── web.config
│   ├── scripts
│   │   ├── download-latest-xmlui.js
│   │   ├── generate-rss.js
│   │   ├── get-releases.js
│   │   └── utils.js
│   ├── src
│   │   ├── components
│   │   │   ├── BlogOverview.xmlui
│   │   │   ├── BlogPage.xmlui
│   │   │   ├── Boxes.xmlui
│   │   │   ├── Breadcrumb.xmlui
│   │   │   ├── ChangeLog.xmlui
│   │   │   ├── ColorPalette.xmlui
│   │   │   ├── DocumentLinks.xmlui
│   │   │   ├── DocumentPage.xmlui
│   │   │   ├── DocumentPageNoTOC.xmlui
│   │   │   ├── Icons.xmlui
│   │   │   ├── IncButton.xmlui
│   │   │   ├── IncButton2.xmlui
│   │   │   ├── NameValue.xmlui
│   │   │   ├── PageNotFound.xmlui
│   │   │   ├── PaletteItem.xmlui
│   │   │   ├── Palettes.xmlui
│   │   │   ├── SectionHeader.xmlui
│   │   │   ├── TBD.xmlui
│   │   │   ├── Test.xmlui
│   │   │   ├── ThemesIntro.xmlui
│   │   │   ├── ThousandThemes.xmlui
│   │   │   ├── TubeStops.xmlui
│   │   │   ├── TubeStops.xmlui.xs
│   │   │   └── TwoColumnCode.xmlui
│   │   ├── config.ts
│   │   ├── Main.xmlui
│   │   └── themes
│   │       ├── docs-theme.ts
│   │       ├── earthtone.ts
│   │       ├── xmlui-gray-on-default.ts
│   │       ├── xmlui-green-on-default.ts
│   │       └── xmlui-orange-on-default.ts
│   └── tsconfig.json
├── LICENSE
├── package-lock.json
├── package.json
├── packages
│   ├── tsconfig.json
│   ├── xmlui-animations
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── Animation.tsx
│   │       ├── AnimationNative.tsx
│   │       ├── FadeAnimation.tsx
│   │       ├── FadeInAnimation.tsx
│   │       ├── FadeOutAnimation.tsx
│   │       ├── index.tsx
│   │       ├── ScaleAnimation.tsx
│   │       └── SlideInAnimation.tsx
│   ├── xmlui-devtools
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   ├── src
│   │   │   ├── devtools
│   │   │   │   ├── DevTools.tsx
│   │   │   │   ├── DevToolsNative.module.scss
│   │   │   │   ├── DevToolsNative.tsx
│   │   │   │   ├── ModalDialog.module.scss
│   │   │   │   ├── ModalDialog.tsx
│   │   │   │   ├── ModalVisibilityContext.tsx
│   │   │   │   ├── Tooltip.module.scss
│   │   │   │   ├── Tooltip.tsx
│   │   │   │   └── utils.ts
│   │   │   ├── editor
│   │   │   │   └── Editor.tsx
│   │   │   └── index.tsx
│   │   └── vite.config-overrides.ts
│   ├── xmlui-hello-world
│   │   ├── .gitignore
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── HelloWorld.module.scss
│   │       ├── HelloWorld.tsx
│   │       ├── HelloWorldNative.tsx
│   │       └── index.tsx
│   ├── xmlui-os-frames
│   │   ├── .gitignore
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── index.tsx
│   │       ├── IPhoneFrame.module.scss
│   │       ├── IPhoneFrame.tsx
│   │       ├── MacOSAppFrame.module.scss
│   │       ├── MacOSAppFrame.tsx
│   │       ├── WindowsAppFrame.module.scss
│   │       └── WindowsAppFrame.tsx
│   ├── xmlui-pdf
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── demo
│   │   │   ├── components
│   │   │   │   └── Pdf.xmlui
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── index.tsx
│   │       ├── LazyPdfNative.tsx
│   │       ├── Pdf.module.scss
│   │       └── Pdf.tsx
│   ├── xmlui-playground
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── hooks
│   │       │   ├── usePlayground.ts
│   │       │   └── useToast.ts
│   │       ├── index.tsx
│   │       ├── playground
│   │       │   ├── Box.module.scss
│   │       │   ├── Box.tsx
│   │       │   ├── CodeSelector.module.scss
│   │       │   ├── CodeSelector.tsx
│   │       │   ├── ConfirmationDialog.module.scss
│   │       │   ├── ConfirmationDialog.tsx
│   │       │   ├── Editor.tsx
│   │       │   ├── Header.module.scss
│   │       │   ├── Header.tsx
│   │       │   ├── Playground.tsx
│   │       │   ├── PlaygroundContent.module.scss
│   │       │   ├── PlaygroundContent.tsx
│   │       │   ├── PlaygroundNative.module.scss
│   │       │   ├── PlaygroundNative.tsx
│   │       │   ├── Preview.tsx
│   │       │   ├── StandalonePlayground.tsx
│   │       │   ├── StandalonePlaygroundNative.module.scss
│   │       │   ├── StandalonePlaygroundNative.tsx
│   │       │   ├── ThemeSwitcher.module.scss
│   │       │   ├── ThemeSwitcher.tsx
│   │       │   └── utils.ts
│   │       ├── providers
│   │       │   ├── Toast.module.scss
│   │       │   └── ToastProvider.tsx
│   │       ├── state
│   │       │   └── store.ts
│   │       ├── themes
│   │       │   └── theme.ts
│   │       └── utils
│   │           └── helpers.ts
│   ├── xmlui-search
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── index.tsx
│   │       ├── Search.module.scss
│   │       └── Search.tsx
│   ├── xmlui-spreadsheet
│   │   ├── .gitignore
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── index.tsx
│   │       ├── Spreadsheet.tsx
│   │       └── SpreadsheetNative.tsx
│   └── xmlui-website-blocks
│       ├── .gitignore
│       ├── CHANGELOG.md
│       ├── demo
│       │   ├── components
│       │   │   ├── HeroBackgroundBreakoutPage.xmlui
│       │   │   ├── HeroBackgroundsPage.xmlui
│       │   │   ├── HeroContentsPage.xmlui
│       │   │   ├── HeroTextAlignPage.xmlui
│       │   │   ├── HeroTextPage.xmlui
│       │   │   └── HeroTonesPage.xmlui
│       │   ├── Main.xmlui
│       │   └── themes
│       │       └── default.ts
│       ├── index.html
│       ├── index.ts
│       ├── meta
│       │   └── componentsMetadata.ts
│       ├── package.json
│       ├── public
│       │   └── resources
│       │       ├── building.jpg
│       │       └── xmlui-logo.svg
│       └── src
│           ├── Carousel
│           │   ├── Carousel.module.scss
│           │   ├── Carousel.tsx
│           │   ├── CarouselContext.tsx
│           │   └── CarouselNative.tsx
│           ├── FancyButton
│           │   ├── FancyButton.module.scss
│           │   ├── FancyButton.tsx
│           │   └── FancyButton.xmlui
│           ├── Hello
│           │   ├── Hello.tsx
│           │   ├── Hello.xmlui
│           │   └── Hello.xmlui.xs
│           ├── HeroSection
│           │   ├── HeroSection.module.scss
│           │   ├── HeroSection.spec.ts
│           │   ├── HeroSection.tsx
│           │   └── HeroSectionNative.tsx
│           ├── index.tsx
│           ├── ScrollToTop
│           │   ├── ScrollToTop.module.scss
│           │   ├── ScrollToTop.tsx
│           │   └── ScrollToTopNative.tsx
│           └── vite-env.d.ts
├── playwright.config.ts
├── README.md
├── tools
│   ├── codefence
│   │   └── xmlui-code-fence-docs.md
│   ├── create-app
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── create-app.ts
│   │   ├── helpers
│   │   │   ├── copy.ts
│   │   │   ├── get-pkg-manager.ts
│   │   │   ├── git.ts
│   │   │   ├── install.ts
│   │   │   ├── is-folder-empty.ts
│   │   │   ├── is-writeable.ts
│   │   │   ├── make-dir.ts
│   │   │   └── validate-pkg.ts
│   │   ├── index.ts
│   │   ├── package.json
│   │   ├── templates
│   │   │   ├── default
│   │   │   │   └── ts
│   │   │   │       ├── gitignore
│   │   │   │       ├── index.html
│   │   │   │       ├── index.ts
│   │   │   │       ├── public
│   │   │   │       │   ├── mockServiceWorker.js
│   │   │   │       │   ├── resources
│   │   │   │       │   │   ├── favicon.ico
│   │   │   │       │   │   └── xmlui-logo.svg
│   │   │   │       │   └── serve.json
│   │   │   │       └── src
│   │   │   │           ├── components
│   │   │   │           │   ├── ApiAware.xmlui
│   │   │   │           │   ├── Home.xmlui
│   │   │   │           │   ├── IncButton.xmlui
│   │   │   │           │   └── PagePanel.xmlui
│   │   │   │           ├── config.ts
│   │   │   │           └── Main.xmlui
│   │   │   ├── index.ts
│   │   │   └── types.ts
│   │   └── tsconfig.json
│   ├── create-xmlui-hello-world
│   │   ├── index.js
│   │   └── package.json
│   └── vscode
│       ├── .gitignore
│       ├── .vscode
│       │   ├── launch.json
│       │   └── tasks.json
│       ├── .vscodeignore
│       ├── build.sh
│       ├── CHANGELOG.md
│       ├── esbuild.js
│       ├── eslint.config.mjs
│       ├── formatter-docs.md
│       ├── generate-test-sample.sh
│       ├── LICENSE.md
│       ├── package-lock.json
│       ├── package.json
│       ├── README.md
│       ├── resources
│       │   ├── xmlui-logo.png
│       │   └── xmlui-markup-syntax-highlighting.png
│       ├── src
│       │   ├── extension.ts
│       │   └── server.ts
│       ├── syntaxes
│       │   └── xmlui.tmLanguage.json
│       ├── test-samples
│       │   └── sample.xmlui
│       ├── tsconfig.json
│       └── tsconfig.tsbuildinfo
├── turbo.json
└── xmlui
    ├── .gitignore
    ├── bin
    │   ├── bootstrap.cjs
    │   ├── bootstrap.js
    │   ├── build-lib.ts
    │   ├── build.ts
    │   ├── index.ts
    │   ├── preview.ts
    │   ├── start.ts
    │   ├── vite-xmlui-plugin.ts
    │   └── viteConfig.ts
    ├── CHANGELOG.md
    ├── conventions
    │   ├── component-qa-checklist.md
    │   ├── copilot-conventions.md
    │   ├── create-xmlui-components.md
    │   ├── mermaid.md
    │   ├── testing-conventions.md
    │   └── xmlui-in-a-nutshell.md
    ├── dev-docs
    │   ├── accessibility.md
    │   ├── build-system.md
    │   ├── build-xmlui.md
    │   ├── component-behaviors.md
    │   ├── component-metadata.md
    │   ├── components-with-options.md
    │   ├── containers.md
    │   ├── data-operations.md
    │   ├── glossary.md
    │   ├── index.md
    │   ├── next
    │   │   ├── component-dev-guide.md
    │   │   ├── configuration-management-enhancement-summary.md
    │   │   ├── documentation-scripts-refactoring-complete-summary.md
    │   │   ├── documentation-scripts-refactoring-plan.md
    │   │   ├── duplicate-pattern-extraction-summary.md
    │   │   ├── error-handling-standardization-summary.md
    │   │   ├── generating-component-reference.md
    │   │   ├── index.md
    │   │   ├── logging-consistency-implementation-summary.md
    │   │   ├── project-build.md
    │   │   ├── project-structure.md
    │   │   ├── theme-context.md
    │   │   ├── tiptap-design-considerations.md
    │   │   ├── working-with-code.md
    │   │   ├── xmlui-runtime-architecture
    │   │   └── xmlui-wcag-accessibility-report.md
    │   ├── react-fundamentals.md
    │   ├── release-method.md
    │   ├── standalone-app.md
    │   ├── theme-variables-refactoring.md
    │   ├── ud-components.md
    │   └── xmlui-repo.md
    ├── package.json
    ├── scripts
    │   ├── coverage-only.js
    │   ├── e2e-test-summary.js
    │   ├── extract-component-metadata.js
    │   ├── generate-docs
    │   │   ├── build-downloads-map.mjs
    │   │   ├── build-pages-map.mjs
    │   │   ├── components-config.json
    │   │   ├── configuration-management.mjs
    │   │   ├── constants.mjs
    │   │   ├── create-theme-files.mjs
    │   │   ├── DocsGenerator.mjs
    │   │   ├── error-handling.mjs
    │   │   ├── extensions-config.json
    │   │   ├── folders.mjs
    │   │   ├── generate-summary-files.mjs
    │   │   ├── get-docs.mjs
    │   │   ├── input-handler.mjs
    │   │   ├── logger.mjs
    │   │   ├── logging-standards.mjs
    │   │   ├── MetadataProcessor.mjs
    │   │   ├── pattern-utilities.mjs
    │   │   └── utils.mjs
    │   ├── generate-metadata-markdown.js
    │   ├── get-langserver-metadata.js
    │   ├── inline-links.mjs
    │   └── README-e2e-summary.md
    ├── src
    │   ├── abstractions
    │   │   ├── _conventions.md
    │   │   ├── ActionDefs.ts
    │   │   ├── AppContextDefs.ts
    │   │   ├── ComponentDefs.ts
    │   │   ├── ContainerDefs.ts
    │   │   ├── ExtensionDefs.ts
    │   │   ├── FunctionDefs.ts
    │   │   ├── RendererDefs.ts
    │   │   ├── scripting
    │   │   │   ├── BlockScope.ts
    │   │   │   ├── Compilation.ts
    │   │   │   ├── LogicalThread.ts
    │   │   │   ├── LoopScope.ts
    │   │   │   ├── modules.ts
    │   │   │   ├── ScriptParserError.ts
    │   │   │   ├── Token.ts
    │   │   │   ├── TryScope.ts
    │   │   │   └── TryScopeExp.ts
    │   │   └── ThemingDefs.ts
    │   ├── components
    │   │   ├── _conventions.md
    │   │   ├── abstractions.ts
    │   │   ├── Accordion
    │   │   │   ├── Accordion.md
    │   │   │   ├── Accordion.module.scss
    │   │   │   ├── Accordion.spec.ts
    │   │   │   ├── Accordion.tsx
    │   │   │   ├── AccordionContext.tsx
    │   │   │   ├── AccordionItem.tsx
    │   │   │   ├── AccordionItemNative.tsx
    │   │   │   └── AccordionNative.tsx
    │   │   ├── Animation
    │   │   │   └── AnimationNative.tsx
    │   │   ├── APICall
    │   │   │   ├── APICall.md
    │   │   │   ├── APICall.spec.ts
    │   │   │   ├── APICall.tsx
    │   │   │   └── APICallNative.tsx
    │   │   ├── App
    │   │   │   ├── App.md
    │   │   │   ├── App.module.scss
    │   │   │   ├── App.spec.ts
    │   │   │   ├── App.tsx
    │   │   │   ├── AppLayoutContext.ts
    │   │   │   ├── AppNative.tsx
    │   │   │   ├── AppStateContext.ts
    │   │   │   ├── doc-resources
    │   │   │   │   ├── condensed-sticky.xmlui
    │   │   │   │   ├── condensed.xmlui
    │   │   │   │   ├── horizontal-sticky.xmlui
    │   │   │   │   ├── horizontal.xmlui
    │   │   │   │   ├── vertical-full-header.xmlui
    │   │   │   │   ├── vertical-sticky.xmlui
    │   │   │   │   └── vertical.xmlui
    │   │   │   ├── IndexerContext.ts
    │   │   │   ├── LinkInfoContext.ts
    │   │   │   ├── SearchContext.tsx
    │   │   │   ├── Sheet.module.scss
    │   │   │   └── Sheet.tsx
    │   │   ├── AppHeader
    │   │   │   ├── AppHeader.md
    │   │   │   ├── AppHeader.module.scss
    │   │   │   ├── AppHeader.spec.ts
    │   │   │   ├── AppHeader.tsx
    │   │   │   └── AppHeaderNative.tsx
    │   │   ├── AppState
    │   │   │   ├── AppState.md
    │   │   │   ├── AppState.spec.ts
    │   │   │   ├── AppState.tsx
    │   │   │   └── AppStateNative.tsx
    │   │   ├── AutoComplete
    │   │   │   ├── AutoComplete.md
    │   │   │   ├── AutoComplete.module.scss
    │   │   │   ├── AutoComplete.spec.ts
    │   │   │   ├── AutoComplete.tsx
    │   │   │   ├── AutoCompleteContext.tsx
    │   │   │   └── AutoCompleteNative.tsx
    │   │   ├── Avatar
    │   │   │   ├── Avatar.md
    │   │   │   ├── Avatar.module.scss
    │   │   │   ├── Avatar.spec.ts
    │   │   │   ├── Avatar.tsx
    │   │   │   └── AvatarNative.tsx
    │   │   ├── Backdrop
    │   │   │   ├── Backdrop.md
    │   │   │   ├── Backdrop.module.scss
    │   │   │   ├── Backdrop.spec.ts
    │   │   │   ├── Backdrop.tsx
    │   │   │   └── BackdropNative.tsx
    │   │   ├── Badge
    │   │   │   ├── Badge.md
    │   │   │   ├── Badge.module.scss
    │   │   │   ├── Badge.spec.ts
    │   │   │   ├── Badge.tsx
    │   │   │   └── BadgeNative.tsx
    │   │   ├── Bookmark
    │   │   │   ├── Bookmark.md
    │   │   │   ├── Bookmark.module.scss
    │   │   │   ├── Bookmark.spec.ts
    │   │   │   ├── Bookmark.tsx
    │   │   │   └── BookmarkNative.tsx
    │   │   ├── Breakout
    │   │   │   ├── Breakout.module.scss
    │   │   │   ├── Breakout.spec.ts
    │   │   │   ├── Breakout.tsx
    │   │   │   └── BreakoutNative.tsx
    │   │   ├── Button
    │   │   │   ├── Button-style.spec.ts
    │   │   │   ├── Button.md
    │   │   │   ├── Button.module.scss
    │   │   │   ├── Button.spec.ts
    │   │   │   ├── Button.tsx
    │   │   │   └── ButtonNative.tsx
    │   │   ├── Card
    │   │   │   ├── Card.md
    │   │   │   ├── Card.module.scss
    │   │   │   ├── Card.spec.ts
    │   │   │   ├── Card.tsx
    │   │   │   └── CardNative.tsx
    │   │   ├── Carousel
    │   │   │   ├── Carousel.md
    │   │   │   ├── Carousel.module.scss
    │   │   │   ├── Carousel.spec.ts
    │   │   │   ├── Carousel.tsx
    │   │   │   ├── CarouselContext.tsx
    │   │   │   ├── CarouselItem.tsx
    │   │   │   ├── CarouselItemNative.tsx
    │   │   │   └── CarouselNative.tsx
    │   │   ├── ChangeListener
    │   │   │   ├── ChangeListener.md
    │   │   │   ├── ChangeListener.spec.ts
    │   │   │   ├── ChangeListener.tsx
    │   │   │   └── ChangeListenerNative.tsx
    │   │   ├── chart-color-schemes.ts
    │   │   ├── Charts
    │   │   │   ├── AreaChart
    │   │   │   │   ├── AreaChart.md
    │   │   │   │   ├── AreaChart.spec.ts
    │   │   │   │   ├── AreaChart.tsx
    │   │   │   │   └── AreaChartNative.tsx
    │   │   │   ├── BarChart
    │   │   │   │   ├── BarChart.md
    │   │   │   │   ├── BarChart.module.scss
    │   │   │   │   ├── BarChart.spec.ts
    │   │   │   │   ├── BarChart.tsx
    │   │   │   │   └── BarChartNative.tsx
    │   │   │   ├── DonutChart
    │   │   │   │   ├── DonutChart.spec.ts
    │   │   │   │   └── DonutChart.tsx
    │   │   │   ├── LabelList
    │   │   │   │   ├── LabelList.module.scss
    │   │   │   │   ├── LabelList.spec.ts
    │   │   │   │   ├── LabelList.tsx
    │   │   │   │   └── LabelListNative.tsx
    │   │   │   ├── Legend
    │   │   │   │   ├── Legend.spec.ts
    │   │   │   │   ├── Legend.tsx
    │   │   │   │   └── LegendNative.tsx
    │   │   │   ├── LineChart
    │   │   │   │   ├── LineChart.md
    │   │   │   │   ├── LineChart.module.scss
    │   │   │   │   ├── LineChart.spec.ts
    │   │   │   │   ├── LineChart.tsx
    │   │   │   │   └── LineChartNative.tsx
    │   │   │   ├── PieChart
    │   │   │   │   ├── PieChart.md
    │   │   │   │   ├── PieChart.spec.ts
    │   │   │   │   ├── PieChart.tsx
    │   │   │   │   ├── PieChartNative.module.scss
    │   │   │   │   └── PieChartNative.tsx
    │   │   │   ├── RadarChart
    │   │   │   │   ├── RadarChart.md
    │   │   │   │   ├── RadarChart.spec.ts
    │   │   │   │   ├── RadarChart.tsx
    │   │   │   │   └── RadarChartNative.tsx
    │   │   │   ├── Tooltip
    │   │   │   │   ├── TooltipContent.module.scss
    │   │   │   │   ├── TooltipContent.spec.ts
    │   │   │   │   └── TooltipContent.tsx
    │   │   │   └── utils
    │   │   │       ├── abstractions.ts
    │   │   │       └── ChartProvider.tsx
    │   │   ├── Checkbox
    │   │   │   ├── Checkbox.md
    │   │   │   ├── Checkbox.spec.ts
    │   │   │   └── Checkbox.tsx
    │   │   ├── CodeBlock
    │   │   │   ├── CodeBlock.module.scss
    │   │   │   ├── CodeBlock.spec.ts
    │   │   │   ├── CodeBlock.tsx
    │   │   │   ├── CodeBlockNative.tsx
    │   │   │   └── highlight-code.ts
    │   │   ├── collectedComponentMetadata.ts
    │   │   ├── ColorPicker
    │   │   │   ├── ColorPicker.md
    │   │   │   ├── ColorPicker.module.scss
    │   │   │   ├── ColorPicker.spec.ts
    │   │   │   ├── ColorPicker.tsx
    │   │   │   └── ColorPickerNative.tsx
    │   │   ├── Column
    │   │   │   ├── Column.md
    │   │   │   ├── Column.tsx
    │   │   │   ├── ColumnNative.tsx
    │   │   │   ├── doc-resources
    │   │   │   │   └── list-component-data.js
    │   │   │   └── TableContext.tsx
    │   │   ├── component-utils.ts
    │   │   ├── ComponentProvider.tsx
    │   │   ├── ComponentRegistryContext.tsx
    │   │   ├── container-helpers.tsx
    │   │   ├── ContentSeparator
    │   │   │   ├── ContentSeparator.md
    │   │   │   ├── ContentSeparator.module.scss
    │   │   │   ├── ContentSeparator.spec.ts
    │   │   │   ├── ContentSeparator.tsx
    │   │   │   └── ContentSeparatorNative.tsx
    │   │   ├── DataSource
    │   │   │   ├── DataSource.md
    │   │   │   └── DataSource.tsx
    │   │   ├── DateInput
    │   │   │   ├── DateInput.md
    │   │   │   ├── DateInput.module.scss
    │   │   │   ├── DateInput.spec.ts
    │   │   │   ├── DateInput.tsx
    │   │   │   └── DateInputNative.tsx
    │   │   ├── DatePicker
    │   │   │   ├── DatePicker.md
    │   │   │   ├── DatePicker.module.scss
    │   │   │   ├── DatePicker.spec.ts
    │   │   │   ├── DatePicker.tsx
    │   │   │   └── DatePickerNative.tsx
    │   │   ├── DropdownMenu
    │   │   │   ├── DropdownMenu.md
    │   │   │   ├── DropdownMenu.module.scss
    │   │   │   ├── DropdownMenu.spec.ts
    │   │   │   ├── DropdownMenu.tsx
    │   │   │   ├── DropdownMenuNative.tsx
    │   │   │   ├── MenuItem.md
    │   │   │   └── SubMenuItem.md
    │   │   ├── EmojiSelector
    │   │   │   ├── EmojiSelector.md
    │   │   │   ├── EmojiSelector.spec.ts
    │   │   │   ├── EmojiSelector.tsx
    │   │   │   └── EmojiSelectorNative.tsx
    │   │   ├── ExpandableItem
    │   │   │   ├── ExpandableItem.module.scss
    │   │   │   ├── ExpandableItem.spec.ts
    │   │   │   ├── ExpandableItem.tsx
    │   │   │   └── ExpandableItemNative.tsx
    │   │   ├── FileInput
    │   │   │   ├── FileInput.md
    │   │   │   ├── FileInput.module.scss
    │   │   │   ├── FileInput.spec.ts
    │   │   │   ├── FileInput.tsx
    │   │   │   └── FileInputNative.tsx
    │   │   ├── FileUploadDropZone
    │   │   │   ├── FileUploadDropZone.md
    │   │   │   ├── FileUploadDropZone.module.scss
    │   │   │   ├── FileUploadDropZone.spec.ts
    │   │   │   ├── FileUploadDropZone.tsx
    │   │   │   └── FileUploadDropZoneNative.tsx
    │   │   ├── FlowLayout
    │   │   │   ├── FlowLayout.md
    │   │   │   ├── FlowLayout.module.scss
    │   │   │   ├── FlowLayout.spec.ts
    │   │   │   ├── FlowLayout.spec.ts-snapshots
    │   │   │   │   └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
    │   │   │   ├── FlowLayout.tsx
    │   │   │   └── FlowLayoutNative.tsx
    │   │   ├── Footer
    │   │   │   ├── Footer.md
    │   │   │   ├── Footer.module.scss
    │   │   │   ├── Footer.spec.ts
    │   │   │   ├── Footer.tsx
    │   │   │   └── FooterNative.tsx
    │   │   ├── Form
    │   │   │   ├── Form.md
    │   │   │   ├── Form.module.scss
    │   │   │   ├── Form.spec.ts
    │   │   │   ├── Form.tsx
    │   │   │   ├── formActions.ts
    │   │   │   ├── FormContext.ts
    │   │   │   └── FormNative.tsx
    │   │   ├── FormItem
    │   │   │   ├── FormItem.md
    │   │   │   ├── FormItem.module.scss
    │   │   │   ├── FormItem.spec.ts
    │   │   │   ├── FormItem.tsx
    │   │   │   ├── FormItemNative.tsx
    │   │   │   ├── HelperText.module.scss
    │   │   │   ├── HelperText.tsx
    │   │   │   ├── ItemWithLabel.tsx
    │   │   │   └── Validations.ts
    │   │   ├── FormSection
    │   │   │   ├── FormSection.md
    │   │   │   ├── FormSection.ts
    │   │   │   └── FormSection.xmlui
    │   │   ├── Fragment
    │   │   │   ├── Fragment.spec.ts
    │   │   │   └── Fragment.tsx
    │   │   ├── Heading
    │   │   │   ├── abstractions.ts
    │   │   │   ├── H1.md
    │   │   │   ├── H1.spec.ts
    │   │   │   ├── H2.md
    │   │   │   ├── H2.spec.ts
    │   │   │   ├── H3.md
    │   │   │   ├── H3.spec.ts
    │   │   │   ├── H4.md
    │   │   │   ├── H4.spec.ts
    │   │   │   ├── H5.md
    │   │   │   ├── H5.spec.ts
    │   │   │   ├── H6.md
    │   │   │   ├── H6.spec.ts
    │   │   │   ├── Heading.md
    │   │   │   ├── Heading.module.scss
    │   │   │   ├── Heading.spec.ts
    │   │   │   ├── Heading.tsx
    │   │   │   └── HeadingNative.tsx
    │   │   ├── HoverCard
    │   │   │   ├── HoverCard.tsx
    │   │   │   └── HovercardNative.tsx
    │   │   ├── HtmlTags
    │   │   │   ├── HtmlTags.module.scss
    │   │   │   ├── HtmlTags.spec.ts
    │   │   │   └── HtmlTags.tsx
    │   │   ├── Icon
    │   │   │   ├── AdmonitionDanger.tsx
    │   │   │   ├── AdmonitionInfo.tsx
    │   │   │   ├── AdmonitionNote.tsx
    │   │   │   ├── AdmonitionTip.tsx
    │   │   │   ├── AdmonitionWarning.tsx
    │   │   │   ├── ApiIcon.tsx
    │   │   │   ├── ArrowDropDown.module.scss
    │   │   │   ├── ArrowDropDown.tsx
    │   │   │   ├── ArrowDropUp.module.scss
    │   │   │   ├── ArrowDropUp.tsx
    │   │   │   ├── ArrowLeft.module.scss
    │   │   │   ├── ArrowLeft.tsx
    │   │   │   ├── ArrowRight.module.scss
    │   │   │   ├── ArrowRight.tsx
    │   │   │   ├── Attach.tsx
    │   │   │   ├── Binding.module.scss
    │   │   │   ├── Binding.tsx
    │   │   │   ├── BoardIcon.tsx
    │   │   │   ├── BoxIcon.tsx
    │   │   │   ├── CheckIcon.tsx
    │   │   │   ├── ChevronDownIcon.tsx
    │   │   │   ├── ChevronLeft.tsx
    │   │   │   ├── ChevronRight.tsx
    │   │   │   ├── ChevronUpIcon.tsx
    │   │   │   ├── CodeFileIcon.tsx
    │   │   │   ├── CodeSandbox.tsx
    │   │   │   ├── CompactListIcon.tsx
    │   │   │   ├── ContentCopyIcon.tsx
    │   │   │   ├── DarkToLightIcon.tsx
    │   │   │   ├── DatabaseIcon.module.scss
    │   │   │   ├── DatabaseIcon.tsx
    │   │   │   ├── DocFileIcon.tsx
    │   │   │   ├── DocIcon.tsx
    │   │   │   ├── DotMenuHorizontalIcon.tsx
    │   │   │   ├── DotMenuIcon.tsx
    │   │   │   ├── EmailIcon.tsx
    │   │   │   ├── EmptyFolderIcon.tsx
    │   │   │   ├── ErrorIcon.tsx
    │   │   │   ├── ExpressionIcon.tsx
    │   │   │   ├── FillPlusCricleIcon.tsx
    │   │   │   ├── FilterIcon.tsx
    │   │   │   ├── FolderIcon.tsx
    │   │   │   ├── GlobeIcon.tsx
    │   │   │   ├── HomeIcon.tsx
    │   │   │   ├── HyperLinkIcon.tsx
    │   │   │   ├── Icon.md
    │   │   │   ├── Icon.module.scss
    │   │   │   ├── Icon.spec.ts
    │   │   │   ├── Icon.tsx
    │   │   │   ├── IconNative.tsx
    │   │   │   ├── ImageFileIcon.tsx
    │   │   │   ├── Inspect.tsx
    │   │   │   ├── LightToDark.tsx
    │   │   │   ├── LinkIcon.tsx
    │   │   │   ├── ListIcon.tsx
    │   │   │   ├── LooseListIcon.tsx
    │   │   │   ├── MoonIcon.tsx
    │   │   │   ├── MoreOptionsIcon.tsx
    │   │   │   ├── NoSortIcon.tsx
    │   │   │   ├── PDFIcon.tsx
    │   │   │   ├── PenIcon.tsx
    │   │   │   ├── PhoneIcon.tsx
    │   │   │   ├── PhotoIcon.tsx
    │   │   │   ├── PlusIcon.tsx
    │   │   │   ├── SearchIcon.tsx
    │   │   │   ├── ShareIcon.tsx
    │   │   │   ├── SortAscendingIcon.tsx
    │   │   │   ├── SortDescendingIcon.tsx
    │   │   │   ├── StarsIcon.tsx
    │   │   │   ├── SunIcon.tsx
    │   │   │   ├── svg
    │   │   │   │   ├── admonition_danger.svg
    │   │   │   │   ├── admonition_info.svg
    │   │   │   │   ├── admonition_note.svg
    │   │   │   │   ├── admonition_tip.svg
    │   │   │   │   ├── admonition_warning.svg
    │   │   │   │   ├── api.svg
    │   │   │   │   ├── arrow-dropdown.svg
    │   │   │   │   ├── arrow-left.svg
    │   │   │   │   ├── arrow-right.svg
    │   │   │   │   ├── arrow-up.svg
    │   │   │   │   ├── attach.svg
    │   │   │   │   ├── binding.svg
    │   │   │   │   ├── box.svg
    │   │   │   │   ├── bulb.svg
    │   │   │   │   ├── code-file.svg
    │   │   │   │   ├── code-sandbox.svg
    │   │   │   │   ├── dark_to_light.svg
    │   │   │   │   ├── database.svg
    │   │   │   │   ├── doc.svg
    │   │   │   │   ├── empty-folder.svg
    │   │   │   │   ├── expression.svg
    │   │   │   │   ├── eye-closed.svg
    │   │   │   │   ├── eye-dark.svg
    │   │   │   │   ├── eye.svg
    │   │   │   │   ├── file-text.svg
    │   │   │   │   ├── filter.svg
    │   │   │   │   ├── folder.svg
    │   │   │   │   ├── img.svg
    │   │   │   │   ├── inspect.svg
    │   │   │   │   ├── light_to_dark.svg
    │   │   │   │   ├── moon.svg
    │   │   │   │   ├── pdf.svg
    │   │   │   │   ├── photo.svg
    │   │   │   │   ├── share.svg
    │   │   │   │   ├── stars.svg
    │   │   │   │   ├── sun.svg
    │   │   │   │   ├── trending-down.svg
    │   │   │   │   ├── trending-level.svg
    │   │   │   │   ├── trending-up.svg
    │   │   │   │   ├── txt.svg
    │   │   │   │   ├── unknown-file.svg
    │   │   │   │   ├── unlink.svg
    │   │   │   │   └── xls.svg
    │   │   │   ├── TableDeleteColumnIcon.tsx
    │   │   │   ├── TableDeleteRowIcon.tsx
    │   │   │   ├── TableInsertColumnIcon.tsx
    │   │   │   ├── TableInsertRowIcon.tsx
    │   │   │   ├── TrashIcon.tsx
    │   │   │   ├── TrendingDownIcon.tsx
    │   │   │   ├── TrendingLevelIcon.tsx
    │   │   │   ├── TrendingUpIcon.tsx
    │   │   │   ├── TxtIcon.tsx
    │   │   │   ├── UnknownFileIcon.tsx
    │   │   │   ├── UnlinkIcon.tsx
    │   │   │   ├── UserIcon.tsx
    │   │   │   ├── WarningIcon.tsx
    │   │   │   └── XlsIcon.tsx
    │   │   ├── IconProvider.tsx
    │   │   ├── IconRegistryContext.tsx
    │   │   ├── IFrame
    │   │   │   ├── IFrame.md
    │   │   │   ├── IFrame.module.scss
    │   │   │   ├── IFrame.spec.ts
    │   │   │   ├── IFrame.tsx
    │   │   │   └── IFrameNative.tsx
    │   │   ├── Image
    │   │   │   ├── Image.md
    │   │   │   ├── Image.module.scss
    │   │   │   ├── Image.spec.ts
    │   │   │   ├── Image.tsx
    │   │   │   └── ImageNative.tsx
    │   │   ├── Input
    │   │   │   ├── index.ts
    │   │   │   ├── InputAdornment.module.scss
    │   │   │   ├── InputAdornment.tsx
    │   │   │   ├── InputDivider.module.scss
    │   │   │   ├── InputDivider.tsx
    │   │   │   ├── InputLabel.module.scss
    │   │   │   ├── InputLabel.tsx
    │   │   │   ├── PartialInput.module.scss
    │   │   │   └── PartialInput.tsx
    │   │   ├── InspectButton
    │   │   │   ├── InspectButton.module.scss
    │   │   │   └── InspectButton.tsx
    │   │   ├── Items
    │   │   │   ├── Items.md
    │   │   │   ├── Items.spec.ts
    │   │   │   ├── Items.tsx
    │   │   │   └── ItemsNative.tsx
    │   │   ├── Link
    │   │   │   ├── Link.md
    │   │   │   ├── Link.module.scss
    │   │   │   ├── Link.spec.ts
    │   │   │   ├── Link.tsx
    │   │   │   └── LinkNative.tsx
    │   │   ├── List
    │   │   │   ├── doc-resources
    │   │   │   │   └── list-component-data.js
    │   │   │   ├── List.md
    │   │   │   ├── List.module.scss
    │   │   │   ├── List.spec.ts
    │   │   │   ├── List.tsx
    │   │   │   └── ListNative.tsx
    │   │   ├── Logo
    │   │   │   ├── doc-resources
    │   │   │   │   └── xmlui-logo.svg
    │   │   │   ├── Logo.md
    │   │   │   ├── Logo.tsx
    │   │   │   └── LogoNative.tsx
    │   │   ├── Markdown
    │   │   │   ├── CodeText.module.scss
    │   │   │   ├── CodeText.tsx
    │   │   │   ├── Markdown.md
    │   │   │   ├── Markdown.module.scss
    │   │   │   ├── Markdown.spec.ts
    │   │   │   ├── Markdown.tsx
    │   │   │   ├── MarkdownNative.tsx
    │   │   │   ├── parse-binding-expr.ts
    │   │   │   └── utils.ts
    │   │   ├── metadata-helpers.ts
    │   │   ├── ModalDialog
    │   │   │   ├── ConfirmationModalContextProvider.tsx
    │   │   │   ├── Dialog.module.scss
    │   │   │   ├── Dialog.tsx
    │   │   │   ├── ModalDialog.md
    │   │   │   ├── ModalDialog.module.scss
    │   │   │   ├── ModalDialog.spec.ts
    │   │   │   ├── ModalDialog.tsx
    │   │   │   ├── ModalDialogNative.tsx
    │   │   │   └── ModalVisibilityContext.tsx
    │   │   ├── NavGroup
    │   │   │   ├── NavGroup.md
    │   │   │   ├── NavGroup.module.scss
    │   │   │   ├── NavGroup.spec.ts
    │   │   │   ├── NavGroup.tsx
    │   │   │   ├── NavGroupContext.ts
    │   │   │   └── NavGroupNative.tsx
    │   │   ├── NavLink
    │   │   │   ├── NavLink.md
    │   │   │   ├── NavLink.module.scss
    │   │   │   ├── NavLink.spec.ts
    │   │   │   ├── NavLink.tsx
    │   │   │   └── NavLinkNative.tsx
    │   │   ├── NavPanel
    │   │   │   ├── NavPanel.md
    │   │   │   ├── NavPanel.module.scss
    │   │   │   ├── NavPanel.spec.ts
    │   │   │   ├── NavPanel.tsx
    │   │   │   └── NavPanelNative.tsx
    │   │   ├── NestedApp
    │   │   │   ├── AppWithCodeView.module.scss
    │   │   │   ├── AppWithCodeView.tsx
    │   │   │   ├── AppWithCodeViewNative.tsx
    │   │   │   ├── defaultProps.tsx
    │   │   │   ├── logo.svg
    │   │   │   ├── NestedApp.module.scss
    │   │   │   ├── NestedApp.tsx
    │   │   │   ├── NestedAppNative.tsx
    │   │   │   ├── Tooltip.module.scss
    │   │   │   ├── Tooltip.tsx
    │   │   │   └── utils.ts
    │   │   ├── NoResult
    │   │   │   ├── NoResult.md
    │   │   │   ├── NoResult.module.scss
    │   │   │   ├── NoResult.spec.ts
    │   │   │   ├── NoResult.tsx
    │   │   │   └── NoResultNative.tsx
    │   │   ├── NumberBox
    │   │   │   ├── numberbox-abstractions.ts
    │   │   │   ├── NumberBox.md
    │   │   │   ├── NumberBox.module.scss
    │   │   │   ├── NumberBox.spec.ts
    │   │   │   ├── NumberBox.tsx
    │   │   │   └── NumberBoxNative.tsx
    │   │   ├── Option
    │   │   │   ├── Option.md
    │   │   │   ├── Option.spec.ts
    │   │   │   ├── Option.tsx
    │   │   │   ├── OptionNative.tsx
    │   │   │   └── OptionTypeProvider.tsx
    │   │   ├── PageMetaTitle
    │   │   │   ├── PageMetaTilteNative.tsx
    │   │   │   ├── PageMetaTitle.md
    │   │   │   ├── PageMetaTitle.spec.ts
    │   │   │   └── PageMetaTitle.tsx
    │   │   ├── Pages
    │   │   │   ├── Page.md
    │   │   │   ├── Pages.md
    │   │   │   ├── Pages.module.scss
    │   │   │   ├── Pages.tsx
    │   │   │   └── PagesNative.tsx
    │   │   ├── Pagination
    │   │   │   ├── Pagination.md
    │   │   │   ├── Pagination.module.scss
    │   │   │   ├── Pagination.spec.ts
    │   │   │   ├── Pagination.tsx
    │   │   │   └── PaginationNative.tsx
    │   │   ├── PositionedContainer
    │   │   │   ├── PositionedContainer.module.scss
    │   │   │   ├── PositionedContainer.tsx
    │   │   │   └── PositionedContainerNative.tsx
    │   │   ├── ProfileMenu
    │   │   │   ├── ProfileMenu.module.scss
    │   │   │   └── ProfileMenu.tsx
    │   │   ├── ProgressBar
    │   │   │   ├── ProgressBar.md
    │   │   │   ├── ProgressBar.module.scss
    │   │   │   ├── ProgressBar.spec.ts
    │   │   │   ├── ProgressBar.tsx
    │   │   │   └── ProgressBarNative.tsx
    │   │   ├── Queue
    │   │   │   ├── Queue.md
    │   │   │   ├── Queue.spec.ts
    │   │   │   ├── Queue.tsx
    │   │   │   ├── queueActions.ts
    │   │   │   └── QueueNative.tsx
    │   │   ├── RadioGroup
    │   │   │   ├── RadioGroup.md
    │   │   │   ├── RadioGroup.module.scss
    │   │   │   ├── RadioGroup.spec.ts
    │   │   │   ├── RadioGroup.tsx
    │   │   │   ├── RadioGroupNative.tsx
    │   │   │   ├── RadioItem.tsx
    │   │   │   └── RadioItemNative.tsx
    │   │   ├── RealTimeAdapter
    │   │   │   ├── RealTimeAdapter.tsx
    │   │   │   └── RealTimeAdapterNative.tsx
    │   │   ├── Redirect
    │   │   │   ├── Redirect.md
    │   │   │   ├── Redirect.spec.ts
    │   │   │   └── Redirect.tsx
    │   │   ├── ResponsiveBar
    │   │   │   ├── README.md
    │   │   │   ├── ResponsiveBar.md
    │   │   │   ├── ResponsiveBar.module.scss
    │   │   │   ├── ResponsiveBar.spec.ts
    │   │   │   ├── ResponsiveBar.tsx
    │   │   │   └── ResponsiveBarNative.tsx
    │   │   ├── Select
    │   │   │   ├── HiddenOption.tsx
    │   │   │   ├── OptionContext.ts
    │   │   │   ├── Select.md
    │   │   │   ├── Select.module.scss
    │   │   │   ├── Select.spec.ts
    │   │   │   ├── Select.tsx
    │   │   │   ├── SelectContext.tsx
    │   │   │   └── SelectNative.tsx
    │   │   ├── SelectionStore
    │   │   │   ├── SelectionStore.md
    │   │   │   ├── SelectionStore.tsx
    │   │   │   └── SelectionStoreNative.tsx
    │   │   ├── Slider
    │   │   │   ├── Slider.md
    │   │   │   ├── Slider.module.scss
    │   │   │   ├── Slider.spec.ts
    │   │   │   ├── Slider.tsx
    │   │   │   └── SliderNative.tsx
    │   │   ├── Slot
    │   │   │   ├── Slot.md
    │   │   │   ├── Slot.spec.ts
    │   │   │   └── Slot.ts
    │   │   ├── SlotItem.tsx
    │   │   ├── SpaceFiller
    │   │   │   ├── SpaceFiller.md
    │   │   │   ├── SpaceFiller.module.scss
    │   │   │   ├── SpaceFiller.spec.ts
    │   │   │   ├── SpaceFiller.tsx
    │   │   │   └── SpaceFillerNative.tsx
    │   │   ├── Spinner
    │   │   │   ├── Spinner.md
    │   │   │   ├── Spinner.module.scss
    │   │   │   ├── Spinner.spec.ts
    │   │   │   ├── Spinner.tsx
    │   │   │   └── SpinnerNative.tsx
    │   │   ├── Splitter
    │   │   │   ├── HSplitter.md
    │   │   │   ├── HSplitter.spec.ts
    │   │   │   ├── Splitter.md
    │   │   │   ├── Splitter.module.scss
    │   │   │   ├── Splitter.spec.ts
    │   │   │   ├── Splitter.tsx
    │   │   │   ├── SplitterNative.tsx
    │   │   │   ├── utils.ts
    │   │   │   ├── VSplitter.md
    │   │   │   └── VSplitter.spec.ts
    │   │   ├── Stack
    │   │   │   ├── CHStack.md
    │   │   │   ├── CHStack.spec.ts
    │   │   │   ├── CVStack.md
    │   │   │   ├── CVStack.spec.ts
    │   │   │   ├── HStack.md
    │   │   │   ├── HStack.spec.ts
    │   │   │   ├── Stack.md
    │   │   │   ├── Stack.module.scss
    │   │   │   ├── Stack.spec.ts
    │   │   │   ├── Stack.tsx
    │   │   │   ├── StackNative.tsx
    │   │   │   ├── VStack.md
    │   │   │   └── VStack.spec.ts
    │   │   ├── StickyBox
    │   │   │   ├── StickyBox.md
    │   │   │   ├── StickyBox.module.scss
    │   │   │   ├── StickyBox.tsx
    │   │   │   └── StickyBoxNative.tsx
    │   │   ├── Switch
    │   │   │   ├── Switch.md
    │   │   │   ├── Switch.spec.ts
    │   │   │   └── Switch.tsx
    │   │   ├── Table
    │   │   │   ├── doc-resources
    │   │   │   │   └── list-component-data.js
    │   │   │   ├── react-table-config.d.ts
    │   │   │   ├── Table.md
    │   │   │   ├── Table.module.scss
    │   │   │   ├── Table.spec.ts
    │   │   │   ├── Table.tsx
    │   │   │   ├── TableNative.tsx
    │   │   │   └── useRowSelection.tsx
    │   │   ├── TableOfContents
    │   │   │   ├── TableOfContents.module.scss
    │   │   │   ├── TableOfContents.spec.ts
    │   │   │   ├── TableOfContents.tsx
    │   │   │   └── TableOfContentsNative.tsx
    │   │   ├── Tabs
    │   │   │   ├── TabContext.tsx
    │   │   │   ├── TabItem.md
    │   │   │   ├── TabItem.tsx
    │   │   │   ├── TabItemNative.tsx
    │   │   │   ├── Tabs.md
    │   │   │   ├── Tabs.module.scss
    │   │   │   ├── Tabs.spec.ts
    │   │   │   ├── Tabs.tsx
    │   │   │   └── TabsNative.tsx
    │   │   ├── Text
    │   │   │   ├── Text.md
    │   │   │   ├── Text.module.scss
    │   │   │   ├── Text.spec.ts
    │   │   │   ├── Text.tsx
    │   │   │   └── TextNative.tsx
    │   │   ├── TextArea
    │   │   │   ├── TextArea.md
    │   │   │   ├── TextArea.module.scss
    │   │   │   ├── TextArea.spec.ts
    │   │   │   ├── TextArea.tsx
    │   │   │   ├── TextAreaNative.tsx
    │   │   │   ├── TextAreaResizable.tsx
    │   │   │   └── useComposedRef.ts
    │   │   ├── TextBox
    │   │   │   ├── TextBox.md
    │   │   │   ├── TextBox.module.scss
    │   │   │   ├── TextBox.spec.ts
    │   │   │   ├── TextBox.tsx
    │   │   │   └── TextBoxNative.tsx
    │   │   ├── Theme
    │   │   │   ├── NotificationToast.tsx
    │   │   │   ├── Theme.md
    │   │   │   ├── Theme.module.scss
    │   │   │   ├── Theme.spec.ts
    │   │   │   ├── Theme.tsx
    │   │   │   └── ThemeNative.tsx
    │   │   ├── TimeInput
    │   │   │   ├── TimeInput.md
    │   │   │   ├── TimeInput.module.scss
    │   │   │   ├── TimeInput.spec.ts
    │   │   │   ├── TimeInput.tsx
    │   │   │   ├── TimeInputNative.tsx
    │   │   │   └── utils.ts
    │   │   ├── Timer
    │   │   │   ├── Timer.md
    │   │   │   ├── Timer.spec.ts
    │   │   │   ├── Timer.tsx
    │   │   │   └── TimerNative.tsx
    │   │   ├── Toggle
    │   │   │   ├── Toggle.module.scss
    │   │   │   └── Toggle.tsx
    │   │   ├── ToneChangerButton
    │   │   │   ├── ToneChangerButton.md
    │   │   │   ├── ToneChangerButton.spec.ts
    │   │   │   └── ToneChangerButton.tsx
    │   │   ├── ToneSwitch
    │   │   │   ├── ToneSwitch.md
    │   │   │   ├── ToneSwitch.module.scss
    │   │   │   ├── ToneSwitch.spec.ts
    │   │   │   ├── ToneSwitch.tsx
    │   │   │   └── ToneSwitchNative.tsx
    │   │   ├── Tooltip
    │   │   │   ├── Tooltip.md
    │   │   │   ├── Tooltip.module.scss
    │   │   │   ├── Tooltip.spec.ts
    │   │   │   ├── Tooltip.tsx
    │   │   │   └── TooltipNative.tsx
    │   │   ├── Tree
    │   │   │   ├── testData.ts
    │   │   │   ├── Tree-dynamic.spec.ts
    │   │   │   ├── Tree-icons.spec.ts
    │   │   │   ├── Tree.md
    │   │   │   ├── Tree.spec.ts
    │   │   │   ├── TreeComponent.module.scss
    │   │   │   ├── TreeComponent.tsx
    │   │   │   └── TreeNative.tsx
    │   │   ├── TreeDisplay
    │   │   │   ├── TreeDisplay.md
    │   │   │   ├── TreeDisplay.module.scss
    │   │   │   ├── TreeDisplay.tsx
    │   │   │   └── TreeDisplayNative.tsx
    │   │   ├── ValidationSummary
    │   │   │   ├── ValidationSummary.module.scss
    │   │   │   └── ValidationSummary.tsx
    │   │   └── VisuallyHidden.tsx
    │   ├── components-core
    │   │   ├── abstractions
    │   │   │   ├── ComponentRenderer.ts
    │   │   │   ├── LoaderRenderer.ts
    │   │   │   ├── standalone.ts
    │   │   │   └── treeAbstractions.ts
    │   │   ├── action
    │   │   │   ├── actions.ts
    │   │   │   ├── APICall.tsx
    │   │   │   ├── FileDownloadAction.tsx
    │   │   │   ├── FileUploadAction.tsx
    │   │   │   ├── NavigateAction.tsx
    │   │   │   └── TimedAction.tsx
    │   │   ├── ApiBoundComponent.tsx
    │   │   ├── appContext
    │   │   │   ├── date-functions.ts
    │   │   │   ├── math-function.ts
    │   │   │   └── misc-utils.ts
    │   │   ├── AppContext.tsx
    │   │   ├── behaviors
    │   │   │   ├── Behavior.tsx
    │   │   │   └── CoreBehaviors.tsx
    │   │   ├── component-hooks.ts
    │   │   ├── ComponentDecorator.tsx
    │   │   ├── ComponentViewer.tsx
    │   │   ├── CompoundComponent.tsx
    │   │   ├── constants.ts
    │   │   ├── DebugViewProvider.tsx
    │   │   ├── descriptorHelper.ts
    │   │   ├── devtools
    │   │   │   ├── InspectorDialog.module.scss
    │   │   │   ├── InspectorDialog.tsx
    │   │   │   └── InspectorDialogVisibilityContext.tsx
    │   │   ├── EngineError.ts
    │   │   ├── event-handlers.ts
    │   │   ├── InspectorButton.module.scss
    │   │   ├── InspectorContext.tsx
    │   │   ├── interception
    │   │   │   ├── abstractions.ts
    │   │   │   ├── ApiInterceptor.ts
    │   │   │   ├── ApiInterceptorProvider.tsx
    │   │   │   ├── apiInterceptorWorker.ts
    │   │   │   ├── Backend.ts
    │   │   │   ├── Errors.ts
    │   │   │   ├── IndexedDb.ts
    │   │   │   ├── initMock.ts
    │   │   │   ├── InMemoryDb.ts
    │   │   │   ├── ReadonlyCollection.ts
    │   │   │   └── useApiInterceptorContext.tsx
    │   │   ├── loader
    │   │   │   ├── ApiLoader.tsx
    │   │   │   ├── DataLoader.tsx
    │   │   │   ├── ExternalDataLoader.tsx
    │   │   │   ├── Loader.tsx
    │   │   │   ├── MockLoaderRenderer.tsx
    │   │   │   └── PageableLoader.tsx
    │   │   ├── LoaderComponent.tsx
    │   │   ├── markup-check.ts
    │   │   ├── parts.ts
    │   │   ├── renderers.ts
    │   │   ├── rendering
    │   │   │   ├── AppContent.tsx
    │   │   │   ├── AppRoot.tsx
    │   │   │   ├── AppWrapper.tsx
    │   │   │   ├── buildProxy.ts
    │   │   │   ├── collectFnVarDeps.ts
    │   │   │   ├── ComponentAdapter.tsx
    │   │   │   ├── ComponentWrapper.tsx
    │   │   │   ├── Container.tsx
    │   │   │   ├── containers.ts
    │   │   │   ├── ContainerWrapper.tsx
    │   │   │   ├── ErrorBoundary.module.scss
    │   │   │   ├── ErrorBoundary.tsx
    │   │   │   ├── InvalidComponent.module.scss
    │   │   │   ├── InvalidComponent.tsx
    │   │   │   ├── nodeUtils.ts
    │   │   │   ├── reducer.ts
    │   │   │   ├── renderChild.tsx
    │   │   │   ├── StandaloneComponent.tsx
    │   │   │   ├── StateContainer.tsx
    │   │   │   ├── UnknownComponent.module.scss
    │   │   │   ├── UnknownComponent.tsx
    │   │   │   └── valueExtractor.ts
    │   │   ├── reportEngineError.ts
    │   │   ├── RestApiProxy.ts
    │   │   ├── script-runner
    │   │   │   ├── asyncProxy.ts
    │   │   │   ├── AttributeValueParser.ts
    │   │   │   ├── bannedFunctions.ts
    │   │   │   ├── BindingTreeEvaluationContext.ts
    │   │   │   ├── eval-tree-async.ts
    │   │   │   ├── eval-tree-common.ts
    │   │   │   ├── eval-tree-sync.ts
    │   │   │   ├── ParameterParser.ts
    │   │   │   ├── process-statement-async.ts
    │   │   │   ├── process-statement-common.ts
    │   │   │   ├── process-statement-sync.ts
    │   │   │   ├── ScriptingSourceTree.ts
    │   │   │   ├── simplify-expression.ts
    │   │   │   ├── statement-queue.ts
    │   │   │   └── visitors.ts
    │   │   ├── StandaloneApp.tsx
    │   │   ├── StandaloneExtensionManager.ts
    │   │   ├── TableOfContentsContext.tsx
    │   │   ├── theming
    │   │   │   ├── _themes.scss
    │   │   │   ├── component-layout-resolver.ts
    │   │   │   ├── extendThemeUtils.ts
    │   │   │   ├── hvar.ts
    │   │   │   ├── layout-resolver.ts
    │   │   │   ├── parse-layout-props.ts
    │   │   │   ├── StyleContext.tsx
    │   │   │   ├── StyleRegistry.ts
    │   │   │   ├── ThemeContext.tsx
    │   │   │   ├── ThemeProvider.tsx
    │   │   │   ├── themes
    │   │   │   │   ├── base-utils.ts
    │   │   │   │   ├── palette.ts
    │   │   │   │   ├── root.ts
    │   │   │   │   ├── solid.ts
    │   │   │   │   ├── theme-colors.ts
    │   │   │   │   └── xmlui.ts
    │   │   │   ├── themeVars.module.scss
    │   │   │   ├── themeVars.ts
    │   │   │   ├── transformThemeVars.ts
    │   │   │   └── utils.ts
    │   │   ├── utils
    │   │   │   ├── actionUtils.ts
    │   │   │   ├── audio-utils.ts
    │   │   │   ├── base64-utils.ts
    │   │   │   ├── compound-utils.ts
    │   │   │   ├── css-utils.ts
    │   │   │   ├── DataLoaderQueryKeyGenerator.ts
    │   │   │   ├── date-utils.ts
    │   │   │   ├── extractParam.ts
    │   │   │   ├── hooks.tsx
    │   │   │   ├── LruCache.ts
    │   │   │   ├── mergeProps.ts
    │   │   │   ├── misc.ts
    │   │   │   ├── request-params.ts
    │   │   │   ├── statementUtils.ts
    │   │   │   └── treeUtils.ts
    │   │   └── xmlui-parser.ts
    │   ├── index-standalone.ts
    │   ├── index.scss
    │   ├── index.ts
    │   ├── language-server
    │   │   ├── server-common.ts
    │   │   ├── server-web-worker.ts
    │   │   ├── server.ts
    │   │   ├── services
    │   │   │   ├── common
    │   │   │   │   ├── docs-generation.ts
    │   │   │   │   ├── lsp-utils.ts
    │   │   │   │   ├── metadata-utils.ts
    │   │   │   │   └── syntax-node-utilities.ts
    │   │   │   ├── completion.ts
    │   │   │   ├── diagnostic.ts
    │   │   │   ├── format.ts
    │   │   │   └── hover.ts
    │   │   └── xmlui-metadata-generated.js
    │   ├── logging
    │   │   ├── LoggerContext.tsx
    │   │   ├── LoggerInitializer.tsx
    │   │   ├── LoggerService.ts
    │   │   └── xmlui.ts
    │   ├── logo.svg
    │   ├── parsers
    │   │   ├── common
    │   │   │   ├── GenericToken.ts
    │   │   │   ├── InputStream.ts
    │   │   │   └── utils.ts
    │   │   ├── scripting
    │   │   │   ├── code-behind-collect.ts
    │   │   │   ├── Lexer.ts
    │   │   │   ├── modules.ts
    │   │   │   ├── Parser.ts
    │   │   │   ├── ParserError.ts
    │   │   │   ├── ScriptingNodeTypes.ts
    │   │   │   ├── TokenTrait.ts
    │   │   │   ├── TokenType.ts
    │   │   │   └── tree-visitor.ts
    │   │   ├── style-parser
    │   │   │   ├── errors.ts
    │   │   │   ├── source-tree.ts
    │   │   │   ├── StyleInputStream.ts
    │   │   │   ├── StyleLexer.ts
    │   │   │   ├── StyleParser.ts
    │   │   │   └── tokens.ts
    │   │   └── xmlui-parser
    │   │       ├── CharacterCodes.ts
    │   │       ├── diagnostics.ts
    │   │       ├── fileExtensions.ts
    │   │       ├── index.ts
    │   │       ├── lint.ts
    │   │       ├── parser.ts
    │   │       ├── ParserError.ts
    │   │       ├── scanner.ts
    │   │       ├── syntax-kind.ts
    │   │       ├── syntax-node.ts
    │   │       ├── transform.ts
    │   │       ├── utils.ts
    │   │       ├── xmlui-serializer.ts
    │   │       └── xmlui-tree.ts
    │   ├── react-app-env.d.ts
    │   ├── syntax
    │   │   ├── monaco
    │   │   │   ├── grammar.monacoLanguage.ts
    │   │   │   ├── index.ts
    │   │   │   ├── xmlui-dark.ts
    │   │   │   ├── xmlui-light.ts
    │   │   │   └── xmluiscript.monacoLanguage.ts
    │   │   └── textMate
    │   │       ├── index.ts
    │   │       ├── xmlui-dark.json
    │   │       ├── xmlui-light.json
    │   │       ├── xmlui.json
    │   │       └── xmlui.tmLanguage.json
    │   ├── testing
    │   │   ├── assertions.ts
    │   │   ├── component-test-helpers.ts
    │   │   ├── ComponentDrivers.ts
    │   │   ├── drivers
    │   │   │   ├── DateInputDriver.ts
    │   │   │   ├── index.ts
    │   │   │   ├── ModalDialogDriver.ts
    │   │   │   ├── NumberBoxDriver.ts
    │   │   │   ├── TextBoxDriver.ts
    │   │   │   ├── TimeInputDriver.ts
    │   │   │   ├── TimerDriver.ts
    │   │   │   └── TreeDriver.ts
    │   │   ├── fixtures.ts
    │   │   ├── index.ts
    │   │   ├── infrastructure
    │   │   │   ├── index.html
    │   │   │   ├── main.tsx
    │   │   │   ├── public
    │   │   │   │   ├── mockServiceWorker.js
    │   │   │   │   ├── resources
    │   │   │   │   │   ├── bell.svg
    │   │   │   │   │   ├── box.svg
    │   │   │   │   │   ├── doc.svg
    │   │   │   │   │   ├── eye.svg
    │   │   │   │   │   ├── flower-640x480.jpg
    │   │   │   │   │   ├── sun.svg
    │   │   │   │   │   ├── test-image-100x100.jpg
    │   │   │   │   │   └── txt.svg
    │   │   │   │   └── serve.json
    │   │   │   └── TestBed.tsx
    │   │   └── themed-app-test-helpers.ts
    │   └── vite-env.d.ts
    ├── tests
    │   ├── components
    │   │   ├── CodeBlock
    │   │   │   └── hightlight-code.test.ts
    │   │   ├── playground-pattern.test.ts
    │   │   └── Tree
    │   │       └── Tree-states.test.ts
    │   ├── components-core
    │   │   ├── abstractions
    │   │   │   └── treeAbstractions.test.ts
    │   │   ├── container
    │   │   │   └── buildProxy.test.ts
    │   │   ├── interception
    │   │   │   ├── orderBy.test.ts
    │   │   │   ├── ReadOnlyCollection.test.ts
    │   │   │   └── request-param-converter.test.ts
    │   │   ├── scripts-runner
    │   │   │   ├── AttributeValueParser.test.ts
    │   │   │   ├── eval-tree-arrow-async.test.ts
    │   │   │   ├── eval-tree-arrow.test.ts
    │   │   │   ├── eval-tree-func-decl-async.test.ts
    │   │   │   ├── eval-tree-func-decl.test.ts
    │   │   │   ├── eval-tree-pre-post.test.ts
    │   │   │   ├── eval-tree-regression.test.ts
    │   │   │   ├── eval-tree.test.ts
    │   │   │   ├── function-proxy.test.ts
    │   │   │   ├── parser-regression.test.ts
    │   │   │   ├── process-event.test.ts
    │   │   │   ├── process-function.test.ts
    │   │   │   ├── process-implicit-context.test.ts
    │   │   │   ├── process-statement-asgn.test.ts
    │   │   │   ├── process-statement-destruct.test.ts
    │   │   │   ├── process-statement-regs.test.ts
    │   │   │   ├── process-statement-sync.test.ts
    │   │   │   ├── process-statement.test.ts
    │   │   │   ├── process-switch-sync.test.ts
    │   │   │   ├── process-switch.test.ts
    │   │   │   ├── process-try-sync.test.ts
    │   │   │   ├── process-try.test.ts
    │   │   │   └── test-helpers.ts
    │   │   ├── test-metadata-handler.ts
    │   │   ├── theming
    │   │   │   ├── border-segments.test.ts
    │   │   │   ├── component-layout.resolver.test.ts
    │   │   │   ├── layout-property-parser.test.ts
    │   │   │   ├── layout-resolver.test.ts
    │   │   │   ├── layout-resolver2.test.ts
    │   │   │   ├── layout-vp-override.test.ts
    │   │   │   └── padding-segments.test.ts
    │   │   └── utils
    │   │       ├── date-utils.test.ts
    │   │       ├── format-human-elapsed-time.test.ts
    │   │       └── LruCache.test.ts
    │   ├── language-server
    │   │   ├── completion.test.ts
    │   │   ├── format.test.ts
    │   │   ├── hover.test.ts
    │   │   └── mockData.ts
    │   └── parsers
    │       ├── common
    │       │   └── input-stream.test.ts
    │       ├── markdown
    │       │   └── parse-binding-expression.test.ts
    │       ├── parameter-parser.test.ts
    │       ├── paremeter-parser.test.ts
    │       ├── scripting
    │       │   ├── eval-tree-arrow.test.ts
    │       │   ├── eval-tree-pre-post.test.ts
    │       │   ├── eval-tree.test.ts
    │       │   ├── function-proxy.test.ts
    │       │   ├── lexer-literals.test.ts
    │       │   ├── lexer-misc.test.ts
    │       │   ├── module-parse.test.ts
    │       │   ├── parser-arrow.test.ts
    │       │   ├── parser-assignments.test.ts
    │       │   ├── parser-binary.test.ts
    │       │   ├── parser-destructuring.test.ts
    │       │   ├── parser-errors.test.ts
    │       │   ├── parser-expressions.test.ts
    │       │   ├── parser-function.test.ts
    │       │   ├── parser-literals.test.ts
    │       │   ├── parser-primary.test.ts
    │       │   ├── parser-regex.test.ts
    │       │   ├── parser-statements.test.ts
    │       │   ├── parser-unary.test.ts
    │       │   ├── process-event.test.ts
    │       │   ├── process-implicit-context.test.ts
    │       │   ├── process-statement-asgn.test.ts
    │       │   ├── process-statement-destruct.test.ts
    │       │   ├── process-statement-regs.test.ts
    │       │   ├── process-statement-sync.test.ts
    │       │   ├── process-statement.test.ts
    │       │   ├── process-switch-sync.test.ts
    │       │   ├── process-switch.test.ts
    │       │   ├── process-try-sync.test.ts
    │       │   ├── process-try.test.ts
    │       │   ├── simplify-expression.test.ts
    │       │   ├── statement-hooks.test.ts
    │       │   └── test-helpers.ts
    │       ├── style-parser
    │       │   ├── generateHvarChain.test.ts
    │       │   ├── parseHVar.test.ts
    │       │   ├── parser.test.ts
    │       │   └── tokens.test.ts
    │       └── xmlui
    │           ├── lint.test.ts
    │           ├── parser.test.ts
    │           ├── scanner.test.ts
    │           ├── transform.attr.test.ts
    │           ├── transform.circular.test.ts
    │           ├── transform.element.test.ts
    │           ├── transform.errors.test.ts
    │           ├── transform.escape.test.ts
    │           ├── transform.regression.test.ts
    │           ├── transform.script.test.ts
    │           ├── transform.test.ts
    │           └── xmlui.ts
    ├── tests-e2e
    │   ├── api-bound-component-regression.spec.ts
    │   ├── api-call-as-extracted-component.spec.ts
    │   ├── assign-to-object-or-array-regression.spec.ts
    │   ├── binding-regression.spec.ts
    │   ├── children-as-template-context-vars.spec.ts
    │   ├── compound-component.spec.ts
    │   ├── context-vars-regression.spec.ts
    │   ├── data-bindings.spec.ts
    │   ├── datasource-and-api-usage-in-var.spec.ts
    │   ├── datasource-direct-binding.spec.ts
    │   ├── datasource-onLoaded-regression.spec.ts
    │   ├── modify-array-item-regression.spec.ts
    │   ├── namespaces.spec.ts
    │   ├── push-to-array-regression.spec.ts
    │   ├── screen-breakpoints.spec.ts
    │   ├── scripting.spec.ts
    │   ├── state-scope-in-pages.spec.ts
    │   └── state-var-scopes.spec.ts
    ├── tsconfig.json
    ├── tsdown.config.ts
    ├── vite.config.ts
    └── vitest.config.ts
```

# Files

--------------------------------------------------------------------------------
/xmlui/tests/components-core/scripts-runner/process-switch-sync.test.ts:
--------------------------------------------------------------------------------

```typescript
  1 | import { describe, expect, it, assert } from "vitest";
  2 | import {createEvalContext, parseStatements} from "./test-helpers";
  3 | import {processStatementQueue} from "../../../src/components-core/script-runner/process-statement-sync";
  4 | 
  5 | describe("Process switch statements (sync) (exp)", () => {
  6 |     it("no case", () => {
  7 |         // --- Arrange
  8 |         const source = `
  9 |             let x = 0;
 10 |             switch (x) {
 11 |             }
 12 |         `;
 13 |         const evalContext = createEvalContext({
 14 |         });
 15 |         const statements = parseStatements(source);
 16 | 
 17 |         // --- Act
 18 |         processStatementQueue(statements, evalContext);
 19 | 
 20 |         // --- Assert
 21 |         const thread = evalContext.mainThread!;
 22 |         expect(thread.blocks!.length).equal(1);
 23 |         expect(thread.blocks![0].vars.x).equal(0);
 24 |     });
 25 | 
 26 |     it("no matching case #1", () => {
 27 |         // --- Arrange
 28 |         const source = `
 29 |             let x = 0;
 30 |             let y = 0;
 31 |             switch (x) {
 32 |               case 3:
 33 |                 y++;
 34 |             }
 35 |         `;
 36 |         const evalContext = createEvalContext({
 37 |         });
 38 |         const statements = parseStatements(source);
 39 | 
 40 |         // --- Act
 41 |         processStatementQueue(statements, evalContext);
 42 | 
 43 |         // --- Assert
 44 |         const thread = evalContext.mainThread!;
 45 |         expect(thread.blocks!.length).equal(1);
 46 |         expect(thread.blocks![0].vars.y).equal(0);
 47 |     });
 48 | 
 49 |     it("no matching case #2", () => {
 50 |         // --- Arrange
 51 |         const source = `
 52 |             let x = 0;
 53 |             let y = 0;
 54 |             switch (x) {
 55 |               case 2:
 56 |                 y++;
 57 |                 break;
 58 |               case 3:
 59 |                 y++;
 60 |                 break;
 61 |             }
 62 |         `;
 63 |         const evalContext = createEvalContext({
 64 |         });
 65 |         const statements = parseStatements(source);
 66 | 
 67 |         // --- Act
 68 |         processStatementQueue(statements, evalContext);
 69 | 
 70 |         // --- Assert
 71 |         const thread = evalContext.mainThread!;
 72 |         expect(thread.blocks!.length).equal(1);
 73 |         expect(thread.blocks![0].vars.y).equal(0);
 74 |     });
 75 | 
 76 |     it("no matching case #3", () => {
 77 |         // --- Arrange
 78 |         const source = `
 79 |             let x = 0;
 80 |             let y = 0;
 81 |             switch (x) {
 82 |               case 1:
 83 |                 y++;
 84 |               case 2:
 85 |                 y++;
 86 |                 break;
 87 |               case 3:
 88 |                 y++;
 89 |                 break;
 90 |             }
 91 |         `;
 92 |         const evalContext = createEvalContext({
 93 |         });
 94 |         const statements = parseStatements(source);
 95 | 
 96 |         // --- Act
 97 |         processStatementQueue(statements, evalContext);
 98 | 
 99 |         // --- Assert
100 |         const thread = evalContext.mainThread!;
101 |         expect(thread.blocks!.length).equal(1);
102 |         expect(thread.blocks![0].vars.y).equal(0);
103 |     });
104 | 
105 |     it("matching case #1", () => {
106 |         // --- Arrange
107 |         const source = `
108 |             let x = 0;
109 |             let y = 0;
110 |             switch (x) {
111 |               case 0:
112 |                 y++;
113 |                 break;
114 |               case 1:
115 |                 y++;
116 |                 break;
117 |               case 2:
118 |                 y++;
119 |                 break;
120 |               case 3:
121 |                 y++;
122 |                 break;
123 |             }
124 |         `;
125 |         const evalContext = createEvalContext({
126 |         });
127 |         const statements = parseStatements(source);
128 | 
129 |         // --- Act
130 |         processStatementQueue(statements, evalContext);
131 | 
132 |         // --- Assert
133 |         const thread = evalContext.mainThread!;
134 |         expect(thread.blocks!.length).equal(1);
135 |         expect(thread.blocks![0].vars.y).equal(1);
136 |     });
137 | 
138 |     it("matching case #2", () => {
139 |         // --- Arrange
140 |         const source = `
141 |             let x = 0;
142 |             let y = 0;
143 |             switch (x) {
144 |               default:
145 |                 y++;
146 |                 break;  
147 |               case 1:
148 |                 y++;
149 |                 break;
150 |               case 2:
151 |                 y++;
152 |                 break;
153 |               case 3:
154 |                 y++;
155 |                 break;
156 |             }
157 |         `;
158 |         const evalContext = createEvalContext({
159 |         });
160 |         const statements = parseStatements(source);
161 | 
162 |         // --- Act
163 |         processStatementQueue(statements, evalContext);
164 | 
165 |         // --- Assert
166 |         const thread = evalContext.mainThread!;
167 |         expect(thread.blocks!.length).equal(1);
168 |         expect(thread.blocks![0].vars.y).equal(1);
169 |     });
170 | 
171 |     it("matching case #3", () => {
172 |         // --- Arrange
173 |         const source = `
174 |             let x = 0;
175 |             let y = 0;
176 |             switch (x) {
177 |               case 1:
178 |                 y++;
179 |                 break;
180 |               default:
181 |                 y++;
182 |                 break;  
183 |               case 2:
184 |                 y++;
185 |                 break;
186 |               case 3:
187 |                 y++;
188 |                 break;
189 |             }
190 |         `;
191 |         const evalContext = createEvalContext({
192 |         });
193 |         const statements = parseStatements(source);
194 | 
195 |         // --- Act
196 |         processStatementQueue(statements, evalContext);
197 | 
198 |         // --- Assert
199 |         const thread = evalContext.mainThread!;
200 |         expect(thread.blocks!.length).equal(1);
201 |         expect(thread.blocks![0].vars.y).equal(1);
202 |     });
203 | 
204 |     it("matching case #4", () => {
205 |         // --- Arrange
206 |         const source = `
207 |             let x = 0;
208 |             let y = 0;
209 |             switch (x) {
210 |               case 1:
211 |                 y++;
212 |                 break;
213 |               case 2:
214 |                 y++;
215 |                 break;
216 |               default:
217 |                 y++;
218 |                 break;  
219 |               case 3:
220 |                 y++;
221 |                 break;
222 |             }
223 |         `;
224 |         const evalContext = createEvalContext({
225 |         });
226 |         const statements = parseStatements(source);
227 | 
228 |         // --- Act
229 |         processStatementQueue(statements, evalContext);
230 | 
231 |         // --- Assert
232 |         const thread = evalContext.mainThread!;
233 |         expect(thread.blocks!.length).equal(1);
234 |         expect(thread.blocks![0].vars.y).equal(1);
235 |     });
236 | 
237 |     it("matching case #5", () => {
238 |         // --- Arrange
239 |         const source = `
240 |             let x = 0;
241 |             let y = 0;
242 |             switch (x) {
243 |               case 1:
244 |                 y++;
245 |                 break;
246 |               case 2:
247 |                 y++;
248 |                 break;
249 |               case 3:
250 |                 y++;
251 |                 break;
252 |               default:
253 |                 y++;
254 |                 break;  
255 |             }
256 |         `;
257 |         const evalContext = createEvalContext({
258 |         });
259 |         const statements = parseStatements(source);
260 | 
261 |         // --- Act
262 |         processStatementQueue(statements, evalContext);
263 | 
264 |         // --- Assert
265 |         const thread = evalContext.mainThread!;
266 |         expect(thread.blocks!.length).equal(1);
267 |         expect(thread.blocks![0].vars.y).equal(1);
268 |     });
269 | 
270 |     it("matching case, fall-through #1", () => {
271 |         // --- Arrange
272 |         const source = `
273 |             let x = 0;
274 |             let y = 0;
275 |             switch (x) {
276 |               case 0:
277 |                 y++;
278 |               case 1:
279 |                 y++;
280 |                 break;
281 |               case 2:
282 |                 y++;
283 |                 break;
284 |               case 3:
285 |                 y++;
286 |                 break;
287 |             }
288 |         `;
289 |         const evalContext = createEvalContext({
290 |         });
291 |         const statements = parseStatements(source);
292 | 
293 |         // --- Act
294 |         processStatementQueue(statements, evalContext);
295 | 
296 |         // --- Assert
297 |         const thread = evalContext.mainThread!;
298 |         expect(thread.blocks!.length).equal(1);
299 |         expect(thread.blocks![0].vars.y).equal(2);
300 |     });
301 | 
302 |     it("matching case, fall-through #2", () => {
303 |         // --- Arrange
304 |         const source = `
305 |             let x = 0;
306 |             let y = 0;
307 |             switch (x) {
308 |               case 0:
309 |                 y++;
310 |               case 1:
311 |                 y++;
312 |               case 2:
313 |                 y++;
314 |                 break;
315 |               case 3:
316 |                 y++;
317 |                 break;
318 |             }
319 |         `;
320 |         const evalContext = createEvalContext({
321 |         });
322 |         const statements = parseStatements(source);
323 | 
324 |         // --- Act
325 |         processStatementQueue(statements, evalContext);
326 | 
327 |         // --- Assert
328 |         const thread = evalContext.mainThread!;
329 |         expect(thread.blocks!.length).equal(1);
330 |         expect(thread.blocks![0].vars.y).equal(3);
331 |     });
332 | 
333 |     it("matching case, fall-through #3", () => {
334 |         // --- Arrange
335 |         const source = `
336 |             let x = 0;
337 |             let y = 0;
338 |             switch (x) {
339 |               case 0:
340 |                 y++;
341 |               case 1:
342 |                 y++;
343 |               case 2:
344 |                 y++;
345 |               case 3:
346 |                 y++;
347 |                 break;
348 |             }
349 |         `;
350 |         const evalContext = createEvalContext({
351 |         });
352 |         const statements = parseStatements(source);
353 | 
354 |         // --- Act
355 |         processStatementQueue(statements, evalContext);
356 | 
357 |         // --- Assert
358 |         const thread = evalContext.mainThread!;
359 |         expect(thread.blocks!.length).equal(1);
360 |         expect(thread.blocks![0].vars.y).equal(4);
361 |     });
362 | 
363 |     it("matching case, fall-through #4", () => {
364 |         // --- Arrange
365 |         const source = `
366 |             let x = 0;
367 |             let y = 0;
368 |             switch (x) {
369 |               case 0:
370 |                 y++;
371 |               case 1:
372 |                 y++;
373 |               case 2:
374 |                 y++;
375 |               case 3:
376 |                 y++;
377 |             }
378 |         `;
379 |         const evalContext = createEvalContext({
380 |         });
381 |         const statements = parseStatements(source);
382 | 
383 |         // --- Act
384 |         processStatementQueue(statements, evalContext);
385 | 
386 |         // --- Assert
387 |         const thread = evalContext.mainThread!;
388 |         expect(thread.blocks!.length).equal(1);
389 |         expect(thread.blocks![0].vars.y).equal(4);
390 |     });
391 | 
392 |     it("switch in loop #1", () => {
393 |         // --- Arrange
394 |         const source = `
395 |             let x = 0;
396 |             let y = 0;
397 |             while (x < 4) {
398 |               switch (x) {
399 |                 case 0:
400 |                   y++;
401 |                 case 1:
402 |                   y++;
403 |                 case 2:
404 |                   y++;
405 |                 case 3:
406 |                   y++;
407 |               }
408 |               x++;
409 |             }  
410 |         `;
411 |         const evalContext = createEvalContext({
412 |         });
413 |         const statements = parseStatements(source);
414 | 
415 |         // --- Act
416 |         processStatementQueue(statements, evalContext);
417 | 
418 |         // --- Assert
419 |         const thread = evalContext.mainThread!;
420 |         expect(thread.blocks!.length).equal(1);
421 |         expect(thread.blocks![0].vars.y).equal(10);
422 |     });
423 | 
424 |     it("switch in loop #2", () => {
425 |         // --- Arrange
426 |         const source = `
427 |             let x = 0;
428 |             let y = 0;
429 |             while (x < 4) {
430 |               switch (x) {
431 |                 case 0:
432 |                   y++;
433 |                 case 1:
434 |                   y++;
435 |                 case 2:
436 |                   y++;
437 |                 case 3:
438 |                   y++;
439 |               }
440 |               x++;
441 |               break;
442 |             }  
443 |         `;
444 |         const evalContext = createEvalContext({
445 |         });
446 |         const statements = parseStatements(source);
447 | 
448 |         // --- Act
449 |         processStatementQueue(statements, evalContext);
450 | 
451 |         // --- Assert
452 |         const thread = evalContext.mainThread!;
453 |         expect(thread.blocks!.length).equal(1);
454 |         expect(thread.blocks![0].vars.y).equal(4);
455 |     });
456 | 
457 |     it("switch in loop #3", () => {
458 |         // --- Arrange
459 |         const source = `
460 |             let x = 0;
461 |             let y = 0;
462 |             while (x < 4) {
463 |               switch (x) {
464 |                 case 0:
465 |                   y++;
466 |                   break;
467 |                 case 1:
468 |                   y++;
469 |                   break;
470 |                 case 2:
471 |                   y++;
472 |                   break;
473 |                 case 3:
474 |                   y++;
475 |                   break;
476 |               }
477 |               x++;
478 |             }  
479 |         `;
480 |         const evalContext = createEvalContext({
481 |         });
482 |         const statements = parseStatements(source);
483 | 
484 |         // --- Act
485 |         processStatementQueue(statements, evalContext);
486 | 
487 |         // --- Assert
488 |         const thread = evalContext.mainThread!;
489 |         expect(thread.blocks!.length).equal(1);
490 |         expect(thread.blocks![0].vars.y).equal(4);
491 |     });
492 | 
493 |     it("switch in loop #4", () => {
494 |         // --- Arrange
495 |         const source = `
496 |             let x = 0;
497 |             let y = 0;
498 |             while (x < 4) {
499 |               switch (x) {
500 |                 case 0:
501 |                   y++;
502 |                   break;
503 |                 case 1:
504 |                   y++;
505 |                   break;
506 |                 case 2:
507 |                   y++;
508 |                 case 3:
509 |                   y++;
510 |               }
511 |               x++;
512 |             }  
513 |         `;
514 |         const evalContext = createEvalContext({
515 |         });
516 |         const statements = parseStatements(source);
517 | 
518 |         // --- Act
519 |         processStatementQueue(statements, evalContext);
520 | 
521 |         // --- Assert
522 |         const thread = evalContext.mainThread!;
523 |         expect(thread.blocks!.length).equal(1);
524 |         expect(thread.blocks![0].vars.y).equal(5);
525 |     });
526 | 
527 |     it("switch in loop #5 (continue)", () => {
528 |         // --- Arrange
529 |         const source = `
530 |             let x = 0;
531 |             let y = 0;
532 |             while (x < 4) {
533 |               switch (x) {
534 |                 case 0:
535 |                   y++;
536 |                   break;
537 |                 case 1:
538 |                   y++;
539 |                   break;
540 |                 case 2:
541 |                   y++;
542 |                   x += 3;
543 |                   continue;
544 |                 case 3:
545 |                   y++;
546 |               }
547 |               x++;
548 |             }
549 |         `;
550 |         const evalContext = createEvalContext({
551 |         });
552 |         const statements = parseStatements(source);
553 | 
554 |         // --- Act
555 |         processStatementQueue(statements, evalContext);
556 | 
557 |         // --- Assert
558 |         const thread = evalContext.mainThread!;
559 |         expect(thread.blocks!.length).equal(1);
560 |         expect(thread.blocks![0].vars.y).equal(3);
561 |     });
562 | 
563 |     it("switch in loop #6 (return)", () => {
564 |         // --- Arrange
565 |         const source = `
566 |             let x = 0;
567 |             let y = 0;
568 |             while (x < 4) {
569 |               switch (x) {
570 |                 case 0:
571 |                   y++;
572 |                   break;
573 |                 case 1:
574 |                   y++;
575 |                   break;
576 |                 case 2:
577 |                   y++;
578 |                   x += 3;
579 |                   return;
580 |                 case 3:
581 |                   y++;
582 |               }
583 |               x++;
584 |             }
585 |         `;
586 |         const evalContext = createEvalContext({
587 |         });
588 |         const statements = parseStatements(source);
589 | 
590 |         // --- Act
591 |         processStatementQueue(statements, evalContext);
592 | 
593 |         // --- Assert
594 |         const thread = evalContext.mainThread!;
595 |         expect(thread.blocks![0].vars.y).equal(3);
596 |     });
597 | 
598 |     it("switch in loop #6 (return)", () => {
599 |         // --- Arrange
600 |         const source = `
601 |             let x = 0;
602 |             let y = 0;
603 |             while (x < 4) {
604 |               switch (x) {
605 |                 case 0:
606 |                   y++;
607 |                   break;
608 |                 case 1:
609 |                   y++;
610 |                   break;
611 |                 case 2:
612 |                   y++;
613 |                   x += 3;
614 |                   return;
615 |                 case 3:
616 |                   y++;
617 |               }
618 |               x++;
619 |             }
620 |         `;
621 |         const evalContext = createEvalContext({
622 |         });
623 |         const statements = parseStatements(source);
624 | 
625 |         // --- Act
626 |         processStatementQueue(statements, evalContext);
627 | 
628 |         // --- Assert
629 |         const thread = evalContext.mainThread!;
630 |         expect(thread.blocks![0].vars.y).equal(3);
631 |     });
632 | 
633 |     it("switch has its own scope", () => {
634 |         // --- Arrange
635 |         const source = `
636 |             let x = 0;
637 |             let y = 0;
638 |             let z = 0;
639 |             switch (x) {
640 |               case 0:
641 |                 let y = 3;
642 |                 z = y + 1;
643 |                 break;
644 |               case 1:
645 |                 y++;
646 |                 break;
647 |             }
648 |         `;
649 |         const evalContext = createEvalContext({
650 |         });
651 |         const statements = parseStatements(source);
652 | 
653 |         // --- Act
654 |         processStatementQueue(statements, evalContext);
655 |         
656 |         // --- Assert
657 |         const thread = evalContext.mainThread!;
658 |         expect(thread.blocks![0].vars.y).equal(0);
659 |         expect(thread.blocks![0].vars.z).equal(4);
660 |     });
661 | 
662 |     it("switch fails with multiple let", () => {
663 |         // --- Arrange
664 |         const source = `
665 |             let x = 0;
666 |             let y = 0;
667 |             switch (x) {
668 |               case 0:
669 |                 let z = 3;
670 |               case 1:
671 |                 let z = 4;
672 |                 y++;
673 |                 break;
674 |             }
675 |         `;
676 |         const evalContext = createEvalContext({
677 |         });
678 |         const statements = parseStatements(source);
679 | 
680 |         // --- Act/Assert
681 |         try {
682 |             processStatementQueue(statements, evalContext);
683 |         } catch (err: any) {
684 |             expect(err.toString().includes("already declared")).equal(true);
685 |             return;
686 |         }
687 |         assert.fail("Exception expected")
688 |     });
689 | 
690 |     it("switch fails with multiple const/let", () => {
691 |         // --- Arrange
692 |         const source = `
693 |             let x = 0;
694 |             let y = 0;
695 |             switch (x) {
696 |               case 0:
697 |                 let z = 3;
698 |               case 1:
699 |                 const z = 4;
700 |                 y++;
701 |                 break;
702 |             }
703 |         `;
704 |         const evalContext = createEvalContext({
705 |         });
706 |         const statements = parseStatements(source);
707 | 
708 |         // --- Act/Assert
709 |         try {
710 |             processStatementQueue(statements, evalContext);
711 |         } catch (err: any) {
712 |             expect(err.toString().includes("already declared")).equal(true);
713 |             return;
714 |         }
715 |         assert.fail("Exception expected")
716 |     });
717 | 
718 |     it("switch fails with multiple const", () => {
719 |         // --- Arrange
720 |         const source = `
721 |             let x = 0;
722 |             let y = 0;
723 |             switch (x) {
724 |               case 0:
725 |                 const z = 3;
726 |               case 1:
727 |                 const z = 4;
728 |                 y++;
729 |                 break;
730 |             }
731 |         `;
732 |         const evalContext = createEvalContext({
733 |         });
734 |         const statements = parseStatements(source);
735 | 
736 |         // --- Act/Assert
737 |         try {
738 |             processStatementQueue(statements, evalContext);
739 |         } catch (err: any) {
740 |             expect(err.toString().includes("already declared")).equal(true);
741 |             return;
742 |         }
743 |         assert.fail("Exception expected")
744 |     });
745 | });
```

--------------------------------------------------------------------------------
/xmlui/src/components-core/RestApiProxy.ts:
--------------------------------------------------------------------------------

```typescript
  1 | import type { AxiosResponse } from "axios";
  2 | import { isPlainObject, isUndefined, omitBy } from "lodash-es";
  3 | 
  4 | import type { AppContextObject } from "../abstractions/AppContextDefs";
  5 | import type { BindingTreeEvaluationContext } from "./script-runner/BindingTreeEvaluationContext";
  6 | import {
  7 |   T_ARROW_EXPRESSION_STATEMENT,
  8 |   type ArrowExpressionStatement,
  9 | } from "./script-runner/ScriptingSourceTree";
 10 | 
 11 | import { extractParam } from "./utils/extractParam";
 12 | import { randomUUID, readCookie } from "./utils/misc";
 13 | import { GenericBackendError } from "./EngineError";
 14 | import { processStatementQueue } from "./script-runner/process-statement-sync";
 15 | import type { ApiInterceptor } from "./interception/ApiInterceptor";
 16 | 
 17 | type OnProgressFn = (progressEvent: { loaded: number; total?: number; progress?: number }) => void;
 18 | 
 19 | interface FileChunk {
 20 |   blob: Blob;
 21 |   chunkStart: number;
 22 |   chunkEnd: number;
 23 | }
 24 | 
 25 | export type ApiOperationDef = {
 26 |   method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options" | "trace" | "connect";
 27 |   url: string;
 28 |   rawBody?: any;
 29 |   body?: any;
 30 |   queryParams?: Record<string, any>;
 31 |   headers?: Record<string, any>;
 32 |   payloadType?: string;
 33 | };
 34 | 
 35 | export type UploadOperationDef = ApiOperationDef & {
 36 |   file: File;
 37 |   formParams?: Record<string, any>;
 38 |   asForm?: boolean;
 39 | };
 40 | 
 41 | export type DownloadOperationDef = ApiOperationDef & {
 42 |   fileName: string;
 43 | };
 44 | 
 45 | export type ApiActionOptions = {
 46 |   resolveBindingExpressions?: boolean;
 47 | };
 48 | 
 49 | interface RestAPIAdapterPropsV2 {
 50 |   apiUrl: string;
 51 |   headers?: Record<string, string>;
 52 |   errorResponseTransform?: string;
 53 | }
 54 | 
 55 | function isAxiosResponse(response: AxiosResponse | Response): response is AxiosResponse {
 56 |   return "data" in response;
 57 | }
 58 | 
 59 | function getContentType(response: AxiosResponse | Response): string {
 60 |   if (isAxiosResponse(response)) {
 61 |     return response.headers['content-type'] || response.headers['Content-Type'] || '';
 62 |   } else {
 63 |     return response.headers.get('content-type') || '';
 64 |   }
 65 | }
 66 | 
 67 | // --- Tests for the most common binary types
 68 | function isBinaryContentType(contentType: string): boolean {
 69 |   const binaryTypes = [
 70 |     // Images
 71 |     'image/',
 72 |     // Audio
 73 |     'audio/',
 74 |     // Video
 75 |     'video/',
 76 |     // Documents
 77 |     'application/pdf',
 78 |     'application/msword',
 79 |     'application/vnd.openxmlformats-officedocument.',
 80 |     'application/vnd.ms-excel',
 81 |     'application/vnd.ms-powerpoint',
 82 |     // Archives
 83 |     'application/zip',
 84 |     'application/x-rar-compressed',
 85 |     'application/x-tar',
 86 |     'application/gzip',
 87 |     'application/x-7z-compressed',
 88 |     // Other binary
 89 |     'application/octet-stream',
 90 |     'application/x-binary',
 91 |   ];
 92 |   
 93 |   return binaryTypes.some(type => contentType.toLowerCase().includes(type.toLowerCase()));
 94 | }
 95 | 
 96 | // --- Tests if a particular content type returns an ArrayBuffer
 97 | function shouldReturnAsArrayBuffer(contentType: string): boolean {
 98 |   const arrayBufferTypes = [
 99 |     'application/zip',
100 |     'application/x-rar-compressed',
101 |     'application/x-tar',
102 |     'application/gzip',
103 |     'application/x-7z-compressed',
104 |     'application/x-binary',
105 |   ];
106 |   
107 |   return arrayBufferTypes.some(type => contentType.toLowerCase().includes(type.toLowerCase()));
108 | }
109 | 
110 | async function parseResponseBody(response: AxiosResponse | Response, logError = false) {
111 |   let resp: any;
112 |   if (isAxiosResponse(response)) {
113 |     resp = response.data;
114 |   } else {
115 |     const contentType = getContentType(response);
116 |     
117 |     // Handle binary content types
118 |     if (isBinaryContentType(contentType)) {
119 |       try {
120 |         if (shouldReturnAsArrayBuffer(contentType)) {
121 |           resp = await response.clone().arrayBuffer();
122 |         } else {
123 |           resp = await response.clone().blob();
124 |         }
125 |       } catch (e) {
126 |         if (logError) {
127 |           console.error("Failed to parse binary response", e, contentType);
128 |         }
129 |         // Fallback to text if binary parsing fails
130 |         try {
131 |           resp = await response.clone().text();
132 |         } catch (textError) {
133 |           if (logError) {
134 |             console.error("Failed to parse response as text after binary parsing failed", textError);
135 |           }
136 |         }
137 |       }
138 |     } else {
139 |       // Handle text-based content types (JSON, text, etc.)
140 |       try {
141 |         resp = await response.clone().json();
142 |       } catch (e: any) {
143 |         try {
144 |           resp = await response.clone().text();
145 |         } catch (e) {
146 |           if (logError) {
147 |             console.error("Failed to parse response as text or JSON", response.body);
148 |           }
149 |         }
150 |       }
151 |     }
152 |   }
153 |   return resp;
154 | }
155 | 
156 | //TODO illesg unit test.....
157 | function appendFormFieldValue(
158 |   { key, value }: { key: string; value: any },
159 |   formData: FormData,
160 |   prevKey: string = key,
161 | ) {
162 |   if (value === undefined || value === null) {
163 |     return;
164 |   }
165 |   if (value instanceof File || value instanceof Blob) {
166 |     formData.append(key, value);
167 |     return;
168 |   }
169 |   if (Array.isArray(value)) {
170 |     value.forEach((val) => {
171 |       appendFormFieldValue({ key, value: val }, formData, prevKey);
172 |     });
173 |   } else if (isPlainObject(value)) {
174 |     Object.entries(value).forEach(([objKey, objVal]) => {
175 |       const concatenatedObjectKey = `${prevKey}.${objKey}`;
176 |       appendFormFieldValue(
177 |         {
178 |           key: concatenatedObjectKey,
179 |           value: objVal,
180 |         },
181 |         formData,
182 |         concatenatedObjectKey,
183 |       );
184 |     });
185 |   } else {
186 |     formData.append(key, value.toString());
187 |   }
188 | }
189 | 
190 | 
191 | const origin = (typeof window !== "undefined" && window.location?.href) || 'http://localhost';
192 | const originUrl = new URL(origin);
193 | function isURLSameOrigin(url: string): boolean {
194 |   const urlObj = new URL(url, origin);
195 | 
196 |   return (
197 |     originUrl.protocol === urlObj.protocol &&
198 |     originUrl.host === urlObj.host &&
199 |     originUrl.port === urlObj.port
200 |   );
201 |   
202 | }
203 | 
204 | export default class RestApiProxy {
205 |   private config: RestAPIAdapterPropsV2;
206 |   private appContext?: AppContextObject;
207 |   public apiInstance?: ApiInterceptor;
208 | 
209 |   constructor(appContext?: AppContextObject, apiInstance?: ApiInterceptor) {
210 |     const conf = appContext?.appGlobals || { apiUrl: "" };
211 |     const { apiUrl, errorResponseTransform } = conf;
212 |     this.appContext = appContext;
213 |     this.apiInstance = apiInstance;
214 | 
215 |     this.config = {
216 |       apiUrl,
217 |       errorResponseTransform,
218 |       headers: {
219 |         ...appContext?.appGlobals?.headers,
220 |       },
221 |     };
222 |   }
223 | 
224 |   public execute = async ({
225 |     abortSignal,
226 |     operation,
227 |     params,
228 |     parseOptions,
229 |     resolveBindingExpressions = false,
230 |     transactionId = randomUUID(),
231 |     onProgress,
232 |   }: {
233 |     abortSignal?: AbortSignal;
234 |     operation: ApiOperationDef;
235 |     params?: any;
236 |     parseOptions?: {
237 |       asBlob?: boolean;
238 |       asFile?: boolean;
239 |     };
240 |     transactionId?: string;
241 |     resolveBindingExpressions?: boolean;
242 |     onProgress?: OnProgressFn;
243 |   }): Promise<any> => {
244 |     return await this.executeOperation({
245 |       operation,
246 |       abortSignal,
247 |       contextParams: params,
248 |       resolveBindingExpressions,
249 |       parseResponse: parseOptions?.asFile
250 |         ? async (response) => {
251 |             //we can't access content-disposition header if it's a CORS request: The suggested workaround was adding Access-Control-Expose-Headers:Content-Disposition to the response header on the server.
252 |             // more info here: https://github.com/matthew-andrews/isomorphic-fetch/issues/67
253 |             let fileName = (operation as DownloadOperationDef).fileName || "unknown";
254 |             if (
255 |               response.headers &&
256 |               response.headers.get &&
257 |               typeof response.headers.get === "function"
258 |             ) {
259 |               const contentDisposition = response.headers.get("Content-Disposition")?.toString();
260 |               if (contentDisposition) {
261 |                 const fileNameMatch = contentDisposition.match(/filename="(.+)"/);
262 |                 if (fileNameMatch && fileNameMatch.length === 2) fileName = fileNameMatch[1];
263 |               }
264 |             }
265 |             return isAxiosResponse(response)
266 |               ? response.data
267 |               : new File([await response.clone().blob()], fileName);
268 |           }
269 |         : undefined,
270 |       transactionId,
271 |       onUploadProgress: onProgress,
272 |     });
273 |   };
274 | 
275 |   public upload = async ({
276 |     operation,
277 |     params = {},
278 |     chunk,
279 |     onUploadProgress,
280 |     abortSignal,
281 |     transactionId = randomUUID(),
282 |     resolveBindingExpressions = false,
283 |   }: {
284 |     abortSignal?: AbortSignal;
285 |     operation: UploadOperationDef;
286 |     params?: any;
287 |     chunk?: FileChunk;
288 |     onUploadProgress?: OnProgressFn;
289 |     transactionId?: string;
290 |     resolveBindingExpressions?: boolean;
291 |   }) => {
292 |     const { file, asForm, formParams } = this.extractParam(
293 |       resolveBindingExpressions,
294 |       operation,
295 |       params,
296 |     );
297 | 
298 |     const uploadParams = {
299 |       chunkStart: chunk?.chunkStart,
300 |       chunkEnd: chunk ? chunk?.chunkEnd - 1 : undefined,
301 |       chunkLength: chunk ? chunk?.chunkEnd - chunk?.chunkStart : undefined,
302 |       fileSize: file.size,
303 |       urlSafeName: encodeURIComponent(file.name),
304 |       fileName: file.name,
305 |     };
306 | 
307 |     const contextParams = { ...params, $uploadParams: uploadParams };
308 | 
309 |     if (asForm) {
310 |       const data = new FormData();
311 |       data.append(file.name, chunk?.blob || file);
312 |       if (formParams) {
313 |         Object.entries(this.extractParam(resolveBindingExpressions, formParams, params)).forEach(
314 |           ([key, value]) => {
315 |             data.append(key, value as string);
316 |           },
317 |         );
318 |       }
319 | 
320 |       return await this.executeOperation({
321 |         operation,
322 |         contextParams,
323 |         resolveBindingExpressions,
324 |         rawBody: data,
325 |         headers: {
326 |           ...this.extractParam(resolveBindingExpressions, operation.headers || {}, contextParams),
327 |           // https://muffinman.io/blog/uploading-files-using-fetch-multipart-form-data/
328 |           // the browser sets the content-type in this case
329 |           "Content-Type": undefined,
330 |         },
331 |         onUploadProgress,
332 |         abortSignal,
333 |         transactionId,
334 |       });
335 |     }
336 | 
337 |     return new Promise((resolve, reject) => {
338 |       const reader = new FileReader();
339 |       reader.readAsArrayBuffer(chunk?.blob || file);
340 |       reader.onload = async (evt) => {
341 |         try {
342 |           if (evt.target === null) {
343 |             reject();
344 |             return;
345 |           }
346 |           resolve(
347 |             await this.executeOperation({
348 |               operation,
349 |               contextParams,
350 |               resolveBindingExpressions,
351 |               rawBody: evt.target.result,
352 |               headers: {
353 |                 ...this.extractParam(
354 |                   resolveBindingExpressions,
355 |                   operation.headers || {},
356 |                   contextParams,
357 |                 ),
358 |                 "Content-Type": file.type,
359 |               },
360 |               onUploadProgress,
361 |               abortSignal,
362 |               transactionId,
363 |             }),
364 |           );
365 |         } catch (e) {
366 |           reject(e);
367 |         }
368 |       };
369 |       reader.onerror = () => {
370 |         reject();
371 |       };
372 |     });
373 |   };
374 | 
375 |   public resolveUrl = ({
376 |     operation,
377 |     params = {},
378 |     resolveBindingExpressions = false,
379 |   }: {
380 |     operation: ApiOperationDef;
381 |     params?: any;
382 |     resolveBindingExpressions?: boolean;
383 |   }) => {
384 |     return this.generateFullApiUrl(
385 |       this.extractParam(resolveBindingExpressions, operation.url, params),
386 |       this.extractParam(resolveBindingExpressions, operation.queryParams, params),
387 |     );
388 |   };
389 | 
390 |   private extractParam = (
391 |     resolveAsBindingExpression: boolean,
392 |     value: any,
393 |     params = {},
394 |     strict?: boolean,
395 |   ) => {
396 |     const localContext = { $adapterConfig: this.config, ...params };
397 |     if (resolveAsBindingExpression) {
398 |       return extractParam(localContext, value, this.appContext, strict);
399 |     }
400 |     if (value?._ARROW_EXPR_) {
401 |       //TODO illesg review, this whole processstatement is because of the chunked uploads (headers as function)
402 |       const evalContext: BindingTreeEvaluationContext = {
403 |         eventArgs: [localContext],
404 |       };
405 |       try {
406 |         const arrowStmt = {
407 |           type: T_ARROW_EXPRESSION_STATEMENT,
408 |           expr: value,
409 |         } as ArrowExpressionStatement;
410 | 
411 |         processStatementQueue([arrowStmt], evalContext);
412 | 
413 |         if (evalContext.mainThread?.blocks?.length) {
414 |           return evalContext.mainThread.blocks[evalContext.mainThread.blocks.length - 1]
415 |             .returnValue;
416 |         }
417 |         return undefined;
418 |       } catch (e) {
419 |         console.error(e);
420 |         return undefined;
421 |       }
422 |     }
423 |     return value;
424 |   };
425 | 
426 |   private executeOperation = async ({
427 |     operation,
428 |     contextParams,
429 |     abortSignal,
430 |     resolveBindingExpressions,
431 |     relativePath = this.extractParam(resolveBindingExpressions, operation.url, contextParams),
432 |     method = this.extractParam(resolveBindingExpressions, operation.method, contextParams),
433 |     queryParams = this.extractParam(
434 |       resolveBindingExpressions,
435 |       operation.queryParams,
436 |       contextParams,
437 |     ),
438 |     body = this.extractParam(resolveBindingExpressions, operation.body, contextParams, true),
439 |     rawBody = this.extractParam(resolveBindingExpressions, operation.rawBody, contextParams),
440 |     headers = this.extractParam(resolveBindingExpressions, operation.headers, contextParams),
441 |     payloadType = this.extractParam(
442 |       resolveBindingExpressions,
443 |       operation.payloadType,
444 |       contextParams,
445 |     ) || "json",
446 |     onUploadProgress,
447 |     parseResponse = this.tryParseResponse,
448 |     transactionId,
449 |   }: {
450 |     operation: ApiOperationDef;
451 |     abortSignal?: AbortSignal;
452 |     relativePath?: string;
453 |     method?: string;
454 |     queryParams?: Record<string, any>;
455 |     contextParams?: Record<string, any>;
456 |     body?: any;
457 |     rawBody?: any;
458 |     headers?: Record<string, string>;
459 |     payloadType?: "form" | "multipart-form" | "json";
460 |     onUploadProgress?: OnProgressFn;
461 |     parseResponse?: (response: Response | AxiosResponse, logError: boolean) => any;
462 |     transactionId: string;
463 |     resolveBindingExpressions: boolean;
464 |   }) => {
465 |     const includeClientTxId = method && method !== "get" && !!transactionId;
466 |     const headersWithoutContentType = { ...this.getHeaders(), ["Content-Type"]: undefined };
467 |     let url = this.generateFullApiUrl(relativePath, queryParams);
468 |     const hasBody = body !== undefined;
469 | 
470 |     const aggregatedHeaders = omitBy(
471 |       { ...(hasBody ? this.getHeaders() : headersWithoutContentType), ...headers },
472 |       isUndefined,
473 |     ) as Record<string, string>;
474 |     if (includeClientTxId) {
475 |       aggregatedHeaders["x-ue-client-tx-id"] = transactionId;
476 |     }
477 | 
478 |     if (this.appContext.appGlobals?.withXSRFToken !== false && isURLSameOrigin(url)) {
479 |       const xsrfToken = readCookie("XSRF-TOKEN");
480 |       if(xsrfToken) {
481 |         aggregatedHeaders["X-XSRF-TOKEN"] = xsrfToken;
482 |       }
483 |     }
484 | 
485 |     let requestBody;
486 |     if (rawBody !== undefined) {
487 |       requestBody = rawBody;
488 |     } else {
489 |       if (payloadType === "multipart-form" || payloadType === "form") {
490 |         const formData = new FormData();
491 |         Object.entries(body).forEach(([key, value]) => {
492 |           appendFormFieldValue({ key, value }, formData);
493 |         });
494 |         if (payloadType === "multipart-form") {
495 |           requestBody = formData;
496 |           // https://muffinman.io/blog/uploading-files-using-fetch-multipart-form-data/
497 |           // the browser sets the content-type in this case
498 |           delete aggregatedHeaders["Content-Type"];
499 |         } else {
500 |           requestBody = new URLSearchParams(formData as any).toString();
501 |           aggregatedHeaders["Content-Type"] = "application/x-www-form-urlencoded";
502 |         }
503 |       } else {
504 |         requestBody = hasBody ? JSON.stringify(body) : undefined;
505 |       }
506 |     }
507 | 
508 |     const options: RequestInit = {
509 |       method: method,
510 |       headers: aggregatedHeaders,
511 |       signal: abortSignal,
512 |       body: requestBody,
513 |     };
514 |     if (onUploadProgress) {
515 |       console.log("Falling back to axios. Reason: onUploadProgress specified");
516 |       const axios = (await import("axios")).default;
517 |       try {
518 |         const response = await axios.request({
519 |           url: url,
520 |           method: options.method,
521 |           headers: aggregatedHeaders,
522 |           data: options.body,
523 |           onUploadProgress,
524 |         });
525 |         return await parseResponse(
526 |           response,
527 |           this.appContext?.appGlobals?.logRestApiErrors ?? false,
528 |         );
529 |       } catch (error) {
530 |         if (axios.isAxiosError(error) && error.response) {
531 |           throw await this.raiseError(error.response);
532 |         } else {
533 |           throw error;
534 |         }
535 |       }
536 |     } else {
537 |       let response: any;
538 |       if (this.apiInstance && this.apiInstance.hasMockForRequest(url, options)) {
539 |         response = await this.apiInstance.executeMockedFetch(url, options);
540 |       } else {
541 |         response = await fetch(url, options);
542 |       }
543 |       if (!response.clone().ok) {
544 |         throw await this.raiseError(response);
545 |       }
546 |       const parsedResponse = await parseResponse(
547 |         response.clone(),
548 |         this.appContext?.appGlobals?.logRestApiErrors ?? false,
549 |       );
550 |       return parsedResponse;
551 |     }
552 |   };
553 | 
554 |   private tryParseResponse = async (response: Response | AxiosResponse, logError = false) => {
555 |     return await parseResponseBody(response, logError);
556 |   };
557 | 
558 |   private generateFullApiUrl(relativePath: string, queryParams: Record<string, any> | undefined) {
559 |     let queryString = "";
560 |     if (queryParams) {
561 |       const params = new URLSearchParams();
562 |       Object.entries(queryParams).forEach(([key, value]) => {
563 |         if (Array.isArray(value)) {
564 |           value.forEach((item) => {
565 |             params.append(key, item);
566 |           });
567 |         } else if (value !== undefined) {
568 |           params.append(key, value);
569 |         }
570 |       });
571 |       queryString = `?${params}`;
572 |     }
573 |     if (relativePath.startsWith("http://") || relativePath.startsWith("https://")) {
574 |       return `${relativePath}${queryString}`;
575 |     }
576 |     //TODO check if autoEncode is enabled
577 |     return `${this.config.apiUrl || ""}${relativePath}${queryString}`;
578 |   }
579 | 
580 |   private raiseError = async (response: Response | AxiosResponse) => {
581 |     if ("config" in response) {
582 |       //poor man's axios response type guard
583 |       try {
584 |         return new GenericBackendError(
585 |           this.config.errorResponseTransform
586 |             ? this.extractParam(true, this.config.errorResponseTransform, {
587 |                 $response: response.data,
588 |               })
589 |             : response.data,
590 |           response.status,
591 |         );
592 |       } catch {}
593 |     } else {
594 |       try {
595 |         const respObject = await response.json();
596 |         return new GenericBackendError(
597 |           this.config.errorResponseTransform
598 |             ? this.extractParam(true, this.config.errorResponseTransform, { $response: respObject })
599 |             : respObject,
600 |           response.status,
601 |         );
602 |       } catch {
603 |         return new GenericBackendError("<No error description>", response.status);
604 |       }
605 |     }
606 | 
607 |     return new Error(
608 |       `[!] Server responded with an error: ${response.status} - ${response.statusText}`,
609 |     );
610 |   };
611 | 
612 |   private getHeaders = (): Record<string, string> => {
613 |     return {
614 |       ["Content-Type" as string]: "application/json; charset=UTF-8",
615 |       ...(this.config.headers ?? {}),
616 |     };
617 |   };
618 | }
619 | 
```

--------------------------------------------------------------------------------
/xmlui/src/components/Charts/RadarChart/RadarChart.spec.ts:
--------------------------------------------------------------------------------

```typescript
  1 | import { expect, test } from "../../../testing/fixtures";
  2 | 
  3 | // Test data helpers - using proper XMLUI data format for radar charts
  4 | const sampleData = `[
  5 |   { subject: 'Math', A: 120, B: 110, fullMark: 150 },
  6 |   { subject: 'Chinese', A: 98, B: 130, fullMark: 150 },
  7 |   { subject: 'English', A: 86, B: 130, fullMark: 150 },
  8 |   { subject: 'Geography', A: 99, B: 100, fullMark: 150 },
  9 |   { subject: 'Physics', A: 85, B: 90, fullMark: 150 },
 10 |   { subject: 'History', A: 65, B: 85, fullMark: 150 }
 11 | ]`;
 12 | 
 13 | const emptyData = `[]`;
 14 | 
 15 | const singlePointData = `[
 16 |   { subject: 'Math', A: 120, B: 110, fullMark: 150 }
 17 | ]`;
 18 | 
 19 | const multiSeriesData = `[
 20 |   { skill: 'Communication', team1: 80, team2: 90, team3: 75 },
 21 |   { skill: 'Problem Solving', team1: 95, team2: 85, team3: 90 },
 22 |   { skill: 'Leadership', team1: 70, team2: 95, team3: 80 },
 23 |   { skill: 'Technical', team1: 90, team2: 80, team3: 95 },
 24 |   { skill: 'Creativity', team1: 85, team2: 75, team3: 85 }
 25 | ]`;
 26 | 
 27 | const largeDataset = `[
 28 |   ${Array.from({ length: 10 }, (_, i) => 
 29 |     `{ category: 'Cat${i + 1}', value1: ${Math.floor(Math.random() * 100)}, value2: ${Math.floor(Math.random() * 100)} }`
 30 |   ).join(', ')}
 31 | ]`;
 32 | 
 33 | // Chart selectors - update based on specific Recharts RadarChart output
 34 | const chartRoot = ".recharts-responsive-container";
 35 | const chartSvg = ".recharts-surface";
 36 | const radarElementsSelector = ".recharts-radar"; // RadarChart specific
 37 | const legendSelector = ".recharts-legend-wrapper";
 38 | const tooltipSelector = ".recharts-tooltip-wrapper";
 39 | const polarGridSelector = ".recharts-polar-grid";
 40 | const polarAngleAxisSelector = ".recharts-polar-angle-axis";
 41 | const polarRadiusAxisSelector = ".recharts-polar-radius-axis";
 42 | const angleAxisTicksSelector = ".recharts-polar-angle-axis .recharts-text";
 43 | const radiusAxisTicksSelector = ".recharts-polar-radius-axis .recharts-text";
 44 | 
 45 | // --- Smoke Tests
 46 | 
 47 | test.describe("smoke tests", { tag: "@smoke" }, () => {
 48 |   test("component renders with basic props", async ({ initTestBed, page }) => {
 49 |     await initTestBed(`
 50 |       <RadarChart
 51 |         nameKey="subject"
 52 |         data="{${sampleData}}"
 53 |         dataKeys="{['A']}"
 54 |         width="600px"
 55 |         height="400px"
 56 |       />
 57 |     `);
 58 |     
 59 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
 60 |     await expect(page.locator(chartRoot)).toBeVisible();
 61 |   });
 62 | 
 63 |   test("renders correct number of radar elements", async ({ initTestBed, page }) => {
 64 |     await initTestBed(`
 65 |       <RadarChart
 66 |         nameKey="subject"
 67 |         data="{${sampleData}}"
 68 |         dataKeys="{['A', 'B']}"
 69 |         width="600px"
 70 |         height="400px"
 71 |       />
 72 |     `);
 73 |     
 74 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
 75 |     const elements = page.locator(radarElementsSelector);
 76 |     await expect(elements).toHaveCount(2); // Should match dataKeys length
 77 |   });
 78 | 
 79 |   test("handles empty data gracefully", async ({ initTestBed, page }) => {
 80 |     await initTestBed(`
 81 |       <RadarChart
 82 |         nameKey="subject"
 83 |         data="{${emptyData}}"
 84 |         dataKeys="{['A']}"
 85 |         width="600px"
 86 |         height="400px"
 87 |       />
 88 |     `);
 89 |     
 90 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
 91 |     await expect(page.locator(chartRoot)).toBeVisible();
 92 |   });
 93 | 
 94 |   test("handles single data point", async ({ initTestBed, page }) => {
 95 |     await initTestBed(`
 96 |       <RadarChart
 97 |         nameKey="subject"
 98 |         data="{${singlePointData}}"
 99 |         dataKeys="{['A']}"
100 |         width="600px"
101 |         height="400px"
102 |       />
103 |     `);
104 |     
105 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
106 |     await expect(page.locator(chartRoot)).toBeVisible();
107 |   });
108 | });
109 | 
110 | // --- Grid and Axes Tests
111 | 
112 | test.describe("polar grid", () => {
113 |   test("polar grid is shown by default", async ({ initTestBed, page }) => {
114 |     await initTestBed(`
115 |       <RadarChart
116 |         nameKey="subject"
117 |         data="{${sampleData}}"
118 |         dataKeys="{['A']}"
119 |         width="600px"
120 |         height="400px"
121 |       />
122 |     `);
123 |     
124 |     await page.waitForSelector(polarGridSelector, { timeout: 10000 });
125 |     await expect(page.locator(polarGridSelector)).toBeVisible();
126 |   });
127 | 
128 |   test("polar grid can be hidden", async ({ initTestBed, page }) => {
129 |     await initTestBed(`
130 |       <RadarChart
131 |         nameKey="subject"
132 |         data="{${sampleData}}"
133 |         dataKeys="{['A']}"
134 |         hideGrid="true"
135 |         width="600px"
136 |         height="400px"
137 |       />
138 |     `);
139 |     
140 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
141 |     await expect(page.locator(polarGridSelector)).not.toBeVisible();
142 |   });
143 | });
144 | 
145 | test.describe("angle axis", () => {
146 |   test("angle axis is shown by default", async ({ initTestBed, page }) => {
147 |     await initTestBed(`
148 |       <RadarChart
149 |         nameKey="subject"
150 |         data="{${sampleData}}"
151 |         dataKeys="{['A']}"
152 |         width="600px"
153 |         height="400px"
154 |       />
155 |     `);
156 |     
157 |     await page.waitForSelector(polarAngleAxisSelector, { timeout: 10000 });
158 |     await expect(page.locator(polarAngleAxisSelector)).toBeVisible();
159 |   });
160 | 
161 |   test("angle axis can be hidden", async ({ initTestBed, page }) => {
162 |     await initTestBed(`
163 |       <RadarChart
164 |         nameKey="subject"
165 |         data="{${sampleData}}"
166 |         dataKeys="{['A']}"
167 |         hideAngleAxis="true"
168 |         width="600px"
169 |         height="400px"
170 |       />
171 |     `);
172 |     
173 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
174 |     await expect(page.locator(polarAngleAxisSelector)).not.toBeVisible();
175 |   });
176 | });
177 | 
178 | test.describe("radius axis", () => {
179 |   test("radius axis is shown by default", async ({ initTestBed, page }) => {
180 |     await initTestBed(`
181 |       <RadarChart
182 |         nameKey="subject"
183 |         data="{${sampleData}}"
184 |         dataKeys="{['A']}"
185 |         width="600px"
186 |         height="400px"
187 |       />
188 |     `);
189 |     
190 |     await page.waitForSelector(polarRadiusAxisSelector, { timeout: 10000 });
191 |     await expect(page.locator(polarRadiusAxisSelector)).toBeVisible();
192 |   });
193 | 
194 |   test("radius axis can be hidden", async ({ initTestBed, page }) => {
195 |     await initTestBed(`
196 |       <RadarChart
197 |         nameKey="subject"
198 |         data="{${sampleData}}"
199 |         dataKeys="{['A']}"
200 |         hideRadiusAxis="true"
201 |         width="600px"
202 |         height="400px"
203 |       />
204 |     `);
205 |     
206 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
207 |     await expect(page.locator(polarRadiusAxisSelector)).not.toBeVisible();
208 |   });
209 | });
210 | 
211 | // --- Legend Tests
212 | 
213 | test.describe("legend", () => {
214 |   test("legend is hidden by default", async ({ initTestBed, page }) => {
215 |     await initTestBed(`
216 |       <RadarChart
217 |         nameKey="subject"
218 |         data="{${sampleData}}"
219 |         dataKeys="{['A', 'B']}"
220 |         width="600px"
221 |         height="400px"
222 |       />
223 |     `);
224 |     
225 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
226 |     await expect(page.locator(legendSelector)).not.toBeVisible();
227 |   });
228 | 
229 |   test("legend can be shown", async ({ initTestBed, page }) => {
230 |     await initTestBed(`
231 |       <RadarChart
232 |         nameKey="subject"
233 |         data="{${sampleData}}"
234 |         dataKeys="{['A', 'B']}"
235 |         showLegend="true"
236 |         width="600px"
237 |         height="400px"
238 |       />
239 |     `);
240 |     
241 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
242 |     await expect(page.locator(legendSelector)).toBeVisible();
243 |   });
244 | });
245 | 
246 | // --- Radar Chart Specific Tests
247 | 
248 | test.describe("filled areas", () => {
249 |   test("areas are filled by default", async ({ initTestBed, page }) => {
250 |     await initTestBed(`
251 |       <RadarChart
252 |         nameKey="subject"
253 |         data="{${sampleData}}"
254 |         dataKeys="{['A', 'B']}"
255 |         width="600px"
256 |         height="400px"
257 |       />
258 |     `);
259 |     
260 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
261 |     const radars = page.locator(radarElementsSelector);
262 |     await expect(radars).toHaveCount(2);
263 |   });
264 | 
265 |   test("areas can be unfilled", async ({ initTestBed, page }) => {
266 |     await initTestBed(`
267 |       <RadarChart
268 |         nameKey="subject"
269 |         data="{${sampleData}}"
270 |         dataKeys="{['A', 'B']}"
271 |         filled="false"
272 |         width="600px"
273 |         height="400px"
274 |       />
275 |     `);
276 |     
277 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
278 |     const radars = page.locator(radarElementsSelector);
279 |     await expect(radars).toHaveCount(2);
280 |   });
281 | });
282 | 
283 | test.describe("stroke width", () => {
284 |   test("uses default stroke width", async ({ initTestBed, page }) => {
285 |     await initTestBed(`
286 |       <RadarChart
287 |         nameKey="subject"
288 |         data="{${sampleData}}"
289 |         dataKeys="{['A']}"
290 |         width="600px"
291 |         height="400px"
292 |       />
293 |     `);
294 |     
295 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
296 |     await expect(page.locator(radarElementsSelector)).toBeVisible();
297 |   });
298 | 
299 |   test("applies custom stroke width", async ({ initTestBed, page }) => {
300 |     await initTestBed(`
301 |       <RadarChart
302 |         nameKey="subject"
303 |         data="{${sampleData}}"
304 |         dataKeys="{['A']}"
305 |         strokeWidth="4"
306 |         width="600px"
307 |         height="400px"
308 |       />
309 |     `);
310 |     
311 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
312 |     await expect(page.locator(radarElementsSelector)).toBeVisible();
313 |   });
314 | });
315 | 
316 | test.describe("fill opacity", () => {
317 |   test("uses default fill opacity", async ({ initTestBed, page }) => {
318 |     await initTestBed(`
319 |       <RadarChart
320 |         nameKey="subject"
321 |         data="{${sampleData}}"
322 |         dataKeys="{['A']}"
323 |         width="600px"
324 |         height="400px"
325 |       />
326 |     `);
327 |     
328 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
329 |     await expect(page.locator(radarElementsSelector)).toBeVisible();
330 |   });
331 | 
332 |   test("applies custom fill opacity", async ({ initTestBed, page }) => {
333 |     await initTestBed(`
334 |       <RadarChart
335 |         nameKey="subject"
336 |         data="{${sampleData}}"
337 |         dataKeys="{['A']}"
338 |         fillOpacity="0.8"
339 |         width="600px"
340 |         height="400px"
341 |       />
342 |     `);
343 |     
344 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
345 |     await expect(page.locator(radarElementsSelector)).toBeVisible();
346 |   });
347 | });
348 | 
349 | // --- Responsive Behavior Tests
350 | 
351 | test.describe("responsive behavior", () => {
352 |   test("enters mini mode with very small container height", async ({ initTestBed, page }) => {
353 |     await initTestBed(`
354 |       <RadarChart
355 |         nameKey="subject"
356 |         data="{${sampleData}}"
357 |         dataKeys="{['A']}"
358 |         showLegend="true"
359 |         width="600px"
360 |         height="100px"
361 |       />
362 |     `);
363 |     
364 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
365 |     
366 |     // Wait for chart to fully render and responsive behavior to take effect
367 |     await page.waitForTimeout(1000);
368 |     
369 |     // In mini mode, legend should be hidden
370 |     await expect(page.locator(legendSelector)).not.toBeVisible();
371 |     
372 |     // Note: Polar axes might still be visible in Recharts RadarChart even in mini mode
373 |     // This is different from CartesianGrid charts - RadarChart handles mini mode differently
374 |     // So we'll focus on testing the legend hiding which is the main responsive behavior
375 |   });
376 | 
377 |   test("normal mode with adequate height", async ({ initTestBed, page }) => {
378 |     await initTestBed(`
379 |       <RadarChart
380 |         nameKey="subject"
381 |         data="{${sampleData}}"
382 |         dataKeys="{['A']}"
383 |         showLegend="true"
384 |         width="600px"
385 |         height="300px"
386 |       />
387 |     `);
388 |     
389 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
390 |     
391 |     // In normal mode, legend and axes should be visible
392 |     await expect(page.locator(legendSelector)).toBeVisible();
393 |     await expect(page.locator(polarAngleAxisSelector)).toBeVisible();
394 |     await expect(page.locator(polarRadiusAxisSelector)).toBeVisible();
395 |   });
396 | });
397 | 
398 | // --- Tooltip Tests
399 | 
400 | test.describe("tooltip", () => {
401 |   test("tooltip is shown by default", async ({ initTestBed, page }) => {
402 |     await initTestBed(`
403 |       <RadarChart
404 |         nameKey="subject"
405 |         data="{${sampleData}}"
406 |         dataKeys="{['A']}"
407 |         width="600px"
408 |         height="400px"
409 |       />
410 |     `);
411 |     
412 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
413 |     
414 |     // Hover over radar area to trigger tooltip
415 |     await page.locator(radarElementsSelector).first().hover();
416 |     await expect(page.locator(tooltipSelector)).toBeVisible();
417 |   });
418 | 
419 |   test("tooltip can be hidden", async ({ initTestBed, page }) => {
420 |     await initTestBed(`
421 |       <RadarChart
422 |         nameKey="subject"
423 |         data="{${sampleData}}"
424 |         dataKeys="{['A']}"
425 |         hideTooltip="true"
426 |         width="600px"
427 |         height="400px"
428 |       />
429 |     `);
430 |     
431 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
432 |     
433 |     // Hover over radar area - tooltip should not appear
434 |     await page.locator(radarElementsSelector).first().hover();
435 |     await expect(page.locator(tooltipSelector)).not.toBeVisible();
436 |   });
437 | });
438 | 
439 | // --- Comprehensive Prop Tests
440 | 
441 | test.describe("data prop", () => {
442 |   test("handles array data correctly", async ({ initTestBed, page }) => {
443 |     await initTestBed(`
444 |       <RadarChart
445 |         nameKey="subject"
446 |         data="{${sampleData}}"
447 |         dataKeys="{['A']}"
448 |         width="600px"
449 |         height="400px"
450 |       />
451 |     `);
452 |     
453 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
454 |     await expect(page.locator(chartRoot)).toBeVisible();
455 |     await expect(page.locator(radarElementsSelector)).toHaveCount(1);
456 |   });
457 | 
458 |   test("handles large datasets", async ({ initTestBed, page }) => {
459 |     await initTestBed(`
460 |       <RadarChart
461 |         nameKey="category"
462 |         data="{${largeDataset}}"
463 |         dataKeys="{['value1', 'value2']}"
464 |         width="600px"
465 |         height="400px"
466 |       />
467 |     `);
468 |     
469 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
470 |     await expect(page.locator(radarElementsSelector)).toHaveCount(2);
471 |   });
472 | 
473 |   test("handles missing data prop", async ({ initTestBed, page }) => {
474 |     await initTestBed(`
475 |       <RadarChart
476 |         nameKey="subject"
477 |         dataKeys="{['A']}"
478 |         width="600px"
479 |         height="400px"
480 |       />
481 |     `);
482 |     
483 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
484 |     await expect(page.locator(chartRoot)).toBeVisible();
485 |   });
486 | });
487 | 
488 | test.describe("dataKeys prop", () => {
489 |   test("renders single data series", async ({ initTestBed, page }) => {
490 |     await initTestBed(`
491 |       <RadarChart
492 |         nameKey="subject"
493 |         data="{${sampleData}}"
494 |         dataKeys="{['A']}"
495 |         width="600px"
496 |         height="400px"
497 |       />
498 |     `);
499 |     
500 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
501 |     await expect(page.locator(radarElementsSelector)).toHaveCount(1);
502 |   });
503 | 
504 |   test("renders multiple data series", async ({ initTestBed, page }) => {
505 |     await initTestBed(`
506 |       <RadarChart
507 |         nameKey="skill"
508 |         data="{${multiSeriesData}}"
509 |         dataKeys="{['team1', 'team2', 'team3']}"
510 |         width="600px"
511 |         height="400px"
512 |       />
513 |     `);
514 |     
515 |     await page.waitForSelector(radarElementsSelector, { timeout: 10000 });
516 |     await expect(page.locator(radarElementsSelector)).toHaveCount(3);
517 |   });
518 | 
519 |   test("handles empty dataKeys array", async ({ initTestBed, page }) => {
520 |     await initTestBed(`
521 |       <RadarChart
522 |         nameKey="subject"
523 |         data="{${sampleData}}"
524 |         dataKeys="{[]}"
525 |         width="600px"
526 |         height="400px"
527 |       />
528 |     `);
529 |     
530 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
531 |     await expect(page.locator(chartRoot)).toBeVisible();
532 |     await expect(page.locator(radarElementsSelector)).toHaveCount(0);
533 |   });
534 | });
535 | 
536 | test.describe("nameKey prop", () => {
537 |   test("uses correct nameKey for angle axis labels", async ({ initTestBed, page }) => {
538 |     await initTestBed(`
539 |       <RadarChart
540 |         nameKey="subject"
541 |         data="{${sampleData}}"
542 |         dataKeys="{['A']}"
543 |         width="600px"
544 |         height="400px"
545 |       />
546 |     `);
547 |     
548 |     await page.waitForSelector(angleAxisTicksSelector, { timeout: 10000 });
549 |     const firstTick = page.locator(angleAxisTicksSelector).first();
550 |     await expect(firstTick).toContainText("Math");
551 |   });
552 | 
553 |   test("handles different nameKey", async ({ initTestBed, page }) => {
554 |     await initTestBed(`
555 |       <RadarChart
556 |         nameKey="skill"
557 |         data="{${multiSeriesData}}"
558 |         dataKeys="{['team1']}"
559 |         width="600px"
560 |         height="400px"
561 |       />
562 |     `);
563 |     
564 |     await page.waitForSelector(angleAxisTicksSelector, { timeout: 10000 });
565 |     const firstTick = page.locator(angleAxisTicksSelector).first();
566 |     await expect(firstTick).toContainText("Communication");
567 |   });
568 | });
569 | 
570 | test.describe("combined props", () => {
571 |   test("all visual props combined", async ({ initTestBed, page }) => {
572 |     await initTestBed(`
573 |       <RadarChart
574 |         nameKey="skill"
575 |         data="{${multiSeriesData}}"
576 |         dataKeys="{['team1', 'team2']}"
577 |         filled="true"
578 |         strokeWidth="3"
579 |         fillOpacity="0.5"
580 |         showLegend="true"
581 |         hideGrid="false"
582 |         width="600px"
583 |         height="400px"
584 |       />
585 |     `);
586 |     
587 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
588 |     await expect(page.locator(radarElementsSelector)).toHaveCount(2);
589 |     await expect(page.locator(legendSelector)).toBeVisible();
590 |     await expect(page.locator(polarGridSelector)).toBeVisible();
591 |   });
592 | 
593 |   test("minimal configuration", async ({ initTestBed, page }) => {
594 |     await initTestBed(`
595 |       <RadarChart
596 |         nameKey="subject"
597 |         data="{${sampleData}}"
598 |         dataKeys="{['A']}"
599 |         hideGrid="true"
600 |         hideAngleAxis="true"
601 |         hideRadiusAxis="true"
602 |         hideTooltip="true"
603 |         filled="false"
604 |         width="600px"
605 |         height="400px"
606 |       />
607 |     `);
608 |     
609 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
610 |     await expect(page.locator(radarElementsSelector)).toHaveCount(1);
611 |     await expect(page.locator(polarGridSelector)).not.toBeVisible();
612 |     await expect(page.locator(polarAngleAxisSelector)).not.toBeVisible();
613 |     await expect(page.locator(polarRadiusAxisSelector)).not.toBeVisible();
614 |   });
615 | 
616 |   test("maximum configuration", async ({ initTestBed, page }) => {
617 |     await initTestBed(`
618 |       <RadarChart
619 |         nameKey="skill"
620 |         data="{${multiSeriesData}}"
621 |         dataKeys="{['team1', 'team2', 'team3']}"
622 |         filled="true"
623 |         strokeWidth="4"
624 |         fillOpacity="0.8"
625 |         showLegend="true"
626 |         hideGrid="false"
627 |         hideAngleAxis="false"
628 |         hideRadiusAxis="false"
629 |         hideTooltip="false"
630 |         width="600px"
631 |         height="400px"
632 |       />
633 |     `);
634 |     
635 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
636 |     await page.waitForSelector(radarElementsSelector, { timeout: 5000 });
637 |     await expect(page.locator(radarElementsSelector)).toHaveCount(3);
638 |     
639 |     await page.waitForSelector(legendSelector, { timeout: 5000 });
640 |     await expect(page.locator(legendSelector)).toBeVisible();
641 |     
642 |     await page.waitForSelector(polarGridSelector, { timeout: 5000 });
643 |     await page.waitForSelector(polarAngleAxisSelector, { timeout: 5000 });
644 |     await page.waitForSelector(polarRadiusAxisSelector, { timeout: 5000 });
645 |     await expect(page.locator(polarGridSelector)).toBeVisible();
646 |     await expect(page.locator(polarAngleAxisSelector)).toBeVisible();
647 |     await expect(page.locator(polarRadiusAxisSelector)).toBeVisible();
648 |   });
649 | });
650 | 
```

--------------------------------------------------------------------------------
/xmlui/src/components/Charts/Legend/Legend.spec.ts:
--------------------------------------------------------------------------------

```typescript
  1 | import { expect, test } from "../../../testing/fixtures";
  2 | 
  3 | // Test data helpers - using proper XMLUI data format
  4 | const sampleData = `[
  5 |   { name: 'Desktop', value: 400, fill: '#8884d8' },
  6 |   { name: 'Mobile', value: 300, fill: '#82ca9d' },
  7 |   { name: 'Tablet', value: 200, fill: '#ffc658' },
  8 |   { name: 'Other', value: 100, fill: '#ff7300' }
  9 | ]`;
 10 | 
 11 | const emptyData = `[]`;
 12 | 
 13 | const singlePointData = `[
 14 |   { name: 'Desktop', value: 400 }
 15 | ]`;
 16 | 
 17 | const largeDataset = `[
 18 |   { name: 'Category A', value: 400 },
 19 |   { name: 'Category B', value: 300 },
 20 |   { name: 'Category C', value: 200 },
 21 |   { name: 'Category D', value: 100 },
 22 |   { name: 'Category E', value: 150 },
 23 |   { name: 'Category F', value: 250 },
 24 |   { name: 'Category G', value: 180 },
 25 |   { name: 'Category H', value: 320 },
 26 |   { name: 'Category I', value: 275 },
 27 |   { name: 'Category J', value: 190 }
 28 | ]`;
 29 | 
 30 | // Chart selectors - Legend specific
 31 | const chartRoot = ".recharts-responsive-container";
 32 | const chartSvg = ".recharts-surface";
 33 | const legendSelector = ".recharts-legend-wrapper";
 34 | const legendItemSelector = ".recharts-legend-item";
 35 | const legendTextSelector = ".recharts-legend-item-text";
 36 | 
 37 | // =============================================================================
 38 | // BASIC FUNCTIONALITY TESTS
 39 | // =============================================================================
 40 | 
 41 | test.describe("Basic Functionality", () => {
 42 |   
 43 |   // Smoke tests
 44 |   test.describe("smoke tests", { tag: "@smoke" }, () => {
 45 |     test("Legend renders within PieChart", async ({ initTestBed, page }) => {
 46 |       await initTestBed(`
 47 |         <PieChart
 48 |           nameKey="name"
 49 |           dataKey="value"
 50 |           data="{${sampleData}}"
 51 |           width="400px"
 52 |           height="400px"
 53 |         >
 54 |           <Legend />
 55 |         </PieChart>
 56 |       `);
 57 |       
 58 |       await page.waitForSelector(chartRoot, { timeout: 10000 });
 59 |       await expect(page.locator(chartRoot)).toBeVisible();
 60 |       await expect(page.locator(legendSelector)).toBeVisible();
 61 |     });
 62 | 
 63 |     test("Legend renders within BarChart", async ({ initTestBed, page }) => {
 64 |       await initTestBed(`
 65 |         <BarChart
 66 |           xKey="name"
 67 |           yKeys="{['value']}"
 68 |           data="{${sampleData}}"
 69 |           width="600px"
 70 |           height="400px"
 71 |           showLegend
 72 |         >
 73 |           <Legend />
 74 |         </BarChart>
 75 |       `);
 76 |       
 77 |       await page.waitForSelector(chartRoot, { timeout: 10000 });
 78 |       await expect(page.locator(chartRoot)).toBeVisible();
 79 |       await expect(page.locator(legendSelector)).toBeVisible();
 80 |     });
 81 |   });
 82 | 
 83 |   // Align prop tests
 84 |   test.describe("align prop", () => {
 85 |     test("handles 'left' alignment", async ({ initTestBed, page }) => {
 86 |       await initTestBed(`
 87 |         <PieChart
 88 |           nameKey="name"
 89 |           dataKey="value"
 90 |           data="{${sampleData}}"
 91 |           width="400px"
 92 |           height="400px"
 93 |         >
 94 |           <Legend align="left" />
 95 |         </PieChart>
 96 |       `);
 97 |       
 98 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
 99 |       const legend = page.locator(legendSelector);
100 |       await expect(legend).toBeVisible();
101 |       
102 |       // Legend should be visible with left alignment
103 |       // Note: Actual positioning may vary based on chart implementation
104 |       await expect(legend).toBeVisible();
105 |     });
106 | 
107 |     test("handles 'center' alignment (default)", async ({ initTestBed, page }) => {
108 |       await initTestBed(`
109 |         <PieChart
110 |           nameKey="name"
111 |           dataKey="value"
112 |           data="{${sampleData}}"
113 |           width="400px"
114 |           height="400px"
115 |         >
116 |           <Legend />
117 |         </PieChart>
118 |       `);
119 |       
120 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
121 |       const legend = page.locator(legendSelector);
122 |       await expect(legend).toBeVisible();
123 |     });
124 | 
125 |     test("handles 'right' alignment", async ({ initTestBed, page }) => {
126 |       await initTestBed(`
127 |         <PieChart
128 |           nameKey="name"
129 |           dataKey="value"
130 |           data="{${sampleData}}"
131 |           width="400px"
132 |           height="400px"
133 |         >
134 |           <Legend align="right" />
135 |         </PieChart>
136 |       `);
137 |       
138 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
139 |       const legend = page.locator(legendSelector);
140 |       await expect(legend).toBeVisible();
141 |       
142 |       // Legend should be visible with right alignment
143 |       // Note: Actual positioning may vary based on chart implementation
144 |       await expect(legend).toBeVisible();
145 |     });
146 |   });
147 | 
148 |   // VerticalAlign prop tests
149 |   test.describe("verticalAlign prop", () => {
150 |     test("handles 'top' vertical alignment", async ({ initTestBed, page }) => {
151 |       await initTestBed(`
152 |         <PieChart
153 |           nameKey="name"
154 |           dataKey="value"
155 |           data="{${sampleData}}"
156 |           width="400px"
157 |           height="400px"
158 |         >
159 |           <Legend verticalAlign="top" />
160 |         </PieChart>
161 |       `);
162 |       
163 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
164 |       const legend = page.locator(legendSelector);
165 |       await expect(legend).toBeVisible();
166 |       
167 |       // Legend should be visible with top alignment
168 |       // Note: Actual positioning may vary based on chart implementation
169 |       await expect(legend).toBeVisible();
170 |     });
171 | 
172 |     test("handles 'bottom' vertical alignment (default)", async ({ initTestBed, page }) => {
173 |       await initTestBed(`
174 |         <PieChart
175 |           nameKey="name"
176 |           dataKey="value"
177 |           data="{${sampleData}}"
178 |           width="400px"
179 |           height="400px"
180 |         >
181 |           <Legend />
182 |         </PieChart>
183 |       `);
184 |       
185 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
186 |       const legend = page.locator(legendSelector);
187 |       await expect(legend).toBeVisible();
188 |     });
189 | 
190 |     test("handles 'middle' vertical alignment", async ({ initTestBed, page }) => {
191 |       await initTestBed(`
192 |         <PieChart
193 |           nameKey="name"
194 |           dataKey="value"
195 |           data="{${sampleData}}"
196 |           width="400px"
197 |           height="400px"
198 |         >
199 |           <Legend verticalAlign="middle" />
200 |         </PieChart>
201 |       `);
202 |       
203 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
204 |       const legend = page.locator(legendSelector);
205 |       await expect(legend).toBeVisible();
206 |       
207 |       // Legend should be visible with middle alignment
208 |       // Note: Actual positioning may vary based on chart implementation
209 |       await expect(legend).toBeVisible();
210 |     });
211 |   });
212 | 
213 |   // Combined alignment tests
214 |   test.describe("combined alignment", () => {
215 |     test("handles top-left alignment", async ({ initTestBed, page }) => {
216 |       await initTestBed(`
217 |         <PieChart
218 |           nameKey="name"
219 |           dataKey="value"
220 |           data="{${sampleData}}"
221 |           width="400px"
222 |           height="400px"
223 |         >
224 |           <Legend align="left" verticalAlign="top" />
225 |         </PieChart>
226 |       `);
227 |       
228 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
229 |       await expect(page.locator(legendSelector)).toBeVisible();
230 |     });
231 | 
232 |     test("handles bottom-right alignment", async ({ initTestBed, page }) => {
233 |       await initTestBed(`
234 |         <PieChart
235 |           nameKey="name"
236 |           dataKey="value"
237 |           data="{${sampleData}}"
238 |           width="400px"
239 |           height="400px"
240 |         >
241 |           <Legend align="right" verticalAlign="bottom" />
242 |         </PieChart>
243 |       `);
244 |       
245 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
246 |       await expect(page.locator(legendSelector)).toBeVisible();
247 |     });
248 | 
249 |     test("handles center-middle alignment", async ({ initTestBed, page }) => {
250 |       await initTestBed(`
251 |         <PieChart
252 |           nameKey="name"
253 |           dataKey="value"
254 |           data="{${sampleData}}"
255 |           width="400px"
256 |           height="400px"
257 |         >
258 |           <Legend align="center" verticalAlign="middle" />
259 |         </PieChart>
260 |       `);
261 |       
262 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
263 |       await expect(page.locator(legendSelector)).toBeVisible();
264 |     });
265 |   });
266 | 
267 |   // Data handling tests
268 |   test.describe("data handling", () => {
269 |     test("displays legend items for all data entries", async ({ initTestBed, page }) => {
270 |       await initTestBed(`
271 |         <PieChart
272 |           nameKey="name"
273 |           dataKey="value"
274 |           data="{${sampleData}}"
275 |           width="400px"
276 |           height="400px"
277 |         >
278 |           <Legend />
279 |         </PieChart>
280 |       `);
281 |       
282 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
283 |       const legendItems = page.locator(legendItemSelector);
284 |       await expect(legendItems).toHaveCount(4); // Desktop, Mobile, Tablet, Other
285 |       
286 |       // Check that legend text matches data names
287 |       await expect(page.locator(legendTextSelector).filter({ hasText: "Desktop" })).toBeVisible();
288 |       await expect(page.locator(legendTextSelector).filter({ hasText: "Mobile" })).toBeVisible();
289 |       await expect(page.locator(legendTextSelector).filter({ hasText: "Tablet" })).toBeVisible();
290 |       await expect(page.locator(legendTextSelector).filter({ hasText: "Other" })).toBeVisible();
291 |     });
292 | 
293 |     test("handles single data point", async ({ initTestBed, page }) => {
294 |       await initTestBed(`
295 |         <PieChart
296 |           nameKey="name"
297 |           dataKey="value"
298 |           data="{${singlePointData}}"
299 |           width="400px"
300 |           height="400px"
301 |         >
302 |           <Legend />
303 |         </PieChart>
304 |       `);
305 |       
306 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
307 |       const legendItems = page.locator(legendItemSelector);
308 |       await expect(legendItems).toHaveCount(1);
309 |       await expect(page.locator(legendTextSelector).filter({ hasText: "Desktop" })).toBeVisible();
310 |     });
311 | 
312 |     test("handles empty data gracefully", async ({ initTestBed, page }) => {
313 |       await initTestBed(`
314 |         <PieChart
315 |           nameKey="name"
316 |           dataKey="value"
317 |           data="{${emptyData}}"
318 |           width="400px"
319 |           height="400px"
320 |         >
321 |           <Legend />
322 |         </PieChart>
323 |       `);
324 |       
325 |       await page.waitForSelector(chartRoot, { timeout: 10000 });
326 |       // Legend should still be present but with no items
327 |       const legendItems = page.locator(legendItemSelector);
328 |       await expect(legendItems).toHaveCount(0);
329 |     });
330 | 
331 |     test("handles large datasets", async ({ initTestBed, page }) => {
332 |       await initTestBed(`
333 |         <PieChart
334 |           nameKey="name"
335 |           dataKey="value"
336 |           data="{${largeDataset}}"
337 |           width="400px"
338 |           height="400px"
339 |         >
340 |           <Legend />
341 |         </PieChart>
342 |       `);
343 |       
344 |       await page.waitForSelector(legendSelector, { timeout: 10000 });
345 |       const legendItems = page.locator(legendItemSelector);
346 |       await expect(legendItems).toHaveCount(10);
347 |     });
348 |   });
349 | 
350 |   // Integration with different chart types
351 |   test.describe("chart type integration", () => {
352 |     test("works with LineChart", async ({ initTestBed, page }) => {
353 |       await initTestBed(`
354 |         <LineChart
355 |           xKey="name"
356 |           yKeys="{['value']}"
357 |           data="{${sampleData}}"
358 |           width="400px"
359 |           height="400px"
360 |           showLegend
361 |         >
362 |           <Legend />
363 |         </LineChart>
364 |       `);
365 |       
366 |       await page.waitForSelector(chartRoot, { timeout: 10000 });
367 |       await expect(page.locator(legendSelector)).toBeVisible();
368 |     });
369 | 
370 |     test("works with DonutChart", async ({ initTestBed, page }) => {
371 |       await initTestBed(`
372 |         <DonutChart
373 |           nameKey="name"
374 |           dataKey="value"
375 |           data="{${sampleData}}"
376 |           width="400px"
377 |           height="400px"
378 |         >
379 |           <Legend />
380 |         </DonutChart>
381 |       `);
382 |       
383 |       await page.waitForSelector(chartRoot, { timeout: 10000 });
384 |       await expect(page.locator(legendSelector)).toBeVisible();
385 |     });
386 |   });
387 | });
388 | 
389 | // =============================================================================
390 | // ACCESSIBILITY TESTS
391 | // =============================================================================
392 | 
393 | test.describe("Accessibility", () => {
394 |   test("legend has proper ARIA structure", async ({ initTestBed, page }) => {
395 |     await initTestBed(`
396 |       <PieChart
397 |         nameKey="name"
398 |         dataKey="value"
399 |         data="{${sampleData}}"
400 |         width="400px"
401 |         height="400px"
402 |       >
403 |         <Legend />
404 |       </PieChart>
405 |     `);
406 |     
407 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
408 |     const legend = page.locator(legendSelector);
409 |     await expect(legend).toBeVisible();
410 |     
411 |     // Legend should be accessible to screen readers
412 |     const legendItems = page.locator(legendItemSelector);
413 |     await expect(legendItems.first()).toBeVisible();
414 |   });
415 | 
416 |   test("legend items are keyboard accessible", async ({ initTestBed, page }) => {
417 |     await initTestBed(`
418 |       <PieChart
419 |         nameKey="name"
420 |         dataKey="value"
421 |         data="{${sampleData}}"
422 |         width="400px"
423 |         height="400px"
424 |       >
425 |         <Legend />
426 |       </PieChart>
427 |     `);
428 |     
429 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
430 |     
431 |     // Tab navigation should work through legend items
432 |     await page.keyboard.press("Tab");
433 |     const focusedElement = page.locator(":focus");
434 |     await expect(focusedElement).toBeVisible();
435 |   });
436 | 
437 |   test("legend text is readable and properly contrasted", async ({ initTestBed, page }) => {
438 |     await initTestBed(`
439 |       <PieChart
440 |         nameKey="name"
441 |         dataKey="value"
442 |         data="{${sampleData}}"
443 |         width="400px"
444 |         height="400px"
445 |       >
446 |         <Legend />
447 |       </PieChart>
448 |     `);
449 |     
450 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
451 |     const legendText = page.locator(legendTextSelector).first();
452 |     await expect(legendText).toBeVisible();
453 |     
454 |     // Text should have readable font size
455 |     await expect(legendText).toHaveCSS("font-size", /\d+px/);
456 |   });
457 | 
458 |   test("supports screen reader navigation", async ({ initTestBed, page }) => {
459 |     await initTestBed(`
460 |       <PieChart
461 |         nameKey="name"
462 |         dataKey="value"
463 |         data="{${sampleData}}"
464 |         width="400px"
465 |         height="400px"
466 |       >
467 |         <Legend />
468 |       </PieChart>
469 |     `);
470 |     
471 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
472 |     
473 |     // Legend should be announced properly by screen readers
474 |     const legendItems = page.locator(legendItemSelector);
475 |     for (let i = 0; i < await legendItems.count(); i++) {
476 |       const item = legendItems.nth(i);
477 |       await expect(item).toBeVisible();
478 |     }
479 |   });
480 | });
481 | 
482 | // =============================================================================
483 | // PERFORMANCE AND EDGE CASES
484 | // =============================================================================
485 | 
486 | test.describe("Performance and Edge Cases", () => {
487 |   test("handles rapid prop changes efficiently", async ({ initTestBed, page }) => {
488 |     const { testStateDriver } = await initTestBed(`
489 |       <PieChart
490 |         nameKey="name"
491 |         dataKey="value"
492 |         data="{${sampleData}}"
493 |         width="400px"
494 |         height="400px"
495 |       >
496 |         <Legend align="{testState || 'center'}" />
497 |       </PieChart>
498 |       <Button onClick="testState = testState === 'center' ? 'left' : 'center'">Toggle Align</Button>
499 |     `);
500 |     
501 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
502 |     
503 |     // Rapidly change alignment
504 |     for (let i = 0; i < 5; i++) {
505 |       await page.getByRole("button", { name: "Toggle Align" }).click();
506 |       await page.waitForTimeout(100);
507 |     }
508 |     
509 |     // Legend should still be visible and functional
510 |     await expect(page.locator(legendSelector)).toBeVisible();
511 |   });
512 | 
513 |   test("maintains performance with large datasets", async ({ initTestBed, page }) => {
514 |     await initTestBed(`
515 |       <PieChart
516 |         nameKey="name"
517 |         dataKey="value"
518 |         data="{${largeDataset}}"
519 |         width="400px"
520 |         height="400px"
521 |       >
522 |         <Legend />
523 |       </PieChart>
524 |     `);
525 |     
526 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
527 |     const legendItems = page.locator(legendItemSelector);
528 |     await expect(legendItems).toHaveCount(10);
529 |     
530 |     // All legend items should be visible
531 |     for (let i = 0; i < 10; i++) {
532 |       await expect(legendItems.nth(i)).toBeVisible();
533 |     }
534 |   });
535 | 
536 |   test("handles responsive container changes", async ({ initTestBed, page }) => {
537 |     const { testStateDriver } = await initTestBed(`
538 |       <PieChart
539 |         nameKey="name"
540 |         dataKey="value"
541 |         data="{${sampleData}}"
542 |         width="{testState || '400px'}"
543 |         height="400px"
544 |       >
545 |         <Legend />
546 |       </PieChart>
547 |       <Button onClick="testState = testState === '400px' ? '200px' : '400px'">Toggle Size</Button>
548 |     `);
549 |     
550 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
551 |     
552 |     // Change container size
553 |     await page.getByRole("button", { name: "Toggle Size" }).click();
554 |     await page.waitForTimeout(500);
555 |     
556 |     // Legend should still be visible and properly positioned
557 |     await expect(page.locator(legendSelector)).toBeVisible();
558 |   });
559 | 
560 |   test("handles Unicode and special characters in legend text", async ({ initTestBed, page }) => {
561 |     const unicodeData = `[
562 |       { name: 'Desktop 🖥️', value: 400 },
563 |       { name: 'Mobile 📱', value: 300 },
564 |       { name: 'Tablet 📟', value: 200 },
565 |       { name: 'Other ⚡', value: 100 }
566 |     ]`;
567 |     
568 |     await initTestBed(`
569 |       <PieChart
570 |         nameKey="name"
571 |         dataKey="value"
572 |         data="{${unicodeData}}"
573 |         width="400px"
574 |         height="400px"
575 |       >
576 |         <Legend />
577 |       </PieChart>
578 |     `);
579 |     
580 |     await page.waitForSelector(legendSelector, { timeout: 10000 });
581 |     
582 |     // Check that Unicode characters are displayed correctly
583 |     await expect(page.locator(legendTextSelector).filter({ hasText: "🖥️" })).toBeVisible();
584 |     await expect(page.locator(legendTextSelector).filter({ hasText: "📱" })).toBeVisible();
585 |     await expect(page.locator(legendTextSelector).filter({ hasText: "📟" })).toBeVisible();
586 |     await expect(page.locator(legendTextSelector).filter({ hasText: "⚡" })).toBeVisible();
587 |   });
588 | 
589 |   test("handles null and undefined prop values gracefully", async ({ initTestBed, page }) => {
590 |     await initTestBed(`
591 |       <PieChart
592 |         nameKey="name"
593 |         dataKey="value"
594 |         data="{${sampleData}}"
595 |         width="400px"
596 |         height="400px"
597 |       >
598 |         <Legend align="{null}" verticalAlign="{undefined}" />
599 |       </PieChart>
600 |     `);
601 |     
602 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
603 |     // Should fall back to default values and still render
604 |     await expect(page.locator(legendSelector)).toBeVisible();
605 |   });
606 | 
607 |   test("works correctly when multiple Legend components are present", async ({ initTestBed, page }) => {
608 |     await initTestBed(`
609 |       <PieChart
610 |         nameKey="name"
611 |         dataKey="value"
612 |         data="{${sampleData}}"
613 |         width="400px"
614 |         height="400px"
615 |       >
616 |         <Legend align="left" />
617 |         <Legend align="right" />
618 |       </PieChart>
619 |     `);
620 |     
621 |     await page.waitForSelector(chartRoot, { timeout: 10000 });
622 |     // Only one legend should be rendered (last one wins)
623 |     const legends = page.locator(legendSelector);
624 |     await expect(legends).toHaveCount(1);
625 |   });
626 | });
627 | 
```
Page 84/186FirstPrevNextLast