This is page 53 of 143. Use http://codebase.md/xmlui-org/xmlui/xmlui/mockApiDef.js?lines=false&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/interception/ReadOnlyCollection.test.ts:
--------------------------------------------------------------------------------
```typescript
import { describe, expect, it, assert } from "vitest";
import {ReadOnlyCollection} from "../../../src/components-core/interception/ReadonlyCollection";
const numArray = [3,4,1,2,5];
const strArray = ["beta", "delta", "alpha", "gamma", "charlie"]
const objArray = [
{ key: "hey", value: 1},
{ key: "bye", value: 114},
{ key: "hey", value: 3},
{ key: "bye", value: 41},
{ key: "ok", value: 1000},
]
describe("ReadOnlyCollection", () => {
it("Construct from Array", () => {
// --- Act
const coll = new ReadOnlyCollection([1, 2, 3]);
// --- Assert
expect(coll.length).equal(3);
expect(coll.at(0)).equal(1);
expect(coll.at(1)).equal(2);
expect(coll.at(2)).equal(3);
});
it("toArray", () => {
// --- Arrange
const coll = new ReadOnlyCollection([3, 2, 1]);
// --- Act
const arr = coll.toArray()
// --- Assert
expect(Array.isArray(arr)).equal(true);
expect(arr.length).equal(3);
expect(arr.at(0)).equal(3);
expect(arr[0]).equal(3);
expect(arr.at(1)).equal(2);
expect(arr[1]).equal(2);
expect(arr.at(2)).equal(1);
expect(arr[2]).equal(1);
});
it("all", () => {
// --- Arrange
const coll = new ReadOnlyCollection([3, 2, 1]);
// --- Act
const all = coll.all()
// --- Assert
expect(all instanceof ReadOnlyCollection).equal(true);
expect(all).not.equal(coll);
expect(all.length).equal(3);
expect(all.at(0)).equal(3);
expect(all.at(1)).equal(2);
expect(all.at(2)).equal(1);
});
it("where #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const where = await coll.where(async i => i >= 3)
// --- Assert
expect(where instanceof ReadOnlyCollection).equal(true);
expect(where).not.equal(numArray);
expect(where.length).equal(3);
expect(where.at(0)).equal(3);
expect(where.at(1)).equal(4);
expect(where.at(2)).equal(5);
});
it("where #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(strArray);
// --- Act
const where = await coll.where(async s => s.includes("t"))
// --- Assert
expect(where instanceof ReadOnlyCollection).equal(true);
expect(where).not.equal(strArray);
expect(where.length).equal(2);
expect(where.at(0)).equal("beta");
expect(where.at(1)).equal("delta");
});
it("where #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const where = await coll.where(async s => s.value > 100)
// --- Assert
expect(where instanceof ReadOnlyCollection).equal(true);
expect(where).not.equal(objArray);
expect(where.length).equal(2);
expect(where.at(0)!.key).equal("bye");
expect(where.at(0)!.value).equal(114);
expect(where.at(1)!.key).equal("ok");
expect(where.at(1)!.value).equal(1000);
});
it("whereArray #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const where = await coll.whereAsArray(async s => s.value > 100)
// --- Assert
expect(Array.isArray(where)).equal(true);
expect(where.length).equal(2);
expect(where.at(0)!.key).equal("bye");
expect(where.at(0)!.value).equal(114);
expect(where.at(1)!.key).equal("ok");
expect(where.at(1)!.value).equal(1000);
});
it("orderBy #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const where = await coll.orderBy(async (i: any) => i)
// --- Assert
expect(where instanceof ReadOnlyCollection).equal(true);
expect(where).not.equal(numArray);
expect(where.length).equal(5);
expect(where.at(0)).equal(1);
expect(where.at(1)).equal(2);
expect(where.at(2)).equal(3);
expect(where.at(3)).equal(4);
expect(where.at(4)).equal(5);
});
it("orderBy #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.orderBy(async (i: any) => i.key, true, async (i: any) => i.value, true);
// --- Assert
expect(res.at(0)!.key).equal("ok");
expect(res.at(0)!.value).equal(1000);
expect(res.at(1)!.key).equal("hey");
expect(res.at(1)!.value).equal(3);
expect(res.at(2)!.key).equal("hey");
expect(res.at(2)!.value).equal(1);
expect(res.at(3)!.key).equal("bye");
expect(res.at(3)!.value).equal(114);
expect(res.at(4)!.key).equal("bye");
expect(res.at(4)!.value).equal(41);
});
it("orderByArray #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const where = await coll.orderByAsArray(async (i: any) => i)
// --- Assert
expect(Array.isArray(where)).equal(true);
expect(where.length).equal(5);
expect(where.at(0)).equal(1);
expect(where.at(1)).equal(2);
expect(where.at(2)).equal(3);
expect(where.at(3)).equal(4);
expect(where.at(4)).equal(5);
});
it("single #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.single(async o => o.key === "ok");
// --- Assert
expect(res!.key).equal("ok");
expect(res!.value).equal(1000);
});
it("single #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act/Assert
try {
await coll.single(async o => o.key === "dummy");
} catch (err: any) {
expect(err.toString().includes("No items")).equal(true);
return;
}
assert.fail("Exception expected");
});
it("single #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act/Assert
try {
await coll.single(async o => o.key === "hey");
} catch (err: any) {
expect(err.toString().includes("Multiple items")).equal(true);
return;
}
assert.fail("Exception expected");
});
it("singleOrDefault #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.singleOrDefault(async o => o.key === "ok", { key: "replaced", value: 0});
// --- Assert
expect(res!.key).equal("ok");
expect(res!.value).equal(1000);
});
it("singleOrDefault #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.singleOrDefault(async o => o.key === "ok");
// --- Assert
expect(res!.key).equal("ok");
expect(res!.value).equal(1000);
});
it("singleOrDefault #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.singleOrDefault(async o => o.key === "none", { key: "replaced", value: 0});
// --- Assert
expect(res!.key).equal("replaced");
expect(res!.value).equal(0);
});
it("singleOrDefault #4", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.singleOrDefault(async o => o.key === "none");
// --- Assert
expect(res).equal(undefined);
});
it("singleOrDefault #5", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act/Assert
try {
await coll.singleOrDefault(async o => o.key === "hey");
} catch (err: any) {
expect(err.toString().includes("Multiple items")).equal(true);
return;
}
assert.fail("Exception expected");
});
it("singleOrDefault #6", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act/Assert
try {
await coll.singleOrDefault(async o => o.key === "hey", { key: "none", value: 0 });
} catch (err: any) {
expect(err.toString().includes("Multiple items")).equal(true);
return;
}
assert.fail("Exception expected");
});
it("distinct #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.distinct(async o => o.key);
// --- Assert
expect(res.length).equal(3);
expect(await res.single(async i => i === "hey")).not.equal(undefined);
expect(await res.single(async i => i === "bye")).not.equal(undefined);
expect(await res.single(async i => i === "ok")).not.equal(undefined);
});
it("distinct #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection([null, 1, 2, undefined, null]);
// --- Act
const res = await coll.distinct(async o => o);
// --- Assert
expect(res.length).equal(4);
expect(await res.single(async i => i === null)).not.equal(undefined);
expect(await res.single(async i => i === undefined)).equal(undefined);
expect(await res.single(async i => i === 1)).not.equal(undefined);
expect(await res.single(async i => i === 2)).not.equal(undefined);
});
it("distinct #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection([2, null, 1, 2, undefined, null, 1]);
// --- Act
const res = await coll.distinct();
// --- Assert
expect(res.length).equal(4);
expect(await res.single(async i => i === null)).not.equal(undefined);
expect(await res.single(async i => i === undefined)).equal(undefined);
expect(await res.single(async i => i === 1)).not.equal(undefined);
expect(await res.single(async i => i === 2)).not.equal(undefined);
});
it("distinctByArray #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.distinctAsArray(async o => o.key);
// --- Assert
expect(res.length).equal(3);
expect(res.find(i => i === "hey")).not.equal(undefined);
expect(res.find(i => i === "bye")).not.equal(undefined);
expect(res.find(i => i === "ok")).not.equal(undefined);
});
it("groupBy #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.groupBy(async o => o.key);
// --- Assert
expect(res.length).equal(3);
let group = await res.single(async i => i.key === "hey");
expect(group!.items.length).equal(2);
group = await res.single(async i => i.key === "ok");
expect(group!.items.length).equal(1);
group = await res.single(async i => i.key === "bye");
expect(group!.items.length).equal(2);
});
it("groupBy #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = await coll.groupBy(async i => i % 2);
// --- Assert
expect(res.length).equal(2);
let group = await res.single(async i => i.key === 0);
expect(group!.items.length).equal(2);
group = await res.single(async i => i.key === 1);
expect(group!.items.length).equal(3);
});
it("groupByArray #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(objArray);
// --- Act
const res = await coll.groupByAsArray(async o => o.key);
// --- Assert
expect(res.length).equal(3);
let group = res.find(i => i.key === "hey");
expect(group!.items.length).equal(2);
group = res.find(i => i.key === "ok");
expect(group!.items.length).equal(1);
group = res.find(i => i.key === "bye");
expect(group!.items.length).equal(2);
});
it("skip #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.skip(0)).toArray();
// --- Assert
expect(res).deep.equal([3,4,1,2,5]);
});
it("skip #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.skip(2)).toArray();
// --- Assert
expect(res).deep.equal([1,2,5]);
});
it("skip #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.skip(5)).toArray();
// --- Assert
expect(res).deep.equal([]);
});
it("skip #4", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.skip(100)).toArray();
// --- Assert
expect(res).deep.equal([]);
});
it("take #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.take(0)).toArray();
// --- Assert
expect(res).deep.equal([]);
});
it("take #2", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.take(3)).toArray();
// --- Assert
expect(res).deep.equal([3, 4, 1]);
});
it("take #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.take(100)).toArray();
// --- Assert
expect(res).deep.equal([3, 4, 1, 2, 5]);
});
it("skipTake #1", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.skipTake(2, 2)).toArray();
// --- Assert
expect(res).deep.equal([1, 2]);
});
it("skipTake #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.skipTake(100, 2)).toArray();
// --- Assert
expect(res).deep.equal([]);
});
it("skipTake #3", async () => {
// --- Arrange
const coll = new ReadOnlyCollection(numArray);
// --- Act
const res = (await coll.skipTake(2, 20)).toArray();
// --- Assert
expect(res).deep.equal([1, 2, 5]);
});
});
```
--------------------------------------------------------------------------------
/xmlui/src/syntax/textMate/xmlui.json:
--------------------------------------------------------------------------------
```json
{
"name": "xmlui",
"type": "css",
"colors": {
"foreground": "#616161",
"focusBorder": "#161F26",
"widget.shadow": "#161F2694",
"input.background": "#FFF",
"input.border": "#161F26",
"input.foreground": "#000",
"input.placeholderForeground": "#a0a0a0",
"inputOption.activeBorder": "#3E313C",
"inputValidation.errorBackground": "#F44C5E",
"inputValidation.errorForeground": "#FFF",
"inputValidation.infoBackground": "#6182b8",
"inputValidation.infoForeground": "#FFF",
"inputValidation.warningBackground": "#F6B555",
"inputValidation.warningForeground": "#000",
"list.activeSelectionBackground": "#5899C5",
"list.activeSelectionForeground": "#fff",
"list.hoverBackground": "#d5e1ea",
"list.hoverForeground": "#fff",
"list.focusBackground": "#d5e1ea",
"list.focusForeground": "#fff",
"list.inactiveSelectionBackground": "#5899C5",
"list.inactiveSelectionForeground": "#fff",
"list.highlightForeground": "#2D3E4C",
"list.inactiveFocusBackground": "#161F26",
"list.invalidItemForeground": "#fff",
"button.background": "#475663",
"button.foreground": "#FFF",
"button.hoverBackground": "#161F26",
"scrollbar.shadow": "#ffffff00",
"scrollbarSlider.activeBackground": "#161F267e",
"scrollbarSlider.background": "#161F267e",
"scrollbarSlider.hoverBackground": "#161F267e",
"badge.background": "#8AE773",
"progressBar.background": "#8AE773",
"editor.background": "#FFF",
"editor.foreground": "#000",
"editor.lineHighlightBackground": "#EEEEEE",
"editor.wordHighlightStrongBackground": "#EEEEEE",
"editor.selectionBackground": "#AED4FB",
"editorLineNumber.foreground": "#b9b9b9",
"editorActiveLineNumber.foreground": "#475663",
"editor.findMatchBackground": "#AED4FB",
"editorHint.foreground": "#F9F9F9",
"editorHint.border": "#F9F9F9",
"editor.wordHighlightBackground": "#AED4FB",
"terminal.border": "#2D3E4C",
"terminal.foreground": "#161F26",
"terminal.ansiBlack": "#000000",
"terminal.ansiBlue": "#6182b8",
"terminal.ansiBrightBlack": "#90a4ae",
"terminal.ansiBrightBlue": "#6182b8",
"terminal.ansiBrightCyan": "#39adb5",
"terminal.ansiBrightGreen": "#91b859",
"terminal.ansiBrightMagenta": "#7c4dff",
"terminal.ansiBrightRed": "#e53935",
"terminal.ansiBrightWhite": "#ffffff",
"terminal.ansiBrightYellow": "#ffb62c",
"terminal.ansiCyan": "#39adb5",
"terminal.ansiGreen": "#91b859",
"terminal.ansiMagenta": "#7c4dff",
"terminal.ansiRed": "#e53935",
"terminal.ansiWhite": "#ffffff",
"terminal.ansiYellow": "#ffb62c",
"terminal.selectionBackground": "#0006",
"panelTitle.activeForeground": "#161F26",
"activityBar.background": "#161F26",
"activityBar.foreground": "#FFF",
"activityBar.dropBackground": "#FFF",
"activityBarBadge.background": "#8AE773",
"activityBarBadge.foreground": "#FFF",
"panel.border": "#2D3E4C",
"dropdown.background": "#FFF",
"dropdown.listBackground": "#FFF",
"dropdown.border": "#DCDEDF",
"dropdown.foreground": "#DCDEDF",
"sideBar.background": "#2D3E4C",
"sideBar.foreground": "#DCDEDF",
"sideBarTitle.foreground": "#FFF",
"sideBarSectionHeader.foreground": "#FFF",
"sideBarSectionHeader.background": "#161F26",
"debugToolBar.background": "#161F26",
"tab.border": "#F3F3F3",
"tab.activeBackground": "#FFF",
"tab.inactiveForeground": "#686868",
"tab.inactiveBackground": "#F3F3F3",
"tab.activeForeground": "#000",
"editorGroupHeader.tabsBackground": "#2D3E4C",
"statusBar.foreground": "#FFF",
"statusBar.background": "#5899C5",
"statusBar.debuggingBackground": "#8AE773",
"statusBar.noFolderBackground": "#161F26",
"extensionButton.prominentBackground": "#475663",
"extensionButton.prominentForeground": "#F6F6F6",
"extensionButton.prominentHoverBackground": "#161F26",
"gitDecoration.modifiedResourceForeground": "#ECB22E",
"gitDecoration.deletedResourceForeground": "#FFF",
"gitDecoration.untrackedResourceForeground": "#ECB22E",
"gitDecoration.ignoredResourceForeground": "#877583",
"gitDecoration.addedResourceForeground": "#ECB22E",
"gitDecoration.conflictingResourceForeground": "#FFF",
"notificationCenter.border": "#161F26",
"notificationToast.border": "#161F26",
"notifications.foreground": "#FFF",
"notifications.background": "#161F26",
"notifications.border": "#161F26",
"notificationCenterHeader.foreground": "#FFF",
"notificationLink.foreground": "#FFF",
"titleBar.activeBackground": "#2D3E4C",
"titleBar.activeForeground": "#FFF",
"titleBar.inactiveBackground": "#161F26",
"titleBar.inactiveForeground": "#685C66",
"titleBar.border": "#2D3E4C",
"welcomePage.buttonBackground": "#F3F3F3",
"welcomePage.buttonHoverBackground": "#ECECEC",
"editorWidget.background": "#F9F9F9",
"editorWidget.border": "#dbdbdb",
"editorSuggestWidget.foreground": "#2D3E4C",
"editorSuggestWidget.highlightForeground": "#2D3E4C",
"editorSuggestWidget.selectedBackground": "#b9b9b9",
"editorGroup.emptyBackground": "#2D3E4C",
"editorGroup.focusedEmptyBorder": "#2D3E4C",
"editorPane.background": "#2D3E4C",
"breadcrumb.foreground": "#161F26",
"breadcrumb.focusForeground": "#475663",
"settings.headerForeground": "#161F26",
"settings.dropdownForeground": "#161F26",
"settings.dropdownBorder": "#161F26",
"menu.separatorBackground": "#F9FAFA",
"menu.background": "#161F26",
"menu.foreground": "#F9FAFA",
"textPreformat.foreground": "#161F26",
"editorIndentGuide.background": "#F3F3F3",
"editorIndentGuide.activeBackground": "#dbdbdb",
"debugExceptionWidget.background": "#AED4FB",
"debugExceptionWidget.border": "#161F26",
"editorMarkerNavigation.background": "#F9F9F9",
"editorMarkerNavigationInfo.background": "#6182b8",
"editorMarkerNavigationError.background": "#F44C5E",
"editorMarkerNavigationWarning.background": "#F6B555"
},
"tokenColors": [
{
"scope": ["support.class.tag.component"],
"settings": {
"foreground": "#000001"
}
},
{
"scope": ["punctuation.definition.tag"],
"settings": {
"foreground": "#000002"
}
},
{
"scope": ["entity.other.attribute-name.localname"],
"settings": {
"foreground": "#000003"
}
},
{
"scope": ["keyword.operator"],
"settings": {
"foreground": "#000004"
}
},
{
"scope": ["string.xmlui"],
"settings": {
"foreground": "#000005"
}
},
{
"scope": ["entity.name.function"],
"settings": {
"foreground": "#000006"
}
},
{
"scope": ["entity.name.tag.localname"],
"settings": {
"foreground": "#000007"
}
},
{
"scope": ["punctuation.definition.comment.xmlui"],
"settings": {
"foreground": "#000008"
}
},
{
"scope": ["comment.block.xmlui"],
"settings": {
"foreground": "#000008"
}
},
{
"scope": ["constant.character.escape.xmlui"],
"settings": {
"foreground": "#000009"
}
},
{
"scope": ["punctuation.definition.constant.xmlui"],
"settings": {
"foreground": "#000010"
}
},
{
"scope": ["storage.xmlui"],
"settings": {
"foreground": "#000011"
}
},
{
"scope": ["punctuation.definition.block.xmlui"],
"settings": {
"foreground": "#000012"
}
},
{
"settings": {
"foreground": "#000013"
}
},
{
"scope": ["string.quoted.single", "string.quoted.double"],
"settings": {
"foreground": "#000014"
}
},
{
"scope": ["meta.paragraph.markdown", "string.other.link.description.title.markdown"],
"settings": {
"foreground": "#110000"
}
},
{
"scope": ["entity.name.section.markdown", "punctuation.definition.heading.markdown"],
"settings": {
"foreground": "#034c7c"
}
},
{
"scope": [
"punctuation.definition.string.begin.markdown",
"punctuation.definition.string.end.markdown",
"markup.quote.markdown"
],
"settings": {
"foreground": "#00AC8F"
}
},
{
"scope": ["markup.quote.markdown"],
"settings": {
"fontStyle": "italic",
"foreground": "#003494"
}
},
{
"scope": ["markup.bold.markdown", "punctuation.definition.bold.markdown"],
"settings": {
"fontStyle": "bold",
"foreground": "#4e76b5"
}
},
{
"scope": ["markup.italic.markdown", "punctuation.definition.italic.markdown"],
"settings": {
"fontStyle": "italic",
"foreground": "#C792EA"
}
},
{
"scope": ["markup.inline.raw.string.markdown", "markup.fenced_code.block.markdown"],
"settings": {
"fontStyle": "italic",
"foreground": "#0460b1"
}
},
{
"scope": ["punctuation.definition.metadata.markdown"],
"settings": {
"foreground": "#00AC8F"
}
},
{
"scope": ["markup.underline.link.image.markdown", "markup.underline.link.markdown"],
"settings": {
"foreground": "#924205"
}
},
{
"name": "Component Tag",
"scope": "component.tag",
"settings": {
"foreground": "#1174FF"
}
},
{
"name": "Attribute name",
"scope": "attribute.name",
"settings": {
"fontStyle": "italic",
"foreground": "#FF8D23"
}
},
{
"name": "Attribute value",
"scope": "attribute.value",
"settings": {
"foreground": "#7681FF"
}
},
{
"name": "Helper Tag",
"scope": "helper.tag",
"settings": {
"foreground": "#32D158"
}
},
{
"name": "Library function",
"scope": "support.function",
"settings": {
"fontStyle": "",
"foreground": "#1ab394"
}
},
{
"name": "Library constant",
"scope": "support.constant",
"settings": {
"fontStyle": "",
"foreground": "#7681FF"
}
},
{
"name": "Library class/type",
"scope": ["support.type", "support.class"],
"settings": {
"foreground": "#d45800"
}
},
{
"name": "Library variable",
"scope": "support.other.variable",
"settings": {
"foreground": "#224555"
}
},
{
"name": "Invalid",
"scope": "invalid",
"settings": {
"fontStyle": " italic bold underline",
"foreground": "#207bb8"
}
},
{
"name": "Invalid deprecated",
"scope": "invalid.deprecated",
"settings": {
"foreground": "#207bb8",
"fontStyle": " bold italic underline"
}
},
{
"name": "[JSON] - Support",
"scope": "source.json support",
"settings": {
"foreground": "#6dbdfa"
}
},
{
"name": "[JSON] - String",
"scope": ["source.json string", "source.json punctuation.definition.string"],
"settings": {
"foreground": "#00820f"
}
},
{
"name": "Lists",
"scope": "markup.list",
"settings": {
"foreground": "#207bb8"
}
},
{
"name": "Headings",
"scope": ["markup.heading punctuation.definition.heading", "entity.name.section"],
"settings": {
"fontStyle": "",
"foreground": "#4FB4D8"
}
},
{
"name": "Support",
"scope": [
"text.html.markdown meta.paragraph meta.link.inline",
"text.html.markdown meta.paragraph meta.link.inline punctuation.definition.string.begin.markdown",
"text.html.markdown meta.paragraph meta.link.inline punctuation.definition.string.end.markdown"
],
"settings": {
"foreground": "#87429A"
}
},
{
"name": "Quotes",
"scope": "markup.quote",
"settings": {
"foreground": "#87429A"
}
},
{
"name": "Bold",
"scope": "markup.bold",
"settings": {
"fontStyle": "bold",
"foreground": "#08134A"
}
},
{
"name": "Italic",
"scope": ["markup.italic", "punctuation.definition.italic"],
"settings": {
"fontStyle": "italic",
"foreground": "#7681FF"
}
},
{
"name": "Link Url",
"scope": "meta.link",
"settings": {
"foreground": "#87429A"
}
},
{
"name": "String",
"scope": "string",
"settings": {
"foreground": "#152dd0"
}
},
{
"name": "Number",
"scope": "constant.numeric",
"settings": {
"foreground": "#7681FF"
}
},
{
"name": "Constant",
"scope": "constant",
"settings": {
"foreground": "#7681FF"
}
},
{
"name": "Built-in constant",
"scope": "language.method",
"settings": {
"foreground": "#7681FF"
}
},
{
"name": "User-defined constant",
"scope": ["constant.character", "constant.other"],
"settings": {
"foreground": "#7681FF"
}
},
{
"name": "Variable",
"scope": "variable",
"settings": {
"fontStyle": "",
"foreground": "#2f86d2"
}
},
{
"name": "Variable",
"scope": "variable.language.this",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "Keyword",
"scope": "keyword",
"settings": {
"fontStyle": "",
"foreground": "#7b30d0"
}
},
{
"name": "Storage",
"scope": "storage",
"settings": {
"fontStyle": "",
"foreground": "#da5221"
}
},
{
"name": "Storage type",
"scope": "storage.type",
"settings": {
"foreground": "#0991b6",
"fontStyle": ""
}
},
{
"name": "Class name",
"scope": "entity.name.class",
"settings": {
"foreground": "#1172c7"
}
},
{
"name": "Inherited class",
"scope": "entity.other.inherited-class",
"settings": {
"fontStyle": "",
"foreground": "#b02767"
}
},
{
"name": "Function argument",
"scope": "variable.parameter",
"settings": {
"foreground": "#b1108e",
"fontStyle": ""
}
},
{
"name": "Tag name",
"scope": "entity.name.tag",
"settings": {
"fontStyle": "",
"foreground": "#0444ac"
}
},
{
"name": "Html Other",
"scope": "text.html.basic",
"settings": {
"fontStyle": "",
"foreground": "#0071ce"
}
},
{
"name": "Entity Name Type",
"scope": "entity.name.type",
"settings": {
"foreground": "#0444ac"
}
}
]
}
```
--------------------------------------------------------------------------------
/xmlui/src/syntax/textMate/xmlui-light.json:
--------------------------------------------------------------------------------
```json
{
"name": "xmlui-light",
"type": "css",
"colors": {
"foreground": "#616161",
"focusBorder": "#161F26",
"widget.shadow": "#161F2694",
"input.background": "#FFF",
"input.border": "#161F26",
"input.foreground": "#000",
"input.placeholderForeground": "#a0a0a0",
"inputOption.activeBorder": "#3E313C",
"inputValidation.errorBackground": "#F44C5E",
"inputValidation.errorForeground": "#FFF",
"inputValidation.infoBackground": "#6182b8",
"inputValidation.infoForeground": "#FFF",
"inputValidation.warningBackground": "#F6B555",
"inputValidation.warningForeground": "#000",
"list.activeSelectionBackground": "#5899C5",
"list.activeSelectionForeground": "#fff",
"list.hoverBackground": "#d5e1ea",
"list.hoverForeground": "#fff",
"list.focusBackground": "#d5e1ea",
"list.focusForeground": "#fff",
"list.inactiveSelectionBackground": "#5899C5",
"list.inactiveSelectionForeground": "#fff",
"list.highlightForeground": "#2D3E4C",
"list.inactiveFocusBackground": "#161F26",
"list.invalidItemForeground": "#fff",
"button.background": "#475663",
"button.foreground": "#FFF",
"button.hoverBackground": "#161F26",
"scrollbar.shadow": "#ffffff00",
"scrollbarSlider.activeBackground": "#161F267e",
"scrollbarSlider.background": "#161F267e",
"scrollbarSlider.hoverBackground": "#161F267e",
"badge.background": "#8AE773",
"progressBar.background": "#8AE773",
"editor.background": "#FFF",
"editor.foreground": "#000",
"editor.lineHighlightBackground": "#EEEEEE",
"editor.wordHighlightStrongBackground": "#EEEEEE",
"editor.selectionBackground": "#AED4FB",
"editorLineNumber.foreground": "#b9b9b9",
"editorActiveLineNumber.foreground": "#475663",
"editor.findMatchBackground": "#AED4FB",
"editorHint.foreground": "#F9F9F9",
"editorHint.border": "#F9F9F9",
"editor.wordHighlightBackground": "#AED4FB",
"terminal.border": "#2D3E4C",
"terminal.foreground": "#161F26",
"terminal.ansiBlack": "#000000",
"terminal.ansiBlue": "#6182b8",
"terminal.ansiBrightBlack": "#90a4ae",
"terminal.ansiBrightBlue": "#6182b8",
"terminal.ansiBrightCyan": "#39adb5",
"terminal.ansiBrightGreen": "#91b859",
"terminal.ansiBrightMagenta": "#7c4dff",
"terminal.ansiBrightRed": "#e53935",
"terminal.ansiBrightWhite": "#ffffff",
"terminal.ansiBrightYellow": "#ffb62c",
"terminal.ansiCyan": "#39adb5",
"terminal.ansiGreen": "#91b859",
"terminal.ansiMagenta": "#7c4dff",
"terminal.ansiRed": "#e53935",
"terminal.ansiWhite": "#ffffff",
"terminal.ansiYellow": "#ffb62c",
"terminal.selectionBackground": "#0006",
"panelTitle.activeForeground": "#161F26",
"activityBar.background": "#161F26",
"activityBar.foreground": "#FFF",
"activityBar.dropBackground": "#FFF",
"activityBarBadge.background": "#8AE773",
"activityBarBadge.foreground": "#FFF",
"panel.border": "#2D3E4C",
"dropdown.background": "#FFF",
"dropdown.listBackground": "#FFF",
"dropdown.border": "#DCDEDF",
"dropdown.foreground": "#DCDEDF",
"sideBar.background": "#2D3E4C",
"sideBar.foreground": "#DCDEDF",
"sideBarTitle.foreground": "#FFF",
"sideBarSectionHeader.foreground": "#FFF",
"sideBarSectionHeader.background": "#161F26",
"debugToolBar.background": "#161F26",
"tab.border": "#F3F3F3",
"tab.activeBackground": "#FFF",
"tab.inactiveForeground": "#686868",
"tab.inactiveBackground": "#F3F3F3",
"tab.activeForeground": "#000",
"editorGroupHeader.tabsBackground": "#2D3E4C",
"statusBar.foreground": "#FFF",
"statusBar.background": "#5899C5",
"statusBar.debuggingBackground": "#8AE773",
"statusBar.noFolderBackground": "#161F26",
"extensionButton.prominentBackground": "#475663",
"extensionButton.prominentForeground": "#F6F6F6",
"extensionButton.prominentHoverBackground": "#161F26",
"gitDecoration.modifiedResourceForeground": "#ECB22E",
"gitDecoration.deletedResourceForeground": "#FFF",
"gitDecoration.untrackedResourceForeground": "#ECB22E",
"gitDecoration.ignoredResourceForeground": "#877583",
"gitDecoration.addedResourceForeground": "#ECB22E",
"gitDecoration.conflictingResourceForeground": "#FFF",
"notificationCenter.border": "#161F26",
"notificationToast.border": "#161F26",
"notifications.foreground": "#FFF",
"notifications.background": "#161F26",
"notifications.border": "#161F26",
"notificationCenterHeader.foreground": "#FFF",
"notificationLink.foreground": "#FFF",
"titleBar.activeBackground": "#2D3E4C",
"titleBar.activeForeground": "#FFF",
"titleBar.inactiveBackground": "#161F26",
"titleBar.inactiveForeground": "#685C66",
"titleBar.border": "#2D3E4C",
"welcomePage.buttonBackground": "#F3F3F3",
"welcomePage.buttonHoverBackground": "#ECECEC",
"editorWidget.background": "#F9F9F9",
"editorWidget.border": "#dbdbdb",
"editorSuggestWidget.foreground": "#2D3E4C",
"editorSuggestWidget.highlightForeground": "#2D3E4C",
"editorSuggestWidget.selectedBackground": "#b9b9b9",
"editorGroup.emptyBackground": "#2D3E4C",
"editorGroup.focusedEmptyBorder": "#2D3E4C",
"editorPane.background": "#2D3E4C",
"breadcrumb.foreground": "#161F26",
"breadcrumb.focusForeground": "#475663",
"settings.headerForeground": "#161F26",
"settings.dropdownForeground": "#161F26",
"settings.dropdownBorder": "#161F26",
"menu.separatorBackground": "#F9FAFA",
"menu.background": "#161F26",
"menu.foreground": "#F9FAFA",
"textPreformat.foreground": "#161F26",
"editorIndentGuide.background": "#F3F3F3",
"editorIndentGuide.activeBackground": "#dbdbdb",
"debugExceptionWidget.background": "#AED4FB",
"debugExceptionWidget.border": "#161F26",
"editorMarkerNavigation.background": "#F9F9F9",
"editorMarkerNavigationInfo.background": "#6182b8",
"editorMarkerNavigationError.background": "#F44C5E",
"editorMarkerNavigationWarning.background": "#F6B555"
},
"tokenColors": [
{
"scope": ["support.class.tag.component"],
"settings": {
"foreground": "#B33175"
}
},
{
"scope": ["punctuation.definition.tag"],
"settings": {
"foreground": "#66748E"
}
},
{
"scope": ["entity.other.attribute-name.localname"],
"settings": {
"foreground": "#2d2d2d"
}
},
{
"scope": ["keyword.operator"],
"settings": {
"foreground": "#2d2d2d"
}
},
{
"scope": ["string.xmlui"],
"settings": {
"foreground": "#0074a9"
}
},
{
"scope": ["entity.name.function"],
"settings": {
"foreground": "#02A1A1"
}
},
{
"scope": ["entity.name.tag.localname"],
"settings": {
"foreground": "#005AE1"
}
},
{
"scope": ["punctuation.definition.comment.xmlui"],
"settings": {
"foreground": "#606060"
}
},
{
"scope": ["comment.block.xmlui"],
"settings": {
"foreground": "#606060",
"fontStyle": "italic"
}
},
{
"scope": ["constant.character.escape.xmlui"],
"settings": {
"foreground": "#00B248"
}
},
{
"scope": ["punctuation.definition.constant.xmlui"],
"settings": {
"foreground": "#708C00"
}
},
{
"scope": ["storage.xmlui"],
"settings": {
"foreground": "#079CF1"
}
},
{
"scope": ["punctuation.definition.block.xmlui"],
"settings": {
"foreground": "#F07100"
}
},
{
"settings": {
"foreground": "#4e5fb3"
}
},
{
"scope": ["string.quoted.single", "string.quoted.double"],
"settings": {
"foreground": "#0074a9"
}
},
{
"scope": ["meta.paragraph.markdown", "string.other.link.description.title.markdown"],
"settings": {
"foreground": "#110000"
}
},
{
"scope": ["entity.name.section.markdown", "punctuation.definition.heading.markdown"],
"settings": {
"foreground": "#034c7c"
}
},
{
"scope": [
"punctuation.definition.string.begin.markdown",
"punctuation.definition.string.end.markdown",
"markup.quote.markdown"
],
"settings": {
"foreground": "#00AC8F"
}
},
{
"scope": ["markup.quote.markdown"],
"settings": {
"fontStyle": "italic",
"foreground": "#003494"
}
},
{
"scope": ["markup.bold.markdown", "punctuation.definition.bold.markdown"],
"settings": {
"fontStyle": "bold",
"foreground": "#4e76b5"
}
},
{
"scope": ["markup.italic.markdown", "punctuation.definition.italic.markdown"],
"settings": {
"fontStyle": "italic",
"foreground": "#C792EA"
}
},
{
"scope": ["markup.inline.raw.string.markdown", "markup.fenced_code.block.markdown"],
"settings": {
"fontStyle": "italic",
"foreground": "#0460b1"
}
},
{
"scope": ["punctuation.definition.metadata.markdown"],
"settings": {
"foreground": "#00AC8F"
}
},
{
"scope": ["markup.underline.link.image.markdown", "markup.underline.link.markdown"],
"settings": {
"foreground": "#924205"
}
},
{
"name": "Component Tag",
"scope": "component.tag",
"settings": {
"foreground": "#1174FF"
}
},
{
"name": "Attribute name",
"scope": "attribute.name",
"settings": {
"fontStyle": "italic",
"foreground": "#FF8D23"
}
},
{
"name": "Attribute value",
"scope": "attribute.value",
"settings": {
"foreground": "#2E39B4"
}
},
{
"name": "Helper Tag",
"scope": "helper.tag",
"settings": {
"foreground": "#32D158"
}
},
{
"name": "Library function",
"scope": "support.function",
"settings": {
"fontStyle": "",
"foreground": "#1ab394"
}
},
{
"name": "Library constant",
"scope": "support.constant",
"settings": {
"fontStyle": "",
"foreground": "#2E39B4"
}
},
{
"name": "Library class/type",
"scope": ["support.type", "support.class"],
"settings": {
"foreground": "#2D2D2D"
}
},
{
"name": "Library variable",
"scope": "support.other.variable",
"settings": {
"foreground": "#224555"
}
},
{
"name": "Invalid",
"scope": "invalid",
"settings": {
"fontStyle": " italic bold underline",
"foreground": "#207bb8"
}
},
{
"name": "Invalid deprecated",
"scope": "invalid.deprecated",
"settings": {
"foreground": "#207bb8",
"fontStyle": " bold italic underline"
}
},
{
"name": "[JSON] - Support",
"scope": "source.json support",
"settings": {
"foreground": "#6dbdfa"
}
},
{
"name": "[JSON] - String",
"scope": ["source.json string", "source.json punctuation.definition.string"],
"settings": {
"foreground": "#0074A9"
}
},
{
"name": "Lists",
"scope": "markup.list",
"settings": {
"foreground": "#207bb8"
}
},
{
"name": "Headings",
"scope": ["markup.heading punctuation.definition.heading", "entity.name.section"],
"settings": {
"fontStyle": "",
"foreground": "#4FB4D8"
}
},
{
"name": "Support",
"scope": [
"text.html.markdown meta.paragraph meta.link.inline",
"text.html.markdown meta.paragraph meta.link.inline punctuation.definition.string.begin.markdown",
"text.html.markdown meta.paragraph meta.link.inline punctuation.definition.string.end.markdown"
],
"settings": {
"foreground": "#87429A"
}
},
{
"name": "Quotes",
"scope": "markup.quote",
"settings": {
"foreground": "#87429A"
}
},
{
"name": "Bold",
"scope": "markup.bold",
"settings": {
"fontStyle": "bold",
"foreground": "#08134A"
}
},
{
"name": "Italic",
"scope": ["markup.italic", "punctuation.definition.italic"],
"settings": {
"fontStyle": "italic",
"foreground": "#2E39B4"
}
},
{
"name": "Link Url",
"scope": "meta.link",
"settings": {
"foreground": "#87429A"
}
},
{
"name": "String",
"scope": "string",
"settings": {
"foreground": "#152dd0"
}
},
{
"name": "Number",
"scope": "constant.numeric",
"settings": {
"foreground": "#2E39B4"
}
},
{
"name": "Constant",
"scope": "constant",
"settings": {
"foreground": "#2E39B4"
}
},
{
"name": "Built-in constant",
"scope": "language.method",
"settings": {
"foreground": "#2E39B4"
}
},
{
"name": "User-defined constant",
"scope": ["constant.character", "constant.other"],
"settings": {
"foreground": "#2E39B4"
}
},
{
"name": "Variable",
"scope": "variable",
"settings": {
"fontStyle": "",
"foreground": "#2f86d2"
}
},
{
"name": "Variable",
"scope": "variable.language.this",
"settings": {
"fontStyle": "",
"foreground": "#000000"
}
},
{
"name": "Keyword",
"scope": "keyword",
"settings": {
"fontStyle": "",
"foreground": "#7b30d0"
}
},
{
"name": "Storage",
"scope": "storage",
"settings": {
"fontStyle": "",
"foreground": "#da5221"
}
},
{
"name": "Storage type",
"scope": "storage.type",
"settings": {
"foreground": "#0991b6",
"fontStyle": ""
}
},
{
"name": "Class name",
"scope": "entity.name.class",
"settings": {
"foreground": "#1172c7"
}
},
{
"name": "Inherited class",
"scope": "entity.other.inherited-class",
"settings": {
"fontStyle": "",
"foreground": "#b02767"
}
},
{
"name": "Function argument",
"scope": "variable.parameter",
"settings": {
"foreground": "#b1108e",
"fontStyle": ""
}
},
{
"name": "Tag name",
"scope": "entity.name.tag",
"settings": {
"fontStyle": "",
"foreground": "#0444ac"
}
},
{
"name": "Html Other",
"scope": "text.html.basic",
"settings": {
"fontStyle": "",
"foreground": "#0071ce"
}
},
{
"name": "Entity Name Type",
"scope": "entity.name.type",
"settings": {
"foreground": "#0444ac"
}
}
]
}
```
--------------------------------------------------------------------------------
/xmlui/src/components/Tree/TreeComponent.tsx:
--------------------------------------------------------------------------------
```typescript
import type { ComponentDef } from "../..";
import { createComponentRenderer } from "../../components-core/renderers";
import { parseScssVar } from "../../components-core/theming/themeVars";
import { MemoizedItem } from "../container-helpers";
import { createMetadata } from "../metadata-helpers";
import { TreeComponent, defaultProps } from "./TreeNative";
import styles from "./TreeComponent.module.scss";
const COMP = "Tree";
export const TreeMd = createMetadata({
status: "stable",
description: `The \`${COMP}\` component is a virtualized tree component that displays hierarchical data with support for flat and hierarchy data formats.`,
props: {
data: {
description: `The data source of the tree. Format depends on the dataFormat property.`,
isRequired: true,
},
dataFormat: {
description: `The input data structure format: "flat" (array with parent relationships) or "hierarchy" (nested objects).`,
valueType: "string",
defaultValue: defaultProps.dataFormat,
},
idField: {
description: `The property name in source data for unique identifiers.`,
valueType: "string",
defaultValue: defaultProps.idField,
},
nameField: {
description: `The property name in source data for display text.`,
valueType: "string",
defaultValue: defaultProps.nameField,
},
iconField: {
description: `The property name in source data for icon identifiers.`,
valueType: "string",
defaultValue: defaultProps.iconField,
},
iconExpandedField: {
description: `The property name in source data for expanded state icons.`,
valueType: "string",
defaultValue: defaultProps.iconExpandedField,
},
iconCollapsedField: {
description: `The property name in source data for collapsed state icons.`,
valueType: "string",
defaultValue: defaultProps.iconCollapsedField,
},
parentIdField: {
description: `The property name in source data for parent relationships (used in flat format).`,
valueType: "string",
defaultValue: defaultProps.parentIdField,
},
childrenField: {
description: `The property name in source data for child arrays (used in hierarchy format).`,
valueType: "string",
defaultValue: defaultProps.childrenField,
},
selectableField: {
description: `The property name in source data for selectable state (default: "selectable").`,
valueType: "string",
defaultValue: defaultProps.selectableField,
},
selectedValue: {
description: `The selected item ID in source data format.`,
},
defaultExpanded: {
description: `Initial expansion state: "none", "all", "first-level", or array of specific IDs.`,
valueType: "string",
defaultValue: defaultProps.defaultExpanded,
},
autoExpandToSelection: {
description: `Automatically expand the path to the selected item.`,
valueType: "boolean",
defaultValue: defaultProps.autoExpandToSelection,
},
itemClickExpands: {
description: "Whether clicking anywhere on a tree item should expand/collapse the node, not just the expand/collapse icon.",
valueType: "boolean",
defaultValue: defaultProps.itemClickExpands,
},
iconCollapsed: {
description: `The icon name to use for collapsed nodes (default: "chevronright").`,
valueType: "string",
defaultValue: defaultProps.iconCollapsed,
},
iconExpanded: {
description: `The icon name to use for expanded nodes (default: "chevrondown").`,
valueType: "string",
defaultValue: defaultProps.iconExpanded,
},
iconSize: {
description: `The size of the expand/collapse icons (default: "16").`,
valueType: "string",
defaultValue: defaultProps.iconSize,
},
itemHeight: {
description: `The height of each tree row in pixels (default: 35).`,
valueType: "number",
defaultValue: defaultProps.itemHeight,
},
animateExpand: {
description: `When true, uses only the collapsed icon and rotates it for expansion instead of switching icons (default: false).`,
valueType: "boolean",
defaultValue: defaultProps.animateExpand,
},
expandRotation: {
description: `The number of degrees to rotate the collapsed icon when expanded in animate mode (default: 90).`,
valueType: "number",
defaultValue: defaultProps.expandRotation,
},
dynamicField: {
description: `The property name in source data for dynamic loading state (default: "dynamic").`,
valueType: "string",
defaultValue: defaultProps.dynamicField,
},
itemTemplate: {
description: "The template for each item in the tree.",
valueType: "ComponentDef",
},
},
events: {
selectionDidChange: {
description: `Fired when the tree selection changes.`,
signature: `(event: TreeSelectionEvent) => void`,
},
nodeDidExpand: {
description: `Fired when a tree node is expanded.`,
signature: `(node: FlatTreeNode) => void`,
},
nodeDidCollapse: {
description: `Fired when a tree node is collapsed.`,
signature: `(node: FlatTreeNode) => void`,
},
loadChildren: {
description: `Fired when a tree node needs to load children dynamically. Should return an array of child data.`,
signature: `(node: FlatTreeNode) => any[]`,
},
},
apis: {
expandAll: {
description: `Expand all nodes in the tree.`,
signature: "expandAll(): void",
},
collapseAll: {
description: `Collapse all nodes in the tree.`,
signature: "collapseAll(): void",
},
expandToLevel: {
description: `Expand nodes up to the specified depth level (0-based).`,
signature: "expandToLevel(level: number): void",
parameters: {
level: "The maximum depth level to expand (0 = root level only)",
},
},
expandNode: {
description: `Expand a specific node by its source data ID.`,
signature: "expandNode(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the node to expand (source data format)",
},
},
collapseNode: {
description: `Collapse a specific node by its source data ID.`,
signature: "collapseNode(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the node to collapse (source data format)",
},
},
selectNode: {
description: `Programmatically select a node by its source data ID.`,
signature: "selectNode(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the node to select (source data format)",
},
},
clearSelection: {
description: `Clear the current selection.`,
signature: "clearSelection(): void",
},
getNodeById: {
description: `Get a tree node by its source data ID.`,
signature: "getNodeById(nodeId: string | number): TreeNode | null",
parameters: {
nodeId: "The ID of the node to retrieve (source data format)",
},
},
getExpandedNodes: {
description: `Get an array of currently expanded node IDs in source data format.`,
signature: "getExpandedNodes(): (string | number)[]",
},
getSelectedNode: {
description: `Get the currently selected tree node.`,
signature: "getSelectedNode(): TreeNode | null",
},
scrollIntoView: {
description: `Scroll to a specific node and expand parent nodes as needed to make it visible.`,
signature: "scrollIntoView(nodeId: string | number, options?: ScrollIntoViewOptions): void",
parameters: {
nodeId: "The ID of the node to scroll to (source data format)",
options: "Optional scroll options",
},
},
scrollToItem: {
description: `Scroll to a specific node if it's currently visible in the tree.`,
signature: "scrollToItem(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the node to scroll to (source data format)",
},
},
appendNode: {
description: `Add a new node to the tree as a child of the specified parent node.`,
signature: "appendNode(parentNodeId: string | number | null, nodeData: any): void",
parameters: {
parentNodeId: "The ID of the parent node, or null/undefined to add to root level",
nodeData: "The node data object using the format specified in dataFormat and field properties",
},
},
removeNode: {
description: `Remove a node and all its descendants from the tree.`,
signature: "removeNode(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the node to remove (along with all its descendants)",
},
},
removeChildren: {
description: `Remove all children (descendants) of a node while keeping the node itself.`,
signature: "removeChildren(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the parent node whose children should be removed",
},
},
insertNodeBefore: {
description: `Insert a new node before an existing node at the same level.`,
signature: "insertNodeBefore(beforeNodeId: string | number, nodeData: any): void",
parameters: {
beforeNodeId: "The ID of the existing node before which the new node should be inserted",
nodeData: "The node data object using the format specified in dataFormat and field properties",
},
},
insertNodeAfter: {
description: `Insert a new node after an existing node at the same level.`,
signature: "insertNodeAfter(afterNodeId: string | number, nodeData: any): void",
parameters: {
afterNodeId: "The ID of the existing node after which the new node should be inserted",
nodeData: "The node data object using the format specified in dataFormat and field properties",
},
},
getNodeLoadingState: {
description: `Get the loading state of a dynamic node.`,
signature: "getNodeLoadingState(nodeId: string | number): NodeLoadingState",
parameters: {
nodeId: "The ID of the node to check loading state for",
},
},
markNodeLoaded: {
description: `Mark a dynamic node as loaded.`,
signature: "markNodeLoaded(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the node to mark as loaded",
},
},
markNodeUnloaded: {
description: `Mark a dynamic node as unloaded and collapse it.`,
signature: "markNodeUnloaded(nodeId: string | number): void",
parameters: {
nodeId: "The ID of the node to mark as unloaded",
},
},
},
themeVars: parseScssVar(styles.themeVars),
defaultThemeVars: {
[`backgroundColor-${COMP}-row--selected`]: "$color-primary-50",
[`backgroundColor-${COMP}-row--hover`]: "$color-surface-100",
[`textColor-${COMP}`]: "$textColor-primary",
[`textColor-${COMP}--selected`]: "$color-primary-900",
[`textColor-${COMP}--hover`]: "$textColor-primary",
[`borderColor-${COMP}-row--focus`]: "$color-primary-500",
[`outlineColor-${COMP}--focus`]: "$outlineColor--focus",
[`outlineWidth-${COMP}--focus`]: "$outlineWidth--focus",
[`outlineStyle-${COMP}--focus`]: "$outlineStyle--focus",
[`outlineOffset-${COMP}--focus`]: "$outlineOffset--focus",
},
});
/**
* This function defines the renderer for the Tree component.
*/
export const treeComponentRenderer = createComponentRenderer(
COMP,
TreeMd,
({ node, extractValue, renderChild, className, lookupEventHandler, registerComponentApi }) => {
// Default item template if none is provided:
// <HStack verticalAlignment="center">
// <Icon when="{$item.icon}" name="{$item.icon}" />
// <Text value="{$item.name}" />
// </HStack>
const defaultItemTemplate: ComponentDef = {
type: "HStack",
props: {
verticalAlignment: "center",
gap: "$space-4"
},
children: [
{
type: "Icon",
when: "{$item.icon}",
props: {
name: "{$item.icon}",
},
},
{
type: "Text",
props: {
value: "{$item.name}",
},
},
],
};
return (
<TreeComponent
registerComponentApi={registerComponentApi}
className={className}
data={extractValue(node.props.data)}
dataFormat={extractValue(node.props.dataFormat)}
idField={extractValue(node.props.idField)}
nameField={extractValue(node.props.nameField)}
iconField={extractValue(node.props.iconField)}
iconExpandedField={extractValue(node.props.iconExpandedField)}
iconCollapsedField={extractValue(node.props.iconCollapsedField)}
parentIdField={extractValue(node.props.parentIdField)}
childrenField={extractValue(node.props.childrenField)}
selectableField={extractValue(node.props.selectableField)}
dynamicField={extractValue(node.props.dynamicField)}
selectedValue={extractValue(node.props.selectedValue)}
selectedId={extractValue(node.props.selectedId)}
defaultExpanded={extractValue(node.props.defaultExpanded)}
autoExpandToSelection={extractValue(node.props.autoExpandToSelection)}
itemClickExpands={extractValue. asOptionalBoolean(node.props.itemClickExpands)}
iconCollapsed={extractValue(node.props.iconCollapsed)}
iconExpanded={extractValue(node.props.iconExpanded)}
iconSize={extractValue(node.props.iconSize)}
itemHeight={extractValue.asOptionalNumber(node.props.itemHeight, defaultProps.itemHeight)}
animateExpand={extractValue.asOptionalBoolean(node.props.animateExpand, defaultProps.animateExpand)}
expandRotation={extractValue.asOptionalNumber(node.props.expandRotation, defaultProps.expandRotation)}
onSelectionChanged={lookupEventHandler("selectionDidChange")}
onNodeExpanded={lookupEventHandler("nodeDidExpand")}
onNodeCollapsed={lookupEventHandler("nodeDidCollapse")}
loadChildren={lookupEventHandler("loadChildren")}
itemRenderer={(flatTreeNode: any) => {
const itemContext = {
id: flatTreeNode.id, // $item.id - Internal unique identifier
name: flatTreeNode.displayName, // $item.name - Primary display text
depth: flatTreeNode.depth, // $item.depth - Nesting level (0-based)
isExpanded: flatTreeNode.isExpanded, // $item.isExpanded - Expansion state
hasChildren: flatTreeNode.hasChildren, // $item.hasChildren - Children indicator
// - icon, iconExpanded, iconCollapsed (from icon fields)
// - uid, path, parentIds, selectable, children (TreeNode internals)
// - All original source data properties (custom fields)
...flatTreeNode,
};
return node.props.itemTemplate ? (
<MemoizedItem node={node.props.itemTemplate} item={itemContext} renderChild={renderChild} />
) : (
<MemoizedItem node={defaultItemTemplate} item={itemContext} renderChild={renderChild} />
);
}}
/>
);
},
);
```
--------------------------------------------------------------------------------
/xmlui/src/components/TextBox/TextBox.module.scss:
--------------------------------------------------------------------------------
```scss
@use "../../components-core/theming/themes" as t;
// --- This code snippet is required to collect the theme variables used in this module
$themeVars: (
);
@function createThemeVar($componentVariable) {
$themeVars: t.appendThemeVar($themeVars, $componentVariable) !global;
@return t.getThemeVar($themeVars, $componentVariable);
}
$componentName: "TextBox";
$themeVars: t.composePaddingVars($themeVars, $componentName);
$backgroundColor-TextBox--disabled: createThemeVar("Input:backgroundColor-#{$componentName}--disabled");
$borderRadius-TextBox--default: createThemeVar("Input:borderRadius-#{$componentName}--default");
$borderRadius-TextBox--error: createThemeVar("Input:borderRadius-#{$componentName}--error");
$borderRadius-TextBox--warning: createThemeVar("Input:borderRadius-#{$componentName}--warning");
$borderRadius-TextBox--success: createThemeVar("Input:borderRadius-#{$componentName}--success");
// Variables for default variant
$borderColor-TextBox--default: createThemeVar("Input:borderColor-#{$componentName}--default");
$borderWidth-TextBox--default: createThemeVar("Input:borderWidth-#{$componentName}--default");
$borderStyle-TextBox--default: createThemeVar("Input:borderStyle-#{$componentName}--default");
$fontSize-TextBox--default: createThemeVar("Input:fontSize-#{$componentName}--default");
$backgroundColor-TextBox--default: createThemeVar("Input:backgroundColor-#{$componentName}--default");
$boxShadow-TextBox--default: createThemeVar("Input:boxShadow-#{$componentName}--default");
$textColor-TextBox--default: createThemeVar("Input:textColor-#{$componentName}--default");
$borderColor-TextBox--default--hover: createThemeVar("Input:borderColor-#{$componentName}--default--hover");
$backgroundColor-TextBox--default--hover: createThemeVar("Input:backgroundColor-#{$componentName}--default--hover");
$boxShadow-TextBox--default--hover: createThemeVar("Input:boxShadow-#{$componentName}--default--hover");
$textColor-TextBox--default--hover: createThemeVar("Input:textColor-#{$componentName}--default--hover");
$borderColor-TextBox--default--focus: createThemeVar("Input:borderColor-#{$componentName}--default--focus");
$backgroundColor-TextBox--default--focus: createThemeVar("Input:backgroundColor-#{$componentName}--default--focus");
$boxShadow-TextBox--default--focus: createThemeVar("Input:boxShadow-#{$componentName}--default--focus");
$textColor-TextBox--default--focus: createThemeVar("Input:textColor-#{$componentName}--default--focus");
$outlineWidth-TextBox--default--focus: createThemeVar("Input:outlineWidth-#{$componentName}--default--focus");
$outlineColor-TextBox--default--focus: createThemeVar("Input:outlineColor-#{$componentName}--default--focus");
$outlineStyle-TextBox--default--focus: createThemeVar("Input:outlineStyle-#{$componentName}--default--focus");
$outlineOffset-TextBox--default--focus: createThemeVar("Input:outlineOffset-#{$componentName}--default--focus");
$textColor-placeholder-TextBox--default: createThemeVar("Input:textColor-placeholder-#{$componentName}--default");
$fontSize-placeholder-TextBox--default: createThemeVar("Input:fontSize-placeholder-#{$componentName}--default");
$color-adornment-TextBox--default: createThemeVar("Input:color-adornment-#{$componentName}--default");
// Variables for error variant
$borderColor-TextBox--error: createThemeVar("Input:borderColor-#{$componentName}--error");
$borderWidth-TextBox--error: createThemeVar("Input:borderWidth-#{$componentName}--error");
$borderStyle-TextBox--error: createThemeVar("Input:borderStyle-#{$componentName}--error");
$fontSize-TextBox--error: createThemeVar("Input:fontSize-#{$componentName}--error");
$backgroundColor-TextBox--error: createThemeVar("Input:backgroundColor-#{$componentName}--error");
$boxShadow-TextBox--error: createThemeVar("Input:boxShadow-#{$componentName}--error");
$textColor-TextBox--error: createThemeVar("Input:textColor-#{$componentName}--error");
$borderColor-TextBox--error--hover: createThemeVar("Input:borderColor-#{$componentName}--error--hover");
$backgroundColor-TextBox--error--hover: createThemeVar("Input:backgroundColor-#{$componentName}--error--hover");
$boxShadow-TextBox--error--hover: createThemeVar("Input:boxShadow-#{$componentName}--error--hover");
$textColor-TextBox--error--hover: createThemeVar("Input:textColor-#{$componentName}--error--hover");
$borderColor-TextBox--error--focus: createThemeVar("Input:borderColor-#{$componentName}--error--focus");
$backgroundColor-TextBox--error--focus: createThemeVar("Input:backgroundColor-#{$componentName}--error--focus");
$boxShadow-TextBox--error--focus: createThemeVar("Input:boxShadow-#{$componentName}--error--focus");
$textColor-TextBox--error--focus: createThemeVar("Input:textColor-#{$componentName}--error--focus");
$outlineWidth-TextBox--error--focus: createThemeVar("Input:outlineWidth-#{$componentName}--error--focus");
$outlineColor-TextBox--error--focus: createThemeVar("Input:outlineColor-#{$componentName}--error--focus");
$outlineStyle-TextBox--error--focus: createThemeVar("Input:outlineStyle-#{$componentName}--error--focus");
$outlineOffset-TextBox--error--focus: createThemeVar("Input:outlineOffset-#{$componentName}--error--focus");
$textColor-placeholder-TextBox--error: createThemeVar("Input:textColor-placeholder-#{$componentName}--error");
$fontSize-placeholder-TextBox--error: createThemeVar("Input:fontSize-placeholder-#{$componentName}--error");
$color-adornment-TextBox--error: createThemeVar("Input:color-adornment-#{$componentName}--error");
// Variables for warning variant
$borderColor-TextBox--warning: createThemeVar("Input:borderColor-#{$componentName}--warning");
$borderWidth-TextBox--warning: createThemeVar("Input:borderWidth-#{$componentName}--warning");
$borderStyle-TextBox--warning: createThemeVar("Input:borderStyle-#{$componentName}--warning");
$fontSize-TextBox--warning: createThemeVar("Input:fontSize-#{$componentName}--warning");
$backgroundColor-TextBox--warning: createThemeVar("Input:backgroundColor-#{$componentName}--warning");
$boxShadow-TextBox--warning: createThemeVar("Input:boxShadow-#{$componentName}--warning");
$textColor-TextBox--warning: createThemeVar("Input:textColor-#{$componentName}--warning");
$borderColor-TextBox--warning--hover: createThemeVar("Input:borderColor-#{$componentName}--warning--hover");
$backgroundColor-TextBox--warning--hover: createThemeVar("Input:backgroundColor-#{$componentName}--warning--hover");
$boxShadow-TextBox--warning--hover: createThemeVar("Input:boxShadow-#{$componentName}--warning--hover");
$textColor-TextBox--warning--hover: createThemeVar("Input:textColor-#{$componentName}--warning--hover");
$borderColor-TextBox--warning--focus: createThemeVar("Input:borderColor-#{$componentName}--warning--focus");
$backgroundColor-TextBox--warning--focus: createThemeVar("Input:backgroundColor-#{$componentName}--warning--focus");
$boxShadow-TextBox--warning--focus: createThemeVar("Input:boxShadow-#{$componentName}--warning--focus");
$textColor-TextBox--warning--focus: createThemeVar("Input:textColor-#{$componentName}--warning--focus");
$outlineWidth-TextBox--warning--focus: createThemeVar("Input:outlineWidth-#{$componentName}--warning--focus");
$outlineColor-TextBox--warning--focus: createThemeVar("Input:outlineColor-#{$componentName}--warning--focus");
$outlineStyle-TextBox--warning--focus: createThemeVar("Input:outlineStyle-#{$componentName}--warning--focus");
$outlineOffset-TextBox--warning--focus: createThemeVar("Input:outlineOffset-#{$componentName}--warning--focus");
$textColor-placeholder-TextBox--warning: createThemeVar("Input:textColor-placeholder-#{$componentName}--warning");
$fontSize-placeholder-TextBox--warning: createThemeVar("Input:fontSize-placeholder-#{$componentName}--warning");
$color-adornment-TextBox--warning: createThemeVar("Input:color-adornment-#{$componentName}--warning");
// Variables for success variant
$borderColor-TextBox--success: createThemeVar("Input:borderColor-#{$componentName}--success");
$borderWidth-TextBox--success: createThemeVar("Input:borderWidth-#{$componentName}--success");
$borderStyle-TextBox--success: createThemeVar("Input:borderStyle-#{$componentName}--success");
$fontSize-TextBox--success: createThemeVar("Input:fontSize-#{$componentName}--success");
$backgroundColor-TextBox--success: createThemeVar("Input:backgroundColor-#{$componentName}--success");
$boxShadow-TextBox--success: createThemeVar("Input:boxShadow-#{$componentName}--success");
$textColor-TextBox--success: createThemeVar("Input:textColor-#{$componentName}--success");
$borderColor-TextBox--success--hover: createThemeVar("Input:borderColor-#{$componentName}--success--hover");
$backgroundColor-TextBox--success--hover: createThemeVar("Input:backgroundColor-#{$componentName}--success--hover");
$boxShadow-TextBox--success--hover: createThemeVar("Input:boxShadow-#{$componentName}--success--hover");
$textColor-TextBox--success--hover: createThemeVar("Input:textColor-#{$componentName}--success--hover");
$borderColor-TextBox--success--focus: createThemeVar("Input:borderColor-#{$componentName}--success--focus");
$backgroundColor-TextBox--success--focus: createThemeVar("Input:backgroundColor-#{$componentName}--success--focus");
$boxShadow-TextBox--success--focus: createThemeVar("Input:boxShadow-#{$componentName}--success--focus");
$textColor-TextBox--success--focus: createThemeVar("Input:textColor-#{$componentName}--success--focus");
$outlineWidth-TextBox--success--focus: createThemeVar("Input:outlineWidth-#{$componentName}--success--focus");
$outlineColor-TextBox--success--focus: createThemeVar("Input:outlineColor-#{$componentName}--success--focus");
$outlineStyle-TextBox--success--focus: createThemeVar("Input:outlineStyle-#{$componentName}--success--focus");
$outlineOffset-TextBox--success--focus: createThemeVar("Input:outlineOffset-#{$componentName}--success--focus");
$textColor-placeholder-TextBox--success: createThemeVar("Input:textColor-placeholder-#{$componentName}--success");
$fontSize-placeholder-TextBox--success: createThemeVar("Input:fontSize-placeholder-#{$componentName}--success");
$color-adornment-TextBox--success: createThemeVar("Input:color-adornment-#{$componentName}--success");
// Variables for passwordToggle (not variant-specific)
$color-passwordToggle-TextBox: createThemeVar("Input:color-passwordToggle-#{$componentName}");
$paddingLeft-passwordToggle-TextBox: createThemeVar("Input:paddingLeft-passwordToggle-#{$componentName}");
$paddingRight-passwordToggle-TextBox: createThemeVar("Input:paddingRight-passwordToggle-#{$componentName}");
$color-passwordToggle-TextBox--hover: createThemeVar("Input:color-passwordToggle-#{$componentName}--hover");
$color-passwordToggle-TextBox--focus: createThemeVar("Input:color-passwordToggle-#{$componentName}--focus");
// Variables for @layer section
$gap-adornment-TextBox: createThemeVar("Input:gap-adornment-#{$componentName}");
$textColor-TextBox--disabled: createThemeVar("Input:textColor-#{$componentName}--disabled");
$borderColor-TextBox--disabled: createThemeVar("Input:borderColor-#{$componentName}--disabled");
// --- CSS properties of a particular TextBox variant
@mixin variant($variantName) {
border-radius: createThemeVar("Input:borderRadius-#{$componentName}--#{$variantName}");
border-color: createThemeVar("Input:borderColor-#{$componentName}--#{$variantName}");
border-width: createThemeVar("Input:borderWidth-#{$componentName}--#{$variantName}");
border-style: createThemeVar("Input:borderStyle-#{$componentName}--#{$variantName}");
font-size: createThemeVar("Input:fontSize-#{$componentName}--#{$variantName}");
background-color: createThemeVar("Input:backgroundColor-#{$componentName}--#{$variantName}");
box-shadow: createThemeVar("Input:boxShadow-#{$componentName}--#{$variantName}");
color: createThemeVar("Input:textColor-#{$componentName}--#{$variantName}");
&:hover {
border-color: createThemeVar("Input:borderColor-#{$componentName}--#{$variantName}--hover");
background-color: createThemeVar("Input:backgroundColor-#{$componentName}--#{$variantName}--hover"
);
box-shadow: createThemeVar("Input:boxShadow-#{$componentName}--#{$variantName}--hover");
color: createThemeVar("Input:textColor-#{$componentName}--#{$variantName}--hover");
}
&:focus-within {
border-color: createThemeVar("Input:borderColor-#{$componentName}--#{$variantName}--focus");
background-color: createThemeVar("Input:backgroundColor-#{$componentName}--#{$variantName}--focus"
);
box-shadow: createThemeVar("Input:boxShadow-#{$componentName}--#{$variantName}--focus");
color: createThemeVar("Input:textColor-#{$componentName}--#{$variantName}--focus");
}
&:has(.input:focus-visible) {
outline-width: createThemeVar("Input:outlineWidth-#{$componentName}--#{$variantName}--focus");
outline-color: createThemeVar("Input:outlineColor-#{$componentName}--#{$variantName}--focus");
outline-style: createThemeVar("Input:outlineStyle-#{$componentName}--#{$variantName}--focus");
outline-offset: createThemeVar("Input:outlineOffset-#{$componentName}--#{$variantName}--focus");
}
.input {
&::placeholder {
color: createThemeVar("Input:textColor-placeholder-#{$componentName}--#{$variantName}");
font-size: createThemeVar("Input:fontSize-placeholder-#{$componentName}--#{$variantName}");
}
}
.adornment {
color: createThemeVar("Input:color-adornment-#{$componentName}--#{$variantName}");
}
.passwordToggle {
cursor: pointer;
color: createThemeVar("Input:color-passwordToggle-#{$componentName}");
padding-left: createThemeVar("Input:paddingLeft-passwordToggle-#{$componentName}");
padding-right: createThemeVar("Input:paddingRight-passwordToggle-#{$componentName}");
&:hover {
color: createThemeVar("Input:color-passwordToggle-#{$componentName}--hover");
}
&:focus {
color: createThemeVar("Input:color-passwordToggle-#{$componentName}--focus");
}
}
}
@layer components {
.inputRoot {
display: flex;
align-items: center;
gap: $gap-adornment-TextBox;
width: 100%;
border-style: solid;
border-width: 1px;
transition: background-color ease-in 0.1s;
overflow: hidden;
@include t.paddingVars($themeVars, $componentName);
@include variant("default");
&.error {
@include variant("error");
}
&.warning {
@include variant("warning");
}
&.valid {
@include variant("success");
}
&:has(.input:is(:disabled)) {
cursor: not-allowed;
background-color: $backgroundColor-TextBox--disabled;
color: $textColor-TextBox--disabled;
border-color: $borderColor-TextBox--disabled;
}
.input {
font-size: inherit;
color: inherit;
border: 0;
outline: none !important;
background-color: transparent;
width: 100%;
padding: 0;
cursor: inherit;
&::-ms-reveal {
display: none;
}
// Remove default search input styles if type="search"
&[type="search"]::-webkit-search-cancel-button,
&[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
}
}
}
.readOnly {
cursor: default;
}
}
// --- We export the theme variables to add them to the component renderer
:export {
themeVars: t.json-stringify($themeVars);
}
```
--------------------------------------------------------------------------------
/xmlui/tests/parsers/scripting/process-statement-regs.test.ts:
--------------------------------------------------------------------------------
```typescript
import { describe, expect, it, assert } from "vitest";
import { processStatementQueueAsync } from "../../../src/components-core/script-runner/process-statement-async";
import { processStatementQueue } from "../../../src/components-core/script-runner/process-statement-sync";
import { createEvalContext, parseExpression, parseStatements } from "./test-helpers";
describe("Process statements regression", () => {
it("while with break #2", async () => {
// --- Arrange
const source = "let x = 0; while (true) {x++ ; if (x > 3) break;}; x++";
const evalContext = createEvalContext({
localContext: {},
});
const statements = parseStatements(source);
// --- Act
const diag = await processStatementQueueAsync(statements, evalContext);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.x).equal(5);
expect(diag.processedStatements).equal(22);
expect(diag.maxLoops).equal(1);
expect(diag.maxBlocks).equal(2);
expect(diag.maxQueueLength).equal(5);
expect(diag.clearToLabels).equal(1);
expect(diag.unshiftedItems).equal(21);
});
it("regression #2", async () => {
// --- Arrange
const source = "((maybeUndefined)=> maybeUndefined)()";
const evalContext = createEvalContext({
localContext: {},
});
const statements = parseStatements(source);
// --- Act
const diag = await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.mainThread!.blocks!.length).equal(1);
expect(diag.processedStatements).equal(1);
expect(diag.maxLoops).equal(0);
expect(diag.maxBlocks).equal(1);
expect(diag.maxQueueLength).equal(1);
expect(diag.clearToLabels).equal(0);
expect(diag.unshiftedItems).equal(0);
});
it("recursive arrow regression #1", async () => {
// --- Arrange
const source =
"const fact = n => { if (n === 0) return 1; else return n * fact(n-1); }; x = fact(3)";
const evalContext = createEvalContext({
localContext: {},
});
evalContext.mainThread!.blocks = [
{
vars: {
x: 0,
},
},
];
const statements = parseStatements(source);
// --- Act
const diag = await processStatementQueueAsync(statements, evalContext, evalContext.mainThread);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.x).equal(6);
expect(diag.processedStatements).equal(2);
expect(diag.maxLoops).equal(0);
expect(diag.maxBlocks).equal(1);
expect(diag.maxQueueLength).equal(2);
expect(diag.clearToLabels).equal(0);
expect(diag.unshiftedItems).equal(0);
});
it("mapped arrow regression #1", async () => {
// --- Arrange
const source = "const mapped = [1,2,3].map(id => {return {id: id} }); console.log(mapped)";
const evalContext = createEvalContext({
localContext: {},
});
const statements = parseStatements(source);
// --- Act
const diag = await processStatementQueueAsync(statements, evalContext);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.mapped.length).equal(3);
expect(diag.processedStatements).equal(2);
expect(diag.maxLoops).equal(0);
expect(diag.maxBlocks).equal(1);
expect(diag.maxQueueLength).equal(2);
expect(diag.clearToLabels).equal(0);
expect(diag.unshiftedItems).equal(0);
});
it("arrow with vars sub-property regression #1", async () => {
// --- Arrange
const source = "let arrow = (val) => val.value++; arrow(x)";
const evalContext = createEvalContext({
localContext: {},
});
evalContext.mainThread!.blocks = [
{
vars: {
x: { value: 0 },
},
},
];
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.x.value).equal(1);
});
it("arrow with vars sub-property regression #2", async () => {
// --- Arrange
const source = "let arrow = (val) => val.some++; arrow(x.value)";
const evalContext = createEvalContext({
localContext: {},
});
evalContext.mainThread!.blocks = [
{
vars: {
x: {
value: { some: 0 },
},
},
},
];
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.x.value.some).equal(1);
});
it("arrow with vars sub-property regression (sync) #1", () => {
// --- Arrange
const source = "let arrow = (val) => val.value++; arrow(x)";
const evalContext = createEvalContext({
localContext: {},
});
evalContext.mainThread!.blocks = [
{
vars: {
x: { value: 0 },
},
},
];
const statements = parseStatements(source);
// --- Act
processStatementQueue(statements, evalContext);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.x.value).equal(1);
});
it("arrow with vars sub-property regression (sync) #2", () => {
// --- Arrange
const source = "let arrow = (val) => val.some++; arrow(x.value)";
const evalContext = createEvalContext({
localContext: {},
});
evalContext.mainThread!.blocks = [
{
vars: {
x: {
value: { some: 0 },
},
},
},
];
const statements = parseStatements(source);
// --- Act
processStatementQueue(statements, evalContext);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.x.value.some).equal(1);
});
it("Arrow argument reference indirection", async () => {
// --- Arrange
const source = "incrementFunc(counter.value)";
const evalContext = createEvalContext({
localContext: {},
});
evalContext.mainThread!.blocks = [
{
vars: {
counter: {
value: { some: 0 },
},
incrementFunc: { ...parseExpression("x => x.some++"), _ARROW_EXPR_: true },
},
},
];
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
const thread = evalContext.mainThread;
expect(thread!.blocks!.length).equal(1);
expect(thread!.blocks![0].vars.counter.value.some).equal(1);
});
it("delete #1", async () => {
// --- Arrange
const source = "x = delete alma";
const evalContext = createEvalContext({
localContext: {
x: 0,
alma: {},
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal(true);
expect(evalContext.localContext.alma).equal(undefined);
});
it("delete #2", async () => {
// --- Arrange
const source = "x = delete alma.b";
const evalContext = createEvalContext({
localContext: {
x: 0,
alma: { a: "hello", b: "hi" },
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal(true);
expect(evalContext.localContext.alma.b).equal(undefined);
expect(evalContext.localContext.alma.a).equal("hello");
});
it("delete #3", async () => {
// --- Arrange
const source = "x = delete alma[1]";
const evalContext = createEvalContext({
localContext: {
x: 0,
alma: [1, 2, 3],
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal(true);
expect(evalContext.localContext.alma.length).equal(3);
expect(evalContext.localContext.alma[0]).equal(1);
expect(evalContext.localContext.alma[1]).equal(undefined);
expect(evalContext.localContext.alma[2]).equal(3);
});
it("delete #4", async () => {
// --- Arrange
const source = "x = delete Math.PI";
const evalContext = createEvalContext({
localContext: {
x: 123,
},
});
const statements = parseStatements(source);
// --- Act/Assert
try {
await processStatementQueueAsync(statements, evalContext);
} catch (err) {
expect(err instanceof TypeError).equal(true);
return;
}
assert.fail("Exception expected");
});
it("disallow running banned function #1", async () => {
// --- Arrange
const source = "const x = setTimeout(() => {}, 300)";
const evalContext = createEvalContext({});
const statements = parseStatements(source);
// --- Act/Assert
try {
await processStatementQueueAsync(statements, evalContext);
} catch (err: any) {
expect(err.toString().includes("not allowed to call")).equal(true);
return;
}
assert.fail("Exception expected");
});
it("Arrow function arg regression (async) #1", async () => {
// --- Arrange
const source = "val = [0,1,2,3].filter(k => k === 2 || k === 3);";
const evalContext = createEvalContext({
localContext: {
val: 0,
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.localContext.val).deep.equal([2, 3]);
});
it("Arrow function arg regression (sync) #1", () => {
// --- Arrange
const source = "val = [0,1,2,3].filter(k => k === 2 || k === 3);";
const evalContext = createEvalContext({
localContext: {
val: 0,
},
});
const statements = parseStatements(source);
// --- Act
processStatementQueue(statements, evalContext);
// --- Assert
expect(evalContext.localContext.val).deep.equal([2, 3]);
});
it("Closure regression #1", async () => {
// --- Arrange
const source = `
const func = ()=> {
const dummy = 'dummy';
return {
fireListMessages: () => {
x = dummy;
}
};
}
func().fireListMessages();
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal("dummy");
});
it("Closure regression #2", async () => {
// --- Arrange
const source = `
const func = ()=> {
const fireListMessages = () => {
x = dummy;
}
const dummy = 'dummy';
return {
fireListMessages
};
}
func().fireListMessages();
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal("dummy");
});
it("Closure regression #3", async () => {
// --- Arrange
const source = `
const func = ()=> {
const fireListMessages = () => {
const otherDummy = "hey!"
return {
nested: () => {
x = otherDummy;
}
}
}
const dummy = 'dummy';
return {
fireListMessages
};
}
func().fireListMessages().nested();
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal("hey!");
});
it("Closure regression (sync) #1", () => {
// --- Arrange
const source = `
const func = ()=> {
const dummy = 'dummy';
return {
fireListMessages: () => {
x = dummy;
}
};
}
func().fireListMessages();
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
processStatementQueue(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal("dummy");
});
it("Closure regression (sync) #2", () => {
// --- Arrange
const source = `
const func = ()=> {
const fireListMessages = () => {
x = dummy;
}
const dummy = 'dummy';
return {
fireListMessages
};
}
func().fireListMessages();
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
processStatementQueue(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal("dummy");
});
it("Closure regression (sync) #3", () => {
// --- Arrange
const source = `
const func = ()=> {
const fireListMessages = () => {
const otherDummy = "hey!"
return {
nested: () => {
x = otherDummy;
}
}
}
const dummy = 'dummy';
return {
fireListMessages
};
}
func().fireListMessages().nested();
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
processStatementQueue(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).equal("hey!");
});
it("Predicate regression #1", async () => {
// --- Arrange
const source = `
const data = [1, 2, 3, 4, 5];
const predicate = v => v % 2 === 0;
x = data.filter(predicate);
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
await processStatementQueueAsync(statements, evalContext, evalContext.mainThread);
// --- Assert
expect(evalContext.localContext.x).toStrictEqual([2, 4]);
});
it("Predicate regression #1 (sync)", () => {
// --- Arrange
const source = `
const data = [1, 2, 3, 4, 5];
const predicate = v => v % 2 === 0;
x = data.filter(predicate);
`;
const evalContext = createEvalContext({
localContext: {
x: 0,
},
});
const statements = parseStatements(source);
// --- Act
processStatementQueue(statements, evalContext);
// --- Assert
expect(evalContext.localContext.x).toStrictEqual([2, 4]);
});
});
```