This is page 89 of 188. Use http://codebase.md/xmlui-org/xmlui/%7BlogoUrl%7D?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .changeset
│ ├── config.json
│ ├── cyan-tools-design.md
│ ├── every-moments-teach.md
│ ├── full-symbols-accept.md
│ └── tricky-zoos-crash.md
├── .eslintrc.cjs
├── .github
│ ├── build-checklist.png
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows
│ ├── deploy-blog-optimized.yml
│ ├── deploy-blog-swa.yml
│ ├── deploy-blog.yml
│ ├── deploy-docs-optimized.yml
│ ├── deploy-docs-swa.yml
│ ├── deploy-docs.yml
│ ├── prepare-versions.yml
│ ├── release-packages.yml
│ ├── run-all-tests.yml
│ └── run-smoke-tests.yml
├── .gitignore
├── .prettierrc.js
├── .vscode
│ ├── launch.json
│ └── settings.json
├── blog
│ ├── .gitignore
│ ├── .gitkeep
│ ├── CHANGELOG.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── blog
│ │ │ ├── images
│ │ │ │ ├── an-advanced-codefence.gif
│ │ │ │ ├── an-advanced-codefence.mp4
│ │ │ │ ├── blog-page-component.png
│ │ │ │ ├── blog-scrabble.png
│ │ │ │ ├── codefence-runner.png
│ │ │ │ ├── integrated-blog-search.png
│ │ │ │ ├── lorem-ipsum.png
│ │ │ │ ├── playground-checkbox-source.png
│ │ │ │ ├── playground.png
│ │ │ │ ├── use-xmlui-mcp-to-find-a-howto.png
│ │ │ │ └── xmlui-demo-gallery.png
│ │ │ ├── introducing-xmlui.md
│ │ │ ├── lorem-ipsum.md
│ │ │ ├── newest-post.md
│ │ │ ├── older-post.md
│ │ │ ├── xmlui-playground.md
│ │ │ └── xmlui-powered-blog.md
│ │ ├── mockServiceWorker.js
│ │ ├── resources
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ └── for-download
│ │ │ │ └── xmlui
│ │ │ │ └── xmlui-standalone.umd.js
│ │ │ ├── github.svg
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ ├── rss.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ ├── staticwebapp.config.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ └── PageNotFound.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── blog-theme.ts
│ └── tsconfig.json
├── CONTRIBUTING.md
├── docs
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── ComponentRefLinks.txt
│ ├── content
│ │ ├── _meta.json
│ │ ├── components
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── APICall.md
│ │ │ ├── App.md
│ │ │ ├── AppHeader.md
│ │ │ ├── AppState.md
│ │ │ ├── AutoComplete.md
│ │ │ ├── Avatar.md
│ │ │ ├── Backdrop.md
│ │ │ ├── Badge.md
│ │ │ ├── BarChart.md
│ │ │ ├── Bookmark.md
│ │ │ ├── Breakout.md
│ │ │ ├── Button.md
│ │ │ ├── Card.md
│ │ │ ├── Carousel.md
│ │ │ ├── ChangeListener.md
│ │ │ ├── Checkbox.md
│ │ │ ├── CHStack.md
│ │ │ ├── ColorPicker.md
│ │ │ ├── Column.md
│ │ │ ├── ContentSeparator.md
│ │ │ ├── CVStack.md
│ │ │ ├── DataSource.md
│ │ │ ├── DateInput.md
│ │ │ ├── DatePicker.md
│ │ │ ├── DonutChart.md
│ │ │ ├── DropdownMenu.md
│ │ │ ├── EmojiSelector.md
│ │ │ ├── ExpandableItem.md
│ │ │ ├── FileInput.md
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FlowLayout.md
│ │ │ ├── Footer.md
│ │ │ ├── Form.md
│ │ │ ├── FormItem.md
│ │ │ ├── FormSection.md
│ │ │ ├── Fragment.md
│ │ │ ├── H1.md
│ │ │ ├── H2.md
│ │ │ ├── H3.md
│ │ │ ├── H4.md
│ │ │ ├── H5.md
│ │ │ ├── H6.md
│ │ │ ├── Heading.md
│ │ │ ├── HSplitter.md
│ │ │ ├── HStack.md
│ │ │ ├── Icon.md
│ │ │ ├── IFrame.md
│ │ │ ├── Image.md
│ │ │ ├── Items.md
│ │ │ ├── LabelList.md
│ │ │ ├── Legend.md
│ │ │ ├── LineChart.md
│ │ │ ├── Link.md
│ │ │ ├── List.md
│ │ │ ├── Logo.md
│ │ │ ├── Markdown.md
│ │ │ ├── MenuItem.md
│ │ │ ├── MenuSeparator.md
│ │ │ ├── ModalDialog.md
│ │ │ ├── NavGroup.md
│ │ │ ├── NavLink.md
│ │ │ ├── NavPanel.md
│ │ │ ├── NoResult.md
│ │ │ ├── NumberBox.md
│ │ │ ├── Option.md
│ │ │ ├── Page.md
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── Pages.md
│ │ │ ├── Pagination.md
│ │ │ ├── PasswordInput.md
│ │ │ ├── PieChart.md
│ │ │ ├── ProgressBar.md
│ │ │ ├── Queue.md
│ │ │ ├── RadioGroup.md
│ │ │ ├── RealTimeAdapter.md
│ │ │ ├── Redirect.md
│ │ │ ├── Select.md
│ │ │ ├── Slider.md
│ │ │ ├── Slot.md
│ │ │ ├── SpaceFiller.md
│ │ │ ├── Spinner.md
│ │ │ ├── Splitter.md
│ │ │ ├── Stack.md
│ │ │ ├── StickyBox.md
│ │ │ ├── SubMenuItem.md
│ │ │ ├── Switch.md
│ │ │ ├── TabItem.md
│ │ │ ├── Table.md
│ │ │ ├── TableOfContents.md
│ │ │ ├── Tabs.md
│ │ │ ├── Text.md
│ │ │ ├── TextArea.md
│ │ │ ├── TextBox.md
│ │ │ ├── Theme.md
│ │ │ ├── TimeInput.md
│ │ │ ├── Timer.md
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneSwitch.md
│ │ │ ├── Tooltip.md
│ │ │ ├── Tree.md
│ │ │ ├── VSplitter.md
│ │ │ ├── VStack.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ ├── xmlui-spreadsheet
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Spreadsheet.md
│ │ │ └── xmlui-website-blocks
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Carousel.md
│ │ │ ├── HelloMd.md
│ │ │ ├── HeroSection.md
│ │ │ └── ScrollToTop.md
│ │ └── extensions
│ │ ├── _meta.json
│ │ ├── xmlui-animations
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Animation.md
│ │ │ ├── FadeAnimation.md
│ │ │ ├── FadeInAnimation.md
│ │ │ ├── FadeOutAnimation.md
│ │ │ ├── ScaleAnimation.md
│ │ │ └── SlideInAnimation.md
│ │ └── xmlui-website-blocks
│ │ ├── _meta.json
│ │ ├── _overview.md
│ │ ├── Carousel.md
│ │ ├── HelloMd.md
│ │ ├── HeroSection.md
│ │ └── ScrollToTop.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── feed.rss
│ │ ├── mockServiceWorker.js
│ │ ├── pages
│ │ │ ├── _meta.json
│ │ │ ├── app-structure.md
│ │ │ ├── build-editor-component.md
│ │ │ ├── build-hello-world-component.md
│ │ │ ├── components-intro.md
│ │ │ ├── context-variables.md
│ │ │ ├── forms.md
│ │ │ ├── globals.md
│ │ │ ├── glossary.md
│ │ │ ├── helper-tags.md
│ │ │ ├── hosted-deployment.md
│ │ │ ├── howto
│ │ │ │ ├── assign-a-complex-json-literal-to-a-component-variable.md
│ │ │ │ ├── chain-a-refetch.md
│ │ │ │ ├── control-cache-invalidation.md
│ │ │ │ ├── debounce-user-input-for-api-calls.md
│ │ │ │ ├── debounce-with-changelistener.md
│ │ │ │ ├── debug-a-component.md
│ │ │ │ ├── delay-a-datasource-until-another-datasource-is-ready.md
│ │ │ │ ├── delegate-a-method.md
│ │ │ │ ├── do-custom-form-validation.md
│ │ │ │ ├── expose-a-method-from-a-component.md
│ │ │ │ ├── filter-and-transform-data-from-an-api.md
│ │ │ │ ├── group-items-in-list-by-a-property.md
│ │ │ │ ├── handle-background-operations.md
│ │ │ │ ├── hide-an-element-until-its-datasource-is-ready.md
│ │ │ │ ├── make-a-set-of-equal-width-cards.md
│ │ │ │ ├── make-a-table-responsive.md
│ │ │ │ ├── make-navpanel-width-responsive.md
│ │ │ │ ├── modify-a-value-reported-in-a-column.md
│ │ │ │ ├── paginate-a-list.md
│ │ │ │ ├── pass-data-to-a-modal-dialog.md
│ │ │ │ ├── react-to-button-click-not-keystrokes.md
│ │ │ │ ├── set-the-initial-value-of-a-select-from-fetched-data.md
│ │ │ │ ├── share-a-modaldialog-across-components.md
│ │ │ │ ├── sync-selections-between-table-and-list-views.md
│ │ │ │ ├── update-ui-optimistically.md
│ │ │ │ ├── use-built-in-form-validation.md
│ │ │ │ └── use-the-same-modaldialog-to-add-or-edit.md
│ │ │ ├── howto.md
│ │ │ ├── intro.md
│ │ │ ├── layout.md
│ │ │ ├── markup.md
│ │ │ ├── mcp.md
│ │ │ ├── modal-dialogs.md
│ │ │ ├── news-and-reviews.md
│ │ │ ├── reactive-intro.md
│ │ │ ├── refactoring.md
│ │ │ ├── routing-and-links.md
│ │ │ ├── samples
│ │ │ │ ├── color-palette.xmlui
│ │ │ │ ├── color-values.xmlui
│ │ │ │ ├── shadow-sizes.xmlui
│ │ │ │ ├── spacing-sizes.xmlui
│ │ │ │ ├── swatch.xmlui
│ │ │ │ ├── theme-gallery-brief.xmlui
│ │ │ │ └── theme-gallery.xmlui
│ │ │ ├── scoping.md
│ │ │ ├── scripting.md
│ │ │ ├── styles-and-themes
│ │ │ │ ├── common-units.md
│ │ │ │ ├── layout-props.md
│ │ │ │ ├── theme-variable-defaults.md
│ │ │ │ ├── theme-variables.md
│ │ │ │ └── themes.md
│ │ │ ├── template-properties.md
│ │ │ ├── test.md
│ │ │ ├── tutorial-01.md
│ │ │ ├── tutorial-02.md
│ │ │ ├── tutorial-03.md
│ │ │ ├── tutorial-04.md
│ │ │ ├── tutorial-05.md
│ │ │ ├── tutorial-06.md
│ │ │ ├── tutorial-07.md
│ │ │ ├── tutorial-08.md
│ │ │ ├── tutorial-09.md
│ │ │ ├── tutorial-10.md
│ │ │ ├── tutorial-11.md
│ │ │ ├── tutorial-12.md
│ │ │ ├── universal-properties.md
│ │ │ ├── user-defined-components.md
│ │ │ ├── vscode.md
│ │ │ ├── working-with-markdown.md
│ │ │ ├── working-with-text.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-charts
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── DonutChart.md
│ │ │ │ ├── LabelList.md
│ │ │ │ ├── Legend.md
│ │ │ │ ├── LineChart.md
│ │ │ │ └── PieChart.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ └── xmlui-spreadsheet
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ └── Spreadsheet.md
│ │ ├── resources
│ │ │ ├── devdocs
│ │ │ │ ├── debug-proxy-object-2.png
│ │ │ │ ├── debug-proxy-object.png
│ │ │ │ ├── table_editor_01.png
│ │ │ │ ├── table_editor_02.png
│ │ │ │ ├── table_editor_03.png
│ │ │ │ ├── table_editor_04.png
│ │ │ │ ├── table_editor_05.png
│ │ │ │ ├── table_editor_06.png
│ │ │ │ ├── table_editor_07.png
│ │ │ │ ├── table_editor_08.png
│ │ │ │ ├── table_editor_09.png
│ │ │ │ ├── table_editor_10.png
│ │ │ │ ├── table_editor_11.png
│ │ │ │ ├── table-editor-01.png
│ │ │ │ ├── table-editor-02.png
│ │ │ │ ├── table-editor-03.png
│ │ │ │ ├── table-editor-04.png
│ │ │ │ ├── table-editor-06.png
│ │ │ │ ├── table-editor-07.png
│ │ │ │ ├── table-editor-08.png
│ │ │ │ ├── table-editor-09.png
│ │ │ │ └── xmlui-rendering-of-tiptap-markdown.png
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ ├── clients.json
│ │ │ │ ├── daily-revenue.json
│ │ │ │ ├── dashboard-stats.json
│ │ │ │ ├── demo.xmlui
│ │ │ │ ├── demo.xmlui.xs
│ │ │ │ ├── downloads
│ │ │ │ │ └── downloads.json
│ │ │ │ ├── for-download
│ │ │ │ │ ├── index-with-api.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── mockApi.js
│ │ │ │ │ ├── start-darwin.sh
│ │ │ │ │ ├── start-linux.sh
│ │ │ │ │ ├── start.bat
│ │ │ │ │ └── xmlui
│ │ │ │ │ └── xmlui-standalone.umd.js
│ │ │ │ ├── getting-started
│ │ │ │ │ ├── cl-tutorial-final.zip
│ │ │ │ │ ├── cl-tutorial.zip
│ │ │ │ │ ├── cl-tutorial2.zip
│ │ │ │ │ ├── cl-tutorial3.zip
│ │ │ │ │ ├── cl-tutorial4.zip
│ │ │ │ │ ├── cl-tutorial5.zip
│ │ │ │ │ ├── cl-tutorial6.zip
│ │ │ │ │ ├── getting-started.zip
│ │ │ │ │ ├── hello-xmlui.zip
│ │ │ │ │ ├── xmlui-empty.zip
│ │ │ │ │ └── xmlui-starter.zip
│ │ │ │ ├── howto
│ │ │ │ │ └── component-icons
│ │ │ │ │ └── up-arrow.svg
│ │ │ │ ├── invoices.json
│ │ │ │ ├── monthly-status.json
│ │ │ │ ├── news-and-reviews.json
│ │ │ │ ├── products.json
│ │ │ │ ├── releases.json
│ │ │ │ ├── tutorials
│ │ │ │ │ ├── datasource
│ │ │ │ │ │ └── api.ts
│ │ │ │ │ └── p2do
│ │ │ │ │ ├── api.ts
│ │ │ │ │ └── todo-logo.svg
│ │ │ │ └── xmlui.json
│ │ │ ├── github.svg
│ │ │ ├── images
│ │ │ │ ├── apiaction-tutorial
│ │ │ │ │ ├── add-success.png
│ │ │ │ │ ├── apiaction-param.png
│ │ │ │ │ ├── change-completed.png
│ │ │ │ │ ├── change-in-progress.png
│ │ │ │ │ ├── confirm-delete.png
│ │ │ │ │ ├── data-error.png
│ │ │ │ │ ├── data-progress.png
│ │ │ │ │ ├── data-success.png
│ │ │ │ │ ├── display-1.png
│ │ │ │ │ ├── item-deleted.png
│ │ │ │ │ ├── item-updated.png
│ │ │ │ │ ├── missing-api-key.png
│ │ │ │ │ ├── new-item-added.png
│ │ │ │ │ └── test-message.png
│ │ │ │ ├── chat-api
│ │ │ │ │ └── domain-model.svg
│ │ │ │ ├── components
│ │ │ │ │ ├── image
│ │ │ │ │ │ └── breakfast.jpg
│ │ │ │ │ ├── markdown
│ │ │ │ │ │ └── colors.png
│ │ │ │ │ └── modal
│ │ │ │ │ ├── deep_link_dialog_1.jpg
│ │ │ │ │ └── deep_link_dialog_2.jpg
│ │ │ │ ├── create-apps
│ │ │ │ │ ├── collapsed-vertical.png
│ │ │ │ │ ├── using-forms-warning-dialog.png
│ │ │ │ │ └── using-forms.png
│ │ │ │ ├── datasource-tutorial
│ │ │ │ │ ├── data-with-header.png
│ │ │ │ │ ├── filtered-data.png
│ │ │ │ │ ├── filtered-items.png
│ │ │ │ │ ├── initial-page-items.png
│ │ │ │ │ ├── list-items.png
│ │ │ │ │ ├── next-page-items.png
│ │ │ │ │ ├── no-data.png
│ │ │ │ │ ├── pagination-1.jpg
│ │ │ │ │ ├── pagination-1.png
│ │ │ │ │ ├── polling-1.png
│ │ │ │ │ ├── refetch-data.png
│ │ │ │ │ ├── slow-loading.png
│ │ │ │ │ ├── test-message.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── unconventional-data.png
│ │ │ │ │ └── unfiltered-items.png
│ │ │ │ ├── flower.jpg
│ │ │ │ ├── get-started
│ │ │ │ │ ├── add-new-contact.png
│ │ │ │ │ ├── app-modified.png
│ │ │ │ │ ├── app-start.png
│ │ │ │ │ ├── app-with-boxes.png
│ │ │ │ │ ├── app-with-toast.png
│ │ │ │ │ ├── boilerplate-structure.png
│ │ │ │ │ ├── cl-initial.png
│ │ │ │ │ ├── cl-start.png
│ │ │ │ │ ├── contact-counts.png
│ │ │ │ │ ├── contact-dialog-title.png
│ │ │ │ │ ├── contact-dialog.png
│ │ │ │ │ ├── contact-menus.png
│ │ │ │ │ ├── contact-predicates.png
│ │ │ │ │ ├── context-menu.png
│ │ │ │ │ ├── dashboard-numbers.png
│ │ │ │ │ ├── default-contact-list.png
│ │ │ │ │ ├── delete-contact.png
│ │ │ │ │ ├── delete-task.png
│ │ │ │ │ ├── detailed-template.png
│ │ │ │ │ ├── edit-contact-details.png
│ │ │ │ │ ├── edited-contact-saved.png
│ │ │ │ │ ├── empty-sections.png
│ │ │ │ │ ├── filter-completed.png
│ │ │ │ │ ├── fullwidth-desktop.png
│ │ │ │ │ ├── fullwidth-mobile.png
│ │ │ │ │ ├── initial-table.png
│ │ │ │ │ ├── items-and-badges.png
│ │ │ │ │ ├── loading-message.png
│ │ │ │ │ ├── new-contact-button.png
│ │ │ │ │ ├── new-contact-saved.png
│ │ │ │ │ ├── no-empty-sections.png
│ │ │ │ │ ├── personal-todo-initial.png
│ │ │ │ │ ├── piechart.png
│ │ │ │ │ ├── review-today.png
│ │ │ │ │ ├── rudimentary-dashboard.png
│ │ │ │ │ ├── section-collapsed.png
│ │ │ │ │ ├── sectioned-items.png
│ │ │ │ │ ├── sections-ordered.png
│ │ │ │ │ ├── spacex-list-with-links.png
│ │ │ │ │ ├── spacex-list.png
│ │ │ │ │ ├── start-personal-todo-1.png
│ │ │ │ │ ├── submit-new-contact.png
│ │ │ │ │ ├── submit-new-task.png
│ │ │ │ │ ├── syntax-highlighting.png
│ │ │ │ │ ├── table-with-badge.png
│ │ │ │ │ ├── template-with-card.png
│ │ │ │ │ ├── test-emulated-api.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── todo-logo.png
│ │ │ │ │ └── xmlui-tools.png
│ │ │ │ ├── HelloApp.png
│ │ │ │ ├── HelloApp2.png
│ │ │ │ ├── logos
│ │ │ │ │ ├── xmlui1.svg
│ │ │ │ │ ├── xmlui2.svg
│ │ │ │ │ ├── xmlui3.svg
│ │ │ │ │ ├── xmlui4.svg
│ │ │ │ │ ├── xmlui5.svg
│ │ │ │ │ ├── xmlui6.svg
│ │ │ │ │ └── xmlui7.svg
│ │ │ │ ├── pdf
│ │ │ │ │ └── dummy-pdf.jpg
│ │ │ │ ├── rendering-engine
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ ├── Component.svg
│ │ │ │ │ ├── CompoundComponent.svg
│ │ │ │ │ ├── RootComponent.svg
│ │ │ │ │ └── tree-with-containers.svg
│ │ │ │ ├── reviewers-guide
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ └── incbutton-in-action.png
│ │ │ │ ├── tools
│ │ │ │ │ └── boilerplate-structure.png
│ │ │ │ ├── try.svg
│ │ │ │ ├── tutorial
│ │ │ │ │ ├── app-chat-history.png
│ │ │ │ │ ├── app-content-placeholder.png
│ │ │ │ │ ├── app-header-and-content.png
│ │ │ │ │ ├── app-links-channel-selected.png
│ │ │ │ │ ├── app-links-click.png
│ │ │ │ │ ├── app-navigation.png
│ │ │ │ │ ├── finished-ex01.png
│ │ │ │ │ ├── finished-ex02.png
│ │ │ │ │ ├── hello.png
│ │ │ │ │ ├── splash-screen-advanced.png
│ │ │ │ │ ├── splash-screen-after-click.png
│ │ │ │ │ ├── splash-screen-centered.png
│ │ │ │ │ ├── splash-screen-events.png
│ │ │ │ │ ├── splash-screen-expression.png
│ │ │ │ │ ├── splash-screen-reuse-after.png
│ │ │ │ │ ├── splash-screen-reuse-before.png
│ │ │ │ │ └── splash-screen.png
│ │ │ │ └── tutorial-01.png
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ ├── Boxes.xmlui
│ │ │ ├── Breadcrumb.xmlui
│ │ │ ├── ChangeLog.xmlui
│ │ │ ├── ColorPalette.xmlui
│ │ │ ├── DocumentLinks.xmlui
│ │ │ ├── DocumentPage.xmlui
│ │ │ ├── DocumentPageNoTOC.xmlui
│ │ │ ├── Icons.xmlui
│ │ │ ├── IncButton.xmlui
│ │ │ ├── IncButton2.xmlui
│ │ │ ├── NameValue.xmlui
│ │ │ ├── PageNotFound.xmlui
│ │ │ ├── PaletteItem.xmlui
│ │ │ ├── Palettes.xmlui
│ │ │ ├── SectionHeader.xmlui
│ │ │ ├── TBD.xmlui
│ │ │ ├── Test.xmlui
│ │ │ ├── ThemesIntro.xmlui
│ │ │ ├── ThousandThemes.xmlui
│ │ │ ├── TubeStops.xmlui
│ │ │ ├── TubeStops.xmlui.xs
│ │ │ └── TwoColumnCode.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ ├── docs-theme.ts
│ │ ├── earthtone.ts
│ │ ├── xmlui-gray-on-default.ts
│ │ ├── xmlui-green-on-default.ts
│ │ └── xmlui-orange-on-default.ts
│ └── tsconfig.json
├── LICENSE
├── package-lock.json
├── package.json
├── packages
│ ├── tsconfig.json
│ ├── xmlui-animations
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── Animation.tsx
│ │ ├── AnimationNative.tsx
│ │ ├── FadeAnimation.tsx
│ │ ├── FadeInAnimation.tsx
│ │ ├── FadeOutAnimation.tsx
│ │ ├── index.tsx
│ │ ├── ScaleAnimation.tsx
│ │ └── SlideInAnimation.tsx
│ ├── xmlui-devtools
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── devtools
│ │ │ │ ├── DevTools.tsx
│ │ │ │ ├── DevToolsNative.module.scss
│ │ │ │ ├── DevToolsNative.tsx
│ │ │ │ ├── ModalDialog.module.scss
│ │ │ │ ├── ModalDialog.tsx
│ │ │ │ ├── ModalVisibilityContext.tsx
│ │ │ │ ├── Tooltip.module.scss
│ │ │ │ ├── Tooltip.tsx
│ │ │ │ └── utils.ts
│ │ │ ├── editor
│ │ │ │ └── Editor.tsx
│ │ │ └── index.tsx
│ │ └── vite.config-overrides.ts
│ ├── xmlui-hello-world
│ │ ├── .gitignore
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── HelloWorld.module.scss
│ │ ├── HelloWorld.tsx
│ │ ├── HelloWorldNative.tsx
│ │ └── index.tsx
│ ├── xmlui-os-frames
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── IPhoneFrame.module.scss
│ │ ├── IPhoneFrame.tsx
│ │ ├── MacOSAppFrame.module.scss
│ │ ├── MacOSAppFrame.tsx
│ │ ├── WindowsAppFrame.module.scss
│ │ └── WindowsAppFrame.tsx
│ ├── xmlui-pdf
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ ├── components
│ │ │ │ └── Pdf.xmlui
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── LazyPdfNative.tsx
│ │ ├── Pdf.module.scss
│ │ └── Pdf.tsx
│ ├── xmlui-playground
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── hooks
│ │ │ ├── usePlayground.ts
│ │ │ └── useToast.ts
│ │ ├── index.tsx
│ │ ├── playground
│ │ │ ├── Box.module.scss
│ │ │ ├── Box.tsx
│ │ │ ├── CodeSelector.module.scss
│ │ │ ├── CodeSelector.tsx
│ │ │ ├── ConfirmationDialog.module.scss
│ │ │ ├── ConfirmationDialog.tsx
│ │ │ ├── Editor.tsx
│ │ │ ├── Header.module.scss
│ │ │ ├── Header.tsx
│ │ │ ├── Playground.tsx
│ │ │ ├── PlaygroundContent.module.scss
│ │ │ ├── PlaygroundContent.tsx
│ │ │ ├── PlaygroundNative.module.scss
│ │ │ ├── PlaygroundNative.tsx
│ │ │ ├── Preview.tsx
│ │ │ ├── StandalonePlayground.tsx
│ │ │ ├── StandalonePlaygroundNative.module.scss
│ │ │ ├── StandalonePlaygroundNative.tsx
│ │ │ ├── ThemeSwitcher.module.scss
│ │ │ ├── ThemeSwitcher.tsx
│ │ │ └── utils.ts
│ │ ├── providers
│ │ │ ├── Toast.module.scss
│ │ │ └── ToastProvider.tsx
│ │ ├── state
│ │ │ └── store.ts
│ │ ├── themes
│ │ │ └── theme.ts
│ │ └── utils
│ │ └── helpers.ts
│ ├── xmlui-search
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Search.module.scss
│ │ └── Search.tsx
│ ├── xmlui-spreadsheet
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Spreadsheet.tsx
│ │ └── SpreadsheetNative.tsx
│ └── xmlui-website-blocks
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── demo
│ │ ├── components
│ │ │ ├── HeroBackgroundBreakoutPage.xmlui
│ │ │ ├── HeroBackgroundsPage.xmlui
│ │ │ ├── HeroContentsPage.xmlui
│ │ │ ├── HeroTextAlignPage.xmlui
│ │ │ ├── HeroTextPage.xmlui
│ │ │ └── HeroTonesPage.xmlui
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── default.ts
│ ├── index.html
│ ├── index.ts
│ ├── meta
│ │ └── componentsMetadata.ts
│ ├── package.json
│ ├── public
│ │ └── resources
│ │ ├── building.jpg
│ │ └── xmlui-logo.svg
│ └── src
│ ├── Carousel
│ │ ├── Carousel.module.scss
│ │ ├── Carousel.tsx
│ │ ├── CarouselContext.tsx
│ │ └── CarouselNative.tsx
│ ├── FancyButton
│ │ ├── FancyButton.module.scss
│ │ ├── FancyButton.tsx
│ │ └── FancyButton.xmlui
│ ├── Hello
│ │ ├── Hello.tsx
│ │ ├── Hello.xmlui
│ │ └── Hello.xmlui.xs
│ ├── HeroSection
│ │ ├── HeroSection.module.scss
│ │ ├── HeroSection.spec.ts
│ │ ├── HeroSection.tsx
│ │ └── HeroSectionNative.tsx
│ ├── index.tsx
│ ├── ScrollToTop
│ │ ├── ScrollToTop.module.scss
│ │ ├── ScrollToTop.tsx
│ │ └── ScrollToTopNative.tsx
│ └── vite-env.d.ts
├── playwright.config.ts
├── README.md
├── tools
│ ├── codefence
│ │ └── xmlui-code-fence-docs.md
│ ├── create-app
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── create-app.ts
│ │ ├── helpers
│ │ │ ├── copy.ts
│ │ │ ├── get-pkg-manager.ts
│ │ │ ├── git.ts
│ │ │ ├── install.ts
│ │ │ ├── is-folder-empty.ts
│ │ │ ├── is-writeable.ts
│ │ │ ├── make-dir.ts
│ │ │ └── validate-pkg.ts
│ │ ├── index.ts
│ │ ├── package.json
│ │ ├── templates
│ │ │ ├── default
│ │ │ │ └── ts
│ │ │ │ ├── gitignore
│ │ │ │ ├── index.html
│ │ │ │ ├── index.ts
│ │ │ │ ├── public
│ │ │ │ │ ├── mockServiceWorker.js
│ │ │ │ │ ├── resources
│ │ │ │ │ │ ├── favicon.ico
│ │ │ │ │ │ └── xmlui-logo.svg
│ │ │ │ │ └── serve.json
│ │ │ │ └── src
│ │ │ │ ├── components
│ │ │ │ │ ├── ApiAware.xmlui
│ │ │ │ │ ├── Home.xmlui
│ │ │ │ │ ├── IncButton.xmlui
│ │ │ │ │ └── PagePanel.xmlui
│ │ │ │ ├── config.ts
│ │ │ │ └── Main.xmlui
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── create-xmlui-hello-world
│ │ ├── index.js
│ │ └── package.json
│ └── vscode
│ ├── .gitignore
│ ├── .vscode
│ │ ├── launch.json
│ │ └── tasks.json
│ ├── .vscodeignore
│ ├── build.sh
│ ├── CHANGELOG.md
│ ├── esbuild.js
│ ├── eslint.config.mjs
│ ├── formatter-docs.md
│ ├── generate-test-sample.sh
│ ├── LICENSE.md
│ ├── package-lock.json
│ ├── package.json
│ ├── README.md
│ ├── resources
│ │ ├── xmlui-logo.png
│ │ └── xmlui-markup-syntax-highlighting.png
│ ├── src
│ │ ├── extension.ts
│ │ └── server.ts
│ ├── syntaxes
│ │ └── xmlui.tmLanguage.json
│ ├── test-samples
│ │ └── sample.xmlui
│ ├── tsconfig.json
│ └── tsconfig.tsbuildinfo
├── turbo.json
└── xmlui
├── .gitignore
├── bin
│ ├── bootstrap.cjs
│ ├── bootstrap.js
│ ├── build-lib.ts
│ ├── build.ts
│ ├── index.ts
│ ├── preview.ts
│ ├── start.ts
│ ├── vite-xmlui-plugin.ts
│ └── viteConfig.ts
├── CHANGELOG.md
├── conventions
│ ├── component-qa-checklist.md
│ ├── copilot-conventions.md
│ ├── create-xmlui-components.md
│ ├── mermaid.md
│ ├── testing-conventions.md
│ └── xmlui-in-a-nutshell.md
├── dev-docs
│ ├── accessibility.md
│ ├── build-system.md
│ ├── build-xmlui.md
│ ├── component-behaviors.md
│ ├── component-metadata.md
│ ├── components-with-options.md
│ ├── containers.md
│ ├── data-operations.md
│ ├── glossary.md
│ ├── index.md
│ ├── next
│ │ ├── component-dev-guide.md
│ │ ├── configuration-management-enhancement-summary.md
│ │ ├── documentation-scripts-refactoring-complete-summary.md
│ │ ├── documentation-scripts-refactoring-plan.md
│ │ ├── duplicate-pattern-extraction-summary.md
│ │ ├── error-handling-standardization-summary.md
│ │ ├── generating-component-reference.md
│ │ ├── index.md
│ │ ├── logging-consistency-implementation-summary.md
│ │ ├── project-build.md
│ │ ├── project-structure.md
│ │ ├── theme-context.md
│ │ ├── tiptap-design-considerations.md
│ │ ├── working-with-code.md
│ │ ├── xmlui-runtime-architecture
│ │ └── xmlui-wcag-accessibility-report.md
│ ├── react-fundamentals.md
│ ├── release-method.md
│ ├── standalone-app.md
│ ├── theme-variables-refactoring.md
│ ├── ud-components.md
│ └── xmlui-repo.md
├── package.json
├── scripts
│ ├── coverage-only.js
│ ├── e2e-test-summary.js
│ ├── extract-component-metadata.js
│ ├── generate-docs
│ │ ├── build-downloads-map.mjs
│ │ ├── build-pages-map.mjs
│ │ ├── components-config.json
│ │ ├── configuration-management.mjs
│ │ ├── constants.mjs
│ │ ├── create-theme-files.mjs
│ │ ├── DocsGenerator.mjs
│ │ ├── error-handling.mjs
│ │ ├── extensions-config.json
│ │ ├── folders.mjs
│ │ ├── generate-summary-files.mjs
│ │ ├── get-docs.mjs
│ │ ├── input-handler.mjs
│ │ ├── logger.mjs
│ │ ├── logging-standards.mjs
│ │ ├── MetadataProcessor.mjs
│ │ ├── pattern-utilities.mjs
│ │ └── utils.mjs
│ ├── generate-metadata-markdown.js
│ ├── get-langserver-metadata.js
│ ├── inline-links.mjs
│ └── README-e2e-summary.md
├── src
│ ├── abstractions
│ │ ├── _conventions.md
│ │ ├── ActionDefs.ts
│ │ ├── AppContextDefs.ts
│ │ ├── ComponentDefs.ts
│ │ ├── ContainerDefs.ts
│ │ ├── ExtensionDefs.ts
│ │ ├── FunctionDefs.ts
│ │ ├── RendererDefs.ts
│ │ ├── scripting
│ │ │ ├── BlockScope.ts
│ │ │ ├── Compilation.ts
│ │ │ ├── LogicalThread.ts
│ │ │ ├── LoopScope.ts
│ │ │ ├── modules.ts
│ │ │ ├── ScriptParserError.ts
│ │ │ ├── Token.ts
│ │ │ ├── TryScope.ts
│ │ │ └── TryScopeExp.ts
│ │ └── ThemingDefs.ts
│ ├── components
│ │ ├── _conventions.md
│ │ ├── abstractions.ts
│ │ ├── Accordion
│ │ │ ├── Accordion.md
│ │ │ ├── Accordion.module.scss
│ │ │ ├── Accordion.spec.ts
│ │ │ ├── Accordion.tsx
│ │ │ ├── AccordionContext.tsx
│ │ │ ├── AccordionItem.tsx
│ │ │ ├── AccordionItemNative.tsx
│ │ │ └── AccordionNative.tsx
│ │ ├── Animation
│ │ │ └── AnimationNative.tsx
│ │ ├── APICall
│ │ │ ├── APICall.md
│ │ │ ├── APICall.spec.ts
│ │ │ ├── APICall.tsx
│ │ │ └── APICallNative.tsx
│ │ ├── App
│ │ │ ├── App.md
│ │ │ ├── App.module.scss
│ │ │ ├── App.spec.ts
│ │ │ ├── App.tsx
│ │ │ ├── AppLayoutContext.ts
│ │ │ ├── AppNative.tsx
│ │ │ ├── AppStateContext.ts
│ │ │ ├── doc-resources
│ │ │ │ ├── condensed-sticky.xmlui
│ │ │ │ ├── condensed.xmlui
│ │ │ │ ├── horizontal-sticky.xmlui
│ │ │ │ ├── horizontal.xmlui
│ │ │ │ ├── vertical-full-header.xmlui
│ │ │ │ ├── vertical-sticky.xmlui
│ │ │ │ └── vertical.xmlui
│ │ │ ├── IndexerContext.ts
│ │ │ ├── LinkInfoContext.ts
│ │ │ ├── SearchContext.tsx
│ │ │ ├── Sheet.module.scss
│ │ │ └── Sheet.tsx
│ │ ├── AppHeader
│ │ │ ├── AppHeader.md
│ │ │ ├── AppHeader.module.scss
│ │ │ ├── AppHeader.spec.ts
│ │ │ ├── AppHeader.tsx
│ │ │ └── AppHeaderNative.tsx
│ │ ├── AppState
│ │ │ ├── AppState.md
│ │ │ ├── AppState.spec.ts
│ │ │ ├── AppState.tsx
│ │ │ └── AppStateNative.tsx
│ │ ├── AutoComplete
│ │ │ ├── AutoComplete.md
│ │ │ ├── AutoComplete.module.scss
│ │ │ ├── AutoComplete.spec.ts
│ │ │ ├── AutoComplete.tsx
│ │ │ ├── AutoCompleteContext.tsx
│ │ │ └── AutoCompleteNative.tsx
│ │ ├── Avatar
│ │ │ ├── Avatar.md
│ │ │ ├── Avatar.module.scss
│ │ │ ├── Avatar.spec.ts
│ │ │ ├── Avatar.tsx
│ │ │ └── AvatarNative.tsx
│ │ ├── Backdrop
│ │ │ ├── Backdrop.md
│ │ │ ├── Backdrop.module.scss
│ │ │ ├── Backdrop.spec.ts
│ │ │ ├── Backdrop.tsx
│ │ │ └── BackdropNative.tsx
│ │ ├── Badge
│ │ │ ├── Badge.md
│ │ │ ├── Badge.module.scss
│ │ │ ├── Badge.spec.ts
│ │ │ ├── Badge.tsx
│ │ │ └── BadgeNative.tsx
│ │ ├── Bookmark
│ │ │ ├── Bookmark.md
│ │ │ ├── Bookmark.module.scss
│ │ │ ├── Bookmark.spec.ts
│ │ │ ├── Bookmark.tsx
│ │ │ └── BookmarkNative.tsx
│ │ ├── Breakout
│ │ │ ├── Breakout.module.scss
│ │ │ ├── Breakout.spec.ts
│ │ │ ├── Breakout.tsx
│ │ │ └── BreakoutNative.tsx
│ │ ├── Button
│ │ │ ├── Button-style.spec.ts
│ │ │ ├── Button.md
│ │ │ ├── Button.module.scss
│ │ │ ├── Button.spec.ts
│ │ │ ├── Button.tsx
│ │ │ └── ButtonNative.tsx
│ │ ├── Card
│ │ │ ├── Card.md
│ │ │ ├── Card.module.scss
│ │ │ ├── Card.spec.ts
│ │ │ ├── Card.tsx
│ │ │ └── CardNative.tsx
│ │ ├── Carousel
│ │ │ ├── Carousel.md
│ │ │ ├── Carousel.module.scss
│ │ │ ├── Carousel.spec.ts
│ │ │ ├── Carousel.tsx
│ │ │ ├── CarouselContext.tsx
│ │ │ ├── CarouselItem.tsx
│ │ │ ├── CarouselItemNative.tsx
│ │ │ └── CarouselNative.tsx
│ │ ├── ChangeListener
│ │ │ ├── ChangeListener.md
│ │ │ ├── ChangeListener.spec.ts
│ │ │ ├── ChangeListener.tsx
│ │ │ └── ChangeListenerNative.tsx
│ │ ├── chart-color-schemes.ts
│ │ ├── Charts
│ │ │ ├── AreaChart
│ │ │ │ ├── AreaChart.md
│ │ │ │ ├── AreaChart.spec.ts
│ │ │ │ ├── AreaChart.tsx
│ │ │ │ └── AreaChartNative.tsx
│ │ │ ├── BarChart
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── BarChart.module.scss
│ │ │ │ ├── BarChart.spec.ts
│ │ │ │ ├── BarChart.tsx
│ │ │ │ └── BarChartNative.tsx
│ │ │ ├── DonutChart
│ │ │ │ ├── DonutChart.spec.ts
│ │ │ │ └── DonutChart.tsx
│ │ │ ├── LabelList
│ │ │ │ ├── LabelList.module.scss
│ │ │ │ ├── LabelList.spec.ts
│ │ │ │ ├── LabelList.tsx
│ │ │ │ └── LabelListNative.tsx
│ │ │ ├── Legend
│ │ │ │ ├── Legend.spec.ts
│ │ │ │ ├── Legend.tsx
│ │ │ │ └── LegendNative.tsx
│ │ │ ├── LineChart
│ │ │ │ ├── LineChart.md
│ │ │ │ ├── LineChart.module.scss
│ │ │ │ ├── LineChart.spec.ts
│ │ │ │ ├── LineChart.tsx
│ │ │ │ └── LineChartNative.tsx
│ │ │ ├── PieChart
│ │ │ │ ├── PieChart.md
│ │ │ │ ├── PieChart.spec.ts
│ │ │ │ ├── PieChart.tsx
│ │ │ │ ├── PieChartNative.module.scss
│ │ │ │ └── PieChartNative.tsx
│ │ │ ├── RadarChart
│ │ │ │ ├── RadarChart.md
│ │ │ │ ├── RadarChart.spec.ts
│ │ │ │ ├── RadarChart.tsx
│ │ │ │ └── RadarChartNative.tsx
│ │ │ ├── Tooltip
│ │ │ │ ├── TooltipContent.module.scss
│ │ │ │ ├── TooltipContent.spec.ts
│ │ │ │ └── TooltipContent.tsx
│ │ │ └── utils
│ │ │ ├── abstractions.ts
│ │ │ └── ChartProvider.tsx
│ │ ├── Checkbox
│ │ │ ├── Checkbox.md
│ │ │ ├── Checkbox.spec.ts
│ │ │ └── Checkbox.tsx
│ │ ├── CodeBlock
│ │ │ ├── CodeBlock.module.scss
│ │ │ ├── CodeBlock.spec.ts
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── CodeBlockNative.tsx
│ │ │ └── highlight-code.ts
│ │ ├── collectedComponentMetadata.ts
│ │ ├── ColorPicker
│ │ │ ├── ColorPicker.md
│ │ │ ├── ColorPicker.module.scss
│ │ │ ├── ColorPicker.spec.ts
│ │ │ ├── ColorPicker.tsx
│ │ │ └── ColorPickerNative.tsx
│ │ ├── Column
│ │ │ ├── Column.md
│ │ │ ├── Column.tsx
│ │ │ ├── ColumnNative.tsx
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ └── TableContext.tsx
│ │ ├── component-utils.ts
│ │ ├── ComponentProvider.tsx
│ │ ├── ComponentRegistryContext.tsx
│ │ ├── container-helpers.tsx
│ │ ├── ContentSeparator
│ │ │ ├── ContentSeparator.md
│ │ │ ├── ContentSeparator.module.scss
│ │ │ ├── ContentSeparator.spec.ts
│ │ │ ├── ContentSeparator.tsx
│ │ │ ├── ContentSeparatorNative.tsx
│ │ │ └── test-padding.xmlui
│ │ ├── DataSource
│ │ │ ├── DataSource.md
│ │ │ └── DataSource.tsx
│ │ ├── DateInput
│ │ │ ├── DateInput.md
│ │ │ ├── DateInput.module.scss
│ │ │ ├── DateInput.spec.ts
│ │ │ ├── DateInput.tsx
│ │ │ └── DateInputNative.tsx
│ │ ├── DatePicker
│ │ │ ├── DatePicker.md
│ │ │ ├── DatePicker.module.scss
│ │ │ ├── DatePicker.spec.ts
│ │ │ ├── DatePicker.tsx
│ │ │ └── DatePickerNative.tsx
│ │ ├── DropdownMenu
│ │ │ ├── DropdownMenu.md
│ │ │ ├── DropdownMenu.module.scss
│ │ │ ├── DropdownMenu.spec.ts
│ │ │ ├── DropdownMenu.tsx
│ │ │ ├── DropdownMenuNative.tsx
│ │ │ ├── MenuItem.md
│ │ │ └── SubMenuItem.md
│ │ ├── EmojiSelector
│ │ │ ├── EmojiSelector.md
│ │ │ ├── EmojiSelector.spec.ts
│ │ │ ├── EmojiSelector.tsx
│ │ │ └── EmojiSelectorNative.tsx
│ │ ├── ExpandableItem
│ │ │ ├── ExpandableItem.module.scss
│ │ │ ├── ExpandableItem.spec.ts
│ │ │ ├── ExpandableItem.tsx
│ │ │ └── ExpandableItemNative.tsx
│ │ ├── FileInput
│ │ │ ├── FileInput.md
│ │ │ ├── FileInput.module.scss
│ │ │ ├── FileInput.spec.ts
│ │ │ ├── FileInput.tsx
│ │ │ └── FileInputNative.tsx
│ │ ├── FileUploadDropZone
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FileUploadDropZone.module.scss
│ │ │ ├── FileUploadDropZone.spec.ts
│ │ │ ├── FileUploadDropZone.tsx
│ │ │ └── FileUploadDropZoneNative.tsx
│ │ ├── FlowLayout
│ │ │ ├── FlowLayout.md
│ │ │ ├── FlowLayout.module.scss
│ │ │ ├── FlowLayout.spec.ts
│ │ │ ├── FlowLayout.spec.ts-snapshots
│ │ │ │ └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
│ │ │ ├── FlowLayout.tsx
│ │ │ └── FlowLayoutNative.tsx
│ │ ├── Footer
│ │ │ ├── Footer.md
│ │ │ ├── Footer.module.scss
│ │ │ ├── Footer.spec.ts
│ │ │ ├── Footer.tsx
│ │ │ └── FooterNative.tsx
│ │ ├── Form
│ │ │ ├── Form.md
│ │ │ ├── Form.module.scss
│ │ │ ├── Form.spec.ts
│ │ │ ├── Form.tsx
│ │ │ ├── formActions.ts
│ │ │ ├── FormContext.ts
│ │ │ └── FormNative.tsx
│ │ ├── FormItem
│ │ │ ├── FormItem.md
│ │ │ ├── FormItem.module.scss
│ │ │ ├── FormItem.spec.ts
│ │ │ ├── FormItem.tsx
│ │ │ ├── FormItemNative.tsx
│ │ │ ├── HelperText.module.scss
│ │ │ ├── HelperText.tsx
│ │ │ ├── ItemWithLabel.tsx
│ │ │ └── Validations.ts
│ │ ├── FormSection
│ │ │ ├── FormSection.md
│ │ │ ├── FormSection.ts
│ │ │ └── FormSection.xmlui
│ │ ├── Fragment
│ │ │ ├── Fragment.spec.ts
│ │ │ └── Fragment.tsx
│ │ ├── Heading
│ │ │ ├── abstractions.ts
│ │ │ ├── H1.md
│ │ │ ├── H1.spec.ts
│ │ │ ├── H2.md
│ │ │ ├── H2.spec.ts
│ │ │ ├── H3.md
│ │ │ ├── H3.spec.ts
│ │ │ ├── H4.md
│ │ │ ├── H4.spec.ts
│ │ │ ├── H5.md
│ │ │ ├── H5.spec.ts
│ │ │ ├── H6.md
│ │ │ ├── H6.spec.ts
│ │ │ ├── Heading.md
│ │ │ ├── Heading.module.scss
│ │ │ ├── Heading.spec.ts
│ │ │ ├── Heading.tsx
│ │ │ └── HeadingNative.tsx
│ │ ├── HoverCard
│ │ │ ├── HoverCard.tsx
│ │ │ └── HovercardNative.tsx
│ │ ├── HtmlTags
│ │ │ ├── HtmlTags.module.scss
│ │ │ ├── HtmlTags.spec.ts
│ │ │ └── HtmlTags.tsx
│ │ ├── Icon
│ │ │ ├── AdmonitionDanger.tsx
│ │ │ ├── AdmonitionInfo.tsx
│ │ │ ├── AdmonitionNote.tsx
│ │ │ ├── AdmonitionTip.tsx
│ │ │ ├── AdmonitionWarning.tsx
│ │ │ ├── ApiIcon.tsx
│ │ │ ├── ArrowDropDown.module.scss
│ │ │ ├── ArrowDropDown.tsx
│ │ │ ├── ArrowDropUp.module.scss
│ │ │ ├── ArrowDropUp.tsx
│ │ │ ├── ArrowLeft.module.scss
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowRight.module.scss
│ │ │ ├── ArrowRight.tsx
│ │ │ ├── Attach.tsx
│ │ │ ├── Binding.module.scss
│ │ │ ├── Binding.tsx
│ │ │ ├── BoardIcon.tsx
│ │ │ ├── BoxIcon.tsx
│ │ │ ├── CheckIcon.tsx
│ │ │ ├── ChevronDownIcon.tsx
│ │ │ ├── ChevronLeft.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUpIcon.tsx
│ │ │ ├── CodeFileIcon.tsx
│ │ │ ├── CodeSandbox.tsx
│ │ │ ├── CompactListIcon.tsx
│ │ │ ├── ContentCopyIcon.tsx
│ │ │ ├── DarkToLightIcon.tsx
│ │ │ ├── DatabaseIcon.module.scss
│ │ │ ├── DatabaseIcon.tsx
│ │ │ ├── DocFileIcon.tsx
│ │ │ ├── DocIcon.tsx
│ │ │ ├── DotMenuHorizontalIcon.tsx
│ │ │ ├── DotMenuIcon.tsx
│ │ │ ├── EmailIcon.tsx
│ │ │ ├── EmptyFolderIcon.tsx
│ │ │ ├── ErrorIcon.tsx
│ │ │ ├── ExpressionIcon.tsx
│ │ │ ├── FillPlusCricleIcon.tsx
│ │ │ ├── FilterIcon.tsx
│ │ │ ├── FolderIcon.tsx
│ │ │ ├── GlobeIcon.tsx
│ │ │ ├── HomeIcon.tsx
│ │ │ ├── HyperLinkIcon.tsx
│ │ │ ├── Icon.md
│ │ │ ├── Icon.module.scss
│ │ │ ├── Icon.spec.ts
│ │ │ ├── Icon.tsx
│ │ │ ├── IconNative.tsx
│ │ │ ├── ImageFileIcon.tsx
│ │ │ ├── Inspect.tsx
│ │ │ ├── LightToDark.tsx
│ │ │ ├── LinkIcon.tsx
│ │ │ ├── ListIcon.tsx
│ │ │ ├── LooseListIcon.tsx
│ │ │ ├── MoonIcon.tsx
│ │ │ ├── MoreOptionsIcon.tsx
│ │ │ ├── NoSortIcon.tsx
│ │ │ ├── PDFIcon.tsx
│ │ │ ├── PenIcon.tsx
│ │ │ ├── PhoneIcon.tsx
│ │ │ ├── PhotoIcon.tsx
│ │ │ ├── PlusIcon.tsx
│ │ │ ├── SearchIcon.tsx
│ │ │ ├── ShareIcon.tsx
│ │ │ ├── SortAscendingIcon.tsx
│ │ │ ├── SortDescendingIcon.tsx
│ │ │ ├── StarsIcon.tsx
│ │ │ ├── SunIcon.tsx
│ │ │ ├── svg
│ │ │ │ ├── admonition_danger.svg
│ │ │ │ ├── admonition_info.svg
│ │ │ │ ├── admonition_note.svg
│ │ │ │ ├── admonition_tip.svg
│ │ │ │ ├── admonition_warning.svg
│ │ │ │ ├── api.svg
│ │ │ │ ├── arrow-dropdown.svg
│ │ │ │ ├── arrow-left.svg
│ │ │ │ ├── arrow-right.svg
│ │ │ │ ├── arrow-up.svg
│ │ │ │ ├── attach.svg
│ │ │ │ ├── binding.svg
│ │ │ │ ├── box.svg
│ │ │ │ ├── bulb.svg
│ │ │ │ ├── code-file.svg
│ │ │ │ ├── code-sandbox.svg
│ │ │ │ ├── dark_to_light.svg
│ │ │ │ ├── database.svg
│ │ │ │ ├── doc.svg
│ │ │ │ ├── empty-folder.svg
│ │ │ │ ├── expression.svg
│ │ │ │ ├── eye-closed.svg
│ │ │ │ ├── eye-dark.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── file-text.svg
│ │ │ │ ├── filter.svg
│ │ │ │ ├── folder.svg
│ │ │ │ ├── img.svg
│ │ │ │ ├── inspect.svg
│ │ │ │ ├── light_to_dark.svg
│ │ │ │ ├── moon.svg
│ │ │ │ ├── pdf.svg
│ │ │ │ ├── photo.svg
│ │ │ │ ├── share.svg
│ │ │ │ ├── stars.svg
│ │ │ │ ├── sun.svg
│ │ │ │ ├── trending-down.svg
│ │ │ │ ├── trending-level.svg
│ │ │ │ ├── trending-up.svg
│ │ │ │ ├── txt.svg
│ │ │ │ ├── unknown-file.svg
│ │ │ │ ├── unlink.svg
│ │ │ │ └── xls.svg
│ │ │ ├── TableDeleteColumnIcon.tsx
│ │ │ ├── TableDeleteRowIcon.tsx
│ │ │ ├── TableInsertColumnIcon.tsx
│ │ │ ├── TableInsertRowIcon.tsx
│ │ │ ├── TrashIcon.tsx
│ │ │ ├── TrendingDownIcon.tsx
│ │ │ ├── TrendingLevelIcon.tsx
│ │ │ ├── TrendingUpIcon.tsx
│ │ │ ├── TxtIcon.tsx
│ │ │ ├── UnknownFileIcon.tsx
│ │ │ ├── UnlinkIcon.tsx
│ │ │ ├── UserIcon.tsx
│ │ │ ├── WarningIcon.tsx
│ │ │ └── XlsIcon.tsx
│ │ ├── IconProvider.tsx
│ │ ├── IconRegistryContext.tsx
│ │ ├── IFrame
│ │ │ ├── IFrame.md
│ │ │ ├── IFrame.module.scss
│ │ │ ├── IFrame.spec.ts
│ │ │ ├── IFrame.tsx
│ │ │ └── IFrameNative.tsx
│ │ ├── Image
│ │ │ ├── Image.md
│ │ │ ├── Image.module.scss
│ │ │ ├── Image.spec.ts
│ │ │ ├── Image.tsx
│ │ │ └── ImageNative.tsx
│ │ ├── Input
│ │ │ ├── index.ts
│ │ │ ├── InputAdornment.module.scss
│ │ │ ├── InputAdornment.tsx
│ │ │ ├── InputDivider.module.scss
│ │ │ ├── InputDivider.tsx
│ │ │ ├── InputLabel.module.scss
│ │ │ ├── InputLabel.tsx
│ │ │ ├── PartialInput.module.scss
│ │ │ └── PartialInput.tsx
│ │ ├── InspectButton
│ │ │ ├── InspectButton.module.scss
│ │ │ └── InspectButton.tsx
│ │ ├── Items
│ │ │ ├── Items.md
│ │ │ ├── Items.spec.ts
│ │ │ ├── Items.tsx
│ │ │ └── ItemsNative.tsx
│ │ ├── Link
│ │ │ ├── Link.md
│ │ │ ├── Link.module.scss
│ │ │ ├── Link.spec.ts
│ │ │ ├── Link.tsx
│ │ │ └── LinkNative.tsx
│ │ ├── List
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── List.md
│ │ │ ├── List.module.scss
│ │ │ ├── List.spec.ts
│ │ │ ├── List.tsx
│ │ │ └── ListNative.tsx
│ │ ├── Logo
│ │ │ ├── doc-resources
│ │ │ │ └── xmlui-logo.svg
│ │ │ ├── Logo.md
│ │ │ ├── Logo.tsx
│ │ │ └── LogoNative.tsx
│ │ ├── Markdown
│ │ │ ├── CodeText.module.scss
│ │ │ ├── CodeText.tsx
│ │ │ ├── Markdown.md
│ │ │ ├── Markdown.module.scss
│ │ │ ├── Markdown.spec.ts
│ │ │ ├── Markdown.tsx
│ │ │ ├── MarkdownNative.tsx
│ │ │ ├── parse-binding-expr.ts
│ │ │ └── utils.ts
│ │ ├── metadata-helpers.ts
│ │ ├── ModalDialog
│ │ │ ├── ConfirmationModalContextProvider.tsx
│ │ │ ├── Dialog.module.scss
│ │ │ ├── Dialog.tsx
│ │ │ ├── ModalDialog.md
│ │ │ ├── ModalDialog.module.scss
│ │ │ ├── ModalDialog.spec.ts
│ │ │ ├── ModalDialog.tsx
│ │ │ ├── ModalDialogNative.tsx
│ │ │ └── ModalVisibilityContext.tsx
│ │ ├── NavGroup
│ │ │ ├── NavGroup.md
│ │ │ ├── NavGroup.module.scss
│ │ │ ├── NavGroup.spec.ts
│ │ │ ├── NavGroup.tsx
│ │ │ ├── NavGroupContext.ts
│ │ │ └── NavGroupNative.tsx
│ │ ├── NavLink
│ │ │ ├── NavLink.md
│ │ │ ├── NavLink.module.scss
│ │ │ ├── NavLink.spec.ts
│ │ │ ├── NavLink.tsx
│ │ │ └── NavLinkNative.tsx
│ │ ├── NavPanel
│ │ │ ├── NavPanel.md
│ │ │ ├── NavPanel.module.scss
│ │ │ ├── NavPanel.spec.ts
│ │ │ ├── NavPanel.tsx
│ │ │ └── NavPanelNative.tsx
│ │ ├── NestedApp
│ │ │ ├── AppWithCodeView.module.scss
│ │ │ ├── AppWithCodeView.tsx
│ │ │ ├── AppWithCodeViewNative.tsx
│ │ │ ├── defaultProps.tsx
│ │ │ ├── logo.svg
│ │ │ ├── NestedApp.module.scss
│ │ │ ├── NestedApp.tsx
│ │ │ ├── NestedAppNative.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── utils.ts
│ │ ├── NoResult
│ │ │ ├── NoResult.md
│ │ │ ├── NoResult.module.scss
│ │ │ ├── NoResult.spec.ts
│ │ │ ├── NoResult.tsx
│ │ │ └── NoResultNative.tsx
│ │ ├── NumberBox
│ │ │ ├── numberbox-abstractions.ts
│ │ │ ├── NumberBox.md
│ │ │ ├── NumberBox.module.scss
│ │ │ ├── NumberBox.spec.ts
│ │ │ ├── NumberBox.tsx
│ │ │ └── NumberBoxNative.tsx
│ │ ├── Option
│ │ │ ├── Option.md
│ │ │ ├── Option.spec.ts
│ │ │ ├── Option.tsx
│ │ │ ├── OptionNative.tsx
│ │ │ └── OptionTypeProvider.tsx
│ │ ├── PageMetaTitle
│ │ │ ├── PageMetaTilteNative.tsx
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── PageMetaTitle.spec.ts
│ │ │ └── PageMetaTitle.tsx
│ │ ├── Pages
│ │ │ ├── Page.md
│ │ │ ├── Pages.md
│ │ │ ├── Pages.module.scss
│ │ │ ├── Pages.tsx
│ │ │ └── PagesNative.tsx
│ │ ├── Pagination
│ │ │ ├── Pagination.md
│ │ │ ├── Pagination.module.scss
│ │ │ ├── Pagination.spec.ts
│ │ │ ├── Pagination.tsx
│ │ │ └── PaginationNative.tsx
│ │ ├── PositionedContainer
│ │ │ ├── PositionedContainer.module.scss
│ │ │ ├── PositionedContainer.tsx
│ │ │ └── PositionedContainerNative.tsx
│ │ ├── ProfileMenu
│ │ │ ├── ProfileMenu.module.scss
│ │ │ └── ProfileMenu.tsx
│ │ ├── ProgressBar
│ │ │ ├── ProgressBar.md
│ │ │ ├── ProgressBar.module.scss
│ │ │ ├── ProgressBar.spec.ts
│ │ │ ├── ProgressBar.tsx
│ │ │ └── ProgressBarNative.tsx
│ │ ├── Queue
│ │ │ ├── Queue.md
│ │ │ ├── Queue.spec.ts
│ │ │ ├── Queue.tsx
│ │ │ ├── queueActions.ts
│ │ │ └── QueueNative.tsx
│ │ ├── RadioGroup
│ │ │ ├── RadioGroup.md
│ │ │ ├── RadioGroup.module.scss
│ │ │ ├── RadioGroup.spec.ts
│ │ │ ├── RadioGroup.tsx
│ │ │ ├── RadioGroupNative.tsx
│ │ │ ├── RadioItem.tsx
│ │ │ └── RadioItemNative.tsx
│ │ ├── RealTimeAdapter
│ │ │ ├── RealTimeAdapter.tsx
│ │ │ └── RealTimeAdapterNative.tsx
│ │ ├── Redirect
│ │ │ ├── Redirect.md
│ │ │ ├── Redirect.spec.ts
│ │ │ └── Redirect.tsx
│ │ ├── ResponsiveBar
│ │ │ ├── README.md
│ │ │ ├── ResponsiveBar.md
│ │ │ ├── ResponsiveBar.module.scss
│ │ │ ├── ResponsiveBar.spec.ts
│ │ │ ├── ResponsiveBar.tsx
│ │ │ └── ResponsiveBarNative.tsx
│ │ ├── Select
│ │ │ ├── HiddenOption.tsx
│ │ │ ├── OptionContext.ts
│ │ │ ├── Select.md
│ │ │ ├── Select.module.scss
│ │ │ ├── Select.spec.ts
│ │ │ ├── Select.tsx
│ │ │ ├── SelectContext.tsx
│ │ │ └── SelectNative.tsx
│ │ ├── SelectionStore
│ │ │ ├── SelectionStore.md
│ │ │ ├── SelectionStore.tsx
│ │ │ └── SelectionStoreNative.tsx
│ │ ├── Slider
│ │ │ ├── Slider.md
│ │ │ ├── Slider.module.scss
│ │ │ ├── Slider.spec.ts
│ │ │ ├── Slider.tsx
│ │ │ └── SliderNative.tsx
│ │ ├── Slot
│ │ │ ├── Slot.md
│ │ │ ├── Slot.spec.ts
│ │ │ └── Slot.ts
│ │ ├── SlotItem.tsx
│ │ ├── SpaceFiller
│ │ │ ├── SpaceFiller.md
│ │ │ ├── SpaceFiller.module.scss
│ │ │ ├── SpaceFiller.spec.ts
│ │ │ ├── SpaceFiller.tsx
│ │ │ └── SpaceFillerNative.tsx
│ │ ├── Spinner
│ │ │ ├── Spinner.md
│ │ │ ├── Spinner.module.scss
│ │ │ ├── Spinner.spec.ts
│ │ │ ├── Spinner.tsx
│ │ │ └── SpinnerNative.tsx
│ │ ├── Splitter
│ │ │ ├── HSplitter.md
│ │ │ ├── HSplitter.spec.ts
│ │ │ ├── Splitter.md
│ │ │ ├── Splitter.module.scss
│ │ │ ├── Splitter.spec.ts
│ │ │ ├── Splitter.tsx
│ │ │ ├── SplitterNative.tsx
│ │ │ ├── utils.ts
│ │ │ ├── VSplitter.md
│ │ │ └── VSplitter.spec.ts
│ │ ├── Stack
│ │ │ ├── CHStack.md
│ │ │ ├── CHStack.spec.ts
│ │ │ ├── CVStack.md
│ │ │ ├── CVStack.spec.ts
│ │ │ ├── HStack.md
│ │ │ ├── HStack.spec.ts
│ │ │ ├── Stack.md
│ │ │ ├── Stack.module.scss
│ │ │ ├── Stack.spec.ts
│ │ │ ├── Stack.tsx
│ │ │ ├── StackNative.tsx
│ │ │ ├── VStack.md
│ │ │ └── VStack.spec.ts
│ │ ├── StickyBox
│ │ │ ├── StickyBox.md
│ │ │ ├── StickyBox.module.scss
│ │ │ ├── StickyBox.tsx
│ │ │ └── StickyBoxNative.tsx
│ │ ├── Switch
│ │ │ ├── Switch.md
│ │ │ ├── Switch.spec.ts
│ │ │ └── Switch.tsx
│ │ ├── Table
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── react-table-config.d.ts
│ │ │ ├── Table.md
│ │ │ ├── Table.module.scss
│ │ │ ├── Table.spec.ts
│ │ │ ├── Table.tsx
│ │ │ ├── TableNative.tsx
│ │ │ └── useRowSelection.tsx
│ │ ├── TableOfContents
│ │ │ ├── TableOfContents.module.scss
│ │ │ ├── TableOfContents.spec.ts
│ │ │ ├── TableOfContents.tsx
│ │ │ └── TableOfContentsNative.tsx
│ │ ├── Tabs
│ │ │ ├── TabContext.tsx
│ │ │ ├── TabItem.md
│ │ │ ├── TabItem.tsx
│ │ │ ├── TabItemNative.tsx
│ │ │ ├── Tabs.md
│ │ │ ├── Tabs.module.scss
│ │ │ ├── Tabs.spec.ts
│ │ │ ├── Tabs.tsx
│ │ │ └── TabsNative.tsx
│ │ ├── Text
│ │ │ ├── Text.md
│ │ │ ├── Text.module.scss
│ │ │ ├── Text.spec.ts
│ │ │ ├── Text.tsx
│ │ │ └── TextNative.tsx
│ │ ├── TextArea
│ │ │ ├── TextArea.md
│ │ │ ├── TextArea.module.scss
│ │ │ ├── TextArea.spec.ts
│ │ │ ├── TextArea.tsx
│ │ │ ├── TextAreaNative.tsx
│ │ │ ├── TextAreaResizable.tsx
│ │ │ └── useComposedRef.ts
│ │ ├── TextBox
│ │ │ ├── TextBox.md
│ │ │ ├── TextBox.module.scss
│ │ │ ├── TextBox.spec.ts
│ │ │ ├── TextBox.tsx
│ │ │ └── TextBoxNative.tsx
│ │ ├── Theme
│ │ │ ├── NotificationToast.tsx
│ │ │ ├── Theme.md
│ │ │ ├── Theme.module.scss
│ │ │ ├── Theme.spec.ts
│ │ │ ├── Theme.tsx
│ │ │ └── ThemeNative.tsx
│ │ ├── TimeInput
│ │ │ ├── TimeInput.md
│ │ │ ├── TimeInput.module.scss
│ │ │ ├── TimeInput.spec.ts
│ │ │ ├── TimeInput.tsx
│ │ │ ├── TimeInputNative.tsx
│ │ │ └── utils.ts
│ │ ├── Timer
│ │ │ ├── Timer.md
│ │ │ ├── Timer.spec.ts
│ │ │ ├── Timer.tsx
│ │ │ └── TimerNative.tsx
│ │ ├── Toggle
│ │ │ ├── Toggle.module.scss
│ │ │ └── Toggle.tsx
│ │ ├── ToneChangerButton
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneChangerButton.spec.ts
│ │ │ └── ToneChangerButton.tsx
│ │ ├── ToneSwitch
│ │ │ ├── ToneSwitch.md
│ │ │ ├── ToneSwitch.module.scss
│ │ │ ├── ToneSwitch.spec.ts
│ │ │ ├── ToneSwitch.tsx
│ │ │ └── ToneSwitchNative.tsx
│ │ ├── Tooltip
│ │ │ ├── Tooltip.md
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.spec.ts
│ │ │ ├── Tooltip.tsx
│ │ │ └── TooltipNative.tsx
│ │ ├── Tree
│ │ │ ├── testData.ts
│ │ │ ├── Tree-dynamic.spec.ts
│ │ │ ├── Tree-icons.spec.ts
│ │ │ ├── Tree.md
│ │ │ ├── Tree.spec.ts
│ │ │ ├── TreeComponent.module.scss
│ │ │ ├── TreeComponent.tsx
│ │ │ └── TreeNative.tsx
│ │ ├── TreeDisplay
│ │ │ ├── TreeDisplay.md
│ │ │ ├── TreeDisplay.module.scss
│ │ │ ├── TreeDisplay.tsx
│ │ │ └── TreeDisplayNative.tsx
│ │ ├── ValidationSummary
│ │ │ ├── ValidationSummary.module.scss
│ │ │ └── ValidationSummary.tsx
│ │ └── VisuallyHidden.tsx
│ ├── components-core
│ │ ├── abstractions
│ │ │ ├── ComponentRenderer.ts
│ │ │ ├── LoaderRenderer.ts
│ │ │ ├── standalone.ts
│ │ │ └── treeAbstractions.ts
│ │ ├── action
│ │ │ ├── actions.ts
│ │ │ ├── APICall.tsx
│ │ │ ├── FileDownloadAction.tsx
│ │ │ ├── FileUploadAction.tsx
│ │ │ ├── NavigateAction.tsx
│ │ │ └── TimedAction.tsx
│ │ ├── ApiBoundComponent.tsx
│ │ ├── appContext
│ │ │ ├── date-functions.ts
│ │ │ ├── math-function.ts
│ │ │ └── misc-utils.ts
│ │ ├── AppContext.tsx
│ │ ├── behaviors
│ │ │ ├── Behavior.tsx
│ │ │ └── CoreBehaviors.tsx
│ │ ├── component-hooks.ts
│ │ ├── ComponentDecorator.tsx
│ │ ├── ComponentViewer.tsx
│ │ ├── CompoundComponent.tsx
│ │ ├── constants.ts
│ │ ├── DebugViewProvider.tsx
│ │ ├── descriptorHelper.ts
│ │ ├── devtools
│ │ │ ├── InspectorDialog.module.scss
│ │ │ ├── InspectorDialog.tsx
│ │ │ └── InspectorDialogVisibilityContext.tsx
│ │ ├── EngineError.ts
│ │ ├── event-handlers.ts
│ │ ├── InspectorButton.module.scss
│ │ ├── InspectorContext.tsx
│ │ ├── interception
│ │ │ ├── abstractions.ts
│ │ │ ├── ApiInterceptor.ts
│ │ │ ├── ApiInterceptorProvider.tsx
│ │ │ ├── apiInterceptorWorker.ts
│ │ │ ├── Backend.ts
│ │ │ ├── Errors.ts
│ │ │ ├── IndexedDb.ts
│ │ │ ├── initMock.ts
│ │ │ ├── InMemoryDb.ts
│ │ │ ├── ReadonlyCollection.ts
│ │ │ └── useApiInterceptorContext.tsx
│ │ ├── loader
│ │ │ ├── ApiLoader.tsx
│ │ │ ├── DataLoader.tsx
│ │ │ ├── ExternalDataLoader.tsx
│ │ │ ├── Loader.tsx
│ │ │ ├── MockLoaderRenderer.tsx
│ │ │ └── PageableLoader.tsx
│ │ ├── LoaderComponent.tsx
│ │ ├── markup-check.ts
│ │ ├── parts.ts
│ │ ├── renderers.ts
│ │ ├── rendering
│ │ │ ├── AppContent.tsx
│ │ │ ├── AppRoot.tsx
│ │ │ ├── AppWrapper.tsx
│ │ │ ├── buildProxy.ts
│ │ │ ├── collectFnVarDeps.ts
│ │ │ ├── ComponentAdapter.tsx
│ │ │ ├── ComponentWrapper.tsx
│ │ │ ├── Container.tsx
│ │ │ ├── containers.ts
│ │ │ ├── ContainerWrapper.tsx
│ │ │ ├── ErrorBoundary.module.scss
│ │ │ ├── ErrorBoundary.tsx
│ │ │ ├── InvalidComponent.module.scss
│ │ │ ├── InvalidComponent.tsx
│ │ │ ├── nodeUtils.ts
│ │ │ ├── reducer.ts
│ │ │ ├── renderChild.tsx
│ │ │ ├── StandaloneComponent.tsx
│ │ │ ├── StateContainer.tsx
│ │ │ ├── UnknownComponent.module.scss
│ │ │ ├── UnknownComponent.tsx
│ │ │ └── valueExtractor.ts
│ │ ├── reportEngineError.ts
│ │ ├── RestApiProxy.ts
│ │ ├── script-runner
│ │ │ ├── asyncProxy.ts
│ │ │ ├── AttributeValueParser.ts
│ │ │ ├── bannedFunctions.ts
│ │ │ ├── BindingTreeEvaluationContext.ts
│ │ │ ├── eval-tree-async.ts
│ │ │ ├── eval-tree-common.ts
│ │ │ ├── eval-tree-sync.ts
│ │ │ ├── ParameterParser.ts
│ │ │ ├── process-statement-async.ts
│ │ │ ├── process-statement-common.ts
│ │ │ ├── process-statement-sync.ts
│ │ │ ├── ScriptingSourceTree.ts
│ │ │ ├── simplify-expression.ts
│ │ │ ├── statement-queue.ts
│ │ │ └── visitors.ts
│ │ ├── StandaloneApp.tsx
│ │ ├── StandaloneExtensionManager.ts
│ │ ├── TableOfContentsContext.tsx
│ │ ├── theming
│ │ │ ├── _themes.scss
│ │ │ ├── component-layout-resolver.ts
│ │ │ ├── extendThemeUtils.ts
│ │ │ ├── hvar.ts
│ │ │ ├── layout-resolver.ts
│ │ │ ├── parse-layout-props.ts
│ │ │ ├── StyleContext.tsx
│ │ │ ├── StyleRegistry.ts
│ │ │ ├── ThemeContext.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── themes
│ │ │ │ ├── base-utils.ts
│ │ │ │ ├── palette.ts
│ │ │ │ ├── root.ts
│ │ │ │ ├── solid.ts
│ │ │ │ ├── theme-colors.ts
│ │ │ │ └── xmlui.ts
│ │ │ ├── themeVars.module.scss
│ │ │ ├── themeVars.ts
│ │ │ ├── transformThemeVars.ts
│ │ │ └── utils.ts
│ │ ├── utils
│ │ │ ├── actionUtils.ts
│ │ │ ├── audio-utils.ts
│ │ │ ├── base64-utils.ts
│ │ │ ├── compound-utils.ts
│ │ │ ├── css-utils.ts
│ │ │ ├── DataLoaderQueryKeyGenerator.ts
│ │ │ ├── date-utils.ts
│ │ │ ├── extractParam.ts
│ │ │ ├── hooks.tsx
│ │ │ ├── LruCache.ts
│ │ │ ├── mergeProps.ts
│ │ │ ├── misc.ts
│ │ │ ├── request-params.ts
│ │ │ ├── statementUtils.ts
│ │ │ └── treeUtils.ts
│ │ └── xmlui-parser.ts
│ ├── index-standalone.ts
│ ├── index.scss
│ ├── index.ts
│ ├── language-server
│ │ ├── server-common.ts
│ │ ├── server-web-worker.ts
│ │ ├── server.ts
│ │ ├── services
│ │ │ ├── common
│ │ │ │ ├── docs-generation.ts
│ │ │ │ ├── lsp-utils.ts
│ │ │ │ ├── metadata-utils.ts
│ │ │ │ └── syntax-node-utilities.ts
│ │ │ ├── completion.ts
│ │ │ ├── diagnostic.ts
│ │ │ ├── format.ts
│ │ │ └── hover.ts
│ │ └── xmlui-metadata-generated.js
│ ├── logging
│ │ ├── LoggerContext.tsx
│ │ ├── LoggerInitializer.tsx
│ │ ├── LoggerService.ts
│ │ └── xmlui.ts
│ ├── logo.svg
│ ├── parsers
│ │ ├── common
│ │ │ ├── GenericToken.ts
│ │ │ ├── InputStream.ts
│ │ │ └── utils.ts
│ │ ├── scripting
│ │ │ ├── code-behind-collect.ts
│ │ │ ├── Lexer.ts
│ │ │ ├── modules.ts
│ │ │ ├── Parser.ts
│ │ │ ├── ParserError.ts
│ │ │ ├── ScriptingNodeTypes.ts
│ │ │ ├── TokenTrait.ts
│ │ │ ├── TokenType.ts
│ │ │ └── tree-visitor.ts
│ │ ├── style-parser
│ │ │ ├── errors.ts
│ │ │ ├── source-tree.ts
│ │ │ ├── StyleInputStream.ts
│ │ │ ├── StyleLexer.ts
│ │ │ ├── StyleParser.ts
│ │ │ └── tokens.ts
│ │ └── xmlui-parser
│ │ ├── CharacterCodes.ts
│ │ ├── diagnostics.ts
│ │ ├── fileExtensions.ts
│ │ ├── index.ts
│ │ ├── lint.ts
│ │ ├── parser.ts
│ │ ├── ParserError.ts
│ │ ├── scanner.ts
│ │ ├── syntax-kind.ts
│ │ ├── syntax-node.ts
│ │ ├── transform.ts
│ │ ├── utils.ts
│ │ ├── xmlui-serializer.ts
│ │ └── xmlui-tree.ts
│ ├── react-app-env.d.ts
│ ├── syntax
│ │ ├── monaco
│ │ │ ├── grammar.monacoLanguage.ts
│ │ │ ├── index.ts
│ │ │ ├── xmlui-dark.ts
│ │ │ ├── xmlui-light.ts
│ │ │ └── xmluiscript.monacoLanguage.ts
│ │ └── textMate
│ │ ├── index.ts
│ │ ├── xmlui-dark.json
│ │ ├── xmlui-light.json
│ │ ├── xmlui.json
│ │ └── xmlui.tmLanguage.json
│ ├── testing
│ │ ├── assertions.ts
│ │ ├── component-test-helpers.ts
│ │ ├── ComponentDrivers.ts
│ │ ├── drivers
│ │ │ ├── DateInputDriver.ts
│ │ │ ├── index.ts
│ │ │ ├── ModalDialogDriver.ts
│ │ │ ├── NumberBoxDriver.ts
│ │ │ ├── TextBoxDriver.ts
│ │ │ ├── TimeInputDriver.ts
│ │ │ ├── TimerDriver.ts
│ │ │ └── TreeDriver.ts
│ │ ├── fixtures.ts
│ │ ├── index.ts
│ │ ├── infrastructure
│ │ │ ├── index.html
│ │ │ ├── main.tsx
│ │ │ ├── public
│ │ │ │ ├── mockServiceWorker.js
│ │ │ │ ├── resources
│ │ │ │ │ ├── bell.svg
│ │ │ │ │ ├── box.svg
│ │ │ │ │ ├── doc.svg
│ │ │ │ │ ├── eye.svg
│ │ │ │ │ ├── flower-640x480.jpg
│ │ │ │ │ ├── sun.svg
│ │ │ │ │ ├── test-image-100x100.jpg
│ │ │ │ │ └── txt.svg
│ │ │ │ └── serve.json
│ │ │ └── TestBed.tsx
│ │ └── themed-app-test-helpers.ts
│ └── vite-env.d.ts
├── tests
│ ├── components
│ │ ├── CodeBlock
│ │ │ └── hightlight-code.test.ts
│ │ ├── playground-pattern.test.ts
│ │ └── Tree
│ │ └── Tree-states.test.ts
│ ├── components-core
│ │ ├── abstractions
│ │ │ └── treeAbstractions.test.ts
│ │ ├── container
│ │ │ └── buildProxy.test.ts
│ │ ├── interception
│ │ │ ├── orderBy.test.ts
│ │ │ ├── ReadOnlyCollection.test.ts
│ │ │ └── request-param-converter.test.ts
│ │ ├── scripts-runner
│ │ │ ├── AttributeValueParser.test.ts
│ │ │ ├── eval-tree-arrow-async.test.ts
│ │ │ ├── eval-tree-arrow.test.ts
│ │ │ ├── eval-tree-func-decl-async.test.ts
│ │ │ ├── eval-tree-func-decl.test.ts
│ │ │ ├── eval-tree-pre-post.test.ts
│ │ │ ├── eval-tree-regression.test.ts
│ │ │ ├── eval-tree.test.ts
│ │ │ ├── function-proxy.test.ts
│ │ │ ├── parser-regression.test.ts
│ │ │ ├── process-event.test.ts
│ │ │ ├── process-function.test.ts
│ │ │ ├── process-implicit-context.test.ts
│ │ │ ├── process-statement-asgn.test.ts
│ │ │ ├── process-statement-destruct.test.ts
│ │ │ ├── process-statement-regs.test.ts
│ │ │ ├── process-statement-sync.test.ts
│ │ │ ├── process-statement.test.ts
│ │ │ ├── process-switch-sync.test.ts
│ │ │ ├── process-switch.test.ts
│ │ │ ├── process-try-sync.test.ts
│ │ │ ├── process-try.test.ts
│ │ │ └── test-helpers.ts
│ │ ├── test-metadata-handler.ts
│ │ ├── theming
│ │ │ ├── border-segments.test.ts
│ │ │ ├── component-layout.resolver.test.ts
│ │ │ ├── layout-property-parser.test.ts
│ │ │ ├── layout-resolver.test.ts
│ │ │ ├── layout-resolver2.test.ts
│ │ │ ├── layout-vp-override.test.ts
│ │ │ └── padding-segments.test.ts
│ │ └── utils
│ │ ├── date-utils.test.ts
│ │ ├── format-human-elapsed-time.test.ts
│ │ └── LruCache.test.ts
│ ├── language-server
│ │ ├── completion.test.ts
│ │ ├── format.test.ts
│ │ ├── hover.test.ts
│ │ └── mockData.ts
│ └── parsers
│ ├── common
│ │ └── input-stream.test.ts
│ ├── markdown
│ │ └── parse-binding-expression.test.ts
│ ├── parameter-parser.test.ts
│ ├── paremeter-parser.test.ts
│ ├── scripting
│ │ ├── eval-tree-arrow.test.ts
│ │ ├── eval-tree-pre-post.test.ts
│ │ ├── eval-tree.test.ts
│ │ ├── function-proxy.test.ts
│ │ ├── lexer-literals.test.ts
│ │ ├── lexer-misc.test.ts
│ │ ├── module-parse.test.ts
│ │ ├── parser-arrow.test.ts
│ │ ├── parser-assignments.test.ts
│ │ ├── parser-binary.test.ts
│ │ ├── parser-destructuring.test.ts
│ │ ├── parser-errors.test.ts
│ │ ├── parser-expressions.test.ts
│ │ ├── parser-function.test.ts
│ │ ├── parser-literals.test.ts
│ │ ├── parser-primary.test.ts
│ │ ├── parser-regex.test.ts
│ │ ├── parser-statements.test.ts
│ │ ├── parser-unary.test.ts
│ │ ├── process-event.test.ts
│ │ ├── process-implicit-context.test.ts
│ │ ├── process-statement-asgn.test.ts
│ │ ├── process-statement-destruct.test.ts
│ │ ├── process-statement-regs.test.ts
│ │ ├── process-statement-sync.test.ts
│ │ ├── process-statement.test.ts
│ │ ├── process-switch-sync.test.ts
│ │ ├── process-switch.test.ts
│ │ ├── process-try-sync.test.ts
│ │ ├── process-try.test.ts
│ │ ├── simplify-expression.test.ts
│ │ ├── statement-hooks.test.ts
│ │ └── test-helpers.ts
│ ├── style-parser
│ │ ├── generateHvarChain.test.ts
│ │ ├── parseHVar.test.ts
│ │ ├── parser.test.ts
│ │ └── tokens.test.ts
│ └── xmlui
│ ├── lint.test.ts
│ ├── parser.test.ts
│ ├── scanner.test.ts
│ ├── transform.attr.test.ts
│ ├── transform.circular.test.ts
│ ├── transform.element.test.ts
│ ├── transform.errors.test.ts
│ ├── transform.escape.test.ts
│ ├── transform.regression.test.ts
│ ├── transform.script.test.ts
│ ├── transform.test.ts
│ └── xmlui.ts
├── tests-e2e
│ ├── api-bound-component-regression.spec.ts
│ ├── api-call-as-extracted-component.spec.ts
│ ├── assign-to-object-or-array-regression.spec.ts
│ ├── binding-regression.spec.ts
│ ├── children-as-template-context-vars.spec.ts
│ ├── compound-component.spec.ts
│ ├── context-vars-regression.spec.ts
│ ├── data-bindings.spec.ts
│ ├── datasource-and-api-usage-in-var.spec.ts
│ ├── datasource-direct-binding.spec.ts
│ ├── datasource-onLoaded-regression.spec.ts
│ ├── modify-array-item-regression.spec.ts
│ ├── namespaces.spec.ts
│ ├── push-to-array-regression.spec.ts
│ ├── screen-breakpoints.spec.ts
│ ├── scripting.spec.ts
│ ├── state-scope-in-pages.spec.ts
│ └── state-var-scopes.spec.ts
├── tsconfig.json
├── tsdown.config.ts
├── vite.config.ts
└── vitest.config.ts
```
# Files
--------------------------------------------------------------------------------
/xmlui/tests/components-core/theming/padding-segments.test.ts:
--------------------------------------------------------------------------------
```typescript
1 | import { describe, expect, it } from "vitest";
2 | import { generatePaddingSegments } from "../../../src/components-core/theming/transformThemeVars";
3 |
4 | describe("generatePaddingSegments", () => {
5 | it("No padding", () => {
6 | const newTheme: Record<string, string> = {
7 | "borderColor-AppHeader": "xxx",
8 | };
9 |
10 | const result = generatePaddingSegments(newTheme);
11 |
12 | expect(result).deep.equal({
13 | "borderColor-AppHeader": "xxx",
14 | });
15 | });
16 |
17 | it("paddingHorizontal only", () => {
18 | const newTheme: Record<string, string> = {
19 | "paddingHorizontal-AppHeader": "xxx",
20 | };
21 |
22 | const result = generatePaddingSegments(newTheme);
23 |
24 | expect(result).deep.equal({
25 | "paddingHorizontal-AppHeader": "xxx",
26 | "paddingLeft-AppHeader": "xxx",
27 | "paddingRight-AppHeader": "xxx",
28 | });
29 | });
30 |
31 | it("paddingVertical only", () => {
32 | const newTheme: Record<string, string> = {
33 | "paddingVertical-AppHeader": "xxx",
34 | };
35 |
36 | const result = generatePaddingSegments(newTheme);
37 |
38 | expect(result).deep.equal({
39 | "paddingBottom-AppHeader": "xxx",
40 | "paddingTop-AppHeader": "xxx",
41 | "paddingVertical-AppHeader": "xxx",
42 | });
43 | });
44 |
45 | it("paddingHorizontal and paddingVertical", () => {
46 | const newTheme: Record<string, string> = {
47 | "paddingHorizontal-AppHeader": "xxx",
48 | "paddingVertical-AppHeader": "yyy",
49 | };
50 |
51 | const result = generatePaddingSegments(newTheme);
52 |
53 | expect(result).deep.equal({
54 | "paddingBottom-AppHeader": "yyy",
55 | "paddingHorizontal-AppHeader": "xxx",
56 | "paddingLeft-AppHeader": "xxx",
57 | "paddingRight-AppHeader": "xxx",
58 | "paddingTop-AppHeader": "yyy",
59 | "paddingVertical-AppHeader": "yyy",
60 | });
61 | });
62 |
63 | it("paddingTop only", () => {
64 | const newTheme: Record<string, string> = {
65 | "paddingTop-AppHeader": "xxx",
66 | };
67 |
68 | const result = generatePaddingSegments(newTheme);
69 |
70 | expect(result).deep.equal({
71 | "paddingTop-AppHeader": "xxx",
72 | });
73 | });
74 |
75 | it("paddingRight only", () => {
76 | const newTheme: Record<string, string> = {
77 | "paddingRight-AppHeader": "xxx",
78 | };
79 |
80 | const result = generatePaddingSegments(newTheme);
81 |
82 | expect(result).deep.equal({
83 | "paddingRight-AppHeader": "xxx",
84 | });
85 | });
86 |
87 | it("paddingBottom only", () => {
88 | const newTheme: Record<string, string> = {
89 | "paddingBottom-AppHeader": "xxx",
90 | };
91 |
92 | const result = generatePaddingSegments(newTheme);
93 |
94 | expect(result).deep.equal({
95 | "paddingBottom-AppHeader": "xxx",
96 | });
97 | });
98 |
99 | it("paddingLeft only", () => {
100 | const newTheme: Record<string, string> = {
101 | "paddingLeft-AppHeader": "xxx",
102 | };
103 |
104 | const result = generatePaddingSegments(newTheme);
105 |
106 | expect(result).deep.equal({
107 | "paddingLeft-AppHeader": "xxx",
108 | });
109 | });
110 |
111 | it("padding with one value", () => {
112 | const newTheme: Record<string, string> = {
113 | "padding-AppHeader": "4px",
114 | };
115 |
116 | const result = generatePaddingSegments(newTheme);
117 |
118 | expect(result).deep.equal({
119 | "padding-AppHeader": "4px",
120 | "paddingTop-AppHeader": "4px",
121 | "paddingRight-AppHeader": "4px",
122 | "paddingBottom-AppHeader": "4px",
123 | "paddingLeft-AppHeader": "4px",
124 | });
125 | });
126 |
127 | it("padding with one value and paddingTop override", () => {
128 | const newTheme: Record<string, string> = {
129 | "padding-AppHeader": "4px",
130 | "paddingTop-AppHeader": "8px",
131 | };
132 |
133 | const result = generatePaddingSegments(newTheme);
134 |
135 | expect(result).deep.equal({
136 | "padding-AppHeader": "4px",
137 | "paddingTop-AppHeader": "8px",
138 | "paddingRight-AppHeader": "4px",
139 | "paddingBottom-AppHeader": "4px",
140 | "paddingLeft-AppHeader": "4px",
141 | });
142 | });
143 |
144 | it("padding with one value and paddingRight override", () => {
145 | const newTheme: Record<string, string> = {
146 | "padding-AppHeader": "4px",
147 | "paddingRight-AppHeader": "8px",
148 | };
149 |
150 | const result = generatePaddingSegments(newTheme);
151 |
152 | expect(result).deep.equal({
153 | "padding-AppHeader": "4px",
154 | "paddingTop-AppHeader": "4px",
155 | "paddingRight-AppHeader": "8px",
156 | "paddingBottom-AppHeader": "4px",
157 | "paddingLeft-AppHeader": "4px",
158 | });
159 | });
160 |
161 | it("padding with one value and paddingBottom override", () => {
162 | const newTheme: Record<string, string> = {
163 | "padding-AppHeader": "4px",
164 | "paddingBottom-AppHeader": "8px",
165 | };
166 |
167 | const result = generatePaddingSegments(newTheme);
168 |
169 | expect(result).deep.equal({
170 | "padding-AppHeader": "4px",
171 | "paddingTop-AppHeader": "4px",
172 | "paddingRight-AppHeader": "4px",
173 | "paddingBottom-AppHeader": "8px",
174 | "paddingLeft-AppHeader": "4px",
175 | });
176 | });
177 |
178 | it("padding with one value and paddingLeft override", () => {
179 | const newTheme: Record<string, string> = {
180 | "padding-AppHeader": "4px",
181 | "paddingLeft-AppHeader": "8px",
182 | };
183 |
184 | const result = generatePaddingSegments(newTheme);
185 |
186 | expect(result).deep.equal({
187 | "padding-AppHeader": "4px",
188 | "paddingTop-AppHeader": "4px",
189 | "paddingRight-AppHeader": "4px",
190 | "paddingBottom-AppHeader": "4px",
191 | "paddingLeft-AppHeader": "8px",
192 | });
193 | });
194 |
195 | it("padding with one value and paddingHorizontal override", () => {
196 | const newTheme: Record<string, string> = {
197 | "padding-AppHeader": "4px",
198 | "paddingHorizontal-AppHeader": "8px",
199 | };
200 |
201 | const result = generatePaddingSegments(newTheme);
202 |
203 | expect(result).deep.equal({
204 | "padding-AppHeader": "4px",
205 | "paddingHorizontal-AppHeader": "8px",
206 | "paddingTop-AppHeader": "4px",
207 | "paddingRight-AppHeader": "8px",
208 | "paddingBottom-AppHeader": "4px",
209 | "paddingLeft-AppHeader": "8px",
210 | });
211 | });
212 |
213 | it("padding with one value and paddingHorizontal and paddingLeft override", () => {
214 | const newTheme: Record<string, string> = {
215 | "padding-AppHeader": "4px",
216 | "paddingHorizontal-AppHeader": "8px",
217 | "paddingLeft-AppHeader": "16px",
218 | };
219 |
220 | const result = generatePaddingSegments(newTheme);
221 |
222 | expect(result).deep.equal({
223 | "padding-AppHeader": "4px",
224 | "paddingHorizontal-AppHeader": "8px",
225 | "paddingLeft-AppHeader": "16px",
226 | "paddingTop-AppHeader": "4px",
227 | "paddingRight-AppHeader": "8px",
228 | "paddingBottom-AppHeader": "4px",
229 | });
230 | });
231 |
232 | it("padding with one value and paddingHorizontal and paddingRight override", () => {
233 | const newTheme: Record<string, string> = {
234 | "padding-AppHeader": "4px",
235 | "paddingHorizontal-AppHeader": "8px",
236 | "paddingRight-AppHeader": "16px",
237 | };
238 |
239 | const result = generatePaddingSegments(newTheme);
240 |
241 | expect(result).deep.equal({
242 | "padding-AppHeader": "4px",
243 | "paddingHorizontal-AppHeader": "8px",
244 | "paddingRight-AppHeader": "16px",
245 | "paddingTop-AppHeader": "4px",
246 | "paddingBottom-AppHeader": "4px",
247 | "paddingLeft-AppHeader": "8px",
248 | });
249 | });
250 |
251 | it("padding with one value and paddingVertical override", () => {
252 | const newTheme: Record<string, string> = {
253 | "padding-AppHeader": "4px",
254 | "paddingVertical-AppHeader": "8px",
255 | };
256 |
257 | const result = generatePaddingSegments(newTheme);
258 |
259 | expect(result).deep.equal({
260 | "padding-AppHeader": "4px",
261 | "paddingVertical-AppHeader": "8px",
262 | "paddingTop-AppHeader": "8px",
263 | "paddingRight-AppHeader": "4px",
264 | "paddingBottom-AppHeader": "8px",
265 | "paddingLeft-AppHeader": "4px",
266 | });
267 | });
268 |
269 | it("padding with one value and paddingVertical and paddingTop override", () => {
270 | const newTheme: Record<string, string> = {
271 | "padding-AppHeader": "4px",
272 | "paddingVertical-AppHeader": "8px",
273 | "paddingTop-AppHeader": "16px",
274 | };
275 |
276 | const result = generatePaddingSegments(newTheme);
277 |
278 | expect(result).deep.equal({
279 | "padding-AppHeader": "4px",
280 | "paddingVertical-AppHeader": "8px",
281 | "paddingTop-AppHeader": "16px",
282 | "paddingRight-AppHeader": "4px",
283 | "paddingBottom-AppHeader": "8px",
284 | "paddingLeft-AppHeader": "4px",
285 | });
286 | });
287 |
288 | it("padding with one value and paddingVertical and paddingBottom override", () => {
289 | const newTheme: Record<string, string> = {
290 | "padding-AppHeader": "4px",
291 | "paddingVertical-AppHeader": "8px",
292 | "paddingBottom-AppHeader": "16px",
293 | };
294 |
295 | const result = generatePaddingSegments(newTheme);
296 |
297 | expect(result).deep.equal({
298 | "padding-AppHeader": "4px",
299 | "paddingVertical-AppHeader": "8px",
300 | "paddingTop-AppHeader": "8px",
301 | "paddingRight-AppHeader": "4px",
302 | "paddingBottom-AppHeader": "16px",
303 | "paddingLeft-AppHeader": "4px",
304 | });
305 | });
306 |
307 | it("padding with two values", () => {
308 | const newTheme: Record<string, string> = {
309 | "padding-AppHeader": "4px 8px",
310 | };
311 |
312 | const result = generatePaddingSegments(newTheme);
313 |
314 | expect(result).deep.equal({
315 | "padding-AppHeader": "4px 8px",
316 | "paddingTop-AppHeader": "4px",
317 | "paddingRight-AppHeader": "8px",
318 | "paddingBottom-AppHeader": "4px",
319 | "paddingLeft-AppHeader": "8px",
320 | });
321 | });
322 |
323 | it("padding with two values and paddingTop override", () => {
324 | const newTheme: Record<string, string> = {
325 | "padding-AppHeader": "4px 8px",
326 | "paddingTop-AppHeader": "16px",
327 | };
328 |
329 | const result = generatePaddingSegments(newTheme);
330 |
331 | expect(result).deep.equal({
332 | "padding-AppHeader": "4px 8px",
333 | "paddingTop-AppHeader": "16px",
334 | "paddingRight-AppHeader": "8px",
335 | "paddingBottom-AppHeader": "4px",
336 | "paddingLeft-AppHeader": "8px",
337 | });
338 | });
339 |
340 | it("padding with two values and paddingRight override", () => {
341 | const newTheme: Record<string, string> = {
342 | "padding-AppHeader": "4px 8px",
343 | "paddingRight-AppHeader": "16px",
344 | };
345 |
346 | const result = generatePaddingSegments(newTheme);
347 |
348 | expect(result).deep.equal({
349 | "padding-AppHeader": "4px 8px",
350 | "paddingTop-AppHeader": "4px",
351 | "paddingRight-AppHeader": "16px",
352 | "paddingBottom-AppHeader": "4px",
353 | "paddingLeft-AppHeader": "8px",
354 | });
355 | });
356 |
357 | it("padding with two values and paddingHorizontal override", () => {
358 | const newTheme: Record<string, string> = {
359 | "padding-AppHeader": "4px 8px",
360 | "paddingHorizontal-AppHeader": "16px",
361 | };
362 |
363 | const result = generatePaddingSegments(newTheme);
364 |
365 | expect(result).deep.equal({
366 | "padding-AppHeader": "4px 8px",
367 | "paddingHorizontal-AppHeader": "16px",
368 | "paddingTop-AppHeader": "4px",
369 | "paddingRight-AppHeader": "16px",
370 | "paddingBottom-AppHeader": "4px",
371 | "paddingLeft-AppHeader": "16px",
372 | });
373 | });
374 |
375 | it("padding with two values and paddingBottom override", () => {
376 | const newTheme: Record<string, string> = {
377 | "padding-AppHeader": "4px 8px",
378 | "paddingBottom-AppHeader": "16px",
379 | };
380 |
381 | const result = generatePaddingSegments(newTheme);
382 |
383 | expect(result).deep.equal({
384 | "padding-AppHeader": "4px 8px",
385 | "paddingTop-AppHeader": "4px",
386 | "paddingRight-AppHeader": "8px",
387 | "paddingBottom-AppHeader": "16px",
388 | "paddingLeft-AppHeader": "8px",
389 | });
390 | });
391 |
392 | it("padding with two values and paddingLeft override", () => {
393 | const newTheme: Record<string, string> = {
394 | "padding-AppHeader": "4px 8px",
395 | "paddingLeft-AppHeader": "16px",
396 | };
397 |
398 | const result = generatePaddingSegments(newTheme);
399 |
400 | expect(result).deep.equal({
401 | "padding-AppHeader": "4px 8px",
402 | "paddingTop-AppHeader": "4px",
403 | "paddingRight-AppHeader": "8px",
404 | "paddingBottom-AppHeader": "4px",
405 | "paddingLeft-AppHeader": "16px",
406 | });
407 | });
408 |
409 | it("padding with two values and paddingVertical override", () => {
410 | const newTheme: Record<string, string> = {
411 | "padding-AppHeader": "4px 8px",
412 | "paddingVertical-AppHeader": "16px",
413 | };
414 |
415 | const result = generatePaddingSegments(newTheme);
416 |
417 | expect(result).deep.equal({
418 | "padding-AppHeader": "4px 8px",
419 | "paddingVertical-AppHeader": "16px",
420 | "paddingTop-AppHeader": "16px",
421 | "paddingRight-AppHeader": "8px",
422 | "paddingBottom-AppHeader": "16px",
423 | "paddingLeft-AppHeader": "8px",
424 | });
425 | });
426 |
427 | it("padding with two values and paddingHorizontal override", () => {
428 | const newTheme: Record<string, string> = {
429 | "padding-AppHeader": "4px 8px",
430 | "paddingHorizontal-AppHeader": "16px",
431 | };
432 |
433 | const result = generatePaddingSegments(newTheme);
434 |
435 | expect(result).deep.equal({
436 | "padding-AppHeader": "4px 8px",
437 | "paddingHorizontal-AppHeader": "16px",
438 | "paddingTop-AppHeader": "4px",
439 | "paddingRight-AppHeader": "16px",
440 | "paddingBottom-AppHeader": "4px",
441 | "paddingLeft-AppHeader": "16px",
442 | });
443 | });
444 |
445 | it("padding with two values and paddingVertical override", () => {
446 | const newTheme: Record<string, string> = {
447 | "padding-AppHeader": "4px 8px",
448 | "paddingVertical-AppHeader": "16px",
449 | };
450 |
451 | const result = generatePaddingSegments(newTheme);
452 |
453 | expect(result).deep.equal({
454 | "padding-AppHeader": "4px 8px",
455 | "paddingVertical-AppHeader": "16px",
456 | "paddingTop-AppHeader": "16px",
457 | "paddingRight-AppHeader": "8px",
458 | "paddingBottom-AppHeader": "16px",
459 | "paddingLeft-AppHeader": "8px",
460 | });
461 | });
462 |
463 | it("padding with three values", () => {
464 | const newTheme: Record<string, string> = {
465 | "padding-AppHeader": "4px 8px 16px",
466 | };
467 |
468 | const result = generatePaddingSegments(newTheme);
469 |
470 | expect(result).deep.equal({
471 | "padding-AppHeader": "4px 8px 16px",
472 | "paddingTop-AppHeader": "4px",
473 | "paddingRight-AppHeader": "8px",
474 | "paddingBottom-AppHeader": "16px",
475 | "paddingLeft-AppHeader": "8px",
476 | });
477 | });
478 |
479 | it("padding with three values and paddingTop override", () => {
480 | const newTheme: Record<string, string> = {
481 | "padding-AppHeader": "4px 8px 16px",
482 | "paddingTop-AppHeader": "32px",
483 | };
484 |
485 | const result = generatePaddingSegments(newTheme);
486 |
487 | expect(result).deep.equal({
488 | "padding-AppHeader": "4px 8px 16px",
489 | "paddingTop-AppHeader": "32px",
490 | "paddingRight-AppHeader": "8px",
491 | "paddingBottom-AppHeader": "16px",
492 | "paddingLeft-AppHeader": "8px",
493 | });
494 | });
495 |
496 | it("padding with three values and paddingRight override", () => {
497 | const newTheme: Record<string, string> = {
498 | "padding-AppHeader": "4px 8px 16px",
499 | "paddingRight-AppHeader": "32px",
500 | };
501 |
502 | const result = generatePaddingSegments(newTheme);
503 |
504 | expect(result).deep.equal({
505 | "padding-AppHeader": "4px 8px 16px",
506 | "paddingTop-AppHeader": "4px",
507 | "paddingRight-AppHeader": "32px",
508 | "paddingBottom-AppHeader": "16px",
509 | "paddingLeft-AppHeader": "8px",
510 | });
511 | });
512 |
513 | it("padding with three values and paddingBottom override", () => {
514 | const newTheme: Record<string, string> = {
515 | "padding-AppHeader": "4px 8px 16px",
516 | "paddingBottom-AppHeader": "32px",
517 | };
518 |
519 | const result = generatePaddingSegments(newTheme);
520 |
521 | expect(result).deep.equal({
522 | "padding-AppHeader": "4px 8px 16px",
523 | "paddingTop-AppHeader": "4px",
524 | "paddingRight-AppHeader": "8px",
525 | "paddingBottom-AppHeader": "32px",
526 | "paddingLeft-AppHeader": "8px",
527 | });
528 | });
529 |
530 | it("padding with three values and paddingLeft override", () => {
531 | const newTheme: Record<string, string> = {
532 | "padding-AppHeader": "4px 8px 16px",
533 | "paddingLeft-AppHeader": "32px",
534 | };
535 |
536 | const result = generatePaddingSegments(newTheme);
537 |
538 | expect(result).deep.equal({
539 | "padding-AppHeader": "4px 8px 16px",
540 | "paddingTop-AppHeader": "4px",
541 | "paddingRight-AppHeader": "8px",
542 | "paddingBottom-AppHeader": "16px",
543 | "paddingLeft-AppHeader": "32px",
544 | });
545 | });
546 |
547 | it("padding with three values and paddingHorizontal override", () => {
548 | const newTheme: Record<string, string> = {
549 | "padding-AppHeader": "4px 8px 16px",
550 | "paddingHorizontal-AppHeader": "32px",
551 | };
552 |
553 | const result = generatePaddingSegments(newTheme);
554 |
555 | expect(result).deep.equal({
556 | "padding-AppHeader": "4px 8px 16px",
557 | "paddingHorizontal-AppHeader": "32px",
558 | "paddingTop-AppHeader": "4px",
559 | "paddingRight-AppHeader": "32px",
560 | "paddingBottom-AppHeader": "16px",
561 | "paddingLeft-AppHeader": "32px",
562 | });
563 | });
564 |
565 | it("padding with three values and paddingVertical override", () => {
566 | const newTheme: Record<string, string> = {
567 | "padding-AppHeader": "4px 8px 16px",
568 | "paddingVertical-AppHeader": "32px",
569 | };
570 |
571 | const result = generatePaddingSegments(newTheme);
572 |
573 | expect(result).deep.equal({
574 | "padding-AppHeader": "4px 8px 16px",
575 | "paddingVertical-AppHeader": "32px",
576 | "paddingTop-AppHeader": "32px",
577 | "paddingRight-AppHeader": "8px",
578 | "paddingBottom-AppHeader": "32px",
579 | "paddingLeft-AppHeader": "8px",
580 | });
581 | });
582 |
583 | it("padding with four values", () => {
584 | const newTheme: Record<string, string> = {
585 | "padding-AppHeader": "4px 8px 16px 32px",
586 | };
587 |
588 | const result = generatePaddingSegments(newTheme);
589 |
590 | expect(result).deep.equal({
591 | "padding-AppHeader": "4px 8px 16px 32px",
592 | "paddingTop-AppHeader": "4px",
593 | "paddingRight-AppHeader": "8px",
594 | "paddingBottom-AppHeader": "16px",
595 | "paddingLeft-AppHeader": "32px",
596 | });
597 | });
598 |
599 | it("padding with four values and paddingTop override", () => {
600 | const newTheme: Record<string, string> = {
601 | "padding-AppHeader": "4px 8px 16px 32px",
602 | "paddingTop-AppHeader": "64px",
603 | };
604 |
605 | const result = generatePaddingSegments(newTheme);
606 |
607 | expect(result).deep.equal({
608 | "padding-AppHeader": "4px 8px 16px 32px",
609 | "paddingTop-AppHeader": "64px",
610 | "paddingRight-AppHeader": "8px",
611 | "paddingBottom-AppHeader": "16px",
612 | "paddingLeft-AppHeader": "32px",
613 | });
614 | });
615 |
616 | it("padding with four values and paddingRight override", () => {
617 | const newTheme: Record<string, string> = {
618 | "padding-AppHeader": "4px 8px 16px 32px",
619 | "paddingRight-AppHeader": "64px",
620 | };
621 |
622 | const result = generatePaddingSegments(newTheme);
623 |
624 | expect(result).deep.equal({
625 | "padding-AppHeader": "4px 8px 16px 32px",
626 | "paddingTop-AppHeader": "4px",
627 | "paddingRight-AppHeader": "64px",
628 | "paddingBottom-AppHeader": "16px",
629 | "paddingLeft-AppHeader": "32px",
630 | });
631 | });
632 |
633 | it("padding with four values and paddingBottom override", () => {
634 | const newTheme: Record<string, string> = {
635 | "padding-AppHeader": "4px 8px 16px 32px",
636 | "paddingBottom-AppHeader": "64px",
637 | };
638 |
639 | const result = generatePaddingSegments(newTheme);
640 |
641 | expect(result).deep.equal({
642 | "padding-AppHeader": "4px 8px 16px 32px",
643 | "paddingTop-AppHeader": "4px",
644 | "paddingRight-AppHeader": "8px",
645 | "paddingBottom-AppHeader": "64px",
646 | "paddingLeft-AppHeader": "32px",
647 | });
648 | });
649 |
650 | it("padding with four values and paddingLeft override", () => {
651 | const newTheme: Record<string, string> = {
652 | "padding-AppHeader": "4px 8px 16px 32px",
653 | "paddingLeft-AppHeader": "64px",
654 | };
655 |
656 | const result = generatePaddingSegments(newTheme);
657 |
658 | expect(result).deep.equal({
659 | "padding-AppHeader": "4px 8px 16px 32px",
660 | "paddingTop-AppHeader": "4px",
661 | "paddingRight-AppHeader": "8px",
662 | "paddingBottom-AppHeader": "16px",
663 | "paddingLeft-AppHeader": "64px",
664 | });
665 | });
666 |
667 | it("padding with four values and paddingHorizontal override", () => {
668 | const newTheme: Record<string, string> = {
669 | "padding-AppHeader": "4px 8px 16px 32px",
670 | "paddingHorizontal-AppHeader": "64px",
671 | };
672 |
673 | const result = generatePaddingSegments(newTheme);
674 |
675 | expect(result).deep.equal({
676 | "padding-AppHeader": "4px 8px 16px 32px",
677 | "paddingHorizontal-AppHeader": "64px",
678 | "paddingTop-AppHeader": "4px",
679 | "paddingRight-AppHeader": "64px",
680 | "paddingBottom-AppHeader": "16px",
681 | "paddingLeft-AppHeader": "64px",
682 | });
683 | });
684 |
685 | it("padding with four values and paddingVertical override", () => {
686 | const newTheme: Record<string, string> = {
687 | "padding-AppHeader": "4px 8px 16px 32px",
688 | "paddingVertical-AppHeader": "64px",
689 | };
690 |
691 | const result = generatePaddingSegments(newTheme);
692 |
693 | expect(result).deep.equal({
694 | "padding-AppHeader": "4px 8px 16px 32px",
695 | "paddingVertical-AppHeader": "64px",
696 | "paddingTop-AppHeader": "64px",
697 | "paddingRight-AppHeader": "8px",
698 | "paddingBottom-AppHeader": "64px",
699 | "paddingLeft-AppHeader": "32px",
700 | });
701 | });
702 | });
703 |
```
--------------------------------------------------------------------------------
/xmlui/src/components/IconProvider.tsx:
--------------------------------------------------------------------------------
```typescript
1 | import type { ForwardedRef, ReactNode } from "react";
2 | import type React from "react";
3 | import { useCallback, useMemo, useRef, useState } from "react";
4 | import {
5 | FiAlertOctagon,
6 | FiCheckCircle,
7 | FiChevronDown,
8 | FiChevronUp,
9 | FiClipboard,
10 | FiDownload,
11 | FiFolder,
12 | FiGrid,
13 | FiHardDrive,
14 | FiHelpCircle,
15 | FiKey,
16 | FiLock,
17 | FiRefreshCcw,
18 | FiSlash,
19 | FiStar,
20 | FiUpload,
21 | FiUser,
22 | FiUserMinus,
23 | FiUserPlus,
24 | FiUsers,
25 | FiX,
26 | FiChevronsRight,
27 | FiChevronsLeft,
28 | FiChevronsDown,
29 | FiChevronsUp,
30 | } from "react-icons/fi";
31 | import { AiOutlineLike, AiOutlineMenu, AiOutlinePlusCircle, AiOutlineSend } from "react-icons/ai";
32 | import {
33 | BsArrowDownShort,
34 | BsPause,
35 | BsPlay,
36 | BsArrowLeftShort,
37 | BsArrowRightShort,
38 | BsArrowUpShort,
39 | BsChatDots,
40 | BsHash,
41 | BsReply,
42 | BsSquare,
43 | BsSquareFill,
44 | BsSquareHalf,
45 | } from "react-icons/bs";
46 | import { GrDocumentConfig, GrEmoji, GrNext, GrPrevious } from "react-icons/gr";
47 | import {
48 | IoChatboxOutline,
49 | IoCubeOutline,
50 | IoEyeOffOutline,
51 | IoEyeOutline,
52 | IoPencil,
53 | IoSwapVertical,
54 | } from "react-icons/io5";
55 | import { MdOutlineDriveFileRenameOutline, MdOutlinePalette } from "react-icons/md";
56 | import { RiAttachment2, RiMessage2Line, RiStickyNoteLine } from "react-icons/ri";
57 | import { VscDebugStart, VscDebugStop, VscSplitHorizontal, VscSplitVertical } from "react-icons/vsc";
58 | import { RxExit, RxLightningBolt, RxOpenInNewWindow } from "react-icons/rx";
59 | import { HiOutlinePaintBrush, HiSun } from "react-icons/hi2";
60 | import { TfiReload } from "react-icons/tfi";
61 | import { HiOutlineCog, HiOutlineDuplicate } from "react-icons/hi";
62 | import { CiCalendarDate } from "react-icons/ci";
63 |
64 | import { IconRegistryContext } from "./IconRegistryContext";
65 | import type { IconBaseProps } from "./Icon/IconNative";
66 | import { ApiIcon } from "./Icon/ApiIcon";
67 | import { AttachmentIcon } from "./Icon/Attach";
68 | import { BindingIcon } from "./Icon/Binding";
69 | import { BoardIcon } from "./Icon/BoardIcon";
70 | import { BoxIcon } from "./Icon/BoxIcon";
71 | import { CheckIcon } from "./Icon/CheckIcon";
72 | import { ChevronLeftIcon } from "./Icon/ChevronLeft";
73 | import { ChevronRightIcon } from "./Icon/ChevronRight";
74 | import { CodeFileIcon } from "./Icon/CodeFileIcon";
75 | import { CodeSandboxIcon } from "./Icon/CodeSandbox";
76 | import { CompactListIcon } from "./Icon/CompactListIcon";
77 | import { ContentCopyIcon } from "./Icon/ContentCopyIcon";
78 | import { DatabaseIcon } from "./Icon/DatabaseIcon";
79 | import { DocFileIcon } from "./Icon/DocFileIcon";
80 | import { DocIcon } from "./Icon/DocIcon";
81 | import { DotMenuHorizontalIcon } from "./Icon/DotMenuHorizontalIcon";
82 | import { DotMenuIcon } from "./Icon/DotMenuIcon";
83 | import { EmailIcon } from "./Icon/EmailIcon";
84 | import { EmptyFolderIcon } from "./Icon/EmptyFolderIcon";
85 | import { ExpressionIcon } from "./Icon/ExpressionIcon";
86 | import { FillPlusCircleIcon } from "./Icon/FillPlusCricleIcon";
87 | import { FilterIcon } from "./Icon/FilterIcon";
88 | import { FolderIcon } from "./Icon/FolderIcon";
89 | import { GlobeIcon } from "./Icon/GlobeIcon";
90 | import { HomeIcon } from "./Icon/HomeIcon";
91 | import { HyperLinkIcon } from "./Icon/HyperLinkIcon";
92 | import { ImageFileIcon } from "./Icon/ImageFileIcon";
93 | import { LinkIcon } from "./Icon/LinkIcon";
94 | import { ListIcon } from "./Icon/ListIcon";
95 | import { LooseListIcon } from "./Icon/LooseListIcon";
96 | import { MoreOptionsIcon } from "./Icon/MoreOptionsIcon";
97 | import { PDFIcon } from "./Icon/PDFIcon";
98 | import { PenIcon } from "./Icon/PenIcon";
99 | import { PhoneIcon } from "./Icon/PhoneIcon";
100 | import { PhotoIcon } from "./Icon/PhotoIcon";
101 | import { PlusIcon } from "./Icon/PlusIcon";
102 | import { SearchIcon } from "./Icon/SearchIcon";
103 | import { ShareIcon } from "./Icon/ShareIcon";
104 | import { TrashIcon } from "./Icon/TrashIcon";
105 | import { TxtIcon } from "./Icon/TxtIcon";
106 | import { UnknownFileIcon } from "./Icon/UnknownFileIcon";
107 | import { UnlinkIcon } from "./Icon/UnlinkIcon";
108 | import { UserIcon } from "./Icon/UserIcon";
109 | import { WarningIcon } from "./Icon/WarningIcon";
110 | import { XlsIcon } from "./Icon/XlsIcon";
111 | import { ErrorIcon } from "./Icon/ErrorIcon";
112 | import { TrendingUpIcon } from "./Icon/TrendingUpIcon";
113 | import { TrendingDownIcon } from "./Icon/TrendingDownIcon";
114 | import { SortAscendingIcon } from "./Icon/SortAscendingIcon";
115 | import { SortDescendingIcon } from "./Icon/SortDescendingIcon";
116 | import { NoSortIcon } from "./Icon/NoSortIcon";
117 | import { TrendingLevelIcon } from "./Icon/TrendingLevelIcon";
118 | import { InspectIcon } from "./Icon/Inspect";
119 | import { MoonIcon } from "./Icon/MoonIcon";
120 | import { StarsIcon } from "./Icon/StarsIcon";
121 | import { LightToDarkIcon } from "./Icon/LightToDark";
122 | import { DarkToLightIcon } from "./Icon/DarkToLightIcon";
123 | import { AdmonitionInfoIcon } from "./Icon/AdmonitionInfo";
124 | import { AdmonitionWarningIcon } from "./Icon/AdmonitionWarning";
125 | import { AdmonitionDangerIcon } from "./Icon/AdmonitionDanger";
126 | import { AdmonitionNoteIcon } from "./Icon/AdmonitionNote";
127 | import { AdmonitionTipIcon } from "./Icon/AdmonitionTip";
128 | import TableInsertRowIcon from "./Icon/TableInsertRowIcon";
129 | import TableDeleteRowIcon from "./Icon/TableDeleteRowIcon";
130 | import TableInsertColumnIcon from "./Icon/TableInsertColumnIcon";
131 | import TableDeleteColumnIcon from "./Icon/TableDeleteColumnIcon";
132 |
133 | type IconRenderer<T extends IconBaseProps> = (props: T, ref: ForwardedRef<HTMLElement>) => React.ReactElement<T>;
134 |
135 | export type IconRegistryEntry = {
136 | renderer: IconRenderer<any>;
137 | };
138 |
139 | type CustomSvgIcon = {
140 | attributes: Record<string, any>;
141 | name: string;
142 | };
143 | export type IconRegistry = {
144 | getRegisteredIconNames: () => Array<string>;
145 | lookupIconRenderer: (name: string) => IconRegistryEntry | undefined;
146 | ensureCustomSvgIcon: (resourceName: string) => Promise<void>;
147 | customSvgs: Record<string, CustomSvgIcon>;
148 | };
149 |
150 | const pool = new Map<string, IconRegistryEntry>();
151 |
152 | function registerIconRenderer(name: string | string[], renderer: IconRenderer<any>) {
153 | if (typeof name === "object") {
154 | name.forEach((n) => {
155 | pool.set(n, { renderer });
156 | });
157 | } else {
158 | pool.set(name.toLowerCase(), { renderer });
159 | }
160 | }
161 |
162 | registerIconRenderer("assign", (props: IconBaseProps) => <FiUser {...props} />);
163 | registerIconRenderer("arrowup", (props: IconBaseProps) => <BsArrowUpShort {...props} />);
164 | registerIconRenderer("arrowleft", (props: IconBaseProps) => <BsArrowLeftShort {...props} />);
165 | registerIconRenderer("arrowright", (props: IconBaseProps) => <BsArrowRightShort {...props} />);
166 | registerIconRenderer("pause", (props: IconBaseProps) => <BsPause {...props} />);
167 | registerIconRenderer("play", (props: IconBaseProps) => <BsPlay {...props} />);
168 | registerIconRenderer("date", (props: IconBaseProps) => <CiCalendarDate {...props} />);
169 | registerIconRenderer("hamburger", (props: IconBaseProps) => <AiOutlineMenu {...props} />);
170 | registerIconRenderer("send", (props: IconBaseProps) => <AiOutlineSend {...props} />);
171 | registerIconRenderer("users", (props: IconBaseProps) => <FiUsers {...props} />);
172 | registerIconRenderer("refresh", (props: IconBaseProps) => <FiRefreshCcw {...props} />);
173 | registerIconRenderer("chevrondown", (props: IconBaseProps) => <FiChevronDown {...props} />);
174 | registerIconRenderer("chevronup", (props: IconBaseProps) => <FiChevronUp {...props} />);
175 | registerIconRenderer("chevronright", (props: IconBaseProps) => <ChevronRightIcon {...props} />);
176 | registerIconRenderer("chevronleft", (props: IconBaseProps) => <ChevronLeftIcon {...props} />);
177 | registerIconRenderer("doublechevrondown", (props: IconBaseProps) => <FiChevronsDown {...props} />);
178 | registerIconRenderer("doublechevronup", (props: IconBaseProps) => <FiChevronsUp {...props} />);
179 | registerIconRenderer("doublechevronright", (props: IconBaseProps) => <FiChevronsRight {...props} />);
180 | registerIconRenderer("doublechevronleft", (props: IconBaseProps) => <FiChevronsLeft {...props} />);
181 | registerIconRenderer("dotmenu", (props: IconBaseProps) => <DotMenuIcon {...props} />);
182 | registerIconRenderer("dotmenuhorizontal", (props: IconBaseProps) => (
183 | <DotMenuHorizontalIcon {...props} />
184 | ));
185 | registerIconRenderer("noresult", (props: IconBaseProps) => <FiSlash {...props} />);
186 | registerIconRenderer("crm", (props: IconBaseProps) => <IoChatboxOutline {...props} />);
187 | registerIconRenderer("chat", (props: IconBaseProps) => <IoChatboxOutline {...props} />);
188 | registerIconRenderer("pencil", (props: IconBaseProps) => <IoPencil {...props} />);
189 | registerIconRenderer("cube", (props: IconBaseProps) => <IoCubeOutline {...props} />);
190 | registerIconRenderer("apps", (props: IconBaseProps) => <FiGrid {...props} />);
191 | registerIconRenderer("permissions", (props: IconBaseProps) => <FiKey {...props} />);
192 | registerIconRenderer("close", (props: IconBaseProps) => <FiX {...props} />);
193 | registerIconRenderer("star", (props: IconBaseProps) => <FiStar {...props} />);
194 | registerIconRenderer("help", (props: IconBaseProps) => <FiHelpCircle {...props} />);
195 | registerIconRenderer("compactlist", (props: IconBaseProps) => <CompactListIcon {...props} />);
196 | registerIconRenderer("copy", (props: IconBaseProps) => <ContentCopyIcon {...props} />);
197 | registerIconRenderer("move", (props: IconBaseProps) => <FiClipboard {...props} />);
198 | registerIconRenderer("rename", (props: IconBaseProps) => (
199 | <MdOutlineDriveFileRenameOutline {...props} />
200 | ));
201 | registerIconRenderer("hyperlink", (props: IconBaseProps) => <HyperLinkIcon {...props} />);
202 | registerIconRenderer("globe", (props: IconBaseProps) => <GlobeIcon {...props} />);
203 | registerIconRenderer("link", (props: IconBaseProps) => <LinkIcon {...props} />);
204 | registerIconRenderer("looseList", (props: IconBaseProps) => <LooseListIcon {...props} />);
205 | registerIconRenderer("options", (props: IconBaseProps) => <MoreOptionsIcon {...props} />);
206 | registerIconRenderer("search", (props: IconBaseProps) => <SearchIcon {...props} />);
207 | registerIconRenderer("filter", (props: IconBaseProps) => <FilterIcon {...props} />);
208 | registerIconRenderer("trash", (props: IconBaseProps) => <TrashIcon {...props} />);
209 | registerIconRenderer("pen", (props: IconBaseProps) => <PenIcon {...props} />);
210 | registerIconRenderer("email", (props: IconBaseProps) => <EmailIcon {...props} />);
211 | registerIconRenderer("phone", (props: IconBaseProps) => <PhoneIcon {...props} />);
212 | registerIconRenderer("home", (props: IconBaseProps) => <HomeIcon {...props} />);
213 | registerIconRenderer("user", (props: IconBaseProps) => <UserIcon {...props} />);
214 | registerIconRenderer("exit", (props: IconBaseProps) => <RxExit {...props} />);
215 | registerIconRenderer("adduser", (props: IconBaseProps) => <FiUserPlus {...props} />);
216 | registerIconRenderer("userminus", (props: IconBaseProps) => <FiUserMinus {...props} />);
217 | registerIconRenderer("plus", (props: IconBaseProps) => <PlusIcon {...props} />);
218 | registerIconRenderer("inspect", (props: IconBaseProps) => <InspectIcon {...props} />);
219 | registerIconRenderer("plus-circle", (props: IconBaseProps) => <AiOutlinePlusCircle {...props} />);
220 | registerIconRenderer("filledplus", (props: IconBaseProps) => <FillPlusCircleIcon {...props} />);
221 | registerIconRenderer("darktolight", (props: IconBaseProps) => <DarkToLightIcon {...props} />);
222 | registerIconRenderer("lighttodark", (props: IconBaseProps) => <LightToDarkIcon {...props} />);
223 | registerIconRenderer("checkmark", (props: IconBaseProps) => <CheckIcon {...props} />);
224 | registerIconRenderer("valid", (props: IconBaseProps) => <FiCheckCircle {...props} />);
225 | registerIconRenderer("info", (props: IconBaseProps) => <FiAlertOctagon {...props} />);
226 | registerIconRenderer("error", (props: IconBaseProps) => <ErrorIcon {...props} />);
227 | registerIconRenderer("warning", (props: IconBaseProps) => <WarningIcon {...props} />);
228 | registerIconRenderer("board", (props: IconBaseProps) => <BoardIcon {...props} />);
229 | registerIconRenderer("list", (props: IconBaseProps) => <ListIcon {...props} />);
230 | registerIconRenderer("folder", (props: IconBaseProps) => <FolderIcon {...props} />);
231 | registerIconRenderer("folder-outline", (props: IconBaseProps) => <FiFolder {...props} />);
232 | registerIconRenderer("emptyfolder", (props: IconBaseProps) => <EmptyFolderIcon {...props} />);
233 | registerIconRenderer("pdf", (props: IconBaseProps) => <PDFIcon {...props} />);
234 | registerIconRenderer("txt", (props: IconBaseProps) => <TxtIcon {...props} />);
235 | registerIconRenderer("doc", (props: IconBaseProps) => <DocIcon {...props} />);
236 | registerIconRenderer("docx", (props: IconBaseProps) => <DocIcon {...props} />);
237 | registerIconRenderer("doc-outline", (props: IconBaseProps) => <DocFileIcon {...props} />);
238 | registerIconRenderer("conf", (props: IconBaseProps) => <GrDocumentConfig {...props} />);
239 | registerIconRenderer("code", (props: IconBaseProps) => <CodeFileIcon {...props} />);
240 | registerIconRenderer("codesandbox", (props: IconBaseProps) => <CodeSandboxIcon {...props} />);
241 | registerIconRenderer("box", (props: IconBaseProps) => <BoxIcon {...props} />);
242 | registerIconRenderer(["xls", "xlsx"], (props: IconBaseProps) => <XlsIcon {...props} />);
243 | registerIconRenderer(
244 | ["jpg", "jpeg", "png", "webp", "svg", "gif", "tif", "ppt", "pptx"],
245 | (props: IconBaseProps) => <ImageFileIcon {...props} />,
246 | );
247 | registerIconRenderer("unknownfile", (props: IconBaseProps) => <UnknownFileIcon {...props} />);
248 | registerIconRenderer("photo", (props: IconBaseProps) => <PhotoIcon {...props} />);
249 | registerIconRenderer("previous", (props: IconBaseProps) => <GrPrevious {...props} />);
250 | registerIconRenderer("next", (props: IconBaseProps) => <GrNext {...props} />);
251 | registerIconRenderer("like", (props: IconBaseProps) => <AiOutlineLike {...props} />);
252 | registerIconRenderer("reply", (props: IconBaseProps) => <BsReply {...props} />);
253 | registerIconRenderer("attach", (props: IconBaseProps) => <AttachmentIcon {...props} />);
254 | registerIconRenderer("attach2", (props: IconBaseProps) => <RiAttachment2 {...props} />);
255 | registerIconRenderer("emoji", (props: IconBaseProps) => <GrEmoji {...props} />);
256 | registerIconRenderer("message", (props: IconBaseProps) => <RiMessage2Line {...props} />);
257 | registerIconRenderer("upload", (props: IconBaseProps) => <FiUpload {...props} />);
258 | registerIconRenderer("split-vertical", (props: IconBaseProps) => <VscSplitVertical {...props} />);
259 | registerIconRenderer("split-horizontal", (props: IconBaseProps) => (
260 | <VscSplitHorizontal {...props} />
261 | ));
262 | registerIconRenderer("swap", (props: IconBaseProps) => <IoSwapVertical {...props} />);
263 | registerIconRenderer("download", (props: IconBaseProps) => <FiDownload {...props} />);
264 | registerIconRenderer("note", (props: IconBaseProps) => <RiStickyNoteLine {...props} />);
265 | registerIconRenderer("binding", (props: IconBaseProps) => <BindingIcon {...props} />);
266 | registerIconRenderer("database", (props: IconBaseProps) => <DatabaseIcon {...props} />);
267 | registerIconRenderer("unlink", (props: IconBaseProps) => <UnlinkIcon {...props} />);
268 | registerIconRenderer("api", (props: IconBaseProps) => <ApiIcon {...props} />);
269 | registerIconRenderer("expression", (props: IconBaseProps) => <ExpressionIcon {...props} />);
270 | registerIconRenderer("chat", (props: IconBaseProps) => <BsChatDots {...props} />);
271 | registerIconRenderer("hash", (props: IconBaseProps) => <BsHash {...props} />);
272 | registerIconRenderer("drive", (props: IconBaseProps) => <FiHardDrive {...props} />);
273 | registerIconRenderer("lock", (props: IconBaseProps) => <FiLock {...props} />);
274 | registerIconRenderer("start", (props: IconBaseProps) => <VscDebugStart {...props} />);
275 | registerIconRenderer("stop", (props: IconBaseProps) => <VscDebugStop {...props} />);
276 | registerIconRenderer("restart", (props: IconBaseProps) => <TfiReload {...props} />);
277 | registerIconRenderer("duplicate", (props: IconBaseProps) => <HiOutlineDuplicate {...props} />);
278 | registerIconRenderer("connect", (props: IconBaseProps) => <RxLightningBolt {...props} />);
279 | registerIconRenderer("cog", (props: IconBaseProps) => <HiOutlineCog {...props} />);
280 | registerIconRenderer("sun", (props: IconBaseProps) => <HiSun {...props} />);
281 | registerIconRenderer("moon", (props: IconBaseProps) => <MoonIcon {...props} />);
282 | registerIconRenderer("stars", (props: IconBaseProps) => <StarsIcon {...props} />);
283 | registerIconRenderer("share", (props: IconBaseProps) => <ShareIcon {...props} />);
284 | registerIconRenderer("new-window", (props: IconBaseProps) => <RxOpenInNewWindow {...props} />);
285 | registerIconRenderer("paint", (props: IconBaseProps) => <HiOutlinePaintBrush {...props} />);
286 | registerIconRenderer("palette", (props: IconBaseProps) => <MdOutlinePalette {...props} />);
287 | registerIconRenderer("trending-up", (props: IconBaseProps) => <TrendingUpIcon {...props} />);
288 | registerIconRenderer("trending-down", (props: IconBaseProps) => <TrendingDownIcon {...props} />);
289 | registerIconRenderer("trending-level", (props: IconBaseProps) => <TrendingLevelIcon {...props} />);
290 | registerIconRenderer("sortasc", (props: IconBaseProps) => <SortAscendingIcon {...props} />);
291 | registerIconRenderer("sortdesc", (props: IconBaseProps) => <SortDescendingIcon {...props} />);
292 | registerIconRenderer("nosort", (props: IconBaseProps) => <NoSortIcon {...props} />);
293 |
294 | registerIconRenderer("admonition_info", (props: IconBaseProps) => (
295 | <AdmonitionInfoIcon {...props} />
296 | ));
297 | registerIconRenderer("admonition_warning", (props: IconBaseProps) => (
298 | <AdmonitionWarningIcon {...props} />
299 | ));
300 | registerIconRenderer("admonition_danger", (props: IconBaseProps) => (
301 | <AdmonitionDangerIcon {...props} />
302 | ));
303 | registerIconRenderer("admonition_note", (props: IconBaseProps) => (
304 | <AdmonitionNoteIcon {...props} />
305 | ));
306 | registerIconRenderer("admonition_tip", (props: IconBaseProps) => <AdmonitionTipIcon {...props} />);
307 |
308 | // --- IDE extras (temporary)
309 | registerIconRenderer("arrowdown", (props: IconBaseProps) => <BsArrowDownShort {...props} />);
310 | registerIconRenderer("square", (props: IconBaseProps) => <BsSquare {...props} />);
311 | registerIconRenderer("squarehalf", (props: IconBaseProps) => <BsSquareHalf {...props} />);
312 | registerIconRenderer("squarefill", (props: IconBaseProps) => <BsSquareFill {...props} />);
313 |
314 | registerIconRenderer("table-insert-row", (props) => <TableInsertRowIcon {...props} />);
315 | registerIconRenderer("table-delete-row", (props) => <TableDeleteRowIcon {...props} />);
316 | registerIconRenderer("table-insert-column", (props) => <TableInsertColumnIcon {...props} />);
317 | registerIconRenderer("table-delete-column", (props) => <TableDeleteColumnIcon {...props} />);
318 |
319 | registerIconRenderer("eye", (props) => <IoEyeOutline {...props} />);
320 | registerIconRenderer("eye-off", (props) => <IoEyeOffOutline {...props} />);
321 |
322 | export function IconProvider({ children }: { children: ReactNode }) {
323 | const getRegisteredIconNames = useCallback(() => {
324 | return Array.from(pool.keys());
325 | }, []);
326 |
327 | const lookupIconRenderer = useCallback((name: string): IconRegistryEntry | undefined => {
328 | return pool.get(name);
329 | }, []);
330 |
331 | const [customSvgs, setCustomSvgs] = useState<
332 | Record<string, { name: string; attributes: Record<string, any> }>
333 | >({});
334 | const attachedResources = useRef<Record<string, boolean>>({});
335 | const spriteRootRef = useRef<SVGSVGElement>(null);
336 |
337 | const ensureCustomSvgIcon = useCallback(async (resourceUrl: string) => {
338 | if (attachedResources.current[resourceUrl]) {
339 | return;
340 | }
341 | const icon = await (await fetch(resourceUrl)).text();
342 | const div = document.createElement("div");
343 | div.style.display = "none";
344 | div.innerHTML = icon;
345 |
346 | const attrs: Record<string, any> = {};
347 | for (let i = 0; i < div.children[0].attributes.length; i++) {
348 | const attr = div.children[0].attributes[i];
349 | if (attr.nodeName !== "class") {
350 | attrs[attr.nodeName] = attr.nodeValue;
351 | }
352 | }
353 |
354 | Object.keys(attrs).forEach((key) => {
355 | div.children[0].removeAttribute(key);
356 | });
357 |
358 | const d = document.createElementNS("http://www.w3.org/2000/svg", "symbol");
359 | d.innerHTML = div.children[0].innerHTML;
360 | d.id = resourceUrl;
361 | d.setAttributeNS(null, "viewBox", attrs["viewBox"]);
362 |
363 | if (!attachedResources.current[resourceUrl]) {
364 | spriteRootRef.current!.appendChild(d);
365 | attachedResources.current[resourceUrl] = true;
366 | }
367 | const customIcon = {
368 | name: resourceUrl,
369 | attributes: attrs,
370 | };
371 | setCustomSvgs((prev) => {
372 | return {
373 | ...prev,
374 | [resourceUrl]: customIcon,
375 | };
376 | });
377 | }, []);
378 |
379 | const contextValue = useMemo(() => {
380 | return {
381 | getRegisteredIconNames,
382 | lookupIconRenderer,
383 | ensureCustomSvgIcon,
384 | customSvgs,
385 | };
386 | }, [customSvgs, ensureCustomSvgIcon, getRegisteredIconNames, lookupIconRenderer]);
387 |
388 | return (
389 | <IconRegistryContext.Provider value={contextValue}>
390 | {children}
391 | <svg style={{ display: "none" }} ref={spriteRootRef}></svg>
392 | </IconRegistryContext.Provider>
393 | );
394 | }
395 |
```
--------------------------------------------------------------------------------
/xmlui/src/parsers/xmlui-parser/xmlui-serializer.ts:
--------------------------------------------------------------------------------
```typescript
1 | import type { ComponentDef, CompoundComponentDef } from "../../abstractions/ComponentDefs";
2 | import type {
3 | XmlUiAttribute,
4 | XmlUiComment,
5 | XmlUiElement,
6 | XmlUiFragment,
7 | XmlUiNode,
8 | } from "./xmlui-tree";
9 | import { COMPOUND_COMP_ID } from "./transform";
10 |
11 | const attrBreakRegex = /[\r\n<>'"&]/;
12 |
13 | /**
14 | * Helper class for XMLUI serialization and parsing
15 | */
16 | export class XmlUiHelper {
17 | /**
18 | * Serialize the specified XML fragment into a string
19 | * @param xml XML fragment to serialize
20 | * @param options Formatting options to use
21 | */
22 | serialize(xml: XmlUiFragment, options?: XmluiSerializationOptions): string {
23 | const fragment = Array.isArray(xml) ? xml : [xml];
24 | return serializeFragment(fragment, 0);
25 |
26 | function serializeFragment(nodes: XmlUiNode[], depth: number): string {
27 | return nodes
28 | .map((n) => serializeNode(n, depth))
29 | .join(options?.prettify ? "\n" + getIndent(depth) : "");
30 | }
31 |
32 | function serializeNode(node: XmlUiNode, depth: number): string {
33 | switch (node.type) {
34 | case "XmlUiComment":
35 | return serializeXmlComment(node, depth);
36 | case "XmlUiElement":
37 | return serializeXmlElement(node, depth);
38 | default:
39 | return "";
40 | }
41 | }
42 |
43 | function getIndent(depth: number): string {
44 | return options?.prettify ? "".padEnd((options?.indents ?? 2) * depth, " ") : "";
45 | }
46 |
47 | function serializeXmlComment(node: XmlUiComment, depth: number): string {
48 | return `${getIndent(depth)}<!--${node.text}-->`;
49 | }
50 |
51 | function serializeXmlElement(node: XmlUiElement, depth: number): string {
52 | let elementStr = `${getIndent(depth)}<${nodeName()}`;
53 | const hasAttrs = (node.attributes?.length ?? 0) > 0;
54 | const hasChildren = (node.childNodes?.length ?? 0) > 0;
55 | if (node.text || hasAttrs || hasChildren) {
56 | // --- Indicate that the node has not yet been broken into multiple lines
57 | if (hasAttrs) {
58 | // --- Render attributes
59 | const attrTexts = node.attributes!.map((a) => serializeXmlAttribute(a));
60 | if (!options?.prettify) {
61 | elementStr += " " + attrTexts.join(" ");
62 | } else {
63 | // --- Check line overflow
64 | const nodeLength =
65 | elementStr.length +
66 | 1 + // --- Space after
67 | attrTexts.join(" ").length + // --- Attributes total length
68 | (hasChildren ? 1 : (options?.useSpaceBeforeClose ?? false) ? 3 : 2); // --- Closing token length
69 | if (nodeLength > (options?.lineLength ?? 80)) {
70 | // --- Too long, break attributes into new lines
71 | attrTexts.forEach((text) => {
72 | elementStr += "\n" + getIndent(depth + 1) + text;
73 | });
74 | if (options?.breakClosingTag ?? false) {
75 | elementStr += "\n" + getIndent(depth);
76 | }
77 | } else {
78 | // --- Attributes fit into the line
79 | elementStr += " " + attrTexts.join(" ");
80 | }
81 | }
82 | }
83 | if (node.text || hasChildren) {
84 | // --- Close the opening tag
85 | elementStr += ">";
86 |
87 | // --- Render the text
88 | if (node.text) {
89 | const textContents = node.preserveSpaces
90 | ? serializeQuotedText(node.text)
91 | : serializeText(node.text);
92 | if (
93 | options?.prettify &&
94 | elementStr.length + textContents.length + node.name.length + 3 >
95 | (options?.lineLength ?? 80)
96 | ) {
97 | // --- break text
98 | elementStr += "\n" + getIndent(depth + 1) + textContents + "\n";
99 | } else {
100 | elementStr += textContents;
101 | }
102 | }
103 |
104 | // --- Render child nodes
105 | if (hasChildren) {
106 | const childrenTexts = node.childNodes!.map((c) => serializeNode(c, depth + 1));
107 | if (!options?.prettify) {
108 | elementStr += childrenTexts.join("");
109 | } else {
110 | childrenTexts.forEach((text) => {
111 | elementStr += "\n" + text;
112 | });
113 | elementStr += "\n";
114 | }
115 | }
116 |
117 | // --- Render the closing tag
118 | elementStr += `${getIndent(depth)}</${node.name}>`;
119 | } else {
120 | elementStr += ((options?.useSpaceBeforeClose ?? false) ? " " : "") + "/>";
121 | }
122 | } else {
123 | elementStr += ((options?.useSpaceBeforeClose ?? false) ? " " : "") + "/>";
124 | if (node.text === "") {
125 | elementStr += `""</${nodeName()}>`;
126 | }
127 | }
128 |
129 | return elementStr;
130 |
131 | function nodeName(): string {
132 | return node.namespace ? `${node.namespace}:${node.name}` : node.name;
133 | }
134 | }
135 |
136 | function serializeXmlAttribute(node: XmlUiAttribute): string {
137 | // --- Handle valueless attributes
138 | if (node.value === undefined || node.value === null) {
139 | return `${nodeName()}`;
140 | }
141 |
142 | // --- Use quotes when required so
143 | if (node.preserveSpaces) {
144 | return `${nodeName()}=${serializeQuotedText(node.value)}`;
145 | }
146 |
147 | // --- Do the rest
148 | const value = node.value ?? "";
149 | return `${nodeName()}=${serializeQuotedText(value)}`;
150 |
151 | function nodeName(): string {
152 | return node.namespace ? `${node.namespace}:${node.name}` : node.name;
153 | }
154 | }
155 |
156 | function serializeText(text: string): string {
157 | return options?.useQuotes || attrBreakRegex.test(text) ? serializeQuotedText(text) : text;
158 | }
159 |
160 | function serializeQuotedText(text: string): string {
161 | const containsQuote = text.indexOf("'") >= 0;
162 | const containsDQuote = text.indexOf('"') >= 0;
163 | if ((!containsQuote && !containsDQuote) || (containsQuote && !containsDQuote)) {
164 | return `"${text.replaceAll("`", "\\`")}"`;
165 | }
166 | if (containsDQuote && !containsQuote) {
167 | return `'${text.replaceAll("`", "\\`")}'`;
168 | }
169 | return `\`${text.replaceAll("`", "\\`")}\``;
170 | }
171 | }
172 |
173 | /**
174 | * Transform the specified component definition into an XMLUI node
175 | * @param def Component definitions
176 | * @param options Transformation options
177 | */
178 | transformComponentDefinition(
179 | def: ComponentDef | CompoundComponentDef,
180 | options?: XmlUiTransformOptions,
181 | ): XmlUiFragment {
182 | return (def as any).type
183 | ? this.transformSimpleComponentDefinition(def as ComponentDef, options)
184 | : this.transformCompoundComponentDefinition(def as CompoundComponentDef, options);
185 | }
186 |
187 | /**
188 | * Transform the specified object into an XMLUI nodes
189 | * @param def Object definition
190 | * @param options Transformation options
191 | */
192 | transformObject(def: Record<string, any>, options?: XmlUiTransformOptions): XmlUiNode[] | null {
193 | const transformed = this.transformValue("Object", "", def, options);
194 | if (!transformed) {
195 | return null;
196 | }
197 | return transformed.childNodes ?? [];
198 | }
199 |
200 | /**
201 | * Transforms the specified simple component definition into an XMLUI node
202 | * @param def Component definition
203 | * @param options Transformation options
204 | */
205 | private transformSimpleComponentDefinition(
206 | def: ComponentDef,
207 | options?: XmlUiTransformOptions,
208 | ): XmlUiFragment {
209 | const componentNode: XmlUiElement = {
210 | type: "XmlUiElement",
211 | name: def.type,
212 | };
213 |
214 | // --- Fundamental props
215 | if (def.uid !== undefined) {
216 | this.addProperty(componentNode, "id", def.uid, options);
217 | }
218 | if (def.testId !== undefined) {
219 | this.addProperty(componentNode, "testId", def.testId, options);
220 | }
221 | if (def.when !== undefined) {
222 | this.addProperty(componentNode, "when", def.when, options);
223 | }
224 |
225 | // --- Process vars
226 | if (def.vars) {
227 | Object.keys(def.vars).forEach((key) => {
228 | const varElement = this.transformValue("var", key, def.vars![key], options);
229 | if (varElement === null) return;
230 | componentNode.childNodes ??= [];
231 | componentNode.childNodes.push(varElement);
232 | });
233 | }
234 |
235 | // --- Process properties
236 | if (def.props) {
237 | Object.keys(def.props).forEach((key) => {
238 | // --- Special serialization for component-aware props
239 | const propValue = def.props![key];
240 | if (key.endsWith("Template") && (propValue as any).type) {
241 | // --- Consider this property holds a component
242 | componentNode.childNodes ??= [];
243 | const propWrapper: XmlUiElement = {
244 | type: "XmlUiElement",
245 | name: "property",
246 | attributes: [
247 | {
248 | type: "XmlUiAttribute",
249 | name: "name",
250 | value: key,
251 | },
252 | ],
253 | };
254 | this.addComponentElement(propWrapper, propValue as ComponentDef);
255 | componentNode.childNodes.push(propWrapper);
256 | } else {
257 | // --- Undefined is not serialized
258 | if (propValue === undefined) {
259 | return;
260 | }
261 |
262 | // --- Handle null property value
263 | if (propValue === null) {
264 | const nullPropElement: XmlUiElement = {
265 | type: "XmlUiElement",
266 | name: "property",
267 | attributes: [
268 | {
269 | type: "XmlUiAttribute",
270 | name: "name",
271 | value: key,
272 | },
273 | ],
274 | };
275 | componentNode.childNodes ??= [];
276 | componentNode.childNodes.push(nullPropElement);
277 | return;
278 | }
279 |
280 | // --- Extract prop if asked so, or if those are special, like "id", "when", or "testIs"
281 | if (key === "id" || key === "when" || key === "testId" || options?.extractProps) {
282 | const idPropElement: XmlUiElement = {
283 | type: "XmlUiElement",
284 | name: "property",
285 | };
286 | this.addProperty(idPropElement, key, propValue, options);
287 | componentNode.childNodes ??= [];
288 | componentNode.childNodes.push(idPropElement);
289 | return;
290 | }
291 |
292 | // --- Add property as the best according to the value
293 | this.addProperty(componentNode, key, propValue, options);
294 | }
295 | });
296 | }
297 |
298 | // --- Process events
299 | if (def.events) {
300 | Object.keys(def.events).forEach((key) => {
301 | const eventElement = this.transformValue("event", key, def.events![key], options);
302 | if (eventElement === null) return;
303 | componentNode.childNodes ??= [];
304 | componentNode.childNodes.push(eventElement);
305 | });
306 | }
307 |
308 | // --- Process loaders
309 | if (def.loaders) {
310 | this.addComponentList(componentNode, "loaders", def.loaders);
311 | }
312 |
313 | // --- Process APIs
314 | if (def.api) {
315 | Object.keys(def.api).forEach((key) => {
316 | const apiElement = this.transformValue("api", key, def.api![key], options);
317 | if (apiElement === null) return;
318 | componentNode.childNodes ??= [];
319 | componentNode.childNodes.push(apiElement);
320 | });
321 | }
322 |
323 | // --- Process uses
324 | if (def.uses) {
325 | this.addList(componentNode, "uses", "", def.uses, options);
326 | }
327 |
328 | // --- Process children
329 | if (def.children) {
330 | if (typeof def.children === "string") {
331 | this.addProperty(componentNode, "children", def.children, options);
332 | } else {
333 | def.children.forEach((ch) => {
334 | this.addComponentElement(componentNode, ch);
335 | });
336 | }
337 | }
338 |
339 | // --- Done
340 | return componentNode;
341 | }
342 |
343 | /**
344 | * Transforms the specified simple component definition into an Xml node
345 | * @param def Compound component definition
346 | * @param options Transformation options
347 | */
348 | private transformCompoundComponentDefinition(
349 | def: CompoundComponentDef | string,
350 | options?: XmlUiTransformOptions,
351 | ): XmlUiFragment {
352 | if (typeof def === "string") {
353 | return {
354 | type: "XmlUiElement",
355 | name: def,
356 | } as XmlUiElement;
357 | }
358 |
359 | const nested: XmlUiFragment = this.transformSimpleComponentDefinition(
360 | def.component,
361 | options,
362 | );
363 | const componentNode: XmlUiElement = {
364 | type: "XmlUiElement",
365 | name: COMPOUND_COMP_ID,
366 | attributes: [
367 | {
368 | type: "XmlUiAttribute",
369 | name: "name",
370 | value: def.name,
371 | },
372 | ],
373 | childNodes: Array.isArray(nested) ? [...nested] : [nested],
374 | };
375 |
376 | // --- Transform APIs
377 | if (def.api) {
378 | Object.keys(def.api).forEach((key) => {
379 | const apiElement = this.transformValue("api", key, def.api![key], options);
380 | if (apiElement === null) return;
381 | componentNode.childNodes ??= [];
382 | componentNode.childNodes.push(apiElement);
383 | });
384 | }
385 |
386 | // --- Done
387 | return componentNode;
388 | }
389 |
390 | /**
391 | * Transforms a value into an XMLUI element
392 | * @param nodeName Name of the value node
393 | * @param name Optional (property) name
394 | * @param value Value to transform
395 | * @param options Transformation options
396 | */
397 | private transformValue(
398 | nodeName: string,
399 | name: string | undefined,
400 | value: any,
401 | options?: XmlUiTransformOptions,
402 | ): XmlUiElement | null {
403 | // --- Do not transform undefined elements
404 | if (value === undefined) return null;
405 |
406 | // --- Prepare the node with the value
407 | const valueNode: XmlUiElement = {
408 | type: "XmlUiElement",
409 | name: nodeName,
410 | };
411 | if (name) {
412 | valueNode.attributes = [
413 | {
414 | type: "XmlUiAttribute",
415 | name: "name",
416 | value: name,
417 | },
418 | ];
419 | }
420 |
421 | // --- Extend the node according to the specified value
422 | // --- Null value: we're done
423 | if (value === null) {
424 | return valueNode;
425 | }
426 |
427 | // --- Simple value: use text or value attribute
428 | if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
429 | const strValue = typeof value === "string" ? value.toString() : `{${value.toString()}}`;
430 | const preserveSpaces =
431 | attrBreakRegex.test(strValue) || strValue.trim().length != strValue.length;
432 | if (options?.preferTextToValue) {
433 | valueNode.text = strValue;
434 | valueNode.preserveSpaces = preserveSpaces;
435 | } else {
436 | valueNode.attributes ??= [];
437 | valueNode.attributes.push({
438 | type: "XmlUiAttribute",
439 | name: "value",
440 | value: strValue,
441 | preserveSpaces,
442 | });
443 | }
444 | return valueNode;
445 | }
446 |
447 | // --- Array value
448 | if (Array.isArray(value)) {
449 | if (value.length === 0) {
450 | // --- Empty array
451 | valueNode.attributes ??= [];
452 | valueNode.attributes.push({
453 | type: "XmlUiAttribute",
454 | name: "value",
455 | value: "{[]}",
456 | });
457 | } else {
458 | value.forEach((item) => {
459 | const itemElement = this.transformValue("item", undefined, item, options);
460 | if (!itemElement) return;
461 | valueNode.childNodes ??= [];
462 | valueNode.childNodes.push(itemElement);
463 | });
464 | }
465 | } else if (typeof value === "object") {
466 | const keys = Object.keys(value);
467 | if (keys.length === 0) {
468 | // --- Empty object
469 | valueNode.attributes ??= [];
470 | valueNode.attributes.push({
471 | type: "XmlUiAttribute",
472 | name: "value",
473 | value: "{{}}",
474 | });
475 | } else {
476 | keys.forEach((key) => {
477 | const fieldElement = this.transformValue("field", key, value[key], options);
478 | if (!fieldElement) return;
479 | valueNode.childNodes ??= [];
480 | valueNode.childNodes.push(fieldElement);
481 | });
482 | }
483 | } else {
484 | throw new Error(`Cannot serialize '${typeof value}' value`);
485 | }
486 |
487 | return valueNode;
488 | }
489 |
490 | /**
491 | * Transforms the specified simple component definition into an Xml node
492 | * @param name Element name
493 | * @param value Value to transform
494 | * @param options Transformation options
495 | */
496 | private transformObjectValue(
497 | name: string,
498 | value: any,
499 | options?: XmlUiTransformOptions,
500 | ): XmlUiNode {
501 | const componentNode: XmlUiElement = {
502 | type: "XmlUiElement",
503 | name: name,
504 | };
505 |
506 | if (value) {
507 | Object.keys(value).forEach((key) =>
508 | this.addProperty(componentNode, key, value[key], options),
509 | );
510 | }
511 | return componentNode;
512 | }
513 |
514 | /**
515 | * Add a property to the specified XMLUI element
516 | * @param element XML element
517 | * @param name Element name
518 | * @param value Element value
519 | * @param options Transformation options
520 | */
521 | private addProperty(
522 | element: XmlUiElement,
523 | name: string,
524 | value: any,
525 | options?: XmlUiTransformOptions,
526 | ): void {
527 | switch (typeof value) {
528 | // --- We do not serialize undefined property values
529 | case "undefined":
530 | break;
531 | case "string":
532 | element.attributes ??= [];
533 | element.attributes.push({
534 | type: "XmlUiAttribute",
535 | name,
536 | value: value?.toString(),
537 | preserveQuotes: options?.removeQuotes ?? false,
538 | preserveSpaces: attrBreakRegex.test(value.toString()),
539 | });
540 | break;
541 | case "boolean":
542 | case "number":
543 | case "object":
544 | const objElement = this.transformValue("property", name, value, options);
545 | if (objElement) {
546 | element.childNodes ??= [];
547 | element.childNodes.push(objElement);
548 | }
549 | break;
550 | default:
551 | throw new Error(`'${typeof value}' transformation is not implemented yet`);
552 | }
553 | }
554 |
555 | private addComponentElement(element: XmlUiElement, component: ComponentDef): void {
556 | element.childNodes ??= [];
557 | const childDef = this.transformComponentDefinition(component);
558 | if (Array.isArray(childDef)) {
559 | element.childNodes.push(...childDef);
560 | } else {
561 | element.childNodes.push(childDef);
562 | }
563 | }
564 |
565 | /**
566 | * Adds a list to the specified XML element
567 | * @param element XML element
568 | * @param name Name of the list (child in `element`)
569 | * @param prefix Prefix to use for the list
570 | * @param list List with items
571 | * @param options Transformation options
572 | */
573 | private addList(
574 | element: XmlUiElement,
575 | name: string,
576 | prefix: string,
577 | list: any[],
578 | options?: XmlUiTransformOptions,
579 | ): void {
580 | const nodeName = `${prefix ? prefix + "." : ""}${name}`;
581 | element.childNodes ??= [];
582 | list.forEach((item) => {
583 | if (typeof item === "string") {
584 | // --- Special case, the item can be the text of an XML element
585 | element.childNodes!.push({
586 | type: "XmlUiElement",
587 | name: nodeName,
588 | text: item,
589 | preserveSpaces: attrBreakRegex.test(item) || item !== item.trim() || item === "",
590 | });
591 | } else if (item === null) {
592 | element.childNodes!.push({
593 | type: "XmlUiElement",
594 | name: nodeName,
595 | });
596 | } else {
597 | const transformed = this.transformObjectValue(nodeName, item, options);
598 | if (Array.isArray(transformed)) {
599 | element.childNodes!.push(...transformed);
600 | } else {
601 | element.childNodes!.push(transformed);
602 | }
603 | }
604 | });
605 | }
606 |
607 | /**
608 | * Adds a component list to the specified element
609 | * @param element XML element
610 | * @param name Name to use for the wrapper element
611 | * @param list List with component items
612 | * @private
613 | */
614 | private addComponentList(element: XmlUiElement, name: string, list: ComponentDef[]): void {
615 | const children: XmlUiNode[] = [];
616 | list.forEach((item) => {
617 | const fragment = this.transformSimpleComponentDefinition(item);
618 | if (Array.isArray(fragment)) {
619 | children.push(...fragment);
620 | } else {
621 | children.push(fragment);
622 | }
623 | });
624 | const listElement: XmlUiElement = {
625 | type: "XmlUiElement",
626 | name,
627 | childNodes: children,
628 | };
629 | element.childNodes ??= [];
630 | element.childNodes.push(listElement);
631 | }
632 | }
633 |
634 | /**
635 | * Options to use with markup transformation from memory format to XMLUI structure
636 | */
637 | export type XmlUiTransformOptions = {
638 | preserveLineBreaks?: boolean;
639 | preserveSpecialChars?: boolean;
640 | removeQuotes?: boolean;
641 | extractProps?: boolean;
642 | preferTextToValue?: boolean;
643 | };
644 |
645 | export type XmluiSerializationOptions = {
646 | // --- Should prettify the output?
647 | prettify?: boolean;
648 |
649 | // --- Number of spaces to use for indentation
650 | indents?: number;
651 |
652 | // --- Max line length before breaking down attributes or text
653 | lineLength?: number;
654 |
655 | // --- Forces using quotes
656 | useQuotes?: boolean;
657 |
658 | // --- Use a space before "/>" ?
659 | useSpaceBeforeClose?: boolean;
660 |
661 | // --- Break closing tag into a new line
662 | breakClosingTag?: boolean;
663 | };
664 |
```