This is page 43 of 186. Use http://codebase.md/xmlui-org/xmlui/xmlui/mockApiDef.js?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .changeset
│ ├── config.json
│ └── cyan-tools-design.md
├── .eslintrc.cjs
├── .github
│ ├── build-checklist.png
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows
│ ├── deploy-blog-optimized.yml
│ ├── deploy-blog-swa.yml
│ ├── deploy-blog.yml
│ ├── deploy-docs-optimized.yml
│ ├── deploy-docs-swa.yml
│ ├── deploy-docs.yml
│ ├── prepare-versions.yml
│ ├── release-packages.yml
│ ├── run-all-tests.yml
│ └── run-smoke-tests.yml
├── .gitignore
├── .prettierrc.js
├── .vscode
│ ├── launch.json
│ └── settings.json
├── blog
│ ├── .gitignore
│ ├── .gitkeep
│ ├── CHANGELOG.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── blog
│ │ │ ├── images
│ │ │ │ ├── an-advanced-codefence.gif
│ │ │ │ ├── an-advanced-codefence.mp4
│ │ │ │ ├── blog-page-component.png
│ │ │ │ ├── blog-scrabble.png
│ │ │ │ ├── codefence-runner.png
│ │ │ │ ├── integrated-blog-search.png
│ │ │ │ ├── lorem-ipsum.png
│ │ │ │ ├── playground-checkbox-source.png
│ │ │ │ ├── playground.png
│ │ │ │ ├── use-xmlui-mcp-to-find-a-howto.png
│ │ │ │ └── xmlui-demo-gallery.png
│ │ │ ├── introducing-xmlui.md
│ │ │ ├── lorem-ipsum.md
│ │ │ ├── newest-post.md
│ │ │ ├── older-post.md
│ │ │ ├── xmlui-playground.md
│ │ │ └── xmlui-powered-blog.md
│ │ ├── mockServiceWorker.js
│ │ ├── resources
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ └── for-download
│ │ │ │ └── xmlui
│ │ │ │ └── xmlui-standalone.umd.js
│ │ │ ├── github.svg
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ ├── rss.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ ├── staticwebapp.config.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ └── PageNotFound.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── blog-theme.ts
│ └── tsconfig.json
├── CONTRIBUTING.md
├── docs
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── ComponentRefLinks.txt
│ ├── content
│ │ ├── _meta.json
│ │ ├── components
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── APICall.md
│ │ │ ├── App.md
│ │ │ ├── AppHeader.md
│ │ │ ├── AppState.md
│ │ │ ├── AutoComplete.md
│ │ │ ├── Avatar.md
│ │ │ ├── Backdrop.md
│ │ │ ├── Badge.md
│ │ │ ├── BarChart.md
│ │ │ ├── Bookmark.md
│ │ │ ├── Breakout.md
│ │ │ ├── Button.md
│ │ │ ├── Card.md
│ │ │ ├── Carousel.md
│ │ │ ├── ChangeListener.md
│ │ │ ├── Checkbox.md
│ │ │ ├── CHStack.md
│ │ │ ├── ColorPicker.md
│ │ │ ├── Column.md
│ │ │ ├── ContentSeparator.md
│ │ │ ├── CVStack.md
│ │ │ ├── DataSource.md
│ │ │ ├── DateInput.md
│ │ │ ├── DatePicker.md
│ │ │ ├── DonutChart.md
│ │ │ ├── DropdownMenu.md
│ │ │ ├── EmojiSelector.md
│ │ │ ├── ExpandableItem.md
│ │ │ ├── FileInput.md
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FlowLayout.md
│ │ │ ├── Footer.md
│ │ │ ├── Form.md
│ │ │ ├── FormItem.md
│ │ │ ├── FormSection.md
│ │ │ ├── Fragment.md
│ │ │ ├── H1.md
│ │ │ ├── H2.md
│ │ │ ├── H3.md
│ │ │ ├── H4.md
│ │ │ ├── H5.md
│ │ │ ├── H6.md
│ │ │ ├── Heading.md
│ │ │ ├── HSplitter.md
│ │ │ ├── HStack.md
│ │ │ ├── Icon.md
│ │ │ ├── IFrame.md
│ │ │ ├── Image.md
│ │ │ ├── Items.md
│ │ │ ├── LabelList.md
│ │ │ ├── Legend.md
│ │ │ ├── LineChart.md
│ │ │ ├── Link.md
│ │ │ ├── List.md
│ │ │ ├── Logo.md
│ │ │ ├── Markdown.md
│ │ │ ├── MenuItem.md
│ │ │ ├── MenuSeparator.md
│ │ │ ├── ModalDialog.md
│ │ │ ├── NavGroup.md
│ │ │ ├── NavLink.md
│ │ │ ├── NavPanel.md
│ │ │ ├── NoResult.md
│ │ │ ├── NumberBox.md
│ │ │ ├── Option.md
│ │ │ ├── Page.md
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── Pages.md
│ │ │ ├── Pagination.md
│ │ │ ├── PasswordInput.md
│ │ │ ├── PieChart.md
│ │ │ ├── ProgressBar.md
│ │ │ ├── Queue.md
│ │ │ ├── RadioGroup.md
│ │ │ ├── RealTimeAdapter.md
│ │ │ ├── Redirect.md
│ │ │ ├── Select.md
│ │ │ ├── Slider.md
│ │ │ ├── Slot.md
│ │ │ ├── SpaceFiller.md
│ │ │ ├── Spinner.md
│ │ │ ├── Splitter.md
│ │ │ ├── Stack.md
│ │ │ ├── StickyBox.md
│ │ │ ├── SubMenuItem.md
│ │ │ ├── Switch.md
│ │ │ ├── TabItem.md
│ │ │ ├── Table.md
│ │ │ ├── TableOfContents.md
│ │ │ ├── Tabs.md
│ │ │ ├── Text.md
│ │ │ ├── TextArea.md
│ │ │ ├── TextBox.md
│ │ │ ├── Theme.md
│ │ │ ├── TimeInput.md
│ │ │ ├── Timer.md
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneSwitch.md
│ │ │ ├── Tooltip.md
│ │ │ ├── Tree.md
│ │ │ ├── VSplitter.md
│ │ │ ├── VStack.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ ├── xmlui-spreadsheet
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Spreadsheet.md
│ │ │ └── xmlui-website-blocks
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Carousel.md
│ │ │ ├── HelloMd.md
│ │ │ ├── HeroSection.md
│ │ │ └── ScrollToTop.md
│ │ └── extensions
│ │ ├── _meta.json
│ │ ├── xmlui-animations
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Animation.md
│ │ │ ├── FadeAnimation.md
│ │ │ ├── FadeInAnimation.md
│ │ │ ├── FadeOutAnimation.md
│ │ │ ├── ScaleAnimation.md
│ │ │ └── SlideInAnimation.md
│ │ └── xmlui-website-blocks
│ │ ├── _meta.json
│ │ ├── _overview.md
│ │ ├── Carousel.md
│ │ ├── FancyButton.md
│ │ ├── HeroSection.md
│ │ └── ScrollToTop.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── feed.rss
│ │ ├── mockServiceWorker.js
│ │ ├── pages
│ │ │ ├── _meta.json
│ │ │ ├── app-structure.md
│ │ │ ├── build-editor-component.md
│ │ │ ├── build-hello-world-component.md
│ │ │ ├── components-intro.md
│ │ │ ├── context-variables.md
│ │ │ ├── forms.md
│ │ │ ├── globals.md
│ │ │ ├── glossary.md
│ │ │ ├── helper-tags.md
│ │ │ ├── hosted-deployment.md
│ │ │ ├── howto
│ │ │ │ ├── assign-a-complex-json-literal-to-a-component-variable.md
│ │ │ │ ├── chain-a-refetch.md
│ │ │ │ ├── control-cache-invalidation.md
│ │ │ │ ├── debounce-user-input-for-api-calls.md
│ │ │ │ ├── debounce-with-changelistener.md
│ │ │ │ ├── debug-a-component.md
│ │ │ │ ├── delay-a-datasource-until-another-datasource-is-ready.md
│ │ │ │ ├── delegate-a-method.md
│ │ │ │ ├── do-custom-form-validation.md
│ │ │ │ ├── expose-a-method-from-a-component.md
│ │ │ │ ├── filter-and-transform-data-from-an-api.md
│ │ │ │ ├── group-items-in-list-by-a-property.md
│ │ │ │ ├── handle-background-operations.md
│ │ │ │ ├── hide-an-element-until-its-datasource-is-ready.md
│ │ │ │ ├── make-a-set-of-equal-width-cards.md
│ │ │ │ ├── make-a-table-responsive.md
│ │ │ │ ├── make-navpanel-width-responsive.md
│ │ │ │ ├── modify-a-value-reported-in-a-column.md
│ │ │ │ ├── paginate-a-list.md
│ │ │ │ ├── pass-data-to-a-modal-dialog.md
│ │ │ │ ├── react-to-button-click-not-keystrokes.md
│ │ │ │ ├── set-the-initial-value-of-a-select-from-fetched-data.md
│ │ │ │ ├── share-a-modaldialog-across-components.md
│ │ │ │ ├── sync-selections-between-table-and-list-views.md
│ │ │ │ ├── update-ui-optimistically.md
│ │ │ │ ├── use-built-in-form-validation.md
│ │ │ │ └── use-the-same-modaldialog-to-add-or-edit.md
│ │ │ ├── howto.md
│ │ │ ├── intro.md
│ │ │ ├── layout.md
│ │ │ ├── markup.md
│ │ │ ├── mcp.md
│ │ │ ├── modal-dialogs.md
│ │ │ ├── news-and-reviews.md
│ │ │ ├── reactive-intro.md
│ │ │ ├── refactoring.md
│ │ │ ├── routing-and-links.md
│ │ │ ├── samples
│ │ │ │ ├── color-palette.xmlui
│ │ │ │ ├── color-values.xmlui
│ │ │ │ ├── shadow-sizes.xmlui
│ │ │ │ ├── spacing-sizes.xmlui
│ │ │ │ ├── swatch.xmlui
│ │ │ │ ├── theme-gallery-brief.xmlui
│ │ │ │ └── theme-gallery.xmlui
│ │ │ ├── scoping.md
│ │ │ ├── scripting.md
│ │ │ ├── styles-and-themes
│ │ │ │ ├── common-units.md
│ │ │ │ ├── layout-props.md
│ │ │ │ ├── theme-variable-defaults.md
│ │ │ │ ├── theme-variables.md
│ │ │ │ └── themes.md
│ │ │ ├── template-properties.md
│ │ │ ├── test.md
│ │ │ ├── tutorial-01.md
│ │ │ ├── tutorial-02.md
│ │ │ ├── tutorial-03.md
│ │ │ ├── tutorial-04.md
│ │ │ ├── tutorial-05.md
│ │ │ ├── tutorial-06.md
│ │ │ ├── tutorial-07.md
│ │ │ ├── tutorial-08.md
│ │ │ ├── tutorial-09.md
│ │ │ ├── tutorial-10.md
│ │ │ ├── tutorial-11.md
│ │ │ ├── tutorial-12.md
│ │ │ ├── universal-properties.md
│ │ │ ├── user-defined-components.md
│ │ │ ├── vscode.md
│ │ │ ├── working-with-markdown.md
│ │ │ ├── working-with-text.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-charts
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── DonutChart.md
│ │ │ │ ├── LabelList.md
│ │ │ │ ├── Legend.md
│ │ │ │ ├── LineChart.md
│ │ │ │ └── PieChart.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ └── xmlui-spreadsheet
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ └── Spreadsheet.md
│ │ ├── resources
│ │ │ ├── devdocs
│ │ │ │ ├── debug-proxy-object-2.png
│ │ │ │ ├── debug-proxy-object.png
│ │ │ │ ├── table_editor_01.png
│ │ │ │ ├── table_editor_02.png
│ │ │ │ ├── table_editor_03.png
│ │ │ │ ├── table_editor_04.png
│ │ │ │ ├── table_editor_05.png
│ │ │ │ ├── table_editor_06.png
│ │ │ │ ├── table_editor_07.png
│ │ │ │ ├── table_editor_08.png
│ │ │ │ ├── table_editor_09.png
│ │ │ │ ├── table_editor_10.png
│ │ │ │ ├── table_editor_11.png
│ │ │ │ ├── table-editor-01.png
│ │ │ │ ├── table-editor-02.png
│ │ │ │ ├── table-editor-03.png
│ │ │ │ ├── table-editor-04.png
│ │ │ │ ├── table-editor-06.png
│ │ │ │ ├── table-editor-07.png
│ │ │ │ ├── table-editor-08.png
│ │ │ │ ├── table-editor-09.png
│ │ │ │ └── xmlui-rendering-of-tiptap-markdown.png
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ ├── clients.json
│ │ │ │ ├── daily-revenue.json
│ │ │ │ ├── dashboard-stats.json
│ │ │ │ ├── demo.xmlui
│ │ │ │ ├── demo.xmlui.xs
│ │ │ │ ├── downloads
│ │ │ │ │ └── downloads.json
│ │ │ │ ├── for-download
│ │ │ │ │ ├── index-with-api.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── mockApi.js
│ │ │ │ │ ├── start-darwin.sh
│ │ │ │ │ ├── start-linux.sh
│ │ │ │ │ ├── start.bat
│ │ │ │ │ └── xmlui
│ │ │ │ │ └── xmlui-standalone.umd.js
│ │ │ │ ├── getting-started
│ │ │ │ │ ├── cl-tutorial-final.zip
│ │ │ │ │ ├── cl-tutorial.zip
│ │ │ │ │ ├── cl-tutorial2.zip
│ │ │ │ │ ├── cl-tutorial3.zip
│ │ │ │ │ ├── cl-tutorial4.zip
│ │ │ │ │ ├── cl-tutorial5.zip
│ │ │ │ │ ├── cl-tutorial6.zip
│ │ │ │ │ ├── getting-started.zip
│ │ │ │ │ ├── hello-xmlui.zip
│ │ │ │ │ ├── xmlui-empty.zip
│ │ │ │ │ └── xmlui-starter.zip
│ │ │ │ ├── howto
│ │ │ │ │ └── component-icons
│ │ │ │ │ └── up-arrow.svg
│ │ │ │ ├── invoices.json
│ │ │ │ ├── monthly-status.json
│ │ │ │ ├── news-and-reviews.json
│ │ │ │ ├── products.json
│ │ │ │ ├── releases.json
│ │ │ │ ├── tutorials
│ │ │ │ │ ├── datasource
│ │ │ │ │ │ └── api.ts
│ │ │ │ │ └── p2do
│ │ │ │ │ ├── api.ts
│ │ │ │ │ └── todo-logo.svg
│ │ │ │ └── xmlui.json
│ │ │ ├── github.svg
│ │ │ ├── images
│ │ │ │ ├── apiaction-tutorial
│ │ │ │ │ ├── add-success.png
│ │ │ │ │ ├── apiaction-param.png
│ │ │ │ │ ├── change-completed.png
│ │ │ │ │ ├── change-in-progress.png
│ │ │ │ │ ├── confirm-delete.png
│ │ │ │ │ ├── data-error.png
│ │ │ │ │ ├── data-progress.png
│ │ │ │ │ ├── data-success.png
│ │ │ │ │ ├── display-1.png
│ │ │ │ │ ├── item-deleted.png
│ │ │ │ │ ├── item-updated.png
│ │ │ │ │ ├── missing-api-key.png
│ │ │ │ │ ├── new-item-added.png
│ │ │ │ │ └── test-message.png
│ │ │ │ ├── chat-api
│ │ │ │ │ └── domain-model.svg
│ │ │ │ ├── components
│ │ │ │ │ ├── image
│ │ │ │ │ │ └── breakfast.jpg
│ │ │ │ │ ├── markdown
│ │ │ │ │ │ └── colors.png
│ │ │ │ │ └── modal
│ │ │ │ │ ├── deep_link_dialog_1.jpg
│ │ │ │ │ └── deep_link_dialog_2.jpg
│ │ │ │ ├── create-apps
│ │ │ │ │ ├── collapsed-vertical.png
│ │ │ │ │ ├── using-forms-warning-dialog.png
│ │ │ │ │ └── using-forms.png
│ │ │ │ ├── datasource-tutorial
│ │ │ │ │ ├── data-with-header.png
│ │ │ │ │ ├── filtered-data.png
│ │ │ │ │ ├── filtered-items.png
│ │ │ │ │ ├── initial-page-items.png
│ │ │ │ │ ├── list-items.png
│ │ │ │ │ ├── next-page-items.png
│ │ │ │ │ ├── no-data.png
│ │ │ │ │ ├── pagination-1.jpg
│ │ │ │ │ ├── pagination-1.png
│ │ │ │ │ ├── polling-1.png
│ │ │ │ │ ├── refetch-data.png
│ │ │ │ │ ├── slow-loading.png
│ │ │ │ │ ├── test-message.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── unconventional-data.png
│ │ │ │ │ └── unfiltered-items.png
│ │ │ │ ├── flower.jpg
│ │ │ │ ├── get-started
│ │ │ │ │ ├── add-new-contact.png
│ │ │ │ │ ├── app-modified.png
│ │ │ │ │ ├── app-start.png
│ │ │ │ │ ├── app-with-boxes.png
│ │ │ │ │ ├── app-with-toast.png
│ │ │ │ │ ├── boilerplate-structure.png
│ │ │ │ │ ├── cl-initial.png
│ │ │ │ │ ├── cl-start.png
│ │ │ │ │ ├── contact-counts.png
│ │ │ │ │ ├── contact-dialog-title.png
│ │ │ │ │ ├── contact-dialog.png
│ │ │ │ │ ├── contact-menus.png
│ │ │ │ │ ├── contact-predicates.png
│ │ │ │ │ ├── context-menu.png
│ │ │ │ │ ├── dashboard-numbers.png
│ │ │ │ │ ├── default-contact-list.png
│ │ │ │ │ ├── delete-contact.png
│ │ │ │ │ ├── delete-task.png
│ │ │ │ │ ├── detailed-template.png
│ │ │ │ │ ├── edit-contact-details.png
│ │ │ │ │ ├── edited-contact-saved.png
│ │ │ │ │ ├── empty-sections.png
│ │ │ │ │ ├── filter-completed.png
│ │ │ │ │ ├── fullwidth-desktop.png
│ │ │ │ │ ├── fullwidth-mobile.png
│ │ │ │ │ ├── initial-table.png
│ │ │ │ │ ├── items-and-badges.png
│ │ │ │ │ ├── loading-message.png
│ │ │ │ │ ├── new-contact-button.png
│ │ │ │ │ ├── new-contact-saved.png
│ │ │ │ │ ├── no-empty-sections.png
│ │ │ │ │ ├── personal-todo-initial.png
│ │ │ │ │ ├── piechart.png
│ │ │ │ │ ├── review-today.png
│ │ │ │ │ ├── rudimentary-dashboard.png
│ │ │ │ │ ├── section-collapsed.png
│ │ │ │ │ ├── sectioned-items.png
│ │ │ │ │ ├── sections-ordered.png
│ │ │ │ │ ├── spacex-list-with-links.png
│ │ │ │ │ ├── spacex-list.png
│ │ │ │ │ ├── start-personal-todo-1.png
│ │ │ │ │ ├── submit-new-contact.png
│ │ │ │ │ ├── submit-new-task.png
│ │ │ │ │ ├── syntax-highlighting.png
│ │ │ │ │ ├── table-with-badge.png
│ │ │ │ │ ├── template-with-card.png
│ │ │ │ │ ├── test-emulated-api.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── todo-logo.png
│ │ │ │ │ └── xmlui-tools.png
│ │ │ │ ├── HelloApp.png
│ │ │ │ ├── HelloApp2.png
│ │ │ │ ├── logos
│ │ │ │ │ ├── xmlui1.svg
│ │ │ │ │ ├── xmlui2.svg
│ │ │ │ │ ├── xmlui3.svg
│ │ │ │ │ ├── xmlui4.svg
│ │ │ │ │ ├── xmlui5.svg
│ │ │ │ │ ├── xmlui6.svg
│ │ │ │ │ └── xmlui7.svg
│ │ │ │ ├── pdf
│ │ │ │ │ └── dummy-pdf.jpg
│ │ │ │ ├── rendering-engine
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ ├── Component.svg
│ │ │ │ │ ├── CompoundComponent.svg
│ │ │ │ │ ├── RootComponent.svg
│ │ │ │ │ └── tree-with-containers.svg
│ │ │ │ ├── reviewers-guide
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ └── incbutton-in-action.png
│ │ │ │ ├── tools
│ │ │ │ │ └── boilerplate-structure.png
│ │ │ │ ├── try.svg
│ │ │ │ ├── tutorial
│ │ │ │ │ ├── app-chat-history.png
│ │ │ │ │ ├── app-content-placeholder.png
│ │ │ │ │ ├── app-header-and-content.png
│ │ │ │ │ ├── app-links-channel-selected.png
│ │ │ │ │ ├── app-links-click.png
│ │ │ │ │ ├── app-navigation.png
│ │ │ │ │ ├── finished-ex01.png
│ │ │ │ │ ├── finished-ex02.png
│ │ │ │ │ ├── hello.png
│ │ │ │ │ ├── splash-screen-advanced.png
│ │ │ │ │ ├── splash-screen-after-click.png
│ │ │ │ │ ├── splash-screen-centered.png
│ │ │ │ │ ├── splash-screen-events.png
│ │ │ │ │ ├── splash-screen-expression.png
│ │ │ │ │ ├── splash-screen-reuse-after.png
│ │ │ │ │ ├── splash-screen-reuse-before.png
│ │ │ │ │ └── splash-screen.png
│ │ │ │ └── tutorial-01.png
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ ├── Boxes.xmlui
│ │ │ ├── Breadcrumb.xmlui
│ │ │ ├── ChangeLog.xmlui
│ │ │ ├── ColorPalette.xmlui
│ │ │ ├── DocumentLinks.xmlui
│ │ │ ├── DocumentPage.xmlui
│ │ │ ├── DocumentPageNoTOC.xmlui
│ │ │ ├── Icons.xmlui
│ │ │ ├── IncButton.xmlui
│ │ │ ├── IncButton2.xmlui
│ │ │ ├── NameValue.xmlui
│ │ │ ├── PageNotFound.xmlui
│ │ │ ├── PaletteItem.xmlui
│ │ │ ├── Palettes.xmlui
│ │ │ ├── SectionHeader.xmlui
│ │ │ ├── TBD.xmlui
│ │ │ ├── Test.xmlui
│ │ │ ├── ThemesIntro.xmlui
│ │ │ ├── ThousandThemes.xmlui
│ │ │ ├── TubeStops.xmlui
│ │ │ ├── TubeStops.xmlui.xs
│ │ │ └── TwoColumnCode.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ ├── docs-theme.ts
│ │ ├── earthtone.ts
│ │ ├── xmlui-gray-on-default.ts
│ │ ├── xmlui-green-on-default.ts
│ │ └── xmlui-orange-on-default.ts
│ └── tsconfig.json
├── LICENSE
├── package-lock.json
├── package.json
├── packages
│ ├── tsconfig.json
│ ├── xmlui-animations
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── Animation.tsx
│ │ ├── AnimationNative.tsx
│ │ ├── FadeAnimation.tsx
│ │ ├── FadeInAnimation.tsx
│ │ ├── FadeOutAnimation.tsx
│ │ ├── index.tsx
│ │ ├── ScaleAnimation.tsx
│ │ └── SlideInAnimation.tsx
│ ├── xmlui-devtools
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── devtools
│ │ │ │ ├── DevTools.tsx
│ │ │ │ ├── DevToolsNative.module.scss
│ │ │ │ ├── DevToolsNative.tsx
│ │ │ │ ├── ModalDialog.module.scss
│ │ │ │ ├── ModalDialog.tsx
│ │ │ │ ├── ModalVisibilityContext.tsx
│ │ │ │ ├── Tooltip.module.scss
│ │ │ │ ├── Tooltip.tsx
│ │ │ │ └── utils.ts
│ │ │ ├── editor
│ │ │ │ └── Editor.tsx
│ │ │ └── index.tsx
│ │ └── vite.config-overrides.ts
│ ├── xmlui-hello-world
│ │ ├── .gitignore
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── HelloWorld.module.scss
│ │ ├── HelloWorld.tsx
│ │ ├── HelloWorldNative.tsx
│ │ └── index.tsx
│ ├── xmlui-os-frames
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── IPhoneFrame.module.scss
│ │ ├── IPhoneFrame.tsx
│ │ ├── MacOSAppFrame.module.scss
│ │ ├── MacOSAppFrame.tsx
│ │ ├── WindowsAppFrame.module.scss
│ │ └── WindowsAppFrame.tsx
│ ├── xmlui-pdf
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ ├── components
│ │ │ │ └── Pdf.xmlui
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── LazyPdfNative.tsx
│ │ ├── Pdf.module.scss
│ │ └── Pdf.tsx
│ ├── xmlui-playground
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── hooks
│ │ │ ├── usePlayground.ts
│ │ │ └── useToast.ts
│ │ ├── index.tsx
│ │ ├── playground
│ │ │ ├── Box.module.scss
│ │ │ ├── Box.tsx
│ │ │ ├── CodeSelector.module.scss
│ │ │ ├── CodeSelector.tsx
│ │ │ ├── ConfirmationDialog.module.scss
│ │ │ ├── ConfirmationDialog.tsx
│ │ │ ├── Editor.tsx
│ │ │ ├── Header.module.scss
│ │ │ ├── Header.tsx
│ │ │ ├── Playground.tsx
│ │ │ ├── PlaygroundContent.module.scss
│ │ │ ├── PlaygroundContent.tsx
│ │ │ ├── PlaygroundNative.module.scss
│ │ │ ├── PlaygroundNative.tsx
│ │ │ ├── Preview.tsx
│ │ │ ├── StandalonePlayground.tsx
│ │ │ ├── StandalonePlaygroundNative.module.scss
│ │ │ ├── StandalonePlaygroundNative.tsx
│ │ │ ├── ThemeSwitcher.module.scss
│ │ │ ├── ThemeSwitcher.tsx
│ │ │ └── utils.ts
│ │ ├── providers
│ │ │ ├── Toast.module.scss
│ │ │ └── ToastProvider.tsx
│ │ ├── state
│ │ │ └── store.ts
│ │ ├── themes
│ │ │ └── theme.ts
│ │ └── utils
│ │ └── helpers.ts
│ ├── xmlui-search
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Search.module.scss
│ │ └── Search.tsx
│ ├── xmlui-spreadsheet
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Spreadsheet.tsx
│ │ └── SpreadsheetNative.tsx
│ └── xmlui-website-blocks
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── demo
│ │ ├── components
│ │ │ ├── HeroBackgroundBreakoutPage.xmlui
│ │ │ ├── HeroBackgroundsPage.xmlui
│ │ │ ├── HeroContentsPage.xmlui
│ │ │ ├── HeroTextAlignPage.xmlui
│ │ │ ├── HeroTextPage.xmlui
│ │ │ └── HeroTonesPage.xmlui
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── default.ts
│ ├── index.html
│ ├── index.ts
│ ├── meta
│ │ └── componentsMetadata.ts
│ ├── package.json
│ ├── public
│ │ └── resources
│ │ ├── building.jpg
│ │ └── xmlui-logo.svg
│ └── src
│ ├── Carousel
│ │ ├── Carousel.module.scss
│ │ ├── Carousel.tsx
│ │ ├── CarouselContext.tsx
│ │ └── CarouselNative.tsx
│ ├── FancyButton
│ │ ├── FancyButton.module.scss
│ │ ├── FancyButton.tsx
│ │ └── FancyButton.xmlui
│ ├── Hello
│ │ ├── Hello.tsx
│ │ ├── Hello.xmlui
│ │ └── Hello.xmlui.xs
│ ├── HeroSection
│ │ ├── HeroSection.module.scss
│ │ ├── HeroSection.spec.ts
│ │ ├── HeroSection.tsx
│ │ └── HeroSectionNative.tsx
│ ├── index.tsx
│ ├── ScrollToTop
│ │ ├── ScrollToTop.module.scss
│ │ ├── ScrollToTop.tsx
│ │ └── ScrollToTopNative.tsx
│ └── vite-env.d.ts
├── playwright.config.ts
├── README.md
├── tools
│ ├── codefence
│ │ └── xmlui-code-fence-docs.md
│ ├── create-app
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── create-app.ts
│ │ ├── helpers
│ │ │ ├── copy.ts
│ │ │ ├── get-pkg-manager.ts
│ │ │ ├── git.ts
│ │ │ ├── install.ts
│ │ │ ├── is-folder-empty.ts
│ │ │ ├── is-writeable.ts
│ │ │ ├── make-dir.ts
│ │ │ └── validate-pkg.ts
│ │ ├── index.ts
│ │ ├── package.json
│ │ ├── templates
│ │ │ ├── default
│ │ │ │ └── ts
│ │ │ │ ├── gitignore
│ │ │ │ ├── index.html
│ │ │ │ ├── index.ts
│ │ │ │ ├── public
│ │ │ │ │ ├── mockServiceWorker.js
│ │ │ │ │ ├── resources
│ │ │ │ │ │ ├── favicon.ico
│ │ │ │ │ │ └── xmlui-logo.svg
│ │ │ │ │ └── serve.json
│ │ │ │ └── src
│ │ │ │ ├── components
│ │ │ │ │ ├── ApiAware.xmlui
│ │ │ │ │ ├── Home.xmlui
│ │ │ │ │ ├── IncButton.xmlui
│ │ │ │ │ └── PagePanel.xmlui
│ │ │ │ ├── config.ts
│ │ │ │ └── Main.xmlui
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── create-xmlui-hello-world
│ │ ├── index.js
│ │ └── package.json
│ └── vscode
│ ├── .gitignore
│ ├── .vscode
│ │ ├── launch.json
│ │ └── tasks.json
│ ├── .vscodeignore
│ ├── build.sh
│ ├── CHANGELOG.md
│ ├── esbuild.js
│ ├── eslint.config.mjs
│ ├── formatter-docs.md
│ ├── generate-test-sample.sh
│ ├── LICENSE.md
│ ├── package-lock.json
│ ├── package.json
│ ├── README.md
│ ├── resources
│ │ ├── xmlui-logo.png
│ │ └── xmlui-markup-syntax-highlighting.png
│ ├── src
│ │ ├── extension.ts
│ │ └── server.ts
│ ├── syntaxes
│ │ └── xmlui.tmLanguage.json
│ ├── test-samples
│ │ └── sample.xmlui
│ ├── tsconfig.json
│ └── tsconfig.tsbuildinfo
├── turbo.json
└── xmlui
├── .gitignore
├── bin
│ ├── bootstrap.cjs
│ ├── bootstrap.js
│ ├── build-lib.ts
│ ├── build.ts
│ ├── index.ts
│ ├── preview.ts
│ ├── start.ts
│ ├── vite-xmlui-plugin.ts
│ └── viteConfig.ts
├── CHANGELOG.md
├── conventions
│ ├── component-qa-checklist.md
│ ├── copilot-conventions.md
│ ├── create-xmlui-components.md
│ ├── mermaid.md
│ ├── testing-conventions.md
│ └── xmlui-in-a-nutshell.md
├── dev-docs
│ ├── accessibility.md
│ ├── build-system.md
│ ├── build-xmlui.md
│ ├── component-behaviors.md
│ ├── component-metadata.md
│ ├── components-with-options.md
│ ├── containers.md
│ ├── data-operations.md
│ ├── glossary.md
│ ├── index.md
│ ├── next
│ │ ├── component-dev-guide.md
│ │ ├── configuration-management-enhancement-summary.md
│ │ ├── documentation-scripts-refactoring-complete-summary.md
│ │ ├── documentation-scripts-refactoring-plan.md
│ │ ├── duplicate-pattern-extraction-summary.md
│ │ ├── error-handling-standardization-summary.md
│ │ ├── generating-component-reference.md
│ │ ├── index.md
│ │ ├── logging-consistency-implementation-summary.md
│ │ ├── project-build.md
│ │ ├── project-structure.md
│ │ ├── theme-context.md
│ │ ├── tiptap-design-considerations.md
│ │ ├── working-with-code.md
│ │ ├── xmlui-runtime-architecture
│ │ └── xmlui-wcag-accessibility-report.md
│ ├── react-fundamentals.md
│ ├── release-method.md
│ ├── standalone-app.md
│ ├── theme-variables-refactoring.md
│ ├── ud-components.md
│ └── xmlui-repo.md
├── package.json
├── scripts
│ ├── coverage-only.js
│ ├── e2e-test-summary.js
│ ├── extract-component-metadata.js
│ ├── generate-docs
│ │ ├── build-downloads-map.mjs
│ │ ├── build-pages-map.mjs
│ │ ├── components-config.json
│ │ ├── configuration-management.mjs
│ │ ├── constants.mjs
│ │ ├── create-theme-files.mjs
│ │ ├── DocsGenerator.mjs
│ │ ├── error-handling.mjs
│ │ ├── extensions-config.json
│ │ ├── folders.mjs
│ │ ├── generate-summary-files.mjs
│ │ ├── get-docs.mjs
│ │ ├── input-handler.mjs
│ │ ├── logger.mjs
│ │ ├── logging-standards.mjs
│ │ ├── MetadataProcessor.mjs
│ │ ├── pattern-utilities.mjs
│ │ └── utils.mjs
│ ├── generate-metadata-markdown.js
│ ├── get-langserver-metadata.js
│ ├── inline-links.mjs
│ └── README-e2e-summary.md
├── src
│ ├── abstractions
│ │ ├── _conventions.md
│ │ ├── ActionDefs.ts
│ │ ├── AppContextDefs.ts
│ │ ├── ComponentDefs.ts
│ │ ├── ContainerDefs.ts
│ │ ├── ExtensionDefs.ts
│ │ ├── FunctionDefs.ts
│ │ ├── RendererDefs.ts
│ │ ├── scripting
│ │ │ ├── BlockScope.ts
│ │ │ ├── Compilation.ts
│ │ │ ├── LogicalThread.ts
│ │ │ ├── LoopScope.ts
│ │ │ ├── modules.ts
│ │ │ ├── ScriptParserError.ts
│ │ │ ├── Token.ts
│ │ │ ├── TryScope.ts
│ │ │ └── TryScopeExp.ts
│ │ └── ThemingDefs.ts
│ ├── components
│ │ ├── _conventions.md
│ │ ├── abstractions.ts
│ │ ├── Accordion
│ │ │ ├── Accordion.md
│ │ │ ├── Accordion.module.scss
│ │ │ ├── Accordion.spec.ts
│ │ │ ├── Accordion.tsx
│ │ │ ├── AccordionContext.tsx
│ │ │ ├── AccordionItem.tsx
│ │ │ ├── AccordionItemNative.tsx
│ │ │ └── AccordionNative.tsx
│ │ ├── Animation
│ │ │ └── AnimationNative.tsx
│ │ ├── APICall
│ │ │ ├── APICall.md
│ │ │ ├── APICall.spec.ts
│ │ │ ├── APICall.tsx
│ │ │ └── APICallNative.tsx
│ │ ├── App
│ │ │ ├── App.md
│ │ │ ├── App.module.scss
│ │ │ ├── App.spec.ts
│ │ │ ├── App.tsx
│ │ │ ├── AppLayoutContext.ts
│ │ │ ├── AppNative.tsx
│ │ │ ├── AppStateContext.ts
│ │ │ ├── doc-resources
│ │ │ │ ├── condensed-sticky.xmlui
│ │ │ │ ├── condensed.xmlui
│ │ │ │ ├── horizontal-sticky.xmlui
│ │ │ │ ├── horizontal.xmlui
│ │ │ │ ├── vertical-full-header.xmlui
│ │ │ │ ├── vertical-sticky.xmlui
│ │ │ │ └── vertical.xmlui
│ │ │ ├── IndexerContext.ts
│ │ │ ├── LinkInfoContext.ts
│ │ │ ├── SearchContext.tsx
│ │ │ ├── Sheet.module.scss
│ │ │ └── Sheet.tsx
│ │ ├── AppHeader
│ │ │ ├── AppHeader.md
│ │ │ ├── AppHeader.module.scss
│ │ │ ├── AppHeader.spec.ts
│ │ │ ├── AppHeader.tsx
│ │ │ └── AppHeaderNative.tsx
│ │ ├── AppState
│ │ │ ├── AppState.md
│ │ │ ├── AppState.spec.ts
│ │ │ ├── AppState.tsx
│ │ │ └── AppStateNative.tsx
│ │ ├── AutoComplete
│ │ │ ├── AutoComplete.md
│ │ │ ├── AutoComplete.module.scss
│ │ │ ├── AutoComplete.spec.ts
│ │ │ ├── AutoComplete.tsx
│ │ │ ├── AutoCompleteContext.tsx
│ │ │ └── AutoCompleteNative.tsx
│ │ ├── Avatar
│ │ │ ├── Avatar.md
│ │ │ ├── Avatar.module.scss
│ │ │ ├── Avatar.spec.ts
│ │ │ ├── Avatar.tsx
│ │ │ └── AvatarNative.tsx
│ │ ├── Backdrop
│ │ │ ├── Backdrop.md
│ │ │ ├── Backdrop.module.scss
│ │ │ ├── Backdrop.spec.ts
│ │ │ ├── Backdrop.tsx
│ │ │ └── BackdropNative.tsx
│ │ ├── Badge
│ │ │ ├── Badge.md
│ │ │ ├── Badge.module.scss
│ │ │ ├── Badge.spec.ts
│ │ │ ├── Badge.tsx
│ │ │ └── BadgeNative.tsx
│ │ ├── Bookmark
│ │ │ ├── Bookmark.md
│ │ │ ├── Bookmark.module.scss
│ │ │ ├── Bookmark.spec.ts
│ │ │ ├── Bookmark.tsx
│ │ │ └── BookmarkNative.tsx
│ │ ├── Breakout
│ │ │ ├── Breakout.module.scss
│ │ │ ├── Breakout.spec.ts
│ │ │ ├── Breakout.tsx
│ │ │ └── BreakoutNative.tsx
│ │ ├── Button
│ │ │ ├── Button-style.spec.ts
│ │ │ ├── Button.md
│ │ │ ├── Button.module.scss
│ │ │ ├── Button.spec.ts
│ │ │ ├── Button.tsx
│ │ │ └── ButtonNative.tsx
│ │ ├── Card
│ │ │ ├── Card.md
│ │ │ ├── Card.module.scss
│ │ │ ├── Card.spec.ts
│ │ │ ├── Card.tsx
│ │ │ └── CardNative.tsx
│ │ ├── Carousel
│ │ │ ├── Carousel.md
│ │ │ ├── Carousel.module.scss
│ │ │ ├── Carousel.spec.ts
│ │ │ ├── Carousel.tsx
│ │ │ ├── CarouselContext.tsx
│ │ │ ├── CarouselItem.tsx
│ │ │ ├── CarouselItemNative.tsx
│ │ │ └── CarouselNative.tsx
│ │ ├── ChangeListener
│ │ │ ├── ChangeListener.md
│ │ │ ├── ChangeListener.spec.ts
│ │ │ ├── ChangeListener.tsx
│ │ │ └── ChangeListenerNative.tsx
│ │ ├── chart-color-schemes.ts
│ │ ├── Charts
│ │ │ ├── AreaChart
│ │ │ │ ├── AreaChart.md
│ │ │ │ ├── AreaChart.spec.ts
│ │ │ │ ├── AreaChart.tsx
│ │ │ │ └── AreaChartNative.tsx
│ │ │ ├── BarChart
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── BarChart.module.scss
│ │ │ │ ├── BarChart.spec.ts
│ │ │ │ ├── BarChart.tsx
│ │ │ │ └── BarChartNative.tsx
│ │ │ ├── DonutChart
│ │ │ │ ├── DonutChart.spec.ts
│ │ │ │ └── DonutChart.tsx
│ │ │ ├── LabelList
│ │ │ │ ├── LabelList.module.scss
│ │ │ │ ├── LabelList.spec.ts
│ │ │ │ ├── LabelList.tsx
│ │ │ │ └── LabelListNative.tsx
│ │ │ ├── Legend
│ │ │ │ ├── Legend.spec.ts
│ │ │ │ ├── Legend.tsx
│ │ │ │ └── LegendNative.tsx
│ │ │ ├── LineChart
│ │ │ │ ├── LineChart.md
│ │ │ │ ├── LineChart.module.scss
│ │ │ │ ├── LineChart.spec.ts
│ │ │ │ ├── LineChart.tsx
│ │ │ │ └── LineChartNative.tsx
│ │ │ ├── PieChart
│ │ │ │ ├── PieChart.md
│ │ │ │ ├── PieChart.spec.ts
│ │ │ │ ├── PieChart.tsx
│ │ │ │ ├── PieChartNative.module.scss
│ │ │ │ └── PieChartNative.tsx
│ │ │ ├── RadarChart
│ │ │ │ ├── RadarChart.md
│ │ │ │ ├── RadarChart.spec.ts
│ │ │ │ ├── RadarChart.tsx
│ │ │ │ └── RadarChartNative.tsx
│ │ │ ├── Tooltip
│ │ │ │ ├── TooltipContent.module.scss
│ │ │ │ ├── TooltipContent.spec.ts
│ │ │ │ └── TooltipContent.tsx
│ │ │ └── utils
│ │ │ ├── abstractions.ts
│ │ │ └── ChartProvider.tsx
│ │ ├── Checkbox
│ │ │ ├── Checkbox.md
│ │ │ ├── Checkbox.spec.ts
│ │ │ └── Checkbox.tsx
│ │ ├── CodeBlock
│ │ │ ├── CodeBlock.module.scss
│ │ │ ├── CodeBlock.spec.ts
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── CodeBlockNative.tsx
│ │ │ └── highlight-code.ts
│ │ ├── collectedComponentMetadata.ts
│ │ ├── ColorPicker
│ │ │ ├── ColorPicker.md
│ │ │ ├── ColorPicker.module.scss
│ │ │ ├── ColorPicker.spec.ts
│ │ │ ├── ColorPicker.tsx
│ │ │ └── ColorPickerNative.tsx
│ │ ├── Column
│ │ │ ├── Column.md
│ │ │ ├── Column.tsx
│ │ │ ├── ColumnNative.tsx
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ └── TableContext.tsx
│ │ ├── component-utils.ts
│ │ ├── ComponentProvider.tsx
│ │ ├── ComponentRegistryContext.tsx
│ │ ├── container-helpers.tsx
│ │ ├── ContentSeparator
│ │ │ ├── ContentSeparator.md
│ │ │ ├── ContentSeparator.module.scss
│ │ │ ├── ContentSeparator.spec.ts
│ │ │ ├── ContentSeparator.tsx
│ │ │ └── ContentSeparatorNative.tsx
│ │ ├── DataSource
│ │ │ ├── DataSource.md
│ │ │ └── DataSource.tsx
│ │ ├── DateInput
│ │ │ ├── DateInput.md
│ │ │ ├── DateInput.module.scss
│ │ │ ├── DateInput.spec.ts
│ │ │ ├── DateInput.tsx
│ │ │ └── DateInputNative.tsx
│ │ ├── DatePicker
│ │ │ ├── DatePicker.md
│ │ │ ├── DatePicker.module.scss
│ │ │ ├── DatePicker.spec.ts
│ │ │ ├── DatePicker.tsx
│ │ │ └── DatePickerNative.tsx
│ │ ├── DropdownMenu
│ │ │ ├── DropdownMenu.md
│ │ │ ├── DropdownMenu.module.scss
│ │ │ ├── DropdownMenu.spec.ts
│ │ │ ├── DropdownMenu.tsx
│ │ │ ├── DropdownMenuNative.tsx
│ │ │ ├── MenuItem.md
│ │ │ └── SubMenuItem.md
│ │ ├── EmojiSelector
│ │ │ ├── EmojiSelector.md
│ │ │ ├── EmojiSelector.spec.ts
│ │ │ ├── EmojiSelector.tsx
│ │ │ └── EmojiSelectorNative.tsx
│ │ ├── ExpandableItem
│ │ │ ├── ExpandableItem.module.scss
│ │ │ ├── ExpandableItem.spec.ts
│ │ │ ├── ExpandableItem.tsx
│ │ │ └── ExpandableItemNative.tsx
│ │ ├── FileInput
│ │ │ ├── FileInput.md
│ │ │ ├── FileInput.module.scss
│ │ │ ├── FileInput.spec.ts
│ │ │ ├── FileInput.tsx
│ │ │ └── FileInputNative.tsx
│ │ ├── FileUploadDropZone
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FileUploadDropZone.module.scss
│ │ │ ├── FileUploadDropZone.spec.ts
│ │ │ ├── FileUploadDropZone.tsx
│ │ │ └── FileUploadDropZoneNative.tsx
│ │ ├── FlowLayout
│ │ │ ├── FlowLayout.md
│ │ │ ├── FlowLayout.module.scss
│ │ │ ├── FlowLayout.spec.ts
│ │ │ ├── FlowLayout.spec.ts-snapshots
│ │ │ │ └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
│ │ │ ├── FlowLayout.tsx
│ │ │ └── FlowLayoutNative.tsx
│ │ ├── Footer
│ │ │ ├── Footer.md
│ │ │ ├── Footer.module.scss
│ │ │ ├── Footer.spec.ts
│ │ │ ├── Footer.tsx
│ │ │ └── FooterNative.tsx
│ │ ├── Form
│ │ │ ├── Form.md
│ │ │ ├── Form.module.scss
│ │ │ ├── Form.spec.ts
│ │ │ ├── Form.tsx
│ │ │ ├── formActions.ts
│ │ │ ├── FormContext.ts
│ │ │ └── FormNative.tsx
│ │ ├── FormItem
│ │ │ ├── FormItem.md
│ │ │ ├── FormItem.module.scss
│ │ │ ├── FormItem.spec.ts
│ │ │ ├── FormItem.tsx
│ │ │ ├── FormItemNative.tsx
│ │ │ ├── HelperText.module.scss
│ │ │ ├── HelperText.tsx
│ │ │ ├── ItemWithLabel.tsx
│ │ │ └── Validations.ts
│ │ ├── FormSection
│ │ │ ├── FormSection.md
│ │ │ ├── FormSection.ts
│ │ │ └── FormSection.xmlui
│ │ ├── Fragment
│ │ │ ├── Fragment.spec.ts
│ │ │ └── Fragment.tsx
│ │ ├── Heading
│ │ │ ├── abstractions.ts
│ │ │ ├── H1.md
│ │ │ ├── H1.spec.ts
│ │ │ ├── H2.md
│ │ │ ├── H2.spec.ts
│ │ │ ├── H3.md
│ │ │ ├── H3.spec.ts
│ │ │ ├── H4.md
│ │ │ ├── H4.spec.ts
│ │ │ ├── H5.md
│ │ │ ├── H5.spec.ts
│ │ │ ├── H6.md
│ │ │ ├── H6.spec.ts
│ │ │ ├── Heading.md
│ │ │ ├── Heading.module.scss
│ │ │ ├── Heading.spec.ts
│ │ │ ├── Heading.tsx
│ │ │ └── HeadingNative.tsx
│ │ ├── HoverCard
│ │ │ ├── HoverCard.tsx
│ │ │ └── HovercardNative.tsx
│ │ ├── HtmlTags
│ │ │ ├── HtmlTags.module.scss
│ │ │ ├── HtmlTags.spec.ts
│ │ │ └── HtmlTags.tsx
│ │ ├── Icon
│ │ │ ├── AdmonitionDanger.tsx
│ │ │ ├── AdmonitionInfo.tsx
│ │ │ ├── AdmonitionNote.tsx
│ │ │ ├── AdmonitionTip.tsx
│ │ │ ├── AdmonitionWarning.tsx
│ │ │ ├── ApiIcon.tsx
│ │ │ ├── ArrowDropDown.module.scss
│ │ │ ├── ArrowDropDown.tsx
│ │ │ ├── ArrowDropUp.module.scss
│ │ │ ├── ArrowDropUp.tsx
│ │ │ ├── ArrowLeft.module.scss
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowRight.module.scss
│ │ │ ├── ArrowRight.tsx
│ │ │ ├── Attach.tsx
│ │ │ ├── Binding.module.scss
│ │ │ ├── Binding.tsx
│ │ │ ├── BoardIcon.tsx
│ │ │ ├── BoxIcon.tsx
│ │ │ ├── CheckIcon.tsx
│ │ │ ├── ChevronDownIcon.tsx
│ │ │ ├── ChevronLeft.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUpIcon.tsx
│ │ │ ├── CodeFileIcon.tsx
│ │ │ ├── CodeSandbox.tsx
│ │ │ ├── CompactListIcon.tsx
│ │ │ ├── ContentCopyIcon.tsx
│ │ │ ├── DarkToLightIcon.tsx
│ │ │ ├── DatabaseIcon.module.scss
│ │ │ ├── DatabaseIcon.tsx
│ │ │ ├── DocFileIcon.tsx
│ │ │ ├── DocIcon.tsx
│ │ │ ├── DotMenuHorizontalIcon.tsx
│ │ │ ├── DotMenuIcon.tsx
│ │ │ ├── EmailIcon.tsx
│ │ │ ├── EmptyFolderIcon.tsx
│ │ │ ├── ErrorIcon.tsx
│ │ │ ├── ExpressionIcon.tsx
│ │ │ ├── FillPlusCricleIcon.tsx
│ │ │ ├── FilterIcon.tsx
│ │ │ ├── FolderIcon.tsx
│ │ │ ├── GlobeIcon.tsx
│ │ │ ├── HomeIcon.tsx
│ │ │ ├── HyperLinkIcon.tsx
│ │ │ ├── Icon.md
│ │ │ ├── Icon.module.scss
│ │ │ ├── Icon.spec.ts
│ │ │ ├── Icon.tsx
│ │ │ ├── IconNative.tsx
│ │ │ ├── ImageFileIcon.tsx
│ │ │ ├── Inspect.tsx
│ │ │ ├── LightToDark.tsx
│ │ │ ├── LinkIcon.tsx
│ │ │ ├── ListIcon.tsx
│ │ │ ├── LooseListIcon.tsx
│ │ │ ├── MoonIcon.tsx
│ │ │ ├── MoreOptionsIcon.tsx
│ │ │ ├── NoSortIcon.tsx
│ │ │ ├── PDFIcon.tsx
│ │ │ ├── PenIcon.tsx
│ │ │ ├── PhoneIcon.tsx
│ │ │ ├── PhotoIcon.tsx
│ │ │ ├── PlusIcon.tsx
│ │ │ ├── SearchIcon.tsx
│ │ │ ├── ShareIcon.tsx
│ │ │ ├── SortAscendingIcon.tsx
│ │ │ ├── SortDescendingIcon.tsx
│ │ │ ├── StarsIcon.tsx
│ │ │ ├── SunIcon.tsx
│ │ │ ├── svg
│ │ │ │ ├── admonition_danger.svg
│ │ │ │ ├── admonition_info.svg
│ │ │ │ ├── admonition_note.svg
│ │ │ │ ├── admonition_tip.svg
│ │ │ │ ├── admonition_warning.svg
│ │ │ │ ├── api.svg
│ │ │ │ ├── arrow-dropdown.svg
│ │ │ │ ├── arrow-left.svg
│ │ │ │ ├── arrow-right.svg
│ │ │ │ ├── arrow-up.svg
│ │ │ │ ├── attach.svg
│ │ │ │ ├── binding.svg
│ │ │ │ ├── box.svg
│ │ │ │ ├── bulb.svg
│ │ │ │ ├── code-file.svg
│ │ │ │ ├── code-sandbox.svg
│ │ │ │ ├── dark_to_light.svg
│ │ │ │ ├── database.svg
│ │ │ │ ├── doc.svg
│ │ │ │ ├── empty-folder.svg
│ │ │ │ ├── expression.svg
│ │ │ │ ├── eye-closed.svg
│ │ │ │ ├── eye-dark.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── file-text.svg
│ │ │ │ ├── filter.svg
│ │ │ │ ├── folder.svg
│ │ │ │ ├── img.svg
│ │ │ │ ├── inspect.svg
│ │ │ │ ├── light_to_dark.svg
│ │ │ │ ├── moon.svg
│ │ │ │ ├── pdf.svg
│ │ │ │ ├── photo.svg
│ │ │ │ ├── share.svg
│ │ │ │ ├── stars.svg
│ │ │ │ ├── sun.svg
│ │ │ │ ├── trending-down.svg
│ │ │ │ ├── trending-level.svg
│ │ │ │ ├── trending-up.svg
│ │ │ │ ├── txt.svg
│ │ │ │ ├── unknown-file.svg
│ │ │ │ ├── unlink.svg
│ │ │ │ └── xls.svg
│ │ │ ├── TableDeleteColumnIcon.tsx
│ │ │ ├── TableDeleteRowIcon.tsx
│ │ │ ├── TableInsertColumnIcon.tsx
│ │ │ ├── TableInsertRowIcon.tsx
│ │ │ ├── TrashIcon.tsx
│ │ │ ├── TrendingDownIcon.tsx
│ │ │ ├── TrendingLevelIcon.tsx
│ │ │ ├── TrendingUpIcon.tsx
│ │ │ ├── TxtIcon.tsx
│ │ │ ├── UnknownFileIcon.tsx
│ │ │ ├── UnlinkIcon.tsx
│ │ │ ├── UserIcon.tsx
│ │ │ ├── WarningIcon.tsx
│ │ │ └── XlsIcon.tsx
│ │ ├── IconProvider.tsx
│ │ ├── IconRegistryContext.tsx
│ │ ├── IFrame
│ │ │ ├── IFrame.md
│ │ │ ├── IFrame.module.scss
│ │ │ ├── IFrame.spec.ts
│ │ │ ├── IFrame.tsx
│ │ │ └── IFrameNative.tsx
│ │ ├── Image
│ │ │ ├── Image.md
│ │ │ ├── Image.module.scss
│ │ │ ├── Image.spec.ts
│ │ │ ├── Image.tsx
│ │ │ └── ImageNative.tsx
│ │ ├── Input
│ │ │ ├── index.ts
│ │ │ ├── InputAdornment.module.scss
│ │ │ ├── InputAdornment.tsx
│ │ │ ├── InputDivider.module.scss
│ │ │ ├── InputDivider.tsx
│ │ │ ├── InputLabel.module.scss
│ │ │ ├── InputLabel.tsx
│ │ │ ├── PartialInput.module.scss
│ │ │ └── PartialInput.tsx
│ │ ├── InspectButton
│ │ │ ├── InspectButton.module.scss
│ │ │ └── InspectButton.tsx
│ │ ├── Items
│ │ │ ├── Items.md
│ │ │ ├── Items.spec.ts
│ │ │ ├── Items.tsx
│ │ │ └── ItemsNative.tsx
│ │ ├── Link
│ │ │ ├── Link.md
│ │ │ ├── Link.module.scss
│ │ │ ├── Link.spec.ts
│ │ │ ├── Link.tsx
│ │ │ └── LinkNative.tsx
│ │ ├── List
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── List.md
│ │ │ ├── List.module.scss
│ │ │ ├── List.spec.ts
│ │ │ ├── List.tsx
│ │ │ └── ListNative.tsx
│ │ ├── Logo
│ │ │ ├── doc-resources
│ │ │ │ └── xmlui-logo.svg
│ │ │ ├── Logo.md
│ │ │ ├── Logo.tsx
│ │ │ └── LogoNative.tsx
│ │ ├── Markdown
│ │ │ ├── CodeText.module.scss
│ │ │ ├── CodeText.tsx
│ │ │ ├── Markdown.md
│ │ │ ├── Markdown.module.scss
│ │ │ ├── Markdown.spec.ts
│ │ │ ├── Markdown.tsx
│ │ │ ├── MarkdownNative.tsx
│ │ │ ├── parse-binding-expr.ts
│ │ │ └── utils.ts
│ │ ├── metadata-helpers.ts
│ │ ├── ModalDialog
│ │ │ ├── ConfirmationModalContextProvider.tsx
│ │ │ ├── Dialog.module.scss
│ │ │ ├── Dialog.tsx
│ │ │ ├── ModalDialog.md
│ │ │ ├── ModalDialog.module.scss
│ │ │ ├── ModalDialog.spec.ts
│ │ │ ├── ModalDialog.tsx
│ │ │ ├── ModalDialogNative.tsx
│ │ │ └── ModalVisibilityContext.tsx
│ │ ├── NavGroup
│ │ │ ├── NavGroup.md
│ │ │ ├── NavGroup.module.scss
│ │ │ ├── NavGroup.spec.ts
│ │ │ ├── NavGroup.tsx
│ │ │ ├── NavGroupContext.ts
│ │ │ └── NavGroupNative.tsx
│ │ ├── NavLink
│ │ │ ├── NavLink.md
│ │ │ ├── NavLink.module.scss
│ │ │ ├── NavLink.spec.ts
│ │ │ ├── NavLink.tsx
│ │ │ └── NavLinkNative.tsx
│ │ ├── NavPanel
│ │ │ ├── NavPanel.md
│ │ │ ├── NavPanel.module.scss
│ │ │ ├── NavPanel.spec.ts
│ │ │ ├── NavPanel.tsx
│ │ │ └── NavPanelNative.tsx
│ │ ├── NestedApp
│ │ │ ├── AppWithCodeView.module.scss
│ │ │ ├── AppWithCodeView.tsx
│ │ │ ├── AppWithCodeViewNative.tsx
│ │ │ ├── defaultProps.tsx
│ │ │ ├── logo.svg
│ │ │ ├── NestedApp.module.scss
│ │ │ ├── NestedApp.tsx
│ │ │ ├── NestedAppNative.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── utils.ts
│ │ ├── NoResult
│ │ │ ├── NoResult.md
│ │ │ ├── NoResult.module.scss
│ │ │ ├── NoResult.spec.ts
│ │ │ ├── NoResult.tsx
│ │ │ └── NoResultNative.tsx
│ │ ├── NumberBox
│ │ │ ├── numberbox-abstractions.ts
│ │ │ ├── NumberBox.md
│ │ │ ├── NumberBox.module.scss
│ │ │ ├── NumberBox.spec.ts
│ │ │ ├── NumberBox.tsx
│ │ │ └── NumberBoxNative.tsx
│ │ ├── Option
│ │ │ ├── Option.md
│ │ │ ├── Option.spec.ts
│ │ │ ├── Option.tsx
│ │ │ ├── OptionNative.tsx
│ │ │ └── OptionTypeProvider.tsx
│ │ ├── PageMetaTitle
│ │ │ ├── PageMetaTilteNative.tsx
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── PageMetaTitle.spec.ts
│ │ │ └── PageMetaTitle.tsx
│ │ ├── Pages
│ │ │ ├── Page.md
│ │ │ ├── Pages.md
│ │ │ ├── Pages.module.scss
│ │ │ ├── Pages.tsx
│ │ │ └── PagesNative.tsx
│ │ ├── Pagination
│ │ │ ├── Pagination.md
│ │ │ ├── Pagination.module.scss
│ │ │ ├── Pagination.spec.ts
│ │ │ ├── Pagination.tsx
│ │ │ └── PaginationNative.tsx
│ │ ├── PositionedContainer
│ │ │ ├── PositionedContainer.module.scss
│ │ │ ├── PositionedContainer.tsx
│ │ │ └── PositionedContainerNative.tsx
│ │ ├── ProfileMenu
│ │ │ ├── ProfileMenu.module.scss
│ │ │ └── ProfileMenu.tsx
│ │ ├── ProgressBar
│ │ │ ├── ProgressBar.md
│ │ │ ├── ProgressBar.module.scss
│ │ │ ├── ProgressBar.spec.ts
│ │ │ ├── ProgressBar.tsx
│ │ │ └── ProgressBarNative.tsx
│ │ ├── Queue
│ │ │ ├── Queue.md
│ │ │ ├── Queue.spec.ts
│ │ │ ├── Queue.tsx
│ │ │ ├── queueActions.ts
│ │ │ └── QueueNative.tsx
│ │ ├── RadioGroup
│ │ │ ├── RadioGroup.md
│ │ │ ├── RadioGroup.module.scss
│ │ │ ├── RadioGroup.spec.ts
│ │ │ ├── RadioGroup.tsx
│ │ │ ├── RadioGroupNative.tsx
│ │ │ ├── RadioItem.tsx
│ │ │ └── RadioItemNative.tsx
│ │ ├── RealTimeAdapter
│ │ │ ├── RealTimeAdapter.tsx
│ │ │ └── RealTimeAdapterNative.tsx
│ │ ├── Redirect
│ │ │ ├── Redirect.md
│ │ │ ├── Redirect.spec.ts
│ │ │ └── Redirect.tsx
│ │ ├── ResponsiveBar
│ │ │ ├── README.md
│ │ │ ├── ResponsiveBar.md
│ │ │ ├── ResponsiveBar.module.scss
│ │ │ ├── ResponsiveBar.spec.ts
│ │ │ ├── ResponsiveBar.tsx
│ │ │ └── ResponsiveBarNative.tsx
│ │ ├── Select
│ │ │ ├── HiddenOption.tsx
│ │ │ ├── OptionContext.ts
│ │ │ ├── Select.md
│ │ │ ├── Select.module.scss
│ │ │ ├── Select.spec.ts
│ │ │ ├── Select.tsx
│ │ │ ├── SelectContext.tsx
│ │ │ └── SelectNative.tsx
│ │ ├── SelectionStore
│ │ │ ├── SelectionStore.md
│ │ │ ├── SelectionStore.tsx
│ │ │ └── SelectionStoreNative.tsx
│ │ ├── Slider
│ │ │ ├── Slider.md
│ │ │ ├── Slider.module.scss
│ │ │ ├── Slider.spec.ts
│ │ │ ├── Slider.tsx
│ │ │ └── SliderNative.tsx
│ │ ├── Slot
│ │ │ ├── Slot.md
│ │ │ ├── Slot.spec.ts
│ │ │ └── Slot.ts
│ │ ├── SlotItem.tsx
│ │ ├── SpaceFiller
│ │ │ ├── SpaceFiller.md
│ │ │ ├── SpaceFiller.module.scss
│ │ │ ├── SpaceFiller.spec.ts
│ │ │ ├── SpaceFiller.tsx
│ │ │ └── SpaceFillerNative.tsx
│ │ ├── Spinner
│ │ │ ├── Spinner.md
│ │ │ ├── Spinner.module.scss
│ │ │ ├── Spinner.spec.ts
│ │ │ ├── Spinner.tsx
│ │ │ └── SpinnerNative.tsx
│ │ ├── Splitter
│ │ │ ├── HSplitter.md
│ │ │ ├── HSplitter.spec.ts
│ │ │ ├── Splitter.md
│ │ │ ├── Splitter.module.scss
│ │ │ ├── Splitter.spec.ts
│ │ │ ├── Splitter.tsx
│ │ │ ├── SplitterNative.tsx
│ │ │ ├── utils.ts
│ │ │ ├── VSplitter.md
│ │ │ └── VSplitter.spec.ts
│ │ ├── Stack
│ │ │ ├── CHStack.md
│ │ │ ├── CHStack.spec.ts
│ │ │ ├── CVStack.md
│ │ │ ├── CVStack.spec.ts
│ │ │ ├── HStack.md
│ │ │ ├── HStack.spec.ts
│ │ │ ├── Stack.md
│ │ │ ├── Stack.module.scss
│ │ │ ├── Stack.spec.ts
│ │ │ ├── Stack.tsx
│ │ │ ├── StackNative.tsx
│ │ │ ├── VStack.md
│ │ │ └── VStack.spec.ts
│ │ ├── StickyBox
│ │ │ ├── StickyBox.md
│ │ │ ├── StickyBox.module.scss
│ │ │ ├── StickyBox.tsx
│ │ │ └── StickyBoxNative.tsx
│ │ ├── Switch
│ │ │ ├── Switch.md
│ │ │ ├── Switch.spec.ts
│ │ │ └── Switch.tsx
│ │ ├── Table
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── react-table-config.d.ts
│ │ │ ├── Table.md
│ │ │ ├── Table.module.scss
│ │ │ ├── Table.spec.ts
│ │ │ ├── Table.tsx
│ │ │ ├── TableNative.tsx
│ │ │ └── useRowSelection.tsx
│ │ ├── TableOfContents
│ │ │ ├── TableOfContents.module.scss
│ │ │ ├── TableOfContents.spec.ts
│ │ │ ├── TableOfContents.tsx
│ │ │ └── TableOfContentsNative.tsx
│ │ ├── Tabs
│ │ │ ├── TabContext.tsx
│ │ │ ├── TabItem.md
│ │ │ ├── TabItem.tsx
│ │ │ ├── TabItemNative.tsx
│ │ │ ├── Tabs.md
│ │ │ ├── Tabs.module.scss
│ │ │ ├── Tabs.spec.ts
│ │ │ ├── Tabs.tsx
│ │ │ └── TabsNative.tsx
│ │ ├── Text
│ │ │ ├── Text.md
│ │ │ ├── Text.module.scss
│ │ │ ├── Text.spec.ts
│ │ │ ├── Text.tsx
│ │ │ └── TextNative.tsx
│ │ ├── TextArea
│ │ │ ├── TextArea.md
│ │ │ ├── TextArea.module.scss
│ │ │ ├── TextArea.spec.ts
│ │ │ ├── TextArea.tsx
│ │ │ ├── TextAreaNative.tsx
│ │ │ ├── TextAreaResizable.tsx
│ │ │ └── useComposedRef.ts
│ │ ├── TextBox
│ │ │ ├── TextBox.md
│ │ │ ├── TextBox.module.scss
│ │ │ ├── TextBox.spec.ts
│ │ │ ├── TextBox.tsx
│ │ │ └── TextBoxNative.tsx
│ │ ├── Theme
│ │ │ ├── NotificationToast.tsx
│ │ │ ├── Theme.md
│ │ │ ├── Theme.module.scss
│ │ │ ├── Theme.spec.ts
│ │ │ ├── Theme.tsx
│ │ │ └── ThemeNative.tsx
│ │ ├── TimeInput
│ │ │ ├── TimeInput.md
│ │ │ ├── TimeInput.module.scss
│ │ │ ├── TimeInput.spec.ts
│ │ │ ├── TimeInput.tsx
│ │ │ ├── TimeInputNative.tsx
│ │ │ └── utils.ts
│ │ ├── Timer
│ │ │ ├── Timer.md
│ │ │ ├── Timer.spec.ts
│ │ │ ├── Timer.tsx
│ │ │ └── TimerNative.tsx
│ │ ├── Toggle
│ │ │ ├── Toggle.module.scss
│ │ │ └── Toggle.tsx
│ │ ├── ToneChangerButton
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneChangerButton.spec.ts
│ │ │ └── ToneChangerButton.tsx
│ │ ├── ToneSwitch
│ │ │ ├── ToneSwitch.md
│ │ │ ├── ToneSwitch.module.scss
│ │ │ ├── ToneSwitch.spec.ts
│ │ │ ├── ToneSwitch.tsx
│ │ │ └── ToneSwitchNative.tsx
│ │ ├── Tooltip
│ │ │ ├── Tooltip.md
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.spec.ts
│ │ │ ├── Tooltip.tsx
│ │ │ └── TooltipNative.tsx
│ │ ├── Tree
│ │ │ ├── testData.ts
│ │ │ ├── Tree-dynamic.spec.ts
│ │ │ ├── Tree-icons.spec.ts
│ │ │ ├── Tree.md
│ │ │ ├── Tree.spec.ts
│ │ │ ├── TreeComponent.module.scss
│ │ │ ├── TreeComponent.tsx
│ │ │ └── TreeNative.tsx
│ │ ├── TreeDisplay
│ │ │ ├── TreeDisplay.md
│ │ │ ├── TreeDisplay.module.scss
│ │ │ ├── TreeDisplay.tsx
│ │ │ └── TreeDisplayNative.tsx
│ │ ├── ValidationSummary
│ │ │ ├── ValidationSummary.module.scss
│ │ │ └── ValidationSummary.tsx
│ │ └── VisuallyHidden.tsx
│ ├── components-core
│ │ ├── abstractions
│ │ │ ├── ComponentRenderer.ts
│ │ │ ├── LoaderRenderer.ts
│ │ │ ├── standalone.ts
│ │ │ └── treeAbstractions.ts
│ │ ├── action
│ │ │ ├── actions.ts
│ │ │ ├── APICall.tsx
│ │ │ ├── FileDownloadAction.tsx
│ │ │ ├── FileUploadAction.tsx
│ │ │ ├── NavigateAction.tsx
│ │ │ └── TimedAction.tsx
│ │ ├── ApiBoundComponent.tsx
│ │ ├── appContext
│ │ │ ├── date-functions.ts
│ │ │ ├── math-function.ts
│ │ │ └── misc-utils.ts
│ │ ├── AppContext.tsx
│ │ ├── behaviors
│ │ │ ├── Behavior.tsx
│ │ │ └── CoreBehaviors.tsx
│ │ ├── component-hooks.ts
│ │ ├── ComponentDecorator.tsx
│ │ ├── ComponentViewer.tsx
│ │ ├── CompoundComponent.tsx
│ │ ├── constants.ts
│ │ ├── DebugViewProvider.tsx
│ │ ├── descriptorHelper.ts
│ │ ├── devtools
│ │ │ ├── InspectorDialog.module.scss
│ │ │ ├── InspectorDialog.tsx
│ │ │ └── InspectorDialogVisibilityContext.tsx
│ │ ├── EngineError.ts
│ │ ├── event-handlers.ts
│ │ ├── InspectorButton.module.scss
│ │ ├── InspectorContext.tsx
│ │ ├── interception
│ │ │ ├── abstractions.ts
│ │ │ ├── ApiInterceptor.ts
│ │ │ ├── ApiInterceptorProvider.tsx
│ │ │ ├── apiInterceptorWorker.ts
│ │ │ ├── Backend.ts
│ │ │ ├── Errors.ts
│ │ │ ├── IndexedDb.ts
│ │ │ ├── initMock.ts
│ │ │ ├── InMemoryDb.ts
│ │ │ ├── ReadonlyCollection.ts
│ │ │ └── useApiInterceptorContext.tsx
│ │ ├── loader
│ │ │ ├── ApiLoader.tsx
│ │ │ ├── DataLoader.tsx
│ │ │ ├── ExternalDataLoader.tsx
│ │ │ ├── Loader.tsx
│ │ │ ├── MockLoaderRenderer.tsx
│ │ │ └── PageableLoader.tsx
│ │ ├── LoaderComponent.tsx
│ │ ├── markup-check.ts
│ │ ├── parts.ts
│ │ ├── renderers.ts
│ │ ├── rendering
│ │ │ ├── AppContent.tsx
│ │ │ ├── AppRoot.tsx
│ │ │ ├── AppWrapper.tsx
│ │ │ ├── buildProxy.ts
│ │ │ ├── collectFnVarDeps.ts
│ │ │ ├── ComponentAdapter.tsx
│ │ │ ├── ComponentWrapper.tsx
│ │ │ ├── Container.tsx
│ │ │ ├── containers.ts
│ │ │ ├── ContainerWrapper.tsx
│ │ │ ├── ErrorBoundary.module.scss
│ │ │ ├── ErrorBoundary.tsx
│ │ │ ├── InvalidComponent.module.scss
│ │ │ ├── InvalidComponent.tsx
│ │ │ ├── nodeUtils.ts
│ │ │ ├── reducer.ts
│ │ │ ├── renderChild.tsx
│ │ │ ├── StandaloneComponent.tsx
│ │ │ ├── StateContainer.tsx
│ │ │ ├── UnknownComponent.module.scss
│ │ │ ├── UnknownComponent.tsx
│ │ │ └── valueExtractor.ts
│ │ ├── reportEngineError.ts
│ │ ├── RestApiProxy.ts
│ │ ├── script-runner
│ │ │ ├── asyncProxy.ts
│ │ │ ├── AttributeValueParser.ts
│ │ │ ├── bannedFunctions.ts
│ │ │ ├── BindingTreeEvaluationContext.ts
│ │ │ ├── eval-tree-async.ts
│ │ │ ├── eval-tree-common.ts
│ │ │ ├── eval-tree-sync.ts
│ │ │ ├── ParameterParser.ts
│ │ │ ├── process-statement-async.ts
│ │ │ ├── process-statement-common.ts
│ │ │ ├── process-statement-sync.ts
│ │ │ ├── ScriptingSourceTree.ts
│ │ │ ├── simplify-expression.ts
│ │ │ ├── statement-queue.ts
│ │ │ └── visitors.ts
│ │ ├── StandaloneApp.tsx
│ │ ├── StandaloneExtensionManager.ts
│ │ ├── TableOfContentsContext.tsx
│ │ ├── theming
│ │ │ ├── _themes.scss
│ │ │ ├── component-layout-resolver.ts
│ │ │ ├── extendThemeUtils.ts
│ │ │ ├── hvar.ts
│ │ │ ├── layout-resolver.ts
│ │ │ ├── parse-layout-props.ts
│ │ │ ├── StyleContext.tsx
│ │ │ ├── StyleRegistry.ts
│ │ │ ├── ThemeContext.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── themes
│ │ │ │ ├── base-utils.ts
│ │ │ │ ├── palette.ts
│ │ │ │ ├── root.ts
│ │ │ │ ├── solid.ts
│ │ │ │ ├── theme-colors.ts
│ │ │ │ └── xmlui.ts
│ │ │ ├── themeVars.module.scss
│ │ │ ├── themeVars.ts
│ │ │ ├── transformThemeVars.ts
│ │ │ └── utils.ts
│ │ ├── utils
│ │ │ ├── actionUtils.ts
│ │ │ ├── audio-utils.ts
│ │ │ ├── base64-utils.ts
│ │ │ ├── compound-utils.ts
│ │ │ ├── css-utils.ts
│ │ │ ├── DataLoaderQueryKeyGenerator.ts
│ │ │ ├── date-utils.ts
│ │ │ ├── extractParam.ts
│ │ │ ├── hooks.tsx
│ │ │ ├── LruCache.ts
│ │ │ ├── mergeProps.ts
│ │ │ ├── misc.ts
│ │ │ ├── request-params.ts
│ │ │ ├── statementUtils.ts
│ │ │ └── treeUtils.ts
│ │ └── xmlui-parser.ts
│ ├── index-standalone.ts
│ ├── index.scss
│ ├── index.ts
│ ├── language-server
│ │ ├── server-common.ts
│ │ ├── server-web-worker.ts
│ │ ├── server.ts
│ │ ├── services
│ │ │ ├── common
│ │ │ │ ├── docs-generation.ts
│ │ │ │ ├── lsp-utils.ts
│ │ │ │ ├── metadata-utils.ts
│ │ │ │ └── syntax-node-utilities.ts
│ │ │ ├── completion.ts
│ │ │ ├── diagnostic.ts
│ │ │ ├── format.ts
│ │ │ └── hover.ts
│ │ └── xmlui-metadata-generated.js
│ ├── logging
│ │ ├── LoggerContext.tsx
│ │ ├── LoggerInitializer.tsx
│ │ ├── LoggerService.ts
│ │ └── xmlui.ts
│ ├── logo.svg
│ ├── parsers
│ │ ├── common
│ │ │ ├── GenericToken.ts
│ │ │ ├── InputStream.ts
│ │ │ └── utils.ts
│ │ ├── scripting
│ │ │ ├── code-behind-collect.ts
│ │ │ ├── Lexer.ts
│ │ │ ├── modules.ts
│ │ │ ├── Parser.ts
│ │ │ ├── ParserError.ts
│ │ │ ├── ScriptingNodeTypes.ts
│ │ │ ├── TokenTrait.ts
│ │ │ ├── TokenType.ts
│ │ │ └── tree-visitor.ts
│ │ ├── style-parser
│ │ │ ├── errors.ts
│ │ │ ├── source-tree.ts
│ │ │ ├── StyleInputStream.ts
│ │ │ ├── StyleLexer.ts
│ │ │ ├── StyleParser.ts
│ │ │ └── tokens.ts
│ │ └── xmlui-parser
│ │ ├── CharacterCodes.ts
│ │ ├── diagnostics.ts
│ │ ├── fileExtensions.ts
│ │ ├── index.ts
│ │ ├── lint.ts
│ │ ├── parser.ts
│ │ ├── ParserError.ts
│ │ ├── scanner.ts
│ │ ├── syntax-kind.ts
│ │ ├── syntax-node.ts
│ │ ├── transform.ts
│ │ ├── utils.ts
│ │ ├── xmlui-serializer.ts
│ │ └── xmlui-tree.ts
│ ├── react-app-env.d.ts
│ ├── syntax
│ │ ├── monaco
│ │ │ ├── grammar.monacoLanguage.ts
│ │ │ ├── index.ts
│ │ │ ├── xmlui-dark.ts
│ │ │ ├── xmlui-light.ts
│ │ │ └── xmluiscript.monacoLanguage.ts
│ │ └── textMate
│ │ ├── index.ts
│ │ ├── xmlui-dark.json
│ │ ├── xmlui-light.json
│ │ ├── xmlui.json
│ │ └── xmlui.tmLanguage.json
│ ├── testing
│ │ ├── assertions.ts
│ │ ├── component-test-helpers.ts
│ │ ├── ComponentDrivers.ts
│ │ ├── drivers
│ │ │ ├── DateInputDriver.ts
│ │ │ ├── index.ts
│ │ │ ├── ModalDialogDriver.ts
│ │ │ ├── NumberBoxDriver.ts
│ │ │ ├── TextBoxDriver.ts
│ │ │ ├── TimeInputDriver.ts
│ │ │ ├── TimerDriver.ts
│ │ │ └── TreeDriver.ts
│ │ ├── fixtures.ts
│ │ ├── index.ts
│ │ ├── infrastructure
│ │ │ ├── index.html
│ │ │ ├── main.tsx
│ │ │ ├── public
│ │ │ │ ├── mockServiceWorker.js
│ │ │ │ ├── resources
│ │ │ │ │ ├── bell.svg
│ │ │ │ │ ├── box.svg
│ │ │ │ │ ├── doc.svg
│ │ │ │ │ ├── eye.svg
│ │ │ │ │ ├── flower-640x480.jpg
│ │ │ │ │ ├── sun.svg
│ │ │ │ │ ├── test-image-100x100.jpg
│ │ │ │ │ └── txt.svg
│ │ │ │ └── serve.json
│ │ │ └── TestBed.tsx
│ │ └── themed-app-test-helpers.ts
│ └── vite-env.d.ts
├── tests
│ ├── components
│ │ ├── CodeBlock
│ │ │ └── hightlight-code.test.ts
│ │ ├── playground-pattern.test.ts
│ │ └── Tree
│ │ └── Tree-states.test.ts
│ ├── components-core
│ │ ├── abstractions
│ │ │ └── treeAbstractions.test.ts
│ │ ├── container
│ │ │ └── buildProxy.test.ts
│ │ ├── interception
│ │ │ ├── orderBy.test.ts
│ │ │ ├── ReadOnlyCollection.test.ts
│ │ │ └── request-param-converter.test.ts
│ │ ├── scripts-runner
│ │ │ ├── AttributeValueParser.test.ts
│ │ │ ├── eval-tree-arrow-async.test.ts
│ │ │ ├── eval-tree-arrow.test.ts
│ │ │ ├── eval-tree-func-decl-async.test.ts
│ │ │ ├── eval-tree-func-decl.test.ts
│ │ │ ├── eval-tree-pre-post.test.ts
│ │ │ ├── eval-tree-regression.test.ts
│ │ │ ├── eval-tree.test.ts
│ │ │ ├── function-proxy.test.ts
│ │ │ ├── parser-regression.test.ts
│ │ │ ├── process-event.test.ts
│ │ │ ├── process-function.test.ts
│ │ │ ├── process-implicit-context.test.ts
│ │ │ ├── process-statement-asgn.test.ts
│ │ │ ├── process-statement-destruct.test.ts
│ │ │ ├── process-statement-regs.test.ts
│ │ │ ├── process-statement-sync.test.ts
│ │ │ ├── process-statement.test.ts
│ │ │ ├── process-switch-sync.test.ts
│ │ │ ├── process-switch.test.ts
│ │ │ ├── process-try-sync.test.ts
│ │ │ ├── process-try.test.ts
│ │ │ └── test-helpers.ts
│ │ ├── test-metadata-handler.ts
│ │ ├── theming
│ │ │ ├── border-segments.test.ts
│ │ │ ├── component-layout.resolver.test.ts
│ │ │ ├── layout-property-parser.test.ts
│ │ │ ├── layout-resolver.test.ts
│ │ │ ├── layout-resolver2.test.ts
│ │ │ ├── layout-vp-override.test.ts
│ │ │ └── padding-segments.test.ts
│ │ └── utils
│ │ ├── date-utils.test.ts
│ │ ├── format-human-elapsed-time.test.ts
│ │ └── LruCache.test.ts
│ ├── language-server
│ │ ├── completion.test.ts
│ │ ├── format.test.ts
│ │ ├── hover.test.ts
│ │ └── mockData.ts
│ └── parsers
│ ├── common
│ │ └── input-stream.test.ts
│ ├── markdown
│ │ └── parse-binding-expression.test.ts
│ ├── parameter-parser.test.ts
│ ├── paremeter-parser.test.ts
│ ├── scripting
│ │ ├── eval-tree-arrow.test.ts
│ │ ├── eval-tree-pre-post.test.ts
│ │ ├── eval-tree.test.ts
│ │ ├── function-proxy.test.ts
│ │ ├── lexer-literals.test.ts
│ │ ├── lexer-misc.test.ts
│ │ ├── module-parse.test.ts
│ │ ├── parser-arrow.test.ts
│ │ ├── parser-assignments.test.ts
│ │ ├── parser-binary.test.ts
│ │ ├── parser-destructuring.test.ts
│ │ ├── parser-errors.test.ts
│ │ ├── parser-expressions.test.ts
│ │ ├── parser-function.test.ts
│ │ ├── parser-literals.test.ts
│ │ ├── parser-primary.test.ts
│ │ ├── parser-regex.test.ts
│ │ ├── parser-statements.test.ts
│ │ ├── parser-unary.test.ts
│ │ ├── process-event.test.ts
│ │ ├── process-implicit-context.test.ts
│ │ ├── process-statement-asgn.test.ts
│ │ ├── process-statement-destruct.test.ts
│ │ ├── process-statement-regs.test.ts
│ │ ├── process-statement-sync.test.ts
│ │ ├── process-statement.test.ts
│ │ ├── process-switch-sync.test.ts
│ │ ├── process-switch.test.ts
│ │ ├── process-try-sync.test.ts
│ │ ├── process-try.test.ts
│ │ ├── simplify-expression.test.ts
│ │ ├── statement-hooks.test.ts
│ │ └── test-helpers.ts
│ ├── style-parser
│ │ ├── generateHvarChain.test.ts
│ │ ├── parseHVar.test.ts
│ │ ├── parser.test.ts
│ │ └── tokens.test.ts
│ └── xmlui
│ ├── lint.test.ts
│ ├── parser.test.ts
│ ├── scanner.test.ts
│ ├── transform.attr.test.ts
│ ├── transform.circular.test.ts
│ ├── transform.element.test.ts
│ ├── transform.errors.test.ts
│ ├── transform.escape.test.ts
│ ├── transform.regression.test.ts
│ ├── transform.script.test.ts
│ ├── transform.test.ts
│ └── xmlui.ts
├── tests-e2e
│ ├── api-bound-component-regression.spec.ts
│ ├── api-call-as-extracted-component.spec.ts
│ ├── assign-to-object-or-array-regression.spec.ts
│ ├── binding-regression.spec.ts
│ ├── children-as-template-context-vars.spec.ts
│ ├── compound-component.spec.ts
│ ├── context-vars-regression.spec.ts
│ ├── data-bindings.spec.ts
│ ├── datasource-and-api-usage-in-var.spec.ts
│ ├── datasource-direct-binding.spec.ts
│ ├── datasource-onLoaded-regression.spec.ts
│ ├── modify-array-item-regression.spec.ts
│ ├── namespaces.spec.ts
│ ├── push-to-array-regression.spec.ts
│ ├── screen-breakpoints.spec.ts
│ ├── scripting.spec.ts
│ ├── state-scope-in-pages.spec.ts
│ └── state-var-scopes.spec.ts
├── tsconfig.json
├── tsdown.config.ts
├── vite.config.ts
└── vitest.config.ts
```
# Files
--------------------------------------------------------------------------------
/docs/public/pages/refactoring.md:
--------------------------------------------------------------------------------
```markdown
1 | # Refactoring XMLUI: Extract Modal Components
2 |
3 | When working with XMLUI applications, you may find yourself with complex components that handle multiple modals and interactions. This guide demonstrates how to factor out XMLUI code into reusable user-defined components that contain modals, improving code organization and maintainability.
4 |
5 | ## The Pattern: Modal Components with Event Communication
6 |
7 | The key pattern involves:
8 |
9 | 1. **Creating user-defined components** that encapsulate modal logic
10 | 2. **Using props** to pass data from parent to child components
11 | 3. **Using custom events** to communicate back from child to parent
12 | 4. **Conditional rendering** to control when components are displayed
13 |
14 | ## Example: Extracting a User Modal Component
15 |
16 | ### Before: Monolithic Component
17 |
18 | ```xmlui
19 | <App var.modalOpenForUserId="{null}">
20 | <DataSource id="users" url="/api/users"/>
21 |
22 | <!-- Large table with inline modal logic -->
23 | <ModalDialog id="all_users" title="All users">
24 | <Table data="{users.value}">
25 | <Column bindTo="name" header="name"/>
26 | <Column header="Edit">
27 | <Button icon="pen">
28 | <event name="click">
29 | modalOpenForUserId = $item.id
30 | </event>
31 | </Button>
32 | </Column>
33 | </Table>
34 | </ModalDialog>
35 |
36 | <!-- User editing modal mixed in with main component -->
37 | <ModalDialog
38 | when="{modalOpenForUserId}"
39 | title="User {modalOpenForUserId}"
40 | onClose="{modalOpenForUserId = null}"
41 | >
42 | <DataSource id="user" url="/api/users/{modalOpenForUserId}"/>
43 | {JSON.stringify(user.value)}
44 | </ModalDialog>
45 |
46 | <Button onClick="{all_users.open()}" label="Show all users" />
47 | </App>
48 | ```
49 |
50 | ### After: Refactored with Component Extraction
51 |
52 | **Main.xmlui** (Parent Component):
53 |
54 | ```xmlui
55 | <App var.modalOpenForUserId="{null}">
56 | <DataSource id="users" url="/api/users"/>
57 |
58 | <ModalDialog id="all_users" title="All users">
59 | <Table data="{users.value}">
60 | <Column bindTo="name" header="name"/>
61 | <Column header="Edit">
62 | <Button icon="pen">
63 | <event name="click">
64 | modalOpenForUserId = $item.id
65 | </event>
66 | </Button>
67 | </Column>
68 | </Table>
69 | </ModalDialog>
70 |
71 | <Button onClick="{all_users.open()}" label="Show all users" />
72 |
73 | <!-- Clean separation: User component handles its own modal -->
74 | <User
75 | when="{modalOpenForUserId}"
76 | userId="{modalOpenForUserId}"
77 | onClose="{modalOpenForUserId=null}"
78 | />
79 | </App>
80 | ```
81 |
82 | **components/User.xmlui** (Extracted Component):
83 |
84 | ```xmlui
85 | <Component name="User">
86 | <DataSource id="user" url="/api/users/{$props.userId}"/>
87 |
88 | <ModalDialog
89 | when="{user.loaded}"
90 | title="User {$props.userId}"
91 | onClose="{emitEvent('close')}"
92 | >
93 | {JSON.stringify(user.value)}
94 | </ModalDialog>
95 | </Component>
96 | ```
97 |
98 | ## Key Concepts Explained
99 |
100 | ### 1. Props for Data Flow (Parent → Child)
101 |
102 | ```xmlui
103 | <!-- Parent passes data via attributes -->
104 | <User userId="{selectedUserId}" userRole="{currentRole}" />
105 | ```
106 |
107 | ```xmlui
108 | <!-- Child accesses via $props -->
109 | <Component name="User">
110 | <DataSource id="user" url="/api/users/{$props.userId}"/>
111 | <Text>Role: {$props.userRole}</Text>
112 | </Component>
113 | ```
114 |
115 | ### 2. Custom Events for Communication (Child → Parent)
116 |
117 | ```xmlui
118 | <!-- Parent listens for custom events -->
119 | <User onClose="{modalOpenForUserId=null}" onSave="{refreshUserList()}" />
120 | ```
121 |
122 | ```xmlui
123 | <!-- Child emits custom events -->
124 | <Component name="User">
125 | <Button onClick="{emitEvent('save')}" label="Save" />
126 | <Button onClick="{emitEvent('close')}" label="Cancel" />
127 | </Component>
128 | ```
129 |
130 | **Important**: Event handlers like `onClose` are **not callback props**. They are event listeners that respond to custom events emitted by the child component using `emitEvent()`.
131 |
132 | ### 3. Conditional Rendering
133 |
134 | ```xmlui
135 | <!-- Only render when needed -->
136 | <User when="{modalOpenForUserId}" userId="{modalOpenForUserId}" />
137 | ```
138 |
139 | ```xmlui
140 | <!-- Wait for data before showing modal -->
141 | <ModalDialog when="{user.loaded}" title="User Details">
142 | <!-- Modal content -->
143 | </ModalDialog>
144 | ```
145 |
146 | ## Advanced Example: Edit/Add Modal Component
147 |
148 | This pattern works well for components that handle both adding and editing:
149 |
150 | **ProductModal.xmlui**:
151 |
152 | ```xmlui
153 | <Component name="ProductModal">
154 | <!-- Fetch complete product data when editing -->
155 | <DataSource
156 | id="productDetails"
157 | url="/api/products/{$props.productId}"
158 | when="{$props.mode === 'edit' && $props.productId}"
159 | />
160 |
161 | <ModalDialog
162 | title="{$props.mode === 'edit' ? 'Edit Product' : 'Add Product'}"
163 | when="{$props.mode === 'add' || productDetails.loaded}"
164 | onClose="{emitEvent('close')}"
165 | >
166 | <Form
167 | data="{$props.mode === 'edit' ? productDetails.value : $props.initialData}"
168 | submitUrl="{$props.mode === 'edit' ? '/api/products/' + $props.productId : '/api/products'}"
169 | submitMethod="{$props.mode === 'edit' ? 'put' : 'post'}"
170 | onSuccess="{emitEvent('saved', $result)}"
171 | >
172 | <FormItem bindTo="name" label="Product Name" required="true" />
173 | <FormItem bindTo="price" label="Price" type="number" required="true" />
174 | <FormItem bindTo="description" label="Description" type="textarea" />
175 | <FormItem bindTo="category" label="Category" />
176 | <FormItem bindTo="inStock" label="In Stock" type="checkbox" />
177 | </Form>
178 | </ModalDialog>
179 | </Component>
180 | ```
181 |
182 | **Usage**:
183 |
184 | ```xmlui
185 | <!-- Add mode -->
186 | <ProductModal
187 | when="{showAddModal}"
188 | mode="add"
189 | initialData="{{}}"
190 | onClose="{showAddModal=false}"
191 | onSaved="{handleProductSaved}"
192 | />
193 |
194 | <!-- Edit mode - pass only the product ID, let the modal fetch complete data -->
195 | <ProductModal
196 | when="{editingProductId}"
197 | mode="edit"
198 | productId="{editingProductId}"
199 | onClose="{editingProductId=null}"
200 | onSaved="{handleProductSaved}"
201 | />
202 | ```
203 |
204 | **Parent component example**:
205 |
206 | ```xmlui
207 | <App var.editingProductId="{null}" var.showAddModal="{false}">
208 | <!-- Minimal product listing - only shows essential fields -->
209 | <DataSource id="products" url="/api/products" />
210 |
211 | <Table data="{products.value}">
212 | <Column bindTo="name" header="Product Name" />
213 | <Column bindTo="price" header="Price" />
214 | <Column header="Actions">
215 | <Button
216 | label="Edit"
217 | onClick="{editingProductId = $item.id}"
218 | />
219 | </Column>
220 | </Table>
221 |
222 | <Button
223 | label="Add Product"
224 | onClick="{showAddModal = true}"
225 | />
226 |
227 | <!-- Modal components handle their own data fetching -->
228 | <ProductModal
229 | when="{showAddModal}"
230 | mode="add"
231 | initialData="{{}}"
232 | onClose="{showAddModal=false}"
233 | onSaved="{products.refresh()}"
234 | />
235 |
236 | <ProductModal
237 | when="{editingProductId}"
238 | mode="edit"
239 | productId="{editingProductId}"
240 | onClose="{editingProductId=null}"
241 | onSaved="{products.refresh()}"
242 | />
243 | </App>
244 | ```
245 |
246 | ## Benefits of This Pattern
247 |
248 | 1. **Separation of Concerns**: Each component has a single responsibility
249 | 2. **Reusability**: Modal components can be used in multiple places
250 | 3. **Maintainability**: Easier to modify and test individual components
251 | 4. **Readability**: Parent component focuses on coordination, not implementation details
252 | 5. **Data Flow Clarity**: Props flow down, events flow up
253 |
254 | ## When to Extract Modal Components
255 |
256 | Consider extracting when:
257 |
258 | - Modal logic becomes complex (validation, multiple steps, etc.)
259 | - The same modal is used in multiple places
260 | - Parent component becomes difficult to read
261 | - Modal needs its own state management
262 | - You want to unit test modal behavior separately
263 |
264 | ## Common Pitfalls
265 |
266 | 1. **Don't forget `when` conditions**: Always use conditional rendering to avoid unnecessary data fetching
267 | 2. **Remember `emitEvent()` for communication**: Child components cannot directly modify parent variables
268 | 3. **Use `$props` prefix**: Access passed data with `$props.propertyName`
269 | 4. **Handle loading states**: Wait for data to load before showing modals (`when="{data.loaded}"`)
270 |
271 | This refactoring pattern helps create maintainable, reusable XMLUI applications with clear data flow and component boundaries.
272 |
```
--------------------------------------------------------------------------------
/xmlui/src/components-core/loader/Loader.tsx:
--------------------------------------------------------------------------------
```typescript
1 | import { useCallback, useEffect, useMemo } from "react";
2 | import { useQuery, type QueryFunction } from "@tanstack/react-query";
3 | import { createDraft, finishDraft } from "immer";
4 |
5 | import type { RegisterComponentApiFn } from "../../abstractions/RendererDefs";
6 | import type {
7 | LoaderErrorFn,
8 | LoaderInProgressChangedFn,
9 | LoaderLoadedFn,
10 | TransformResultFn,
11 | } from "../abstractions/LoaderRenderer";
12 | import type { ComponentDef } from "../../abstractions/ComponentDefs";
13 | import type { ContainerState } from "../rendering/ContainerWrapper";
14 | import { extractParam } from "../utils/extractParam";
15 | import { useAppContext } from "../AppContext";
16 | import { useIsomorphicLayoutEffect, usePrevious } from "../utils/hooks";
17 | import { useApiInterceptorContext } from "../interception/useApiInterceptorContext";
18 |
19 | /**
20 | * The properties of the Loader component
21 | */
22 | type LoaderProps = {
23 | state: ContainerState;
24 | loader: ComponentDef;
25 | loaderFn: LoaderFunction;
26 | queryId?: readonly any[];
27 | pollIntervalInSeconds?: number;
28 | registerComponentApi?: RegisterComponentApiFn;
29 | onLoaded?: (...args: any[]) => void;
30 | loaderInProgressChanged: LoaderInProgressChangedFn;
31 | loaderIsRefetchingChanged: LoaderInProgressChangedFn;
32 | loaderLoaded: LoaderLoadedFn;
33 | loaderError: LoaderErrorFn;
34 | transformResult?: TransformResultFn;
35 | structuralSharing?: boolean;
36 | };
37 |
38 | /**
39 | * This function represents the loader's job.
40 | */
41 | type LoaderFunction = (abortSignal?: AbortSignal) => Promise<any>;
42 |
43 | export function Loader({
44 | state,
45 | loader,
46 | loaderFn,
47 | queryId,
48 | pollIntervalInSeconds,
49 | registerComponentApi,
50 | onLoaded,
51 | loaderLoaded,
52 | loaderInProgressChanged,
53 | loaderIsRefetchingChanged,
54 | loaderError,
55 | transformResult,
56 | structuralSharing = true,
57 | }: LoaderProps) {
58 | const { uid } = loader;
59 | const appContext = useAppContext();
60 | const { initialized } = useApiInterceptorContext();
61 |
62 | // --- Rely on react-query to decide when data fetching should use the cache or when is should fetch the data from
63 | // --- its data source.
64 | // --- data: The data obtained by the query
65 | // --- status: Query execution status
66 | // --- error: Error information about the current query error (in "error" state)
67 | // --- refetch: The function that can be used to re-fetch the data (because of data/state changes)
68 | const { data, status, isFetching, isLoading, error, refetch, isRefetching } = useQuery({
69 | queryKey: useMemo(
70 | () => (queryId ? queryId : [uid, extractParam(state, loader.props, appContext)]),
71 | [appContext, loader.props, queryId, state, uid],
72 | ),
73 | structuralSharing,
74 | //we pause the loaders if the apiInterceptor is not initialized (true when the app is not using mockApi)
75 | enabled: initialized,
76 | queryFn: useCallback<QueryFunction>(
77 | async ({ signal }) => {
78 | // console.log("[Loader queryFn] Starting to fetch data...");
79 | try {
80 | const newVar: any = await loaderFn(signal);
81 | //console.log("[Loader queryFn] Data received:", newVar);
82 | if (newVar === undefined) {
83 | //console.log("[Loader queryFn] Data is undefined, returning null");
84 | return null;
85 | }
86 | return newVar;
87 | } catch (error) {
88 | //console.error("[Loader queryFn] Error fetching data:", error);
89 | throw error;
90 | }
91 | },
92 | [loaderFn],
93 | ),
94 | select: useCallback(
95 | (data: any) => {
96 | // console.log("[Loader select] Data before transform:", data);
97 | // console.log("[Loader select] resultSelector:", loader.props.resultSelector);
98 | // console.log("[Loader select] transformResult function:", !!transformResult);
99 |
100 | let result = data;
101 | const resultSelector = loader.props.resultSelector;
102 | if (resultSelector) {
103 | //console.log("[Loader select] Applying resultSelector");
104 | result = extractParam(
105 | { $response: data },
106 | resultSelector.startsWith("{") ? resultSelector : `{$response.${resultSelector}}`,
107 | );
108 | //console.log("[Loader select] Result after resultSelector:", result);
109 | }
110 |
111 | const finalResult = transformResult ? transformResult(result) : result;
112 | //console.log("[Loader select] Final result:", finalResult);
113 | return finalResult;
114 | },
115 | [loader.props.resultSelector, transformResult],
116 | ),
117 | retry: false,
118 | });
119 |
120 | useEffect(() => {
121 | let intervalId: NodeJS.Timeout;
122 | if (pollIntervalInSeconds) {
123 | intervalId = setInterval(() => {
124 | void refetch();
125 | }, pollIntervalInSeconds * 1000);
126 | }
127 | return () => {
128 | if (intervalId) {
129 | clearInterval(intervalId);
130 | }
131 | };
132 | }, [pollIntervalInSeconds, refetch]);
133 |
134 | const prevData = usePrevious(data);
135 | const prevError = usePrevious(error);
136 |
137 | useIsomorphicLayoutEffect(() => {
138 | loaderInProgressChanged(isFetching || isLoading);
139 | }, [isLoading, isFetching, loaderInProgressChanged]);
140 |
141 | useIsomorphicLayoutEffect(() => {
142 | loaderIsRefetchingChanged(isRefetching);
143 | }, [isRefetching, loaderIsRefetchingChanged]);
144 |
145 | useIsomorphicLayoutEffect(() => {
146 | //console.log("isRefetching", isRefetching);
147 | //console.log("[Loader] useLayoutEffect status:", status);
148 | //console.log("[Loader] useLayoutEffect data:", data);
149 | //console.log("[Loader] useLayoutEffect prevData:", prevData);
150 | //console.log("[Loader] useLayoutEffect data !== prevData:", data !== prevData);
151 |
152 | if (status === "success" && data !== prevData) {
153 | //console.log("[Loader] Calling loaderLoaded with data:", data);
154 | loaderLoaded(data);
155 | //we do this to push the onLoaded callback to the next event loop.
156 | // It works, because useLayoutEffect will run synchronously after the render, and the onLoaded callback will have
157 | // access to the latest loader value
158 | setTimeout(() => {
159 | // console.log("[Loader] Calling onLoaded with data:", data);
160 | // console.log("[Loader] onLoaded function exists:", !!onLoaded);
161 | onLoaded?.(data, isRefetching);
162 | }, 0);
163 | } else if (status === "error" && error !== prevError) {
164 | // console.log("[Loader] Calling loaderError with error:", error);
165 | loaderError(error);
166 | }
167 | }, [data, error, loaderError, loaderLoaded, onLoaded, prevData, prevError, status, isRefetching]);
168 |
169 | useIsomorphicLayoutEffect(() => {
170 | return () => {
171 | loaderLoaded(undefined);
172 | };
173 | }, [loaderLoaded, uid]);
174 |
175 | useEffect(() => {
176 | registerComponentApi?.({
177 | refetch: (options) => {
178 | void refetch(options);
179 | },
180 | update: async (updater) => {
181 | const oldData = appContext.queryClient?.getQueryData(queryId!) as any[];
182 | if (!oldData) {
183 | //loader not loaded yet, we skip the update
184 | return;
185 | }
186 | const draft = createDraft(oldData);
187 | const ret = await updater(draft); //if it returns a value, we take it as the new data
188 | const newData = ret || finishDraft(draft);
189 |
190 | if (oldData.length !== newData.length) {
191 | throw new Error(
192 | "Use this method for update only. If you want to add or delete, call the addItem/deleteItem method.",
193 | );
194 | }
195 |
196 | appContext.queryClient?.setQueryData(queryId!, newData);
197 | },
198 | addItem: (element: any, indexToInsert?: number) => {
199 | const oldData = appContext.queryClient?.getQueryData(queryId!) as any[];
200 | const draft = createDraft(oldData);
201 | if (indexToInsert === undefined) {
202 | draft.push(element);
203 | } else {
204 | draft.splice(indexToInsert, 0, element);
205 | }
206 | const newData = finishDraft(draft);
207 | appContext.queryClient?.setQueryData(queryId!, newData);
208 | },
209 | getItems: () => {
210 | return data;
211 | },
212 | deleteItem: (element: any) => {
213 | throw new Error("not implemented");
214 | },
215 | });
216 | }, [appContext.queryClient, queryId, refetch, registerComponentApi, data]);
217 |
218 | return null;
219 | }
220 |
```
--------------------------------------------------------------------------------
/docs/public/resources/images/logos/xmlui7.svg:
--------------------------------------------------------------------------------
```
1 | <svg width="53" height="15" viewBox="0 0 53 15" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <path d="M0.78 14.66C0.593333 14.66 0.5 14.5133 0.5 14.22C0.5 14.0867 0.526667 13.9667 0.58 13.86C1.08667 12.7 1.80667 11.4 2.74 9.96L4.54 7.52L4.98 6.92L4.4 5.7C4.12 5.11333 3.92667 4.72667 3.82 4.54C3.60667 4.18 3.38667 3.86667 3.16 3.6C3.02667 3.44 2.86667 3.30667 2.68 3.2C2.50667 3.08 2.35333 2.96667 2.22 2.86C2.08667 2.75333 2.02 2.62 2.02 2.46C2.02 2.31333 2.05333 2.17333 2.12 2.04C2.2 1.90667 2.28667 1.84 2.38 1.84C2.43333 1.84 2.48 1.86 2.52 1.9C2.62667 1.98 2.76667 2.09333 2.94 2.24C3.11333 2.38667 3.31333 2.56667 3.54 2.78H3.58C4.06 3.34 4.52667 4.08667 4.98 5.02C5.04667 5.15333 5.12 5.32 5.2 5.52C5.29333 5.70667 5.40667 5.92667 5.54 6.18C5.58 6.14 5.60667 6.08 5.62 6C5.75333 5.81333 5.92667 5.56667 6.14 5.26C6.35333 4.95333 6.61333 4.59333 6.92 4.18C7.22667 3.75333 7.66667 3.11333 8.24 2.26C8.48 1.87333 8.78 1.41333 9.14 0.88C9.20667 0.773333 9.28 0.719999 9.36 0.719999C9.57333 0.719999 9.68 0.92 9.68 1.32C9.68 1.45333 9.64667 1.58667 9.58 1.72C9.5 1.85333 8.76 2.91333 7.36 4.9L6.08 6.74V6.78C6.02667 6.83333 5.96 6.92 5.88 7.04C5.90667 7.10667 5.93333 7.18 5.96 7.26C5.98667 7.34 6.01333 7.42667 6.04 7.52C6.13333 7.72 6.24667 7.99333 6.38 8.34C6.51333 8.67333 6.66667 9.08667 6.84 9.58C6.92 9.99333 7.08 10.5467 7.32 11.24C7.50667 11.56 7.70667 11.9133 7.92 12.3C8.13333 12.6867 8.36667 13.1133 8.62 13.58C8.64667 13.66 8.66 13.7267 8.66 13.78C8.66 14.14 8.52 14.32 8.24 14.32C8.14667 14.32 8.06 14.2733 7.98 14.18L7.46 13.48C7.39333 13.36 7.16 12.8267 6.76 11.88C6.70667 11.7467 6.65333 11.6067 6.6 11.46C6.56 11.3 6.52 11.1267 6.48 10.94C6.42667 10.7133 6.38 10.5267 6.34 10.38C6.31333 10.22 6.28667 10.1133 6.26 10.06L5.46 8.08C5.44667 8.06667 5.42667 8.03333 5.4 7.98C5.38667 7.91333 5.35333 7.82667 5.3 7.72L4.9 8.24C4.63333 8.58667 4.36 8.96 4.08 9.36C3.8 9.76 3.51333 10.18 3.22 10.62C3.06 10.8333 2.86 11.1267 2.62 11.5C2.38 11.8733 2.10667 12.32 1.8 12.84L1.06 14.42C0.98 14.58 0.886667 14.66 0.78 14.66ZM11.9355 14.64C11.6821 14.64 11.5821 14.42 11.6355 13.98L11.9355 12.28C11.9755 12.1067 12.0221 11.8933 12.0755 11.64C12.1421 11.3733 12.2088 11.0667 12.2755 10.72C12.3021 10.4133 12.3488 10.02 12.4155 9.54C12.4821 9.04667 12.5621 8.45333 12.6555 7.76L12.9755 5.86C13.0421 5.63333 13.1221 5.34 13.2155 4.98C13.3088 4.60667 13.4155 4.17333 13.5355 3.68C13.6155 3.28 13.7621 3.14 13.9755 3.26L13.8755 2.5C13.8088 2.26 13.7555 2.04 13.7155 1.84C13.6755 1.62667 13.6421 1.43333 13.6155 1.26C13.6021 1.22 13.5955 1.14667 13.5955 1.04C13.5955 0.719999 13.7021 0.559999 13.9155 0.559999C14.0221 0.559999 14.1021 0.646666 14.1555 0.819999C14.2088 0.993333 14.2621 1.19333 14.3155 1.42C14.3688 1.63333 14.4221 1.87333 14.4755 2.14C14.5555 2.51333 14.6155 2.96 14.6555 3.48C14.6821 3.78667 14.7021 4.04 14.7155 4.24C14.7421 4.44 14.7621 4.59333 14.7755 4.7C14.8421 5.16667 14.9021 5.56 14.9555 5.88C15.0088 6.18667 15.0621 6.42667 15.1155 6.6C15.2888 7.24 15.5955 7.8 16.0355 8.28L16.3355 8.66C16.9755 7.94 17.4555 7.38 17.7755 6.98C17.9221 6.80667 18.0955 6.58667 18.2955 6.32C18.5088 6.04 18.7621 5.70667 19.0555 5.32C19.2155 5.06667 19.5421 4.43333 20.0355 3.42L20.0555 3.4C20.0821 3.4 20.1421 3.28 20.2355 3.04C20.3421 2.73333 20.4488 2.52667 20.5555 2.42L20.4955 2.4C20.6421 2.29333 20.7621 2.24 20.8555 2.24C21.0155 2.24 21.1955 2.48667 21.3955 2.98C21.4888 3.18 21.5355 3.42 21.5355 3.7C21.5355 3.79333 21.5221 3.90667 21.4955 4.04C21.4821 4.17333 21.4621 4.32 21.4355 4.48C21.4088 4.64 21.3821 4.77333 21.3555 4.88C21.3421 4.98667 21.3355 5.06667 21.3355 5.12V5.14C21.3355 5.32667 21.3221 5.63333 21.2955 6.06C21.2688 6.48667 21.2288 7.03333 21.1755 7.7C21.1488 7.82 21.1155 8.11333 21.0755 8.58C21.0355 9.04667 20.9955 9.68667 20.9555 10.5C20.9421 10.7533 20.9288 10.9867 20.9155 11.2C20.9155 11.4 20.9155 11.5867 20.9155 11.76C20.9155 11.9333 20.9155 12.08 20.9155 12.2C20.9288 12.32 20.9421 12.42 20.9555 12.5L21.0955 13.34C21.1088 13.38 21.1155 13.4333 21.1155 13.5C21.1155 13.7667 20.9688 13.9 20.6755 13.9C20.5688 13.9 20.5021 13.86 20.4755 13.78C20.4488 13.6733 20.4221 13.54 20.3955 13.38C20.3688 13.22 20.3421 13.0267 20.3155 12.8C20.2755 11.9733 20.2555 11.34 20.2555 10.9C20.2555 10.6867 20.2755 10.3067 20.3155 9.76C20.3555 9.21333 20.4288 8.5 20.5355 7.62C20.5488 7.38 20.5621 7.06 20.5755 6.66C20.6021 6.24667 20.6355 5.75333 20.6755 5.18L20.8355 3.52C20.8221 3.49333 20.8088 3.47333 20.7955 3.46C20.7821 3.44667 20.7688 3.43333 20.7555 3.42C20.7288 3.42 20.6688 3.60667 20.5755 3.98H20.5555C20.3821 4.31333 20.2021 4.64667 20.0155 4.98C19.8421 5.3 19.6621 5.62 19.4755 5.94C19.1688 6.46 18.7221 7.05333 18.1355 7.72L17.2155 8.86C16.7888 9.36667 16.4955 9.62 16.3355 9.62C16.1755 9.62 16.0288 9.55333 15.8955 9.42L15.6355 9.16L15.5555 9.06C15.1421 8.55333 14.8155 7.98667 14.5755 7.36C14.5221 7.2 14.4688 7.02667 14.4155 6.84C14.3755 6.64 14.3421 6.43333 14.3155 6.22C14.2621 5.82 14.2088 5.42 14.1555 5.02C14.1021 4.60667 14.0755 4.36667 14.0755 4.3C14.0221 4.47333 13.9621 4.70667 13.8955 5C13.8421 5.29333 13.7688 5.64 13.6755 6.04C13.6355 6.28 13.5755 6.58667 13.4955 6.96C13.4555 7.13333 13.4221 7.3 13.3955 7.46C13.3688 7.60667 13.3421 7.73333 13.3155 7.84H13.2755C13.2488 8.14667 13.2021 8.55333 13.1355 9.06C13.0821 9.56667 13.0088 10.1733 12.9155 10.88C12.8755 11.0533 12.8221 11.2733 12.7555 11.54C12.7021 11.8067 12.6421 12.1267 12.5755 12.5C12.5221 12.8333 12.4221 13.3933 12.2755 14.18H12.2555C12.2155 14.4867 12.1088 14.64 11.9355 14.64ZM25.1309 14.42C24.9443 14.42 24.8576 14.34 24.8709 14.18C24.8176 14.1 24.7376 13.92 24.6309 13.64V13.66C24.6309 13.74 24.6243 13.7333 24.6109 13.64C24.5976 13.5333 24.5843 13.4 24.5709 13.24C24.5576 13.08 24.5509 12.9533 24.5509 12.86L24.7109 11.26C24.7776 10.7 24.8776 10.1333 25.0109 9.56L25.4109 7.98C25.5976 7.27333 25.8776 6.13333 26.2509 4.56C26.2776 4.29333 26.3243 3.94 26.3909 3.5C26.4709 3.06 26.5576 2.53333 26.6509 1.92C26.7043 1.58667 26.8509 1.42 27.0909 1.42C27.2909 1.42 27.3909 1.58667 27.3909 1.92V1.94C27.3909 2.23333 27.3376 2.62 27.2309 3.1C27.1376 3.56667 27.0376 4.13333 26.9309 4.8C26.8776 5.05333 26.8109 5.32667 26.7309 5.62C26.6643 5.9 26.5776 6.20667 26.4709 6.54C26.3643 6.88667 26.2709 7.2 26.1909 7.48C26.1109 7.76 26.0509 7.99333 26.0109 8.18C25.9309 8.5 25.8376 8.92 25.7309 9.44C25.6376 9.96 25.5243 10.58 25.3909 11.3C25.3509 11.6467 25.3176 11.9533 25.2909 12.22C25.2643 12.4733 25.2509 12.6867 25.2509 12.86C25.2509 12.94 25.2509 13.0133 25.2509 13.08C25.2643 13.1333 25.2776 13.18 25.2909 13.22C25.2909 13.1933 25.3576 13.3067 25.4909 13.56C25.6643 13.48 26.0176 13.4 26.5509 13.32L27.2309 13.34C27.4043 13.3533 27.5443 13.3667 27.6509 13.38C27.7709 13.3933 27.8576 13.4 27.9109 13.4H27.9709C28.1309 13.4 28.3309 13.36 28.5709 13.28C28.7043 13.2267 28.8176 13.1933 28.9109 13.18C29.0176 13.1533 29.0976 13.1333 29.1509 13.12C30.0576 13 30.6709 12.8267 30.9909 12.6C31.0976 12.5067 31.1976 12.46 31.2909 12.46C31.4243 12.46 31.4909 12.5733 31.4909 12.8C31.4909 13.2 31.3909 13.48 31.1909 13.64C31.1243 13.6933 31.0309 13.7467 30.9109 13.8C30.8043 13.84 30.6709 13.8733 30.5109 13.9L29.2109 14.18C28.9176 14.2333 28.6576 14.28 28.4309 14.32C28.2043 14.3733 28.0043 14.4 27.8309 14.4C27.7376 14.4 27.6376 14.3933 27.5309 14.38C27.4243 14.38 27.3043 14.3733 27.1709 14.36C26.8776 14.32 26.6576 14.3 26.5109 14.3C26.2176 14.2733 25.7576 14.3133 25.1309 14.42Z" fill="#DA020F"/>
3 | <path d="M42.5108 0.69363H45.3318V9.30839C45.3453 10.7846 44.8498 11.971 43.8455 12.8675C42.8411 13.7641 41.4963 14.2022 39.8111 14.182C38.0922 14.182 36.7609 13.7438 35.8171 12.8675C34.8802 11.9845 34.4117 10.7846 34.4117 9.26795V0.69363H37.2226V8.84328C37.2226 9.88136 37.4282 10.6363 37.8394 11.1082C38.2573 11.58 38.9314 11.816 39.8616 11.816C40.7986 11.816 41.4727 11.5767 41.8839 11.0981C42.3018 10.6195 42.5108 9.86114 42.5108 8.82305V0.69363ZM52.4057 14H49.5847V0.69363H52.4057V14Z" fill="black"/>
4 | </svg>
5 |
```
--------------------------------------------------------------------------------
/xmlui/src/components/CodeBlock/CodeBlock.spec.ts:
--------------------------------------------------------------------------------
```typescript
1 | import { expect, test } from "../../testing/fixtures";
2 |
3 | // =============================================================================
4 | // BASIC FUNCTIONALITY TESTS
5 | // =============================================================================
6 |
7 | test("component renders with basic props", async ({ initTestBed, createCodeBlockDriver }) => {
8 | await initTestBed(`<CodeBlock />`);
9 | const driver = await createCodeBlockDriver();
10 | await expect(driver.component).toBeVisible();
11 | });
12 |
13 | test("component renders with Text content", async ({ initTestBed, createCodeBlockDriver }) => {
14 | await initTestBed(`
15 | <CodeBlock>
16 | <Text variant="codefence">const hello = "world";</Text>
17 | </CodeBlock>
18 | `);
19 | const driver = await createCodeBlockDriver();
20 | await expect(driver.component).toBeVisible();
21 | await expect(driver.getContent()).toContainText("const hello = \"world\";");
22 | });
23 |
24 | test("component renders with children content", async ({ initTestBed, createCodeBlockDriver }) => {
25 | await initTestBed(`
26 | <CodeBlock>
27 | <pre><code>function test() { return 42; }</code></pre>
28 | </CodeBlock>
29 | `);
30 | const driver = await createCodeBlockDriver();
31 | await expect(driver.component).toBeVisible();
32 | await expect(driver.getContent()).toContainText("function test() { return 42; }");
33 | });
34 |
35 | // =============================================================================
36 | // ACCESSIBILITY TESTS
37 | // =============================================================================
38 |
39 | test("component has proper semantic structure", async ({ initTestBed, createCodeBlockDriver }) => {
40 | await initTestBed(`
41 | <CodeBlock>
42 | <Text variant="codefence">const x = 1;</Text>
43 | </CodeBlock>
44 | `);
45 | const driver = await createCodeBlockDriver();
46 | await expect(driver.component).toBeVisible();
47 |
48 | // CodeBlock should be identifiable as a code container
49 | await expect(driver.component).toHaveClass(/codeBlock/);
50 | });
51 |
52 | test("component content is accessible to screen readers", async ({ initTestBed, createCodeBlockDriver }) => {
53 | await initTestBed(`
54 | <CodeBlock>
55 | <Text variant="codefence">function accessible() { return true; }</Text>
56 | </CodeBlock>
57 | `);
58 | const driver = await createCodeBlockDriver();
59 |
60 | // Code content should be readable
61 | const codeText = await driver.getCodeText();
62 | expect(codeText).toContain("function accessible() { return true; }");
63 | });
64 |
65 | // =============================================================================
66 | // VISUAL STATE TESTS
67 | // =============================================================================
68 |
69 | test("component applies theme variables correctly", async ({ initTestBed, createCodeBlockDriver }) => {
70 | await initTestBed(`<CodeBlock />`, {
71 | testThemeVars: {
72 | "backgroundColor-CodeBlock": "rgb(255, 0, 0)",
73 | "borderRadius-CodeBlock": "8px",
74 | },
75 | });
76 | const driver = await createCodeBlockDriver();
77 | await expect(driver.component).toHaveCSS("background-color", "rgb(255, 0, 0)");
78 | await expect(driver.component).toHaveCSS("border-radius", "8px");
79 | });
80 |
81 | // =============================================================================
82 | // EDGE CASE TESTS
83 | // =============================================================================
84 |
85 | test("component handles null and undefined props gracefully", async ({ initTestBed, createCodeBlockDriver }) => {
86 | await initTestBed(`<CodeBlock/>`);
87 | const driver = await createCodeBlockDriver();
88 | await expect(driver.component).toBeVisible();
89 | });
90 |
91 | test("component handles empty content", async ({ initTestBed, createCodeBlockDriver }) => {
92 | await initTestBed(`<CodeBlock></CodeBlock>`);
93 | const driver = await createCodeBlockDriver();
94 | await expect(driver.component).toBeVisible();
95 | await expect(driver.getContent()).toBeVisible();
96 | });
97 |
98 | test("component handles special characters in code", async ({ initTestBed, createCodeBlockDriver }) => {
99 | await initTestBed(`
100 | <CodeBlock>
101 | <Text variant="codefence">const emoji = "🚀"; const unicode = "émojis"; const quotes = '"test"';</Text>
102 | </CodeBlock>
103 | `);
104 | const driver = await createCodeBlockDriver();
105 | await expect(driver.component).toBeVisible();
106 | await expect(driver.getContent()).toContainText('const emoji = "🚀"');
107 | await expect(driver.getContent()).toContainText("émojis");
108 | });
109 |
110 | test("component handles very long code content", async ({ initTestBed, createCodeBlockDriver }) => {
111 | const longCode = "const veryLongVariableName = ".repeat(100) + '"end";';
112 | await initTestBed(`
113 | <CodeBlock>
114 | <Text variant="codefence">${longCode}</Text>
115 | </CodeBlock>
116 | `);
117 | const driver = await createCodeBlockDriver();
118 | await expect(driver.component).toBeVisible();
119 | await expect(driver.getContent()).toContainText("end");
120 | });
121 |
122 | test("component handles invalid meta prop gracefully", async ({ initTestBed, createCodeBlockDriver }) => {
123 | await initTestBed(`
124 | <CodeBlock meta="invalid">
125 | <Text variant="codefence">test code</Text>
126 | </CodeBlock>
127 | `);
128 | const driver = await createCodeBlockDriver();
129 | await expect(driver.component).toBeVisible();
130 | });
131 |
132 | // =============================================================================
133 | // INTEGRATION TESTS
134 | // =============================================================================
135 |
136 | test("component works correctly in different layout contexts", async ({ initTestBed, createCodeBlockDriver }) => {
137 | await initTestBed(`
138 | <VStack>
139 | <Text>Code example:</Text>
140 | <CodeBlock>
141 | <Text variant="codefence">const layout = 'test';</Text>
142 | </CodeBlock>
143 | <Text>End of example</Text>
144 | </VStack>
145 | `);
146 | const driver = await createCodeBlockDriver();
147 | await expect(driver.component).toBeVisible();
148 | await expect(driver.getContent()).toContainText("const layout = 'test';");
149 | });
150 |
151 | test("component handles multiline code content", async ({ initTestBed, createCodeBlockDriver }) => {
152 | await initTestBed(`
153 | <CodeBlock>
154 | <Text variant="codefence">function example() {
155 | return "multiline test";
156 | }</Text>
157 | </CodeBlock>
158 | `);
159 | const driver = await createCodeBlockDriver();
160 |
161 | await expect(driver.component).toBeVisible();
162 | await expect(driver.getContent()).toContainText("function example()");
163 | await expect(driver.getContent()).toContainText("return \"multiline test\"");
164 | });
165 |
166 | test("component applies global CSS class correctly", async ({ initTestBed, createCodeBlockDriver }) => {
167 | await initTestBed(`<CodeBlock />`);
168 | const driver = await createCodeBlockDriver();
169 |
170 | await expect(driver.component).toHaveClass(/global-codeBlock/);
171 | });
172 |
173 | test("component maintains consistent styling across themes", async ({ initTestBed, createCodeBlockDriver }) => {
174 | // Test light theme
175 | await initTestBed(`<CodeBlock />`, {
176 | testThemeVars: {
177 | "backgroundColor-CodeBlock": "rgb(248, 249, 250)",
178 | "border-CodeBlock": "1px solid rgb(208, 215, 222)",
179 | },
180 | });
181 | let driver = await createCodeBlockDriver();
182 | await expect(driver.component).toHaveCSS("background-color", "rgb(248, 249, 250)");
183 |
184 | // Test dark theme
185 | await initTestBed(`<CodeBlock />`, {
186 | testThemeVars: {
187 | "backgroundColor-CodeBlock": "rgb(22, 27, 34)",
188 | "border-CodeBlock": "1px solid rgb(48, 54, 61)",
189 | },
190 | });
191 | driver = await createCodeBlockDriver();
192 | await expect(driver.component).toHaveCSS("background-color", "rgb(22, 27, 34)");
193 | });
194 |
195 | // --- Smoke Tests (maintaining existing)
196 |
197 | test.describe("smoke tests", { tag: "@smoke" }, () => {
198 | test("component renders", async ({ initTestBed, createCodeBlockDriver }) => {
199 | await initTestBed(`<CodeBlock />`);
200 | await expect((await createCodeBlockDriver()).component).toBeAttached();
201 | });
202 |
203 | test("component with Text codefence renders", async ({ initTestBed, createCodeBlockDriver }) => {
204 | await initTestBed(`
205 | <CodeBlock>
206 | <Text variant="codefence">
207 | This is a test
208 | </Text>
209 | </CodeBlock>
210 | `);
211 | await expect((await createCodeBlockDriver()).component).toBeAttached();
212 | });
213 | });
214 |
```
--------------------------------------------------------------------------------
/docs/content/components/ExpandableItem.md:
--------------------------------------------------------------------------------
```markdown
1 | # ExpandableItem [#expandableitem]
2 |
3 | `ExpandableItem` creates expandable/collapsible section, similar to the HTML details disclosure element. When the user clicks on the `summary` the content expands or collapses.
4 |
5 | ## Properties [#properties]
6 |
7 | ### `enabled` (default: true) [#enabled-default-true]
8 |
9 | When true, the expandable item can be opened and closed. When false, it cannot be toggled.
10 |
11 | ### `iconCollapsed` (default: "chevronright") [#iconcollapsed-default-chevronright]
12 |
13 | The icon to display when the item is collapsed.
14 |
15 | ### `iconExpanded` (default: "chevrondown") [#iconexpanded-default-chevrondown]
16 |
17 | The icon to display when the item is expanded.
18 |
19 | ### `iconPosition` (default: "end") [#iconposition-default-end]
20 |
21 | Determines the position of the icon (start or end).
22 |
23 | Available values:
24 |
25 | | Value | Description |
26 | | --- | --- |
27 | | `start` | The icon will appear at the start (left side when the left-to-right direction is set) |
28 | | `end` | The icon will appear at the end (right side when the left-to-right direction is set) **(default)** |
29 |
30 | ### `initiallyExpanded` (default: false) [#initiallyexpanded-default-false]
31 |
32 | Determines if the component is initially expanded when rendered.
33 |
34 | ### `summary` [#summary]
35 |
36 | The summary content that is always visible and acts as the trigger.
37 |
38 | ### `withSwitch` (default: false) [#withswitch-default-false]
39 |
40 | When true, a switch is used instead of an icon to toggle the expanded state.
41 |
42 | ## Events [#events]
43 |
44 | ### `expandedChange` [#expandedchange]
45 |
46 | This event fires when the expandable item is expanded or collapsed. It provides a boolean value indicating the new state.
47 |
48 | ## Exposed Methods [#exposed-methods]
49 |
50 | ### `collapse` [#collapse]
51 |
52 | This method collapses the item.
53 |
54 | **Signature**: `collapse(): void`
55 |
56 | ### `expand` [#expand]
57 |
58 | This method expands the item.
59 |
60 | **Signature**: `expand(): void`
61 |
62 | ### `isExpanded` [#isexpanded]
63 |
64 | This method returns a boolean indicating whether the item is currently expanded.
65 |
66 | **Signature**: `isExpanded(): boolean`
67 |
68 | ### `toggle` [#toggle]
69 |
70 | This method toggles the item's expanded state.
71 |
72 | **Signature**: `toggle(): void`
73 |
74 | ## Styling [#styling]
75 |
76 | ### Theme Variables [#theme-variables]
77 |
78 | | Variable | Default Value (Light) | Default Value (Dark) |
79 | | --- | --- | --- |
80 | | [backgroundColor](../styles-and-themes/common-units/#color)-ExpandableItem | transparent | transparent |
81 | | [border](../styles-and-themes/common-units/#border)-ExpandableItem | *none* | *none* |
82 | | [borderBottom](../styles-and-themes/common-units/#border)-ExpandableItem | *none* | *none* |
83 | | [borderBottomColor](../styles-and-themes/common-units/#color)-ExpandableItem | *none* | *none* |
84 | | [borderBottomStyle](../styles-and-themes/common-units/#border-style)-ExpandableItem | *none* | *none* |
85 | | [borderBottomWidth](../styles-and-themes/common-units/#size)-ExpandableItem | 1px | 1px |
86 | | [borderColor](../styles-and-themes/common-units/#color)-ExpandableItem | $borderColor | $borderColor |
87 | | [borderEndEndRadius](../styles-and-themes/common-units/#border-rounding)-ExpandableItem | *none* | *none* |
88 | | [borderEndStartRadius](../styles-and-themes/common-units/#border-rounding)-ExpandableItem | *none* | *none* |
89 | | [borderHorizontal](../styles-and-themes/common-units/#border)-ExpandableItem | *none* | *none* |
90 | | [borderHorizontalColor](../styles-and-themes/common-units/#color)-ExpandableItem | *none* | *none* |
91 | | [borderHorizontalStyle](../styles-and-themes/common-units/#border-style)-ExpandableItem | *none* | *none* |
92 | | [borderHorizontalWidth](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
93 | | [borderLeft](../styles-and-themes/common-units/#border)-ExpandableItem | *none* | *none* |
94 | | [color](../styles-and-themes/common-units/#color)-ExpandableItem | *none* | *none* |
95 | | [borderLeftStyle](../styles-and-themes/common-units/#border-style)-ExpandableItem | *none* | *none* |
96 | | [borderLeftWidth](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
97 | | [borderRadius](../styles-and-themes/common-units/#border-rounding)-ExpandableItem | 0 | 0 |
98 | | [borderRight](../styles-and-themes/common-units/#border)-ExpandableItem | *none* | *none* |
99 | | [color](../styles-and-themes/common-units/#color)-ExpandableItem | *none* | *none* |
100 | | [borderRightStyle](../styles-and-themes/common-units/#border-style)-ExpandableItem | *none* | *none* |
101 | | [borderRightWidth](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
102 | | [borderStartEndRadius](../styles-and-themes/common-units/#border-rounding)-ExpandableItem | *none* | *none* |
103 | | [borderStartStartRadius](../styles-and-themes/common-units/#border-rounding)-ExpandableItem | *none* | *none* |
104 | | [borderStyle](../styles-and-themes/common-units/#border-style)-ExpandableItem | solid | solid |
105 | | [borderTop](../styles-and-themes/common-units/#border)-ExpandableItem | *none* | *none* |
106 | | [borderTopColor](../styles-and-themes/common-units/#color)-ExpandableItem | *none* | *none* |
107 | | [borderTopStyle](../styles-and-themes/common-units/#border-style)-ExpandableItem | *none* | *none* |
108 | | [borderTopWidth](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
109 | | [borderHorizontal](../styles-and-themes/common-units/#border)-ExpandableItem | *none* | *none* |
110 | | [borderVerticalColor](../styles-and-themes/common-units/#color)-ExpandableItem | *none* | *none* |
111 | | [borderVerticalStyle](../styles-and-themes/common-units/#border-style)-ExpandableItem | *none* | *none* |
112 | | [borderVerticalWidth](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
113 | | [borderWidth](../styles-and-themes/common-units/#size)-ExpandableItem | 0 | 0 |
114 | | [color](../styles-and-themes/common-units/#color)-ExpandableItem | $textColor-primary | $textColor-primary |
115 | | [color](../styles-and-themes/common-units/#color)-ExpandableItem--disabled | $textColor--disabled | $textColor--disabled |
116 | | [fontFamily](../styles-and-themes/common-units/#fontFamily)-ExpandableItem | $fontFamily | $fontFamily |
117 | | [fontSize](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
118 | | [fontWeight](../styles-and-themes/common-units/#fontWeight)-ExpandableItem | *none* | *none* |
119 | | [gap](../styles-and-themes/common-units/#size)-ExpandableItem | $space-2 | $space-2 |
120 | | [padding](../styles-and-themes/common-units/#size)-content-ExpandableItem | *none* | *none* |
121 | | [padding](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
122 | | [paddingBottom](../styles-and-themes/common-units/#size)-content-ExpandableItem | *none* | *none* |
123 | | [paddingBottom](../styles-and-themes/common-units/#size)-ExpandableItem | $space-2 | $space-2 |
124 | | [paddingHorizontal](../styles-and-themes/common-units/#size)-content-ExpandableItem | *none* | *none* |
125 | | [paddingHorizontal](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
126 | | [paddingHorizontal](../styles-and-themes/common-units/#size)-ExpandableItem-summary | *none* | *none* |
127 | | [paddingLeft](../styles-and-themes/common-units/#size)-content-ExpandableItem | $space-3 | $space-3 |
128 | | [paddingLeft](../styles-and-themes/common-units/#size)-ExpandableItem | $space-0 | $space-0 |
129 | | [paddingRight](../styles-and-themes/common-units/#size)-content-ExpandableItem | $space-3 | $space-3 |
130 | | [paddingRight](../styles-and-themes/common-units/#size)-ExpandableItem | $space-0 | $space-0 |
131 | | [paddingTop](../styles-and-themes/common-units/#size)-content-ExpandableItem | *none* | *none* |
132 | | [paddingTop](../styles-and-themes/common-units/#size)-ExpandableItem | $space-2 | $space-2 |
133 | | [paddingVertical](../styles-and-themes/common-units/#size)-content-ExpandableItem | $space-2 | $space-2 |
134 | | [paddingVertical](../styles-and-themes/common-units/#size)-ExpandableItem | *none* | *none* |
135 | | [paddingVertical](../styles-and-themes/common-units/#size)-ExpandableItem-summary | *none* | *none* |
136 | | [transition](../styles-and-themes/common-units/#transition)-ExpandableItem | 0.2s ease | 0.2s ease |
137 |
```
--------------------------------------------------------------------------------
/docs/content/components/AppState.md:
--------------------------------------------------------------------------------
```markdown
1 | # AppState [#appstate]
2 |
3 | `AppState` is an invisible component that provides global state management across your entire application. Unlike component variables that are scoped locally, AppState allows any component to access and update shared state without prop drilling.
4 |
5 | **Key advantages over variables:**
6 | - **Global accessibility**: Any component can access the state by referencing the same `bucket`
7 | - **Automatic reactivity**: UI updates automatically when state changes, no manual prop passing required
8 | - **Cross-component coordination**: Perfect for user sessions, UI preferences, loading states, and shared data
9 |
10 | ## Using AppState [#using-appstate]
11 |
12 | Variables in xmlui are a straightforward tool for managing states. However, a variable's scope is the app's main file or the particular component file in which it is declared. To access the variable's value (the stored state), you must pass its value to components wanting to leverage it.
13 |
14 | ### Storing State in Variables [#storing-state-in-variables]
15 |
16 | In the following example, the main file of the app declares a variable, `enhancedMode`, which is toggled with a checkbox:
17 |
18 | ```xmlui-pg
19 | ---app copy display filename="Main.xmlui"
20 | <App var.enhancedMode="{false}">
21 | <VStack gap="$space-4" padding="$space-4">
22 | <Checkbox
23 | label="Enhanced mode"
24 | initialValue="{enhancedMode}"
25 | onDidChange="v => enhancedMode = v" />
26 | <Component1 enhancedMode="{enhancedMode}" />
27 | <Component2 enhancedMode="{enhancedMode}" />
28 | </VStack>
29 | </App>
30 | ---desc
31 | Two components, `Component1` and `Component2`, use the value of `enhancedMode`. Because of the aforementioned scoping issue, the app must explicitly pass the variable's value to those components so that they can use it. These components utilize the value to render their UI:
32 | ---comp copy display filename="Component1.xmlui"
33 | <Component name="Component1">
34 | <H3 when="{$props.enhancedMode}">I am in enhanced mode!</H3>
35 | <Text when="{!$props.enhancedMode}">Enhanced mode turned off.</Text>
36 | </Component>
37 | ---desc
38 | When you define an `AppState`, you can set its `initialValue` property to initialize the state value.
39 | ---comp copy display filename="Component2.xmlui"
40 | <Component name="Component2">
41 | <Button enabled="{$props.enhancedMode}">Set enhanced options</Button>
42 | </Component>
43 | ---desc
44 | You can try how this app works:
45 | ```
46 |
47 | ### Storing State in AppState [#storing-state-in-appstate]
48 |
49 | What if `Component1` and `Component2` had nested components using `enhancedMode`? You must also pass them to the nested components (via properties). What if you have not only one but a dozen of similar properties and a long chain of nested components? The "use a variable" pattern soon becomes a state management nightmare.
50 |
51 | If the nested components want to change the state value, you must declare events and event handlers or component APIs to manage the state. It sounds pretty tedious!
52 |
53 | This situation is where `AppState` comes into the picture. With an `AppState` instance, you can define a state object that automatically conveys between parent and nested child component chains implicitly.
54 |
55 | Let's turn the previous example into one using `AppState`! The following code shows how we change the main app file:
56 |
57 | ```xmlui-pg
58 | ---app copy display filename="Main.xmlui"
59 | <App>
60 | <AppState id="appState" initialValue="{{ enhancedMode: false }}"/>
61 | <VStack gap="$space-4" padding="$space-4">
62 | <Checkbox
63 | label="Enhanced mode"
64 | initialValue="{appState.value.enhancedMode}"
65 | onDidChange="v => appState.update({ enhancedMode: v})" />
66 | <Component1 />
67 | <Component2 />
68 | </VStack>
69 | </App>
70 | ---desc
71 | When you define an `AppState`, you can set its `initialValue` property to initialize the state value. You must give an ID to the `AppState` instance to access it and use the `value` property to get the state. You must invoke the `AppState`'s `update` method when you intend to update the state.
72 |
73 | The components may use their own `AppState` object to access the state value:
74 | ---comp copy display filename="Component1.xmlui"
75 | <Component name="Component1">
76 | <AppState id="state" />
77 | <H3 when="{state.value.enhancedMode}">I am in enhanced mode!</H3>
78 | <Text when="{!state.value.enhancedMode}">Enhanced mode turned off.</Text>
79 | </Component>
80 | ---comp copy display filename="Component2.xmlui"
81 | <Component name="Component2">
82 | <AppState id="state" />
83 | <Button enabled="{state.value.enhancedMode}">Set enhanced options</Button>
84 | </Component>
85 | ---desc
86 | The modified app works the same way as the previous one (using variables):
87 | ```
88 |
89 | ### State Buckets [#state-buckets]
90 |
91 | With the `AppState` component, you can use separate state objects. The `bucket` property of `AppState` is an identifier (using the "default" string by default). While multiple `AppState` objects use the same `bucket` property value, they refer to the same state object.
92 |
93 | If you want to run the sample with explicit state buckets (for example, with the `settings` bucket id), you should change the `AppState` declarations accordingly:
94 |
95 | ```xmlui /bucket="settings"/
96 | <!-- Main.xmlui -->
97 | <AppState id="appState" bucket="settings" initialValue="{{ enhancedMode: false }}"/>
98 |
99 | <!-- Component1 -->
100 | <AppState id="state" bucket="settings" />
101 |
102 | <!-- Component2 -->
103 | <AppState id="state" bucket="settings" />
104 | ```
105 |
106 | ## Properties [#properties]
107 |
108 | ### `bucket` (default: "default") [#bucket-default-default]
109 |
110 | This property is the identifier of the bucket to which the `AppState` instance is bound. Multiple `AppState` instances with the same bucket will share the same state object: any of them updating the state will cause the other instances to view the new, updated state.
111 |
112 | ### `initialValue` [#initialvalue]
113 |
114 | This property contains the initial state value. Though you can use multiple `AppState`component instances for the same bucket with their `initialValue` set, it may result in faulty app logic. When xmlui instantiates an `AppState` with an explicit initial value, that value is immediately merged with the existing state. The issue may come from the behavior that `initialValue` is set (merged) only when a component mounts. By default, the bucket's initial state is undefined.
115 |
116 | ## Events [#events]
117 |
118 | ### `didUpdate` [#didupdate]
119 |
120 | This event is fired when the AppState value is updated. The event provides the new state value as its parameter.
121 |
122 | ## Exposed Methods [#exposed-methods]
123 |
124 | ### `appendToList` [#appendtolist]
125 |
126 | This method appends an item to an array in the application state object bound to the `AppState` instance.
127 |
128 | **Signature**: `appendToList(key: string, id: any)`
129 |
130 | - `key`: The key of the array in the state object.
131 | - `id`: The item to append to the array.
132 |
133 | ### `listIncludes` [#listincludes]
134 |
135 | This method checks if an array in the application state object contains a specific item.
136 |
137 | **Signature**: `listIncludes(key: string, id: any)`
138 |
139 | - `key`: The key of the array in the state object.
140 | - `id`: The item to check for in the array.
141 |
142 | ### `removeFromList` [#removefromlist]
143 |
144 | This method removes an item from an array in the application state object bound to the `AppState` instance.
145 |
146 | **Signature**: `removeFromList(key: string, id: any)`
147 |
148 | - `key`: The key of the array in the state object.
149 | - `id`: The item to remove from the array.
150 |
151 | ### `update` [#update]
152 |
153 | This method updates the application state object bound to the `AppState` instance.
154 |
155 | **Signature**: `update(newState: Record<string, any>)`
156 |
157 | - `newState`: An object that specifies the new state value.
158 |
159 | If the argument is a hash object, it will be merged with the previous state value. Let's assume the previous state value was the following:
160 |
161 | ```json
162 | {
163 | "enhancedMode": false,
164 | "showHeader": true,
165 | "showFooter": true,
166 | "theme": "light"
167 | }
168 | ```
169 |
170 | Now, update the state with this call:
171 |
172 | ```js
173 | appState.update({ enhancedMode: true, theme: "dark" });
174 | ```
175 |
176 | The new state value will be:
177 |
178 | ```json
179 | {
180 | "enhancedMode": true,
181 | "showHeader": true,
182 | "showFooter": true,
183 | "theme": "dark"
184 | }
185 | ```
186 |
187 | ## Styling [#styling]
188 |
189 | This component does not have any styles.
190 |
```
--------------------------------------------------------------------------------
/docs/public/resources/files/for-download/mockApi.js:
--------------------------------------------------------------------------------
```javascript
1 | /* eslint-disable */
2 | /* tslint:disable */
3 |
4 | /**
5 | * Mock Service Worker (2.0.1).
6 | * @see https://github.com/mswjs/msw
7 | * - Please do NOT modify this file.
8 | * - Please do NOT serve this file on production.
9 | */
10 |
11 | const INTEGRITY_CHECKSUM = '0877fcdc026242810f5bfde0d7178db4'
12 | const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
13 | const activeClientIds = new Set()
14 |
15 | self.addEventListener('install', function () {
16 | self.skipWaiting()
17 | })
18 |
19 | self.addEventListener('activate', function (event) {
20 | event.waitUntil(self.clients.claim())
21 | })
22 |
23 | self.addEventListener('message', async function (event) {
24 | const clientId = event.source.id
25 |
26 | if (!clientId || !self.clients) {
27 | return
28 | }
29 |
30 | const client = await self.clients.get(clientId)
31 |
32 | if (!client) {
33 | return
34 | }
35 |
36 | const allClients = await self.clients.matchAll({
37 | type: 'window',
38 | })
39 |
40 | switch (event.data) {
41 | case 'KEEPALIVE_REQUEST': {
42 | sendToClient(client, {
43 | type: 'KEEPALIVE_RESPONSE',
44 | })
45 | break
46 | }
47 |
48 | case 'INTEGRITY_CHECK_REQUEST': {
49 | sendToClient(client, {
50 | type: 'INTEGRITY_CHECK_RESPONSE',
51 | payload: INTEGRITY_CHECKSUM,
52 | })
53 | break
54 | }
55 |
56 | case 'MOCK_ACTIVATE': {
57 | activeClientIds.add(clientId)
58 |
59 | sendToClient(client, {
60 | type: 'MOCKING_ENABLED',
61 | payload: true,
62 | })
63 | break
64 | }
65 |
66 | case 'MOCK_DEACTIVATE': {
67 | activeClientIds.delete(clientId)
68 | break
69 | }
70 |
71 | case 'CLIENT_CLOSED': {
72 | activeClientIds.delete(clientId)
73 |
74 | const remainingClients = allClients.filter((client) => {
75 | return client.id !== clientId
76 | })
77 |
78 | // Unregister itself when there are no more clients
79 | if (remainingClients.length === 0) {
80 | self.registration.unregister()
81 | }
82 |
83 | break
84 | }
85 | }
86 | })
87 |
88 | self.addEventListener('fetch', function (event) {
89 | const { request } = event
90 |
91 | // Bypass navigation requests.
92 | if (request.mode === 'navigate') {
93 | return
94 | }
95 |
96 | // Opening the DevTools triggers the "only-if-cached" request
97 | // that cannot be handled by the worker. Bypass such requests.
98 | if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
99 | return
100 | }
101 |
102 | // Bypass all requests when there are no active clients.
103 | // Prevents the self-unregistered worked from handling requests
104 | // after it's been deleted (still remains active until the next reload).
105 | if (activeClientIds.size === 0) {
106 | return
107 | }
108 |
109 | // Generate unique request ID.
110 | const requestId = crypto.randomUUID()
111 | event.respondWith(handleRequest(event, requestId))
112 | })
113 |
114 | async function handleRequest(event, requestId) {
115 | const client = await resolveMainClient(event)
116 | const response = await getResponse(event, client, requestId)
117 |
118 | // Send back the response clone for the "response:*" life-cycle events.
119 | // Ensure MSW is active and ready to handle the message, otherwise
120 | // this message will pend indefinitely.
121 | if (client && activeClientIds.has(client.id)) {
122 | ;(async function () {
123 | const responseClone = response.clone()
124 | // When performing original requests, response body will
125 | // always be a ReadableStream, even for 204 responses.
126 | // But when creating a new Response instance on the client,
127 | // the body for a 204 response must be null.
128 | const responseBody = response.status === 204 ? null : responseClone.body
129 |
130 | sendToClient(
131 | client,
132 | {
133 | type: 'RESPONSE',
134 | payload: {
135 | requestId,
136 | isMockedResponse: IS_MOCKED_RESPONSE in response,
137 | type: responseClone.type,
138 | status: responseClone.status,
139 | statusText: responseClone.statusText,
140 | body: responseBody,
141 | headers: Object.fromEntries(responseClone.headers.entries()),
142 | },
143 | },
144 | [responseBody],
145 | )
146 | })()
147 | }
148 |
149 | return response
150 | }
151 |
152 | // Resolve the main client for the given event.
153 | // Client that issues a request doesn't necessarily equal the client
154 | // that registered the worker. It's with the latter the worker should
155 | // communicate with during the response resolving phase.
156 | async function resolveMainClient(event) {
157 | const client = await self.clients.get(event.clientId)
158 |
159 | if (client?.frameType === 'top-level') {
160 | return client
161 | }
162 |
163 | const allClients = await self.clients.matchAll({
164 | type: 'window',
165 | })
166 |
167 | return allClients
168 | .filter((client) => {
169 | // Get only those clients that are currently visible.
170 | return client.visibilityState === 'visible'
171 | })
172 | .find((client) => {
173 | // Find the client ID that's recorded in the
174 | // set of clients that have registered the worker.
175 | return activeClientIds.has(client.id)
176 | })
177 | }
178 |
179 | async function getResponse(event, client, requestId) {
180 | const { request } = event
181 |
182 | // Clone the request because it might've been already used
183 | // (i.e. its body has been read and sent to the client).
184 | const requestClone = request.clone()
185 |
186 | function passthrough() {
187 | const headers = Object.fromEntries(requestClone.headers.entries())
188 |
189 | // Remove internal MSW request header so the passthrough request
190 | // complies with any potential CORS preflight checks on the server.
191 | // Some servers forbid unknown request headers.
192 | delete headers['x-msw-intention']
193 |
194 | return fetch(requestClone, { headers })
195 | }
196 |
197 | // Bypass mocking when the client is not active.
198 | if (!client) {
199 | return passthrough()
200 | }
201 |
202 | // Bypass initial page load requests (i.e. static assets).
203 | // The absence of the immediate/parent client in the map of the active clients
204 | // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet
205 | // and is not ready to handle requests.
206 | if (!activeClientIds.has(client.id)) {
207 | return passthrough()
208 | }
209 |
210 | // Bypass requests with the explicit bypass header.
211 | // Such requests can be issued by "ctx.fetch()".
212 | const mswIntention = request.headers.get('x-msw-intention')
213 | if (['bypass', 'passthrough'].includes(mswIntention)) {
214 | return passthrough()
215 | }
216 |
217 | // Notify the client that a request has been intercepted.
218 | const requestBuffer = await request.arrayBuffer()
219 | const clientMessage = await sendToClient(
220 | client,
221 | {
222 | type: 'REQUEST',
223 | payload: {
224 | id: requestId,
225 | url: request.url,
226 | mode: request.mode,
227 | method: request.method,
228 | headers: Object.fromEntries(request.headers.entries()),
229 | cache: request.cache,
230 | credentials: request.credentials,
231 | destination: request.destination,
232 | integrity: request.integrity,
233 | redirect: request.redirect,
234 | referrer: request.referrer,
235 | referrerPolicy: request.referrerPolicy,
236 | body: requestBuffer,
237 | keepalive: request.keepalive,
238 | },
239 | },
240 | [requestBuffer],
241 | )
242 |
243 | switch (clientMessage.type) {
244 | case 'MOCK_RESPONSE': {
245 | return respondWithMock(clientMessage.data)
246 | }
247 |
248 | case 'MOCK_NOT_FOUND': {
249 | return passthrough()
250 | }
251 | }
252 |
253 | return passthrough()
254 | }
255 |
256 | function sendToClient(client, message, transferrables = []) {
257 | return new Promise((resolve, reject) => {
258 | const channel = new MessageChannel()
259 |
260 | channel.port1.onmessage = (event) => {
261 | if (event.data && event.data.error) {
262 | return reject(event.data.error)
263 | }
264 |
265 | resolve(event.data)
266 | }
267 |
268 | client.postMessage(
269 | message,
270 | [channel.port2].concat(transferrables.filter(Boolean)),
271 | )
272 | })
273 | }
274 |
275 | async function respondWithMock(response) {
276 | // Setting response status code to 0 is a no-op.
277 | // However, when responding with a "Response.error()", the produced Response
278 | // instance will have status code set to 0. Since it's not possible to create
279 | // a Response instance with status code 0, handle that use-case separately.
280 | if (response.status === 0) {
281 | return Response.error()
282 | }
283 |
284 | const mockedResponse = new Response(response.body, response)
285 |
286 | Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, {
287 | value: true,
288 | enumerable: true,
289 | })
290 |
291 | return mockedResponse
292 | }
293 |
```
--------------------------------------------------------------------------------
/xmlui/tests/parsers/scripting/lexer-misc.test.ts:
--------------------------------------------------------------------------------
```typescript
1 | import { describe, expect, it } from "vitest";
2 | import { Lexer } from "../../../src/parsers/scripting/Lexer";
3 | import { InputStream } from "../../../src/parsers/common/InputStream";
4 | import { TokenType } from "../../../src/parsers/scripting/TokenType";
5 |
6 | describe("Lexer - miscellaneous", () => {
7 | it("Empty", () => {
8 | // --- Arrange
9 | const source = "";
10 | const wLexer = new Lexer(new InputStream(source));
11 |
12 | // --- Act
13 | const next = wLexer.get();
14 |
15 | // --- Assert
16 | expect(next.type).equal(TokenType.Eof);
17 | expect(next.text).equal(source);
18 | expect(next.startPosition).equal(0);
19 | expect(next.endPosition).equal(source.length);
20 | expect(next.startLine).equal(1);
21 | expect(next.endLine).equal(1);
22 | expect(next.startColumn).equal(0);
23 | expect(next.endColumn).equal(source.length);
24 | });
25 |
26 | const miscCases = [
27 | { src: "...", exp: TokenType.Spread },
28 | { src: ";", exp: TokenType.Semicolon },
29 | { src: "/", exp: TokenType.Divide },
30 | { src: "**", exp: TokenType.Exponent },
31 | { src: "*", exp: TokenType.Multiply },
32 | { src: "%", exp: TokenType.Remainder },
33 | { src: "+", exp: TokenType.Plus },
34 | { src: "-", exp: TokenType.Minus },
35 | { src: "^", exp: TokenType.BitwiseXor },
36 | { src: "|", exp: TokenType.BitwiseOr },
37 | { src: "||", exp: TokenType.LogicalOr },
38 | { src: "&", exp: TokenType.BitwiseAnd },
39 | { src: "&&", exp: TokenType.LogicalAnd },
40 | { src: ",", exp: TokenType.Comma },
41 | { src: "(", exp: TokenType.LParent },
42 | { src: ")", exp: TokenType.RParent },
43 | { src: ":", exp: TokenType.Colon },
44 | { src: "[", exp: TokenType.LSquare },
45 | { src: "]", exp: TokenType.RSquare },
46 | { src: "?", exp: TokenType.QuestionMark },
47 | { src: "??", exp: TokenType.NullCoalesce },
48 | { src: "?.", exp: TokenType.OptionalChaining },
49 | { src: "{", exp: TokenType.LBrace },
50 | { src: "}", exp: TokenType.RBrace },
51 | { src: "=", exp: TokenType.Assignment },
52 | { src: "==", exp: TokenType.Equal },
53 | { src: "===", exp: TokenType.StrictEqual },
54 | { src: "!", exp: TokenType.LogicalNot },
55 | { src: "!=", exp: TokenType.NotEqual },
56 | { src: "!==", exp: TokenType.StrictNotEqual },
57 | { src: "<", exp: TokenType.LessThan },
58 | { src: "<=", exp: TokenType.LessThanOrEqual },
59 | { src: "<<", exp: TokenType.ShiftLeft },
60 | { src: ">", exp: TokenType.GreaterThan },
61 | { src: ">=", exp: TokenType.GreaterThanOrEqual },
62 | { src: ">>", exp: TokenType.SignedShiftRight },
63 | { src: ">>>", exp: TokenType.ShiftRight },
64 | { src: ".", exp: TokenType.Dot },
65 | { src: "thisId", exp: TokenType.Identifier },
66 | { src: "_other145$", exp: TokenType.Identifier },
67 | { src: "$loader", exp: TokenType.Identifier },
68 | { src: "Infinity", exp: TokenType.Infinity },
69 | { src: "NaN", exp: TokenType.NaN },
70 | { src: "true", exp: TokenType.True },
71 | { src: "false", exp: TokenType.False },
72 | { src: "$item", exp: TokenType.Identifier },
73 | { src: "null", exp: TokenType.Null },
74 | { src: "undefined", exp: TokenType.Undefined },
75 | { src: "in", exp: TokenType.In },
76 | { src: "+=", exp: TokenType.AddAssignment },
77 | { src: "-=", exp: TokenType.SubtractAssignment },
78 | { src: "**=", exp: TokenType.ExponentAssignment },
79 | { src: "*=", exp: TokenType.MultiplyAssignment },
80 | { src: "/=", exp: TokenType.DivideAssignment },
81 | { src: "%=", exp: TokenType.RemainderAssignment },
82 | { src: "<<=", exp: TokenType.ShiftLeftAssignment },
83 | { src: ">>=", exp: TokenType.SignedShiftRightAssignment },
84 | { src: ">>>=", exp: TokenType.ShiftRightAssignment },
85 | { src: "&=", exp: TokenType.BitwiseAndAssignment },
86 | { src: "&&=", exp: TokenType.LogicalAndAssignment },
87 | { src: "^=", exp: TokenType.BitwiseXorAssignment },
88 | { src: "|=", exp: TokenType.BitwiseOrAssignment },
89 | { src: "||=", exp: TokenType.LogicalOrAssignment },
90 | { src: "??=", exp: TokenType.NullCoalesceAssignment },
91 | { src: "=>", exp: TokenType.Arrow },
92 | { src: "++", exp: TokenType.IncOp },
93 | { src: "--", exp: TokenType.DecOp },
94 | { src: "let", exp: TokenType.Let },
95 | { src: "const", exp: TokenType.Const },
96 | { src: "var", exp: TokenType.Var },
97 | { src: "if", exp: TokenType.If },
98 | { src: "else", exp: TokenType.Else },
99 | { src: "return", exp: TokenType.Return },
100 | { src: "break", exp: TokenType.Break },
101 | { src: "continue", exp: TokenType.Continue },
102 | { src: "do", exp: TokenType.Do },
103 | { src: "while", exp: TokenType.While },
104 | { src: "for", exp: TokenType.For },
105 | { src: "of", exp: TokenType.Of },
106 | { src: "try", exp: TokenType.Try },
107 | { src: "catch", exp: TokenType.Catch },
108 | { src: "finally", exp: TokenType.Finally },
109 | { src: "throw", exp: TokenType.Throw },
110 | { src: "switch", exp: TokenType.Switch },
111 | { src: "case", exp: TokenType.Case },
112 | { src: "default", exp: TokenType.Default },
113 | { src: "delete", exp: TokenType.Delete },
114 | { src: "function", exp: TokenType.Function },
115 | { src: "as", exp: TokenType.As },
116 | ];
117 | miscCases.forEach(c => {
118 | it(`Token ${c.src} #1`, () => {
119 | const source = c.src;
120 | const wLexer = new Lexer(new InputStream(source));
121 |
122 | // --- Act
123 | const next = wLexer.get();
124 |
125 | // --- Assert
126 | expect(next.type).equal(c.exp);
127 | expect(next.text).equal(source);
128 | expect(next.startPosition).equal(0);
129 | expect(next.endPosition).equal(source.length);
130 | expect(next.startLine).equal(1);
131 | expect(next.endLine).equal(1);
132 | expect(next.startColumn).equal(0);
133 | expect(next.endColumn).equal(source.length);
134 | });
135 |
136 | it(`Token ${c.src} #2`, () => {
137 | const source = ` \t \r ${c.src}`;
138 | const wLexer = new Lexer(new InputStream(source));
139 |
140 | // --- Act
141 | const next = wLexer.get();
142 |
143 | // --- Assert
144 | expect(next.type).equal(c.exp);
145 | expect(next.text).equal(c.src);
146 | expect(next.startPosition).equal(5);
147 | expect(next.endPosition).equal(source.length);
148 | expect(next.startLine).equal(1);
149 | expect(next.endLine).equal(1);
150 | expect(next.startColumn).equal(5);
151 | expect(next.endColumn).equal(source.length);
152 | });
153 |
154 | it(`Token ${c.src} #3`, () => {
155 | const source = ` /* c */ ${c.src}`;
156 | const wLexer = new Lexer(new InputStream(source));
157 |
158 | // --- Act
159 | const next = wLexer.get();
160 |
161 | // --- Assert
162 | expect(next.type).equal(c.exp);
163 | expect(next.text).equal(c.src);
164 | expect(next.startPosition).equal(9);
165 | expect(next.endPosition).equal(source.length);
166 | expect(next.startLine).equal(1);
167 | expect(next.endLine).equal(1);
168 | expect(next.startColumn).equal(9);
169 | expect(next.endColumn).equal(source.length);
170 | });
171 |
172 | it(`Token ${c.src} #4`, () => {
173 | const source = `${c.src} \t \r `;
174 | const wLexer = new Lexer(new InputStream(source));
175 |
176 | // --- Act
177 | const next = wLexer.get();
178 |
179 | // --- Assert
180 | expect(next.type).equal(c.exp);
181 | expect(next.text).equal(c.src);
182 | expect(next.startPosition).equal(0);
183 | expect(next.endPosition).equal(c.src.length);
184 | expect(next.startLine).equal(1);
185 | expect(next.endLine).equal(1);
186 | expect(next.startColumn).equal(0);
187 | expect(next.endColumn).equal(c.src.length);
188 | });
189 |
190 | it(`Token ${c.src} #5`, () => {
191 | const source = `${c.src} // c`;
192 | const wLexer = new Lexer(new InputStream(source));
193 |
194 | // --- Act
195 | const next = wLexer.get();
196 | const trail1 = wLexer.get(true);
197 | const trail2 = wLexer.get(true);
198 | const trail3 = wLexer.get();
199 |
200 | // --- Assert
201 | expect(next.type).equal(c.exp);
202 | expect(next.text).equal(c.src);
203 | expect(next.startPosition).equal(0);
204 | expect(next.endPosition).equal(c.src.length);
205 | expect(next.startLine).equal(1);
206 | expect(next.endLine).equal(1);
207 | expect(next.startColumn).equal(0);
208 | expect(next.endColumn).equal(c.src.length);
209 | expect(trail1.type).equal(TokenType.Ws);
210 | expect(trail2.type).equal(TokenType.EolComment);
211 | expect(trail3.type).equal(TokenType.Eof);
212 | });
213 | });
214 | });
215 |
```