This is page 55 of 144. 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
│ ├── every-moments-teach.md
│ ├── fancy-laws-drop.md
│ ├── full-symbols-accept.md
│ └── tricky-zoos-crash.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
│ │ ├── HelloMd.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
│ │ │ └── test-padding.xmlui
│ │ ├── 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/src/components/Text/Text.module.scss:
--------------------------------------------------------------------------------
```scss
@use "../../components-core/theming/themes" as t;
$themeVars: ();
@function createThemeVar($componentVariable) {
$themeVars: t.appendThemeVar($themeVars, $componentVariable) !global;
@return t.getThemeVar($themeVars, $componentVariable);
}
$component: "Text";
$themeVars: t.composeTextVars($themeVars, $component);
// Variables for default variant (empty string means default)
$marginTop-Text: createThemeVar("marginTop-#{$component}");
$marginBottom-Text: createThemeVar("marginBottom-#{$component}");
$marginLeft-Text: createThemeVar("marginLeft-#{$component}");
$marginRight-Text: createThemeVar("marginRight-#{$component}");
$verticalAlignment-Text: createThemeVar("verticalAlignment-#{$component}");
$textColor-Text--hover: createThemeVar("textColor-#{$component}--hover");
// Variables for small variant
$marginTop-Text-small: createThemeVar("marginTop-#{$component}-small");
$marginBottom-Text-small: createThemeVar("marginBottom-#{$component}-small");
$marginLeft-Text-small: createThemeVar("marginLeft-#{$component}-small");
$marginRight-Text-small: createThemeVar("marginRight-#{$component}-small");
$verticalAlignment-Text-small: createThemeVar("verticalAlignment-#{$component}-small");
$textColor-Text-small--hover: createThemeVar("textColor-#{$component}-small--hover");
// Variables for code variant
$marginTop-Text-code: createThemeVar("marginTop-#{$component}-code");
$marginBottom-Text-code: createThemeVar("marginBottom-#{$component}-code");
$marginLeft-Text-code: createThemeVar("marginLeft-#{$component}-code");
$marginRight-Text-code: createThemeVar("marginRight-#{$component}-code");
$verticalAlignment-Text-code: createThemeVar("verticalAlignment-#{$component}-code");
$textColor-Text-code--hover: createThemeVar("textColor-#{$component}-code--hover");
// Variables for @layer section - abbr variant
$fontWeight-Text-abbr: createThemeVar("fontWeight-#{$component}-abbr");
$textTransform-Text-abbr: createThemeVar("textTransform-#{$component}-abbr");
// Variables for cite variant
$fontStyle-Text-cite: createThemeVar("fontStyle-#{$component}-cite");
// Variables for em variant
$fontStyle-Text-em: createThemeVar("fontStyle-#{$component}-em");
// Variables for deleted variant
$textDecorationLine-Text-deleted: createThemeVar("textDecorationLine-#{$component}-deleted");
$textDecorationColor-Text-deleted: createThemeVar("textDecorationColor-#{$component}-deleted");
$textDecorationStyle-Text-deleted: createThemeVar("textDecorationStyle-#{$component}-deleted");
$textDecorationThickness-Text-deleted: createThemeVar("textDecorationThickness-#{$component}-deleted");
// Variables for inserted variant
$textDecorationLine-Text-inserted: createThemeVar("textDecorationLine-#{$component}-inserted");
$textDecorationColor-Text-inserted: createThemeVar("textDecorationColor-#{$component}-inserted");
$textDecorationStyle-Text-inserted: createThemeVar("textDecorationStyle-#{$component}-inserted");
$textDecorationThickness-Text-inserted: createThemeVar("textDecorationThickness-#{$component}-inserted");
// Variables for keyboard variant
$backgroundColor-Text-keyboard: createThemeVar("backgroundColor-#{$component}-keyboard");
$fontFamily-Text-keyboard: createThemeVar("fontFamily-#{$component}-keyboard");
$fontWeight-Text-keyboard: createThemeVar("fontWeight-#{$component}-keyboard");
$fontSize-Text-keyboard: createThemeVar("fontSize-#{$component}-keyboard");
$borderWidth-Text-keyboard: createThemeVar("borderWidth-#{$component}-keyboard");
$borderColor-Text-keyboard: createThemeVar("borderColor-#{$component}-keyboard");
$borderStyle-Text-keyboard: createThemeVar("borderStyle-#{$component}-keyboard");
$borderRadius-Text-keyboard: createThemeVar("borderRadius-#{$component}-keyboard");
$paddingHorizontal-Text-keyboard: createThemeVar("paddingHorizontal-#{$component}-keyboard");
// Variables for marked variant
$backgroundColor-Text-marked: createThemeVar("backgroundColor-#{$component}-marked");
$textColor-Text-marked: createThemeVar("textColor-#{$component}-marked");
$fontWeight-Text-marked: createThemeVar("fontWeight-#{$component}-marked");
$fontStyle-Text-marked: createThemeVar("fontStyle-#{$component}-marked");
$lineHeight-Text-marked: createThemeVar("lineHeight-#{$component}-marked");
// Variables for mono variant
$fontFamily-Text-mono: createThemeVar("fontFamily-#{$component}-mono");
// Variables for sample variant
$fontFamily-Text-sample: createThemeVar("fontFamily-#{$component}-sample");
$fontSize-Text-sample: createThemeVar("fontSize-#{$component}-sample");
// Variables for sup variant
$fontSize-Text-sup: createThemeVar("fontSize-#{$component}-sup");
$verticalAlignment-Text-sup: createThemeVar("verticalAlignment-#{$component}-sup");
// Variables for sub variant
$fontSize-Text-sub: createThemeVar("fontSize-#{$component}-sub");
$verticalAlignment-Text-sub: createThemeVar("verticalAlignment-#{$component}-sub");
// Variables for var variant
$fontStyle-Text-var: createThemeVar("fontStyle-#{$component}-var");
// Variables for title variant
$fontSize-Text-title: createThemeVar("fontSize-#{$component}-title");
// Variables for subtitle variant
$fontSize-Text-subtitle: createThemeVar("fontSize-#{$component}-subtitle");
// Variables for caption variant
$letterSpacing-Text-caption: createThemeVar("letterSpacing-#{$component}-caption");
// Variables for placeholder variant
$textColor-Text-placeholder: createThemeVar("textColor-#{$component}-placeholder");
$fontStyle-Text-placeholder: createThemeVar("fontStyle-#{$component}-placeholder");
$fontWeight-Text-placeholder: createThemeVar("fontWeight-#{$component}-placeholder");
$fontSize-Text-placeholder: createThemeVar("fontSize-#{$component}-placeholder");
// Variables for paragraph variant
$fontSize-Text-paragraph: createThemeVar("fontSize-#{$component}-paragraph");
$paddingVertical-Text-paragraph: createThemeVar("paddingVertical-#{$component}-paragraph");
// Variables for subheading variant
$fontSize-Text-subheading: createThemeVar("fontSize-#{$component}-subheading");
$fontWeight-Text-subheading: createThemeVar("fontWeight-#{$component}-subheading");
$fontStyle-Text-subheading: createThemeVar("fontStyle-#{$component}-subheading");
$letterSpacing-Text-subheading: createThemeVar("letterSpacing-#{$component}-subheading");
$textTransform-Text-subheading: createThemeVar("textTransform-#{$component}-subheading");
$textColor-Text-subheading: createThemeVar("textColor-#{$component}-subheading");
// Variables for tableheading variant
$marginTop-Text-tableheading: createThemeVar("marginTop-#{$component}-tableheading");
$marginBottom-Text-tableheading: createThemeVar("marginBottom-#{$component}-tableheading");
$paddingHorizontal-Text-tableheading: createThemeVar("paddingHorizontal-#{$component}-tableheading");
$fontSize-Text-tableheading: createThemeVar("fontSize-#{$component}-tableheading");
$fontWeight-Text-tableheading: createThemeVar("fontWeight-#{$component}-tableheading");
// Variables for secondary variant
$fontSize-Text-secondary: createThemeVar("fontSize-#{$component}-secondary");
$textColor-Text-secondary: createThemeVar("textColor-#{$component}-secondary");
@mixin textVariant($variant) {
$variantName: if($variant == "", "#{$component}", "#{$component}-#{$variant}");
$themeVars: t.composePaddingVars($themeVars, $variantName);
$themeVars: t.composeBorderVars($themeVars, $variantName);
$themeVars: t.composeTextVars($themeVars, $variantName, $component);
@include t.paddingVars($themeVars, $variantName);
@include t.borderVars($themeVars, $variantName);
@include t.textVars($themeVars, $variantName);
margin-top: createThemeVar("marginTop-#{$variantName}");
margin-bottom: createThemeVar("marginBottom-#{$variantName}");
margin-left: createThemeVar("marginLeft-#{$variantName}");
margin-right: createThemeVar("marginRight-#{$variantName}");
vertical-align: createThemeVar("verticalAlignment-#{$variantName}");
&:hover {
color: createThemeVar("textColor-#{$variantName}--hover");
}
}
@layer components {
.text {
display: inline;
overflow: hidden;
text-overflow: ellipsis;
margin: 0;
padding: 0;
min-height: fit-content;
&.default {
@include textVariant("");
}
&.inherit {
@include t.ignoreTextVars();
}
&.abbr {
font-weight: $fontWeight-Text-abbr;
text-transform: $textTransform-Text-abbr;
}
&.cite {
font-style: $fontStyle-Text-cite;
}
&.em {
font-style: $fontStyle-Text-em;
}
&.deleted {
text-decoration-line: $textDecorationLine-Text-deleted;
text-decoration-color: $textDecorationColor-Text-deleted;
text-decoration-style: $textDecorationStyle-Text-deleted;
text-decoration-thickness: $textDecorationThickness-Text-deleted;
// Based on accessibility concerns
// Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del
&::before,
&::after {
clip-path: inset(100%);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
&::before {
content: " [deletion start] ";
}
&::after {
content: " [deletion end] ";
}
}
&.inserted {
text-decoration-line: $textDecorationLine-Text-inserted !important;
text-decoration-color: $textDecorationColor-Text-inserted !important;
text-decoration-style: $textDecorationStyle-Text-inserted !important;
text-decoration-thickness: $textDecorationThickness-Text-inserted !important;
// Based on accessibility concerns
// Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins
&::before,
&::after {
clip-path: inset(100%);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
&::before {
content: " [insertion start] ";
}
&::after {
content: " [insertion end] ";
}
}
// This is just a style placeholder
&.keyboard {
background-color: $backgroundColor-Text-keyboard;
font-family: $fontFamily-Text-keyboard;
font-weight: $fontWeight-Text-keyboard;
font-size: $fontSize-Text-keyboard;
border-width: $borderWidth-Text-keyboard;
border-color: $borderColor-Text-keyboard;
border-style: $borderStyle-Text-keyboard;
border-radius: $borderRadius-Text-keyboard;
padding-left: $paddingHorizontal-Text-keyboard;
padding-right: $paddingHorizontal-Text-keyboard;
}
&.marked {
background-color: $backgroundColor-Text-marked;
color: $textColor-Text-marked;
font-weight: $fontWeight-Text-marked;
font-style: $fontStyle-Text-marked;
line-height: $lineHeight-Text-marked;
// Based on accessibility concerns
// Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark
&::before,
&::after {
clip-path: inset(100%);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
&::before {
content: " [highlight start] ";
}
&::after {
content: " [highlight end] ";
}
}
&.mono {
font-family: $fontFamily-Text-mono;
}
&.sample {
font-family: $fontFamily-Text-sample;
font-size: $fontSize-Text-sample;
}
&.sup {
font-size: $fontSize-Text-sup;
vertical-align: $verticalAlignment-Text-sup;
}
&.sub {
font-size: $fontSize-Text-sub;
vertical-align: $verticalAlignment-Text-sub;
}
&.var {
font-style: $fontStyle-Text-var;
}
&.title {
font-size: $fontSize-Text-title;
}
&.subtitle {
font-size: $fontSize-Text-subtitle;
}
&.small {
@include textVariant("small");
}
&.code {
@include textVariant("code");
}
&.caption {
letter-spacing: $letterSpacing-Text-caption;
}
&.placeholder {
color: $textColor-Text-placeholder;
font-style: $fontStyle-Text-placeholder;
font-weight: $fontWeight-Text-placeholder;
font-size: $fontSize-Text-placeholder;
}
&.paragraph {
font-size: $fontSize-Text-paragraph;
padding-top: $paddingVertical-Text-paragraph;
padding-bottom: $paddingVertical-Text-paragraph;
}
&.subheading {
font-size: $fontSize-Text-subheading;
font-weight: $fontWeight-Text-subheading;
font-style: $fontStyle-Text-subheading;
letter-spacing: $letterSpacing-Text-subheading;
text-transform: $textTransform-Text-subheading;
color: $textColor-Text-subheading;
}
&.tableheading {
margin-top: $marginTop-Text-tableheading;
margin-bottom: $marginBottom-Text-tableheading;
padding-left: $paddingHorizontal-Text-tableheading;
padding-right: $paddingHorizontal-Text-tableheading;
font-size: $fontSize-Text-tableheading;
font-weight: $fontWeight-Text-tableheading;
}
&.secondary {
font-size: $fontSize-Text-secondary;
color: $textColor-Text-secondary;
}
&.strong{
font-weight: t.$fontWeight-bold;
}
}
/*
This is a Chromium based solution that is supported by most modern browsers.
See this source for details: https://css-tricks.com/line-clampin/
*/
.truncateOverflow {
overflow: hidden;
overflow-wrap: break-word;
white-space: nowrap;
max-width: 100%;
}
.preserveLinebreaks {
white-space: pre-wrap;
display: inline-block;
}
.noEllipsis {
text-overflow: clip;
}
// --- Overflow behavior classes
.overflowNone {
// Force single line as per metadata: "No wrapping, text stays on a single line"
white-space: nowrap;
// Hide overflow content
overflow: hidden;
// Use clip instead of ellipsis
text-overflow: clip;
// Constrain width
max-width: 100%;
}
.overflowScroll {
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
text-overflow: unset;
max-width: 100%;
// Ensure scrollbar is visible when needed
&::-webkit-scrollbar {
height: 6px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
}
.overflowFlow {
// Allow text to wrap to multiple lines
white-space: normal;
// Hide horizontal overflow, show vertical scrollbar when needed
overflow-x: hidden;
overflow-y: auto;
// Disable text-overflow ellipsis since we want wrapping
text-overflow: unset;
// Constrain width but allow height to grow
max-width: 100%;
// Change display to block to respect width/height constraints
display: block;
// Ensure height constraint is respected in flex contexts
flex-shrink: 0;
flex-grow: 0;
// Use min-height instead of height to avoid conflicts
min-height: 0;
// Style vertical scrollbar
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 3px;
}
}
}
// --- Break mode classes
.breakNormal {
word-break: normal;
overflow-wrap: normal;
}
.breakWord {
overflow-wrap: break-word;
}
.breakAnywhere {
word-break: break-all;
overflow-wrap: anywhere;
}
.breakKeep {
word-break: keep-all;
}
.breakHyphenate {
hyphens: auto;
overflow-wrap: break-word;
}
:export {
themeVars: t.json-stringify($themeVars);
}
```
--------------------------------------------------------------------------------
/xmlui/tests/parsers/scripting/simplify-expression.test.ts:
--------------------------------------------------------------------------------
```typescript
import { describe, expect, it } from "vitest";
import { Parser } from "../../../src/parsers/scripting/Parser";
import { Identifier, Literal } from "../../../src/components-core/script-runner/ScriptingSourceTree";
import {
simplifyExpression,
simplifyStatement,
} from "../../../src/components-core/script-runner/simplify-expression";
describe("Parser - simplify expression", () => {
const exprNoUpdateCases = [
"-x",
"x+a",
"x, y",
"x ? y : z",
"x(123)",
"x.a",
"x[123]",
"x",
"123",
"[1, 2, x]",
"{a: 1, b: 2}",
"...x",
"x = a + b",
"x => x + 1",
"++x",
"x++",
];
exprNoUpdateCases.forEach((c) => {
it(`No change: ${c}`, () => {
// --- Arrange
const wParser = new Parser(c);
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
expect(simple).equal(expr);
});
});
const stmtNoUpdateCases = [
";",
"a + b",
"a => a + 1",
"let a = 1",
"const a = 1",
"var x = 1, y = 2",
"{ x++; }",
"if (x) { x++; } else { x--; }",
"return 123",
"while (x) { x++; }",
"do { x++; } while (x)",
"break",
"continue",
"throw x",
"try { x++; } catch (e) { x--; } finally { x++; }",
"for (let i = 0; i < 10; i++) { x++; }",
"for (let i in x) { x++; }",
"for (let i of x) { x++; }",
"switch (x) { case 1: x++; break; default: x--; }",
"function f() { x++; }",
];
stmtNoUpdateCases.forEach((c) => {
it(`No change: ${c}`, () => {
// --- Arrange
const wParser = new Parser(c);
const stmt = wParser.parseStatements()![0];
// --- Act
const simple = simplifyStatement(stmt);
// --- Assert
expect(simple).equal(stmt);
});
});
it("-{const value} works", () => {
// --- Arrange
const wParser = new Parser("-123.5");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(-123.5);
});
it("!{const value} works", () => {
// --- Arrange
const wParser = new Parser("!123.5");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(false);
});
it("typeof {const value} works", () => {
// --- Arrange
const wParser = new Parser("typeof true");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal("boolean");
});
const unarySimpleCases = [
"-123.5",
"-123 + a",
"-123, x",
"x, -123",
"-123 ? y : z",
"x ? -123 : z",
"x ? y : -123",
"x(-123)",
"(-123).a",
"x[-123]",
"[1, 2, -123]",
"{a: -123}",
"{[-123]: x}",
"...(-123)",
"x = -123 + b",
"x => -123 + 1",
"++(-123)",
"(-123)++",
];
unarySimpleCases.forEach((c) => {
it(`Unary simplified: ${c}`, () => {
// --- Arrange
const wParser = new Parser(c);
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
expect(simple).not.equal(expr);
});
});
const unaryStatementCases = [
"-123.5;",
"a => a + -123",
"let a = -123",
"const a = -123",
"var x = -123",
"{ (-123)++; }",
"if (-123) { x++; } else { x--; }",
"if (x) { -123; } else { x--; }",
"if (x) { x++; } else { -123; }",
"return -123",
"while (-123) { x++; }",
"while (x) { -123; }",
"do { -123; } while (x)",
"do { x++; } while (-123)",
"throw -123",
"try { -123; } catch (e) { x--; } finally { x++; }",
"try { x++; } catch (e) { -123; } finally { x++; }",
"try { x++; } catch (e) { x--; } finally { -123; }",
"for (let i = -123; i < 10; i++) { x++; }",
"for (let i = 0; i < -123; i++) { x++; }",
"for (let i = 0; i < 10; -123) { x++; }",
"for (let i = 0; i < 10; i++) { -123; }",
"for (let i in -123) { x++; }",
"for (let i in x) { -123; }",
"for (let i of -123) { x++; }",
"for (let i of x) { -123; }",
"switch (-123) { case 1: x++; break; default: x--; }",
"switch (x) { case -123: x++; break; default: x--; }",
"switch (x) { case 1: -123; break; default: x--; }",
"switch (x) { case 1: x++; break; default: -123; }",
"function f() { -123; }",
];
unaryStatementCases.forEach((c) => {
it(`Unary simplified: ${c}`, () => {
// --- Arrange
const wParser = new Parser(c);
const stmt = wParser.parseStatements()![0];
// --- Act
const simple = simplifyStatement(stmt);
// --- Assert
expect(simple).not.equal(stmt);
});
});
it("{const}**{const} works", () => {
// --- Arrange
const wParser = new Parser("2**2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(4);
});
it("{const}*{const} works", () => {
// --- Arrange
const wParser = new Parser("2*2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(4);
});
it("{const}/{const} works", () => {
// --- Arrange
const wParser = new Parser("2/4");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(0.5);
});
it("{const}%{const} works", () => {
// --- Arrange
const wParser = new Parser("5%2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(1);
});
it("{const}+{const} works", () => {
// --- Arrange
const wParser = new Parser("1+2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(3);
});
it("{const}-{const} works", () => {
// --- Arrange
const wParser = new Parser("1-2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(-1);
});
it("{const}<<{const} works", () => {
// --- Arrange
const wParser = new Parser("2 << 1");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(4);
});
it("{const}>>{const} works", () => {
// --- Arrange
const wParser = new Parser("15 >> 2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(3);
});
it("{const}>>>{const} works", () => {
// --- Arrange
const wParser = new Parser("3 >>> 1");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(1);
});
it("{const}<{const} works", () => {
// --- Arrange
const wParser = new Parser("1 < 2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(true);
});
it("{const}<={const} works", () => {
// --- Arrange
const wParser = new Parser("1 <= 2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(true);
});
it("{const}>{const} works", () => {
// --- Arrange
const wParser = new Parser("1 > 2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(false);
});
it("{const}>={const} works", () => {
// --- Arrange
const wParser = new Parser("1 >= 2");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(false);
});
it("{const}=={const} works", () => {
// --- Arrange
const wParser = new Parser("1 == '1'");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(true);
});
it("{const}==={const} works", () => {
// --- Arrange
const wParser = new Parser("1 === '1'");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(false);
});
it("{const}!={const} works", () => {
// --- Arrange
const wParser = new Parser("1 != '1'");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(false);
});
it("{const}!=={const} works", () => {
// --- Arrange
const wParser = new Parser("1 !== '1'");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(true);
});
it("{const}&{const} works", () => {
// --- Arrange
const wParser = new Parser("1 & 3");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(1);
});
it("{const}|{const} works", () => {
// --- Arrange
const wParser = new Parser("1 | 3");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(3);
});
it("{const}^{const} works", () => {
// --- Arrange
const wParser = new Parser("1 ^ 3");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(2);
});
it("{const}&&{const} works", () => {
// --- Arrange
const wParser = new Parser("1 && 3");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(3);
});
it("{const}||{const} works", () => {
// --- Arrange
const wParser = new Parser("1 || 3");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(1);
});
it("{expr} + 0 works", () => {
// --- Arrange
const wParser = new Parser("x + 0");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const id = simple as Identifier;
expect(id.name).equal("x");
});
it("0 + {expr} works", () => {
// --- Arrange
const wParser = new Parser("0 + x");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const id = simple as Identifier;
expect(id.name).equal("x");
});
it("{expr} - 0 works", () => {
// --- Arrange
const wParser = new Parser("x - 0");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const id = simple as Identifier;
expect(id.name).equal("x");
});
it("{expr} * 1 works", () => {
// --- Arrange
const wParser = new Parser("x * 1");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const id = simple as Identifier;
expect(id.name).equal("x");
});
it("1 * {expr} works", () => {
// --- Arrange
const wParser = new Parser("1 * x");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const id = simple as Identifier;
expect(id.name).equal("x");
});
it("0 * {expr} works", () => {
// --- Arrange
const wParser = new Parser("0 * x");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(0);
});
it("{expr} * 0 works", () => {
// --- Arrange
const wParser = new Parser("x * 0");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(0);
});
it("{expr} / 1 works", () => {
// --- Arrange
const wParser = new Parser("x / 1");
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const id = simple as Identifier;
expect(id.name).equal("x");
});
const binarySimpleCases = [
{ src: "1+2+3", result: 6 },
{ src: "4*(2+3)", result: 20 },
{ src: "123 % 2 + 4 * 6", result: 25 },
];
binarySimpleCases.forEach((c) => {
it(`Binary simplified: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
const expr = wParser.parseExpr()!;
// --- Act
const simple = simplifyExpression(expr);
// --- Assert
const literal = simple as Literal;
expect(literal.value).equal(c.result);
});
});
const binaryStatementCases = [
"1+2;",
"a => a + (1+2)",
"let a = 1+2",
"const a = 1+2",
"var x = 1+2",
"{ (1+2)++; }",
"if (1+2) { x++; } else { x--; }",
"if (x) { 1+2; } else { x--; }",
"if (x) { x++; } else { 1+2; }",
"return 1+2",
"while (1+2) { x++; }",
"while (x) { 1+2; }",
"do { 1+2; } while (x)",
"do { x++; } while (1+2)",
"throw 1+2",
"try { 1+2; } catch (e) { x--; } finally { x++; }",
"try { x++; } catch (e) { 1+2; } finally { x++; }",
"try { x++; } catch (e) { x--; } finally { 1+2; }",
"for (let i = 1+2; i < 10; i++) { x++; }",
"for (let i = 0; i < 1+2; i++) { x++; }",
"for (let i = 0; i < 10; 1+2) { x++; }",
"for (let i = 0; i < 10; i++) { 1+2; }",
"for (let i in 1+2) { x++; }",
"for (let i in x) { 1+2; }",
"for (let i of 1+2) { x++; }",
"for (let i of x) { 1+2; }",
"switch (1+2) { case 1: x++; break; default: x--; }",
"switch (x) { case 1+2: x++; break; default: x--; }",
"switch (x) { case 1: 1+2; break; default: x--; }",
"switch (x) { case 1: x++; break; default: 1+2; }",
"function f() { 1+2; }",
];
binaryStatementCases.forEach((c) => {
it(`Binary simplified: ${c}`, () => {
// --- Arrange
const wParser = new Parser(c);
const stmt = wParser.parseStatements()![0];
// --- Act
const simple = simplifyStatement(stmt);
// --- Assert
expect(simple).not.equal(stmt);
});
});
});
```
--------------------------------------------------------------------------------
/xmlui/src/parsers/xmlui-parser/scanner.ts:
--------------------------------------------------------------------------------
```typescript
import { CharacterCodes } from "./CharacterCodes";
import type { ScannerDiagnosticMessage} from "./diagnostics";
import {
Diag_Invalid_Character,
Diag_Unterminated_CData,
Diag_Unterminated_Comment,
Diag_Unterminated_Script,
Diag_Unterminated_String_Literal
} from "./diagnostics";
import { SyntaxKind, isTrivia } from "./syntax-kind";
export type ScannerErrorCallback = (message: ScannerDiagnosticMessage, length: number, arg0?: any) => void;
export interface Scanner {
getStartPos(): number;
getToken(): SyntaxKind;
getTokenStart(): number;
getTokenEnd(): number;
getTokenText(): string;
getTokenValue(): string;
isIdentifier(): boolean;
peekChar(ahead?: number): number | null;
scanChar(): number | null;
scan(): SyntaxKind;
scanTrivia(): SyntaxKind | null;
scanText(): SyntaxKind;
getText(): string;
setText(text: string | undefined, start?: number, length?: number): void;
setOnError(onError: ScannerErrorCallback | undefined): void;
resetTokenState(pos: number): void;
back(): void;
}
export function createScanner(
skipTrivia: boolean,
textInitial?: string,
onError?: ScannerErrorCallback,
start?: number,
length?: number
): Scanner {
let text = textInitial ?? "";
// Current position (end position of text of current token)
let pos: number;
// End of text
let end: number;
// Start position of whitespace before current token
let fullStartPos: number;
// Start position of text of current token
let tokenStart: number;
let token: SyntaxKind;
let tokenValue!: string;
setText(text, start, length);
// Create the scanner instance
return {
getStartPos: () => fullStartPos,
getTokenEnd: () => pos,
getToken: () => token,
getTokenStart: () => tokenStart,
getTokenText: () => text.substring(tokenStart, pos),
getTokenValue: () => tokenValue,
isIdentifier: () => token === SyntaxKind.Identifier,
peekChar,
scanChar,
scan,
scanTrivia,
scanText,
getText,
setText,
setOnError,
resetTokenState,
back,
};
function peekChar(ahead?: number): number | null {
if (pos + (ahead ?? 0) >= end) {
return null;
}
const ch = codePointUnchecked(pos + (ahead ?? 0));
return isNaN(ch) ? null : ch;
}
function scanChar(): number | null {
if (pos >= end) {
return null;
}
const ch = codePointUnchecked(pos);
pos += charSize(ch);
return ch;
}
function scan(): SyntaxKind {
fullStartPos = pos;
while (true) {
tokenStart = pos;
if (pos >= end) {
return (token = SyntaxKind.EndOfFileToken);
}
const ch = codePointUnchecked(pos);
switch (ch) {
// --- Collect line break
case CharacterCodes.lineFeed:
case CharacterCodes.carriageReturn:
if (skipTrivia) {
pos++;
continue;
} else {
if (
ch === CharacterCodes.carriageReturn &&
pos + 1 < end &&
charCodeUnchecked(pos + 1) === CharacterCodes.lineFeed
) {
// consume both CR and LF
pos += 2;
} else {
pos++;
}
return (token = SyntaxKind.NewLineTrivia);
}
// --- Collect whitespace
case CharacterCodes.tab:
case CharacterCodes.verticalTab:
case CharacterCodes.formFeed:
case CharacterCodes.space:
case CharacterCodes.nonBreakingSpace:
case CharacterCodes.ogham:
case CharacterCodes.enQuad:
case CharacterCodes.emQuad:
case CharacterCodes.enSpace:
case CharacterCodes.emSpace:
case CharacterCodes.threePerEmSpace:
case CharacterCodes.fourPerEmSpace:
case CharacterCodes.sixPerEmSpace:
case CharacterCodes.figureSpace:
case CharacterCodes.punctuationSpace:
case CharacterCodes.thinSpace:
case CharacterCodes.hairSpace:
case CharacterCodes.zeroWidthSpace:
case CharacterCodes.narrowNoBreakSpace:
case CharacterCodes.mathematicalSpace:
case CharacterCodes.ideographicSpace:
case CharacterCodes.byteOrderMark:
if (skipTrivia) {
pos++;
continue;
} else {
while (pos < end && isWhiteSpaceSingleLine(charCodeUnchecked(pos))) {
pos++;
}
return (token = SyntaxKind.WhitespaceTrivia);
}
// --- Collect string literal
case CharacterCodes.doubleQuote:
case CharacterCodes.singleQuote:
case CharacterCodes.backtick:
tokenValue = scanString();
return (token = SyntaxKind.StringLiteral);
// --- Collext XML entities
case CharacterCodes.ampersand:
if (
charCodeUnchecked(pos + 1) === CharacterCodes.a &&
charCodeUnchecked(pos + 2) === CharacterCodes.m &&
charCodeUnchecked(pos + 3) === CharacterCodes.p &&
charCodeUnchecked(pos + 4) === CharacterCodes.semicolon
) {
pos += 5;
return (token = SyntaxKind.AmpersandEntity);
} else if (
charCodeUnchecked(pos + 1) === CharacterCodes.l &&
charCodeUnchecked(pos + 2) === CharacterCodes.t &&
charCodeUnchecked(pos + 3) === CharacterCodes.semicolon
) {
pos += 4;
return (token = SyntaxKind.LessThanEntity);
} else if (
charCodeUnchecked(pos + 1) === CharacterCodes.g &&
charCodeUnchecked(pos + 2) === CharacterCodes.t &&
charCodeUnchecked(pos + 3) === CharacterCodes.semicolon
) {
pos += 4;
return (token = SyntaxKind.GreaterThanEntity);
} else if (
charCodeUnchecked(pos + 1) === CharacterCodes.q &&
charCodeUnchecked(pos + 2) === CharacterCodes.u &&
charCodeUnchecked(pos + 3) === CharacterCodes.o &&
charCodeUnchecked(pos + 4) === CharacterCodes.t &&
charCodeUnchecked(pos + 5) === CharacterCodes.semicolon
) {
pos += 6;
return (token = SyntaxKind.DoubleQuoteEntity);
} else if (
charCodeUnchecked(pos + 1) === CharacterCodes.a &&
charCodeUnchecked(pos + 2) === CharacterCodes.p &&
charCodeUnchecked(pos + 3) === CharacterCodes.o &&
charCodeUnchecked(pos + 4) === CharacterCodes.s &&
charCodeUnchecked(pos + 5) === CharacterCodes.semicolon
) {
pos += 6;
return (token = SyntaxKind.SingleQuoteEntity);
}
pos++;
error(Diag_Invalid_Character, 1)
return (token = SyntaxKind.Unknown);
// --- Collect equal token
case CharacterCodes.equals:
pos++;
return (token = SyntaxKind.Equal);
// --- Collect colon token
case CharacterCodes.colon:
pos++;
return (token = SyntaxKind.Colon);
// --- Collect tokens starting with '<'
case CharacterCodes.lessThan:
if (charCodeUnchecked(pos + 1) === CharacterCodes.slash) {
// --- "</"
pos += 2;
return (token = SyntaxKind.CloseNodeStart);
} else if (
// --- "<!-- -->", XMLUI comment
charCodeUnchecked(pos + 1) === CharacterCodes.exclamation &&
charCodeUnchecked(pos + 2) === CharacterCodes.minus &&
charCodeUnchecked(pos + 3) === CharacterCodes.minus
) {
pos += 4;
while (pos < end) {
if (
charCodeUnchecked(pos) === CharacterCodes.minus &&
charCodeUnchecked(pos + 1) === CharacterCodes.minus &&
charCodeUnchecked(pos + 2) === CharacterCodes.greaterThan
) {
pos += 3;
return (token = SyntaxKind.CommentTrivia);
}
pos += charSize(charCodeUnchecked(pos));
}
error(Diag_Unterminated_Comment,4);
return (token = SyntaxKind.Unknown);
} else if (
// --- <![CDATA[ section
charCodeUnchecked(pos + 1) === CharacterCodes.exclamation &&
charCodeUnchecked(pos + 2) === CharacterCodes.openBracket &&
charCodeUnchecked(pos + 3) === CharacterCodes.C &&
charCodeUnchecked(pos + 4) === CharacterCodes.D &&
charCodeUnchecked(pos + 5) === CharacterCodes.A &&
charCodeUnchecked(pos + 6) === CharacterCodes.T &&
charCodeUnchecked(pos + 7) === CharacterCodes.A &&
charCodeUnchecked(pos + 8) === CharacterCodes.openBracket
) {
pos += 9;
while (pos < end) {
if (
charCodeUnchecked(pos) === CharacterCodes.closeBracket &&
charCodeUnchecked(pos + 1) === CharacterCodes.closeBracket &&
charCodeUnchecked(pos + 2) === CharacterCodes.greaterThan
) {
pos += 3;
return (token = SyntaxKind.CData);
}
pos += charSize(charCodeUnchecked(pos));
}
error(Diag_Unterminated_CData, 9);
return (token = SyntaxKind.CData);
} else if (
// --- <script>
charCodeUnchecked(pos + 1) === CharacterCodes.s &&
charCodeUnchecked(pos + 2) === CharacterCodes.c &&
charCodeUnchecked(pos + 3) === CharacterCodes.r &&
charCodeUnchecked(pos + 4) === CharacterCodes.i &&
charCodeUnchecked(pos + 5) === CharacterCodes.p &&
charCodeUnchecked(pos + 6) === CharacterCodes.t &&
charCodeUnchecked(pos + 7) === CharacterCodes.greaterThan
){
pos += 8;
while (pos < end) {
if (
charCodeUnchecked(pos) === CharacterCodes.lessThan &&
charCodeUnchecked(pos + 1) === CharacterCodes.slash &&
charCodeUnchecked(pos + 2) === CharacterCodes.s &&
charCodeUnchecked(pos + 3) === CharacterCodes.c &&
charCodeUnchecked(pos + 4) === CharacterCodes.r &&
charCodeUnchecked(pos + 5) === CharacterCodes.i &&
charCodeUnchecked(pos + 6) === CharacterCodes.p &&
charCodeUnchecked(pos + 7) === CharacterCodes.t &&
charCodeUnchecked(pos + 8) === CharacterCodes.greaterThan
) {
pos += 9;
return (token = SyntaxKind.Script);
}
pos += charSize(charCodeUnchecked(pos));
}
error(Diag_Unterminated_Script,9);
return (token = SyntaxKind.Script);
}
pos++;
return (token = SyntaxKind.OpenNodeStart);
case CharacterCodes.slash:
if (charCodeUnchecked(pos + 1) === CharacterCodes.greaterThan) {
pos += 2;
return (token = SyntaxKind.NodeClose);
}
pos++;
error(Diag_Invalid_Character, 1);
return (token = SyntaxKind.Unknown);
// --- Collect node closing token
case CharacterCodes.greaterThan:
pos++;
return (token = SyntaxKind.NodeEnd);
default:
const identifierKind = scanIdentifier(ch);
if (identifierKind) {
return (token = identifierKind);
} else if (isWhiteSpaceSingleLine(ch)) {
pos += charSize(ch);
continue;
} else if (isLineBreak(ch)) {
pos += charSize(ch);
continue;
}
const size = charSize(ch);
pos += size;
error(Diag_Invalid_Character, size);
return (token = SyntaxKind.Unknown);
}
}
}
function scanTrivia(): SyntaxKind | null {
const currentPos = pos;
const token = scan();
if (isTrivia(token)) {
return token;
}
resetTokenState(currentPos);
return null;
}
function scanText(): SyntaxKind {
return SyntaxKind.Unknown;
}
function getText(): string {
return text;
}
/**
* Returns the char code for the character at the given position within `text`. This
* should only be used when pos is guaranteed to be within the bounds of `text` as this
* function does not perform bounds checks.
*/
function charCodeUnchecked(pos: number) {
return text.charCodeAt(pos);
}
function codePointUnchecked(pos: number) {
return codePointAt(text, pos);
}
function codePointAt(s: string, i: number): number {
return s.codePointAt(i) ?? 0;
}
function setText(newText: string | undefined, start: number | undefined, length: number | undefined) {
text = newText || "";
end = length === undefined ? text.length : start! + length;
resetTokenState(start || 0);
}
function setOnError(errorCallback: ScannerErrorCallback | undefined) {
onError = errorCallback;
}
function resetTokenState(position: number) {
pos = position;
fullStartPos = position;
tokenStart = position;
token = SyntaxKind.Unknown;
tokenValue = undefined!;
}
function back() {
resetTokenState(fullStartPos);
}
function scanIdentifier(startCharacter: number) {
let ch = startCharacter;
if (isIdentifierStart(ch)) {
pos += charSize(ch);
while (pos < end && isIdentifierPart((ch = codePointUnchecked(pos)))) {
pos += charSize(ch);
}
tokenValue = text.substring(tokenStart, pos);
return getIdentifierToken();
}
}
function getIdentifierToken(): SyntaxKind.Identifier {
return (token = SyntaxKind.Identifier);
}
function scanString(): string {
const quote = charCodeUnchecked(pos);
pos++;
let result = "";
let start = pos;
while (true) {
if (pos >= end) {
result += text.substring(start, pos);
error(Diag_Unterminated_String_Literal, 1);
break;
}
const ch = charCodeUnchecked(pos);
if (ch === quote) {
result += text.substring(start, pos);
pos++;
break;
}
pos++;
}
return result;
}
function error(message: ScannerDiagnosticMessage, troublesomePrefixLength: number = 0): void {
if (onError) {
onError(message, troublesomePrefixLength);
}
}
}
function charSize(ch: number) {
if (ch >= 0x10000) {
return 2;
}
if (ch === CharacterCodes.EOF) {
return 0;
}
return 1;
}
function isASCIILetter(ch: number): boolean {
return (ch >= CharacterCodes.A && ch <= CharacterCodes.Z) || (ch >= CharacterCodes.a && ch <= CharacterCodes.z);
}
function isWordCharacter(ch: number): boolean {
return isASCIILetter(ch) || isDigit(ch) || ch === CharacterCodes._;
}
function isDigit(ch: number): boolean {
return ch >= CharacterCodes._0 && ch <= CharacterCodes._9;
}
export function isIdentifierStart(ch: number): boolean {
return isASCIILetter(ch) || ch === CharacterCodes.$ || ch === CharacterCodes._;
}
function isIdentifierPart(ch: number): boolean {
return isWordCharacter(ch) || ch === CharacterCodes.$ || ch === CharacterCodes.minus || ch === CharacterCodes.dot;
}
function isWhiteSpaceSingleLine(ch: number): boolean {
// Note: nextLine is in the Zs space, and should be considered to be a whitespace.
// It is explicitly not a line-break as it isn't in the exact set specified by EcmaScript.
return (
ch === CharacterCodes.space ||
ch === CharacterCodes.tab ||
ch === CharacterCodes.verticalTab ||
ch === CharacterCodes.formFeed ||
ch === CharacterCodes.nonBreakingSpace ||
ch === CharacterCodes.nextLine ||
ch === CharacterCodes.ogham ||
(ch >= CharacterCodes.enQuad && ch <= CharacterCodes.zeroWidthSpace) ||
ch === CharacterCodes.narrowNoBreakSpace ||
ch === CharacterCodes.mathematicalSpace ||
ch === CharacterCodes.ideographicSpace ||
ch === CharacterCodes.byteOrderMark
);
}
function isLineBreak(ch: number): boolean {
return (
ch === CharacterCodes.lineFeed ||
ch === CharacterCodes.carriageReturn ||
ch === CharacterCodes.lineSeparator ||
ch === CharacterCodes.paragraphSeparator
);
}
```
--------------------------------------------------------------------------------
/xmlui/src/components/ColorPicker/ColorPicker.spec.ts:
--------------------------------------------------------------------------------
```typescript
import { test, expect } from "../../testing/fixtures";
// =============================================================================
// BASIC FUNCTIONALITY TESTS
// =============================================================================
test("component renders with default value", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {});
// Check that the component is visible
await expect(page.locator("input[type='color']")).toBeVisible();
// Check default color (#000000 - black)
await expect(page.locator("input[type='color']")).toHaveValue("#000000");
});
test("component updates when value changes", async ({ page, initTestBed }) => {
const COLOR_1 = "#ff0000"; // Red
const COLOR_2 = "#00ff00"; // Green
await initTestBed(`<ColorPicker initialValue="${COLOR_1}" />`, {});
// Check that the initial color is set correctly
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveValue(COLOR_1);
// Change the color
await colorInput.fill(COLOR_2); // Green
await expect(colorInput).toHaveValue(COLOR_2);
});
test("component renders label correctly", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker label="Select Color" />`);
// Check that the label is displayed
const label = page.locator("label");
await expect(label).toBeVisible();
await expect(label).toContainText("Select Color");
});
test("component handles disabled state correctly", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker enabled="false" />`, {});
// Check that the input is disabled
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toBeDisabled();
});
test("component handles enabled state correctly", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker enabled="true" />`, {});
// Check that the input is disabled
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toBeEnabled();
});
test("component fires didChange event when color is selected", async ({ page, initTestBed }) => {
const COLOR_1 = "#ff0000"; // Red
const COLOR_2 = "#00ff00"; // Green
const { testStateDriver } = await initTestBed(`
<ColorPicker initialValue="${COLOR_1}" onDidChange="(value) => testState = value" />
`);
// Change the color
await page.locator("input[type='color']").fill(COLOR_2);
// Check that the event fired with the new color value
await expect.poll(() => testStateDriver.testState()).toEqual(COLOR_2);
});
test("component's gotFocus event fires", async ({ page, initTestBed }) => {
const { testStateDriver } = await initTestBed(`
<ColorPicker initialValue="#FF0000" onGotFocus="testState = 'focused'" />
`);
const colorInput = page.locator("input[type='color']");
// Focus the input
await colorInput.focus();
// Verify the input is focused
await expect(colorInput).toBeFocused();
// Verify the focus event fired
await expect.poll(testStateDriver.testState).toEqual("focused");
});
// =============================================================================
// ACCESSIBILITY TESTS
// =============================================================================
test("component has correct accessibility attributes", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker label="Select Color" />`, {});
// Check that the input has a valid label association
const colorInput = page.locator("input[type='color']");
const inputId = await colorInput.getAttribute("id");
const label = page.locator("label");
expect(inputId).toBeTruthy();
await expect(label).toHaveAttribute("for", inputId);
});
test("component is keyboard accessible", async ({ page, initTestBed }) => {
const { testStateDriver } = await initTestBed(`
<ColorPicker initialValue="#FF0000" onGotFocus="testState = 'focused'" />
`);
const colorInput = page.locator("input[type='color']");
// Focus the input
await page.keyboard.press("Tab");
// Verify the input is focused
await expect(colorInput).toBeFocused();
// Verify the focus event fired
await expect.poll(testStateDriver.testState).toEqual("focused");
});
// =============================================================================
// VISUAL STATE TESTS
// =============================================================================
test.describe("Validation", () => {
[
{ value: "--default", prop: "" },
{ value: "--warning", prop: 'validationStatus="warning"' },
{ value: "--error", prop: 'validationStatus="error"' },
{ value: "--success", prop: 'validationStatus="valid"' },
].forEach((variant) => {
test(`applies correct borderRadius ${variant.value}`, async ({ initTestBed, page }) => {
await initTestBed(`<ColorPicker testId="test" ${variant.prop} />`, {
testThemeVars: { [`borderRadius-ColorPicker${variant.value}`]: "12px" },
});
await expect(page.getByTestId("test")).toHaveCSS("border-radius", "12px");
});
test(`applies correct borderColor ${variant.value}`, async ({ initTestBed, page }) => {
await initTestBed(`<ColorPicker testId="test" ${variant.prop} />`, {
testThemeVars: { [`borderColor-ColorPicker${variant.value}`]: "rgb(255, 0, 0)" },
});
await expect(page.getByTestId("test")).toHaveCSS("border-color", "rgb(255, 0, 0)");
});
test(`applies correct borderWidth ${variant.value}`, async ({ initTestBed, page }) => {
await initTestBed(`<ColorPicker testId="test" ${variant.prop} />`, {
testThemeVars: { [`borderWidth-ColorPicker${variant.value}`]: "1px" },
});
await expect(page.getByTestId("test")).toHaveCSS("border-width", "1px");
});
test(`applies correct borderStyle ${variant.value}`, async ({ initTestBed, page }) => {
await initTestBed(`<ColorPicker testId="test" ${variant.prop} />`, {
testThemeVars: { [`borderStyle-ColorPicker${variant.value}`]: "dashed" },
});
await expect(page.getByTestId("test")).toHaveCSS("border-style", "dashed");
});
test(`applies correct boxShadow ${variant.value}`, async ({ initTestBed, page }) => {
await initTestBed(`<ColorPicker testId="test" ${variant.prop} />`, {
testThemeVars: {
[`boxShadow-ColorPicker${variant.value}`]: "0 2px 8px rgba(0, 0, 0, 0.1)",
},
});
await expect(page.getByTestId("test")).toHaveCSS(
"box-shadow",
"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px",
);
});
test(`applies correct borderColor on hover ${variant.value}`, async ({ initTestBed, page }) => {
await initTestBed(`<ColorPicker testId="test" ${variant.prop} />`, {
testThemeVars: { [`borderColor-ColorPicker${variant.value}--hover`]: "rgb(0, 0, 0)" },
});
await page.getByTestId("test").hover();
await expect(page.getByTestId("test")).toHaveCSS("border-color", "rgb(0, 0, 0)");
});
test(`applies correct boxShadow on hover ${variant.value}`, async ({ initTestBed, page }) => {
await initTestBed(`<ColorPicker testId="test" ${variant.prop} />`, {
testThemeVars: {
[`boxShadow-ColorPicker${variant.value}--hover`]: "0 2px 8px rgba(0, 0, 0, 0.1)",
},
});
await page.getByTestId("test").hover();
await expect(page.getByTestId("test")).toHaveCSS(
"box-shadow",
"rgba(0, 0, 0, 0.1) 0px 2px 8px 0px",
);
});
});
});
test("component applies backgroundColor-ColorPicker theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"backgroundColor-ColorPicker": "rgb(240, 240, 240)",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("background-color", "rgb(240, 240, 240)");
});
test("component applies borderColor-ColorPicker theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"borderColor-ColorPicker": "rgb(255, 0, 0)",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("border-color", "rgb(255, 0, 0)");
});
test("component applies borderColor-ColorPicker--hover theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"borderColor-ColorPicker": "rgb(0, 0, 0)",
"borderColor-ColorPicker--hover": "rgb(255, 0, 0)",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("border-color", "rgb(0, 0, 0)");
await colorInput.hover();
await expect(colorInput).toHaveCSS("border-color", "rgb(255, 0, 0)");
});
test("component applies borderColor-ColorPicker--focus theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"borderColor-ColorPicker": "rgb(0, 0, 0)",
"borderColor-ColorPicker--focus": "rgb(0, 255, 0)",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("border-color", "rgb(0, 0, 0)");
await colorInput.focus();
await expect(colorInput).toHaveCSS("border-color", "rgb(0, 255, 0)");
});
test("component applies borderRadius-ColorPicker theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"borderRadius-ColorPicker": "4px",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("border-radius", "4px");
});
test("component applies borderWidth-ColorPicker theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"borderWidth-ColorPicker": "2px",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("border-width", "2px");
});
test("component applies borderStyle-ColorPicker theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"borderStyle-ColorPicker": "solid",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("border-style", "solid");
});
test("component applies boxShadow-ColorPicker theme variable", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker />`, {
testThemeVars: {
"boxShadow-ColorPicker": "0 2px 4px rgba(0, 0, 0, 0.1)",
},
});
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveCSS("box-shadow", "rgba(0, 0, 0, 0.1) 0px 2px 4px 0px");
});
// =============================================================================
// EDGE CASE TESTS
// =============================================================================
test("component handles invalid color values gracefully", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker initialValue="not-a-color" />`);
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveValue("#000000");
});
test("component handles required attribute correctly", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker required="true" />`);
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveAttribute("required", "");
});
test("component handles readOnly mode correctly", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker readOnly="true" />`);
const colorInput = page.locator("input[type='color']");
// For ColorPickers the readOnly attribute typically makes the input disabled
await expect(colorInput).toBeDisabled();
});
// =============================================================================
// PERFORMANCE TESTS
// =============================================================================
test("component handles rapid value changes efficiently", async ({ page, initTestBed }) => {
// Test with initial color
await initTestBed(`
<Fragment>
<ColorPicker id="colorPicker" initialValue="#ff0000" />
<Button testId="toGreen" onClick="colorPicker.setValue('#00ff00')">Change to Green</Button>
<Button testId="toBlue" onClick="colorPicker.setValue('#0000ff')">Change to Blue</Button>
</Fragment>
`);
await page.getByTestId("toGreen").click();
await page.getByTestId("toBlue").click();
await expect(page.locator("input[type='color']")).toHaveValue("#0000ff", { timeout: 3000 });
});
// =============================================================================
// INTEGRATION TESTS
// =============================================================================
test("component works correctly in a form context", async ({ page, initTestBed }) => {
const { testStateDriver } = await initTestBed(`
<Form onSubmit="(data) => testState = data.testField" data="{{ testField: '#0000ff' }}">
<FormItem type="colorpicker" label="Choose Color" bindTo="testField" />
</Form>
`);
// Check that the color picker is inside the form
const formElement = page.locator("form");
const colorInput = formElement.locator("input[type='color']");
await expect(colorInput).toBeVisible();
// Submit the form
await page.locator("[type=submit]").click();
// Check that the form was submitted
await expect.poll(testStateDriver.testState).toEqual("#0000ff");
});
test("component value API works", async ({ page, initTestBed }) => {
await initTestBed(`
<Fragment>
<ColorPicker id="colorPicker" initialValue="#ff0000" />
<Text testId="colorPickerValue" value="{colorPicker.value}" />
</Fragment>
`);
await expect(page.getByTestId("colorPickerValue")).toHaveText("#ff0000");
});
test("component setValue API works", async ({ page, initTestBed }) => {
await initTestBed(`
<Fragment>
<ColorPicker id="colorPicker" initialValue="#ff0000" />
<Button onClick="colorPicker.setValue('#00ff00')">Change Color</Button>
</Fragment>
`);
// Test setValue API
await page.getByRole("button", { name: "Change Color" }).click();
const colorInput = page.locator("input[type='color']");
await expect(colorInput).toHaveValue("#00ff00");
});
test("component focus API works", async ({ page, initTestBed }) => {
const { testStateDriver } = await initTestBed(`
<Fragment>
<ColorPicker id="colorPicker" onGotFocus="testState = 'focused'" />
<Button onClick="colorPicker.focus()">Focus Color Picker</Button>
</Fragment>
`);
const button = page.getByRole("button", { name: "Focus Color Picker" });
// Focus the input
await button.click();
// Verify the input is focused
await expect(page.locator("input[type='color']")).toBeFocused();
// Verify the focus event fired
await expect.poll(testStateDriver.testState).toEqual("focused");
});
// =============================================================================
// VISUAL STATE TESTS
// =============================================================================
test("input has correct width in px", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker width="200px" testId="test"/>`, {});
const input = page.getByTestId("test");
const { width } = await input.boundingBox();
expect(width).toBe(200);
});
test("input with label has correct width in px", async ({ page, initTestBed }) => {
await initTestBed(`<ColorPicker width="200px" label="test" testId="test"/>`, {});
const input = page.getByTestId("test");
const { width } = await input.boundingBox();
expect(width).toBe(200);
});
test("input has correct width in %", async ({ page, initTestBed }) => {
await page.setViewportSize({ width: 400, height: 300});
await initTestBed(`<ColorPicker width="50%" testId="test"/>`, {});
const input = page.getByTestId("test");
const { width } = await input.boundingBox();
expect(width).toBe(200);
});
test("input with label has correct width in %", async ({ page, initTestBed }) => {
await page.setViewportSize({ width: 400, height: 300});
await initTestBed(`<ColorPicker width="50%" label="test" testId="test"/>`, {});
const input = page.getByTestId("test");
const { width } = await input.boundingBox();
expect(width).toBe(200);
});
```
--------------------------------------------------------------------------------
/xmlui/tests/parsers/scripting/parser-literals.test.ts:
--------------------------------------------------------------------------------
```typescript
import { describe, expect, it } from "vitest";
import { Parser } from "../../../src/parsers/scripting/Parser";
import {
ArrayLiteral,
Expression,
Identifier,
Literal,
ObjectLiteral,
BinaryExpression,
TemplateLiteralExpression,
T_LITERAL,
T_TEMPLATE_LITERAL_EXPRESSION,
T_BINARY_EXPRESSION,
T_IDENTIFIER,
T_ARRAY_LITERAL,
T_UNARY_EXPRESSION,
T_OBJECT_LITERAL,
} from "../../../src/components-core/script-runner/ScriptingSourceTree";
import { tokenTraits } from "../../../src/parsers/scripting/TokenTrait";
import { TokenType } from "../../../src/parsers/scripting/TokenType";
describe("Parser - literals", () => {
const boolCases = [
{ src: "true", exp: true },
{ src: "false", exp: false },
];
boolCases.forEach((c) => {
it(`Boolean literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_LITERAL);
const literal = expr as Literal;
expect(literal.value).equal(c.exp);
});
});
const binaryCases = [
{ src: "0b0", exp: 0 },
{ src: "0b0_0", exp: 0 },
{ src: "0b1_0", exp: 2 },
{ src: "0b011100110", exp: 230 },
{ src: "0b0111_0011_0", exp: 230 },
{
src: "0b11111111_11111111_11111111_11111111_11111111_11111111_11111111_11111111",
exp: BigInt("0xffffffffffffffff"),
},
];
binaryCases.forEach((c) => {
it(`Binary literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_LITERAL);
const literal = expr as Literal;
expect(literal.value).equal(c.exp);
});
});
const decimalCases = [
{ src: "0", exp: 0 },
{ src: "1", exp: 1 },
{ src: "2", exp: 2 },
{ src: "3", exp: 3 },
{ src: "4", exp: 4 },
{ src: "5", exp: 5 },
{ src: "6", exp: 6 },
{ src: "7", exp: 7 },
{ src: "8", exp: 8 },
{ src: "9", exp: 9 },
{ src: "0123", exp: 123 },
{ src: "0_123", exp: 123 },
{ src: "123_456_678_912_345", exp: 123456678912345 },
{ src: "999999_123_456_678_912_345", exp: BigInt("999999123456678912345") },
];
decimalCases.forEach((c) => {
it(`Decimal literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_LITERAL);
const literal = expr as Literal;
expect(literal.value).equal(c.exp);
});
});
const hexadecimalCases = [
{ src: "0x0", exp: 0x0 },
{ src: "0x0_0", exp: 0x0 },
{ src: "0x1_0", exp: 0x10 },
{ src: "0x12ac34", exp: 0x12ac34 },
{ src: "0x12_ac34", exp: 0x12ac34 },
{
src: "0xffffffffffffffff",
exp: BigInt("0xffffffffffffffff"),
},
];
hexadecimalCases.forEach((c) => {
it(`Binary literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_LITERAL);
const literal = expr as Literal;
expect(literal.value).equal(c.exp);
});
});
const realCases = [
{ src: "0.0", exp: 0.0 },
{ src: "1.0", exp: 1.0 },
{ src: "2.1", exp: 2.1 },
{ src: "3.12", exp: 3.12 },
{ src: "4.123", exp: 4.123 },
{ src: "5.1234", exp: 5.1234 },
{ src: "6.12345", exp: 6.12345 },
{ src: "7.123_456", exp: 7.123456 },
{ src: "8.12", exp: 8.12 },
{ src: "9.12", exp: 9.12 },
{ src: "01.0", exp: 1.0 },
{ src: "1_.0", exp: 1.0 },
{ src: "543_210.012_345_6", exp: 543210.0123456 },
{ src: "0e0", exp: 0 },
{ src: "1e0", exp: 1 },
{ src: "2e0", exp: 2 },
{ src: "3e0", exp: 3 },
{ src: "4e0", exp: 4 },
{ src: "5e0", exp: 5 },
{ src: "6e0", exp: 6 },
{ src: "7e0", exp: 7 },
{ src: "8e0", exp: 8 },
{ src: "9e0", exp: 9 },
{ src: "123e0", exp: 123 },
{ src: "23_4e0", exp: 234 },
{ src: "123e13", exp: 123e13 },
{ src: "123e+13", exp: 123e13 },
{ src: "123e-13", exp: 123e-13 },
{ src: "123.456e13", exp: 123.456e13 },
{ src: "123.45_6e+13", exp: 123.456e13 },
{ src: "123.4_56e-13", exp: 123.456e-13 },
{ src: ".0", exp: 0.0 },
{ src: ".12_34", exp: 0.1234 },
{ src: ".456e13", exp: 0.456e13 },
{ src: ".45_6e+13", exp: 0.456e13 },
{ src: ".4_56e-13", exp: 0.456e-13 },
{ src: "Infinity", exp: Infinity },
];
realCases.forEach((c) => {
it(`Real literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_LITERAL);
const literal = expr as Literal;
expect(literal.value).equal(c.exp);
});
});
it("NaN literal", () => {
// --- Arrange
const wParser = new Parser("NaN");
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_LITERAL);
const literal = expr as Literal;
expect(isNaN(literal.value)).equal(true);
});
const stringCases = [
{ src: '"\\S"', exp: "\xa0" },
{ src: '"Hello"', exp: "Hello" },
{ src: '"Hello\b"', exp: "Hello\b" },
{ src: '"Hello\\b"', exp: "Hello\b" },
{ src: '"Hello\\\\b"', exp: "Hello\\b" },
{ src: '"Hello\b1"', exp: "Hello\b1" },
{ src: '"Hello\\b1"', exp: "Hello\b1" },
{ src: '"Hello\\\\b1"', exp: "Hello\\b1" },
{ src: '"Hello\f"', exp: "Hello\f" },
{ src: '"Hello\\f"', exp: "Hello\f" },
{ src: '"Hello\\\\f"', exp: "Hello\\f" },
{ src: '"Hello\f1"', exp: "Hello\f1" },
{ src: '"Hello\\f1"', exp: "Hello\f1" },
{ src: '"Hello\\\\f1"', exp: "Hello\\f1" },
{ src: '"Hello\\n"', exp: "Hello\n" },
{ src: '"Hello\\\\n"', exp: "Hello\\n" },
{ src: '"Hello\\n1"', exp: "Hello\n1" },
{ src: '"Hello\\\\n1"', exp: "Hello\\n1" },
{ src: '"Hello\\r"', exp: "Hello\r" },
{ src: '"Hello\\\\r"', exp: "Hello\\r" },
{ src: '"Hello\\r1"', exp: "Hello\r1" },
{ src: '"Hello\\\\r1"', exp: "Hello\\r1" },
{ src: '"Hello\\q"', exp: "Hello\q" },
{ src: '"Hello\t"', exp: "Hello\t" },
{ src: '"Hello\\t"', exp: "Hello\t" },
{ src: '"Hello\\\\t"', exp: "Hello\\t" },
{ src: '"Hello\t1"', exp: "Hello\t1" },
{ src: '"Hello\\t1"', exp: "Hello\t1" },
{ src: '"Hello\\\\t1"', exp: "Hello\\t1" },
{ src: '"Hello\v"', exp: "Hello\v" },
{ src: '"Hello\\v"', exp: "Hello\v" },
{ src: '"Hello\\\\v"', exp: "Hello\\v" },
{ src: '"Hello\v1"', exp: "Hello\v1" },
{ src: '"Hello\\v1"', exp: "Hello\v1" },
{ src: '"Hello\\\\v1"', exp: "Hello\\v1" },
{ src: '"Hello\0"', exp: "Hello\u0000" },
{ src: '"Hello\\0"', exp: "Hello\u0000" },
{ src: '"Hello\\\\0"', exp: "Hello\\0" },
{ src: '"Hello\\01"', exp: "Hello\u00001" },
{ src: '"Hello\\\\01"', exp: "Hello\\01" },
{ src: '"Hello\\x02"', exp: "Hello\u0002" },
{ src: '"Hello\\xa4"', exp: "Hello\u00a4" },
{ src: '"Hello❤️"', exp: "Hello❤️" },
];
stringCases.forEach((c) => {
it(`String literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_LITERAL);
const literal = expr as Literal;
expect(literal.value).equal(c.exp);
});
});
it("template string, no placeholder", () => {
// --- Arrange
const wParser = new Parser("`hi\\n\\x41`");
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
expect(expr.type).equal(T_TEMPLATE_LITERAL_EXPRESSION);
const literal = expr as TemplateLiteralExpression;
expect(literal.segments).toHaveLength(1);
expect(literal.segments[0].type).equal(T_LITERAL);
expect((literal.segments[0] as Literal).value).equal("hi\nA");
});
it("template string, expr placeholder", () => {
// --- Arrange
const wParser = new Parser("`hi ${ 1 + 2 } there`");
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
expect(expr.type).equal(T_TEMPLATE_LITERAL_EXPRESSION);
const literal = expr as TemplateLiteralExpression;
expect(literal.segments).toHaveLength(3);
expect(literal.segments[0].type).equal(T_LITERAL);
expect((literal.segments[0] as Literal).value).equal("hi ");
const binary = literal.segments[1] as BinaryExpression;
expect(binary.type).equal(T_BINARY_EXPRESSION);
expect(binary.op).equal("+");
expect(binary.left.type).equal(T_LITERAL);
expect((binary.left as Literal).value).equal(1);
expect(binary.right.type).equal(T_LITERAL);
expect((binary.right as Literal).value).equal(2);
expect(literal.segments[2].type).equal(T_LITERAL);
expect((literal.segments[2] as Literal).value).equal(" there");
});
it("template string, no str before placeholder", () => {
// --- Arrange
const wParser = new Parser("`${ 1 + 2 } there`");
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
expect(expr.type).equal(T_TEMPLATE_LITERAL_EXPRESSION);
const literal = expr as TemplateLiteralExpression;
expect(literal.segments).toHaveLength(2);
const binary = literal.segments[0] as BinaryExpression;
expect(binary.type).equal(T_BINARY_EXPRESSION);
expect(binary.op).equal("+");
expect(binary.left.type).equal(T_LITERAL);
expect((binary.left as Literal).value).equal(1);
expect(binary.right.type).equal(T_LITERAL);
expect((binary.right as Literal).value).equal(2);
expect(literal.segments[1].type).equal(T_LITERAL);
expect((literal.segments[1] as Literal).value).equal(" there");
});
it("template string, no str after placeholder", () => {
// --- Arrange
const wParser = new Parser("`hi ${ 1 + 2 }`");
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
expect(expr.type).equal(T_TEMPLATE_LITERAL_EXPRESSION);
const literal = expr as TemplateLiteralExpression;
expect(literal.segments).toHaveLength(2);
expect(literal.segments[0].type).equal(T_LITERAL);
expect((literal.segments[0] as Literal).value).equal("hi ");
const binary = literal.segments[1] as BinaryExpression;
expect(binary.type).equal(T_BINARY_EXPRESSION);
expect(binary.op).equal("+");
expect(binary.left.type).equal(T_LITERAL);
expect((binary.left as Literal).value).equal(1);
expect(binary.right.type).equal(T_LITERAL);
expect((binary.right as Literal).value).equal(2);
});
it("template string, nested template string placeholder", () => {
// --- Arrange
const wParser = new Parser("`hi ${ `all ${2} people` } there`");
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
expect(expr.type).equal(T_TEMPLATE_LITERAL_EXPRESSION);
const literal = expr as TemplateLiteralExpression;
expect(literal.segments).toHaveLength(3);
expect(literal.segments[0].type).equal(T_LITERAL);
expect((literal.segments[0] as Literal).value).equal("hi ");
{
const literalNested = literal.segments[1] as TemplateLiteralExpression;
expect(literalNested.type).equal(T_TEMPLATE_LITERAL_EXPRESSION);
expect(literalNested.segments).toHaveLength(3);
expect(literalNested.segments[0].type).equal(T_LITERAL);
expect((literalNested.segments[0] as Literal).value).equal("all ");
expect(literalNested.segments[1].type).equal(T_LITERAL);
expect((literalNested.segments[1] as Literal).value).equal(2);
expect(literalNested.segments[2].type).equal(T_LITERAL);
expect((literalNested.segments[2] as Literal).value).equal(" people");
}
expect(literal.segments[2].type).equal(T_LITERAL);
expect((literal.segments[2] as Literal).value).equal(" there");
});
const arrayCases = [
{ src: "[]", len: 0, idx: -1, exp: null },
{ src: "[1, a, a+b]", len: 3, idx: 0, exp: T_LITERAL },
{ src: "[1, a, a+b]", len: 3, idx: 1, exp: T_IDENTIFIER },
{ src: "[1, a, a+b]", len: 3, idx: 2, exp: T_BINARY_EXPRESSION },
{ src: "[[b], a+b]", len: 2, idx: 0, exp: T_ARRAY_LITERAL },
{ src: "[[b], a+b]", len: 2, idx: 1, exp: T_BINARY_EXPRESSION },
];
arrayCases.forEach((c) => {
it(`Array literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_ARRAY_LITERAL);
const array = expr as ArrayLiteral;
expect(array.items.length).equal(c.len);
if (c.len > 0) {
// eslint-disable-next-line jest/no-conditional-expect
expect(array.items[c.idx].type).equal(c.exp);
}
});
});
const objectCases = [
{ src: "{ abc }", len: 1, idx: 0, name: T_IDENTIFIER, val: T_IDENTIFIER },
{ src: "{ abc: 123, b:2, }", len: 2, idx: 0, name: T_IDENTIFIER, val: T_LITERAL },
{ src: "{}", len: 0, idx: -1, name: null, val: null },
{ src: "{ abc: 123 }", len: 1, idx: 0, name: T_IDENTIFIER, val: T_LITERAL },
{ src: "{ 12: 123 }", len: 1, idx: 0, name: T_LITERAL, val: T_LITERAL },
{ src: '{ "Hello": 123 }', len: 1, idx: 0, name: T_LITERAL, val: T_LITERAL },
{ src: "{ abc: 123, }", len: 1, idx: 0, name: T_IDENTIFIER, val: T_LITERAL },
{ src: "{ abc: 123, 12: !a}", len: 2, idx: 0, name: T_IDENTIFIER, val: T_LITERAL },
{ src: "{ abc: 123, 12: !a}", len: 2, idx: 1, name: T_LITERAL, val: T_UNARY_EXPRESSION },
{
src: "{ abc: { a: b }, 12: [a, b, c]}",
len: 2,
idx: 0,
name: T_IDENTIFIER,
val: T_OBJECT_LITERAL,
},
{
src: "{ abc: { a: b }, 12: [a, b, c]}",
len: 2,
idx: 1,
name: T_LITERAL,
val: T_ARRAY_LITERAL,
},
];
objectCases.forEach((c) => {
it(`Object literal: ${c.src}`, () => {
// --- Arrange
const wParser = new Parser(c.src);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_OBJECT_LITERAL);
const array = expr as ObjectLiteral;
expect(array.props.length).equal(c.len);
if (c.len > 0) {
// eslint-disable-next-line jest/no-conditional-expect
expect((array.props[c.idx] as [Expression, Expression])[0].type).equal(c.name);
// eslint-disable-next-line jest/no-conditional-expect
expect((array.props[c.idx] as [Expression, Expression])[1].type).equal(c.val);
}
});
});
const allKeywords = Object.keys(tokenTraits)
.filter(
(k) =>
tokenTraits[k as unknown as TokenType].keywordLike &&
!tokenTraits[k as unknown as TokenType].expressionStart,
)
.map((tt) => TokenType[tt as unknown as TokenType]);
allKeywords.forEach((kw) => {
it(`Object literal with '${kw}'`, () => {
// --- Arrange
const wParser = new Parser(`{ ${kw}: 123 }`);
// --- Act
const expr = wParser.parseExpr();
// --- Assert
expect(expr).not.equal(null);
if (!expr) return;
expect(expr.type).equal(T_OBJECT_LITERAL);
const array = expr as ObjectLiteral;
expect(array.props.length).equal(1);
expect((array.props[0] as [Expression, Expression])[0].type).equal(T_IDENTIFIER);
const prop = (array.props[0] as [Expression, Expression])[0] as Identifier;
expect(prop.name).equal(kw);
const literal = (array.props[0] as [Expression, Expression])[1] as Literal;
expect(literal.value).equal(123);
});
});
});
```