This is page 152 of 181. Use http://codebase.md/xmlui-org/xmlui/xmlui-latest.js?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .changeset
│ └── config.json
├── .eslintrc.cjs
├── .github
│ ├── build-checklist.png
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows
│ ├── deploy-blog.yml
│ ├── deploy-docs-optimized.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
│ ├── layout-changes.md
│ ├── package.json
│ ├── public
│ │ ├── blog
│ │ │ ├── images
│ │ │ │ ├── blog-page-component.png
│ │ │ │ ├── blog-scrabble.png
│ │ │ │ ├── integrated-blog-search.png
│ │ │ │ └── lorem-ipsum.png
│ │ │ ├── lorem-ipsum.md
│ │ │ ├── newest-post.md
│ │ │ ├── older-post.md
│ │ │ └── welcome-to-the-xmlui-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
│ │ └── 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
│ │ │ │ ├── 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
│ ├── 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
│ │ └── tsconfig.json
│ ├── 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
│ │ ├── tsconfig.json
│ │ └── 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
│ │ └── tsconfig.json
│ ├── 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
│ │ └── tsconfig.json
│ ├── 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
│ │ └── tsconfig.json
│ ├── 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.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.module.scss
│ │ │ │ ├── Preview.tsx
│ │ │ │ ├── Select.module.scss
│ │ │ │ ├── StandalonePlayground.tsx
│ │ │ │ ├── StandalonePlaygroundNative.module.scss
│ │ │ │ ├── StandalonePlaygroundNative.tsx
│ │ │ │ ├── ThemeSwitcher.module.scss
│ │ │ │ ├── ThemeSwitcher.tsx
│ │ │ │ ├── ToneSwitcher.tsx
│ │ │ │ ├── Tooltip.module.scss
│ │ │ │ ├── Tooltip.tsx
│ │ │ │ └── utils.ts
│ │ │ ├── providers
│ │ │ │ ├── Toast.module.scss
│ │ │ │ └── ToastProvider.tsx
│ │ │ ├── state
│ │ │ │ └── store.ts
│ │ │ ├── themes
│ │ │ │ └── theme.ts
│ │ │ └── utils
│ │ │ └── helpers.ts
│ │ └── tsconfig.json
│ ├── 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
│ │ └── tsconfig.json
│ ├── xmlui-spreadsheet
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── index.tsx
│ │ │ ├── Spreadsheet.tsx
│ │ │ └── SpreadsheetNative.tsx
│ │ └── tsconfig.json
│ └── 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.tsx
│ │ │ └── HeroSectionNative.tsx
│ │ ├── index.tsx
│ │ ├── ScrollToTop
│ │ │ ├── ScrollToTop.module.scss
│ │ │ ├── ScrollToTop.tsx
│ │ │ └── ScrollToTopNative.tsx
│ │ └── vite-env.d.ts
│ └── tsconfig.json
├── 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.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
│ ├── 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
│ ├── ud-components.md
│ └── xmlui-repo.md
├── package.json
├── playwright.config.ts
├── scripts
│ ├── coverage-only.js
│ ├── e2e-test-summary.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
│ ├── get-langserver-metadata.mjs
│ ├── 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.spec.ts
│ │ │ │ ├── LabelList.tsx
│ │ │ │ ├── LabelListNative.module.scss
│ │ │ │ └── LabelListNative.tsx
│ │ │ ├── Legend
│ │ │ │ ├── Legend.spec.ts
│ │ │ │ ├── Legend.tsx
│ │ │ │ └── LegendNative.tsx
│ │ │ ├── LineChart
│ │ │ │ ├── LineChart.md
│ │ │ │ ├── LineChart.module.scss
│ │ │ │ ├── LineChart.spec.ts
│ │ │ │ ├── LineChart.tsx
│ │ │ │ └── LineChartNative.tsx
│ │ │ ├── PieChart
│ │ │ │ ├── PieChart.md
│ │ │ │ ├── PieChart.spec.ts
│ │ │ │ ├── PieChart.tsx
│ │ │ │ ├── PieChartNative.module.scss
│ │ │ │ └── PieChartNative.tsx
│ │ │ ├── RadarChart
│ │ │ │ ├── RadarChart.md
│ │ │ │ ├── RadarChart.spec.ts
│ │ │ │ ├── RadarChart.tsx
│ │ │ │ └── RadarChartNative.tsx
│ │ │ ├── Tooltip
│ │ │ │ ├── TooltipContent.module.scss
│ │ │ │ ├── TooltipContent.spec.ts
│ │ │ │ └── TooltipContent.tsx
│ │ │ └── utils
│ │ │ ├── abstractions.ts
│ │ │ └── ChartProvider.tsx
│ │ ├── Checkbox
│ │ │ ├── Checkbox.md
│ │ │ ├── Checkbox.spec.ts
│ │ │ └── Checkbox.tsx
│ │ ├── CodeBlock
│ │ │ ├── CodeBlock.module.scss
│ │ │ ├── CodeBlock.spec.ts
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── CodeBlockNative.tsx
│ │ │ └── highlight-code.ts
│ │ ├── collectedComponentMetadata.ts
│ │ ├── ColorPicker
│ │ │ ├── ColorPicker.md
│ │ │ ├── ColorPicker.module.scss
│ │ │ ├── ColorPicker.spec.ts
│ │ │ ├── ColorPicker.tsx
│ │ │ └── ColorPickerNative.tsx
│ │ ├── Column
│ │ │ ├── Column.md
│ │ │ ├── Column.tsx
│ │ │ ├── ColumnNative.tsx
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ └── TableContext.tsx
│ │ ├── component-utils.ts
│ │ ├── ComponentProvider.tsx
│ │ ├── ComponentRegistryContext.tsx
│ │ ├── container-helpers.tsx
│ │ ├── ContentSeparator
│ │ │ ├── ContentSeparator.md
│ │ │ ├── ContentSeparator.module.scss
│ │ │ ├── ContentSeparator.spec.ts
│ │ │ ├── ContentSeparator.tsx
│ │ │ └── ContentSeparatorNative.tsx
│ │ ├── DataSource
│ │ │ ├── DataSource.md
│ │ │ └── DataSource.tsx
│ │ ├── DateInput
│ │ │ ├── DateInput.md
│ │ │ ├── DateInput.module.scss
│ │ │ ├── DateInput.spec.ts
│ │ │ ├── DateInput.tsx
│ │ │ └── DateInputNative.tsx
│ │ ├── DatePicker
│ │ │ ├── DatePicker.md
│ │ │ ├── DatePicker.module.scss
│ │ │ ├── DatePicker.spec.ts
│ │ │ ├── DatePicker.tsx
│ │ │ └── DatePickerNative.tsx
│ │ ├── DropdownMenu
│ │ │ ├── DropdownMenu.md
│ │ │ ├── DropdownMenu.module.scss
│ │ │ ├── DropdownMenu.spec.ts
│ │ │ ├── DropdownMenu.tsx
│ │ │ ├── DropdownMenuNative.tsx
│ │ │ ├── MenuItem.md
│ │ │ └── SubMenuItem.md
│ │ ├── EmojiSelector
│ │ │ ├── EmojiSelector.md
│ │ │ ├── EmojiSelector.spec.ts
│ │ │ ├── EmojiSelector.tsx
│ │ │ └── EmojiSelectorNative.tsx
│ │ ├── ExpandableItem
│ │ │ ├── ExpandableItem.module.scss
│ │ │ ├── ExpandableItem.spec.ts
│ │ │ ├── ExpandableItem.tsx
│ │ │ └── ExpandableItemNative.tsx
│ │ ├── FileInput
│ │ │ ├── FileInput.md
│ │ │ ├── FileInput.module.scss
│ │ │ ├── FileInput.spec.ts
│ │ │ ├── FileInput.tsx
│ │ │ └── FileInputNative.tsx
│ │ ├── FileUploadDropZone
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FileUploadDropZone.module.scss
│ │ │ ├── FileUploadDropZone.spec.ts
│ │ │ ├── FileUploadDropZone.tsx
│ │ │ └── FileUploadDropZoneNative.tsx
│ │ ├── FlowLayout
│ │ │ ├── FlowLayout.md
│ │ │ ├── FlowLayout.module.scss
│ │ │ ├── FlowLayout.spec.ts
│ │ │ ├── FlowLayout.spec.ts-snapshots
│ │ │ │ └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
│ │ │ ├── FlowLayout.tsx
│ │ │ └── FlowLayoutNative.tsx
│ │ ├── Footer
│ │ │ ├── Footer.md
│ │ │ ├── Footer.module.scss
│ │ │ ├── Footer.spec.ts
│ │ │ ├── Footer.tsx
│ │ │ └── FooterNative.tsx
│ │ ├── Form
│ │ │ ├── Form.md
│ │ │ ├── Form.module.scss
│ │ │ ├── Form.spec.ts
│ │ │ ├── Form.tsx
│ │ │ ├── formActions.ts
│ │ │ ├── FormContext.ts
│ │ │ └── FormNative.tsx
│ │ ├── FormItem
│ │ │ ├── FormItem.md
│ │ │ ├── FormItem.module.scss
│ │ │ ├── FormItem.spec.ts
│ │ │ ├── FormItem.tsx
│ │ │ ├── FormItemNative.tsx
│ │ │ ├── HelperText.module.scss
│ │ │ ├── HelperText.tsx
│ │ │ ├── ItemWithLabel.tsx
│ │ │ └── Validations.ts
│ │ ├── FormSection
│ │ │ ├── FormSection.md
│ │ │ ├── FormSection.ts
│ │ │ └── FormSection.xmlui
│ │ ├── Fragment
│ │ │ ├── Fragment.spec.ts
│ │ │ └── Fragment.tsx
│ │ ├── Heading
│ │ │ ├── abstractions.ts
│ │ │ ├── H1.md
│ │ │ ├── H1.spec.ts
│ │ │ ├── H2.md
│ │ │ ├── H2.spec.ts
│ │ │ ├── H3.md
│ │ │ ├── H3.spec.ts
│ │ │ ├── H4.md
│ │ │ ├── H4.spec.ts
│ │ │ ├── H5.md
│ │ │ ├── H5.spec.ts
│ │ │ ├── H6.md
│ │ │ ├── H6.spec.ts
│ │ │ ├── Heading.md
│ │ │ ├── Heading.module.scss
│ │ │ ├── Heading.spec.ts
│ │ │ ├── Heading.tsx
│ │ │ └── HeadingNative.tsx
│ │ ├── HoverCard
│ │ │ ├── HoverCard.tsx
│ │ │ └── HovercardNative.tsx
│ │ ├── HtmlTags
│ │ │ ├── HtmlTags.module.scss
│ │ │ ├── HtmlTags.spec.ts
│ │ │ └── HtmlTags.tsx
│ │ ├── Icon
│ │ │ ├── AdmonitionDanger.tsx
│ │ │ ├── AdmonitionInfo.tsx
│ │ │ ├── AdmonitionNote.tsx
│ │ │ ├── AdmonitionTip.tsx
│ │ │ ├── AdmonitionWarning.tsx
│ │ │ ├── ApiIcon.tsx
│ │ │ ├── ArrowDropDown.module.scss
│ │ │ ├── ArrowDropDown.tsx
│ │ │ ├── ArrowDropUp.module.scss
│ │ │ ├── ArrowDropUp.tsx
│ │ │ ├── ArrowLeft.module.scss
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowRight.module.scss
│ │ │ ├── ArrowRight.tsx
│ │ │ ├── Attach.tsx
│ │ │ ├── Binding.module.scss
│ │ │ ├── Binding.tsx
│ │ │ ├── BoardIcon.tsx
│ │ │ ├── BoxIcon.tsx
│ │ │ ├── CheckIcon.tsx
│ │ │ ├── ChevronDownIcon.tsx
│ │ │ ├── ChevronLeft.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUpIcon.tsx
│ │ │ ├── CodeFileIcon.tsx
│ │ │ ├── CodeSandbox.tsx
│ │ │ ├── CompactListIcon.tsx
│ │ │ ├── ContentCopyIcon.tsx
│ │ │ ├── DarkToLightIcon.tsx
│ │ │ ├── DatabaseIcon.module.scss
│ │ │ ├── DatabaseIcon.tsx
│ │ │ ├── DocFileIcon.tsx
│ │ │ ├── DocIcon.tsx
│ │ │ ├── DotMenuHorizontalIcon.tsx
│ │ │ ├── DotMenuIcon.tsx
│ │ │ ├── EmailIcon.tsx
│ │ │ ├── EmptyFolderIcon.tsx
│ │ │ ├── ErrorIcon.tsx
│ │ │ ├── ExpressionIcon.tsx
│ │ │ ├── FillPlusCricleIcon.tsx
│ │ │ ├── FilterIcon.tsx
│ │ │ ├── FolderIcon.tsx
│ │ │ ├── GlobeIcon.tsx
│ │ │ ├── HomeIcon.tsx
│ │ │ ├── HyperLinkIcon.tsx
│ │ │ ├── Icon.md
│ │ │ ├── Icon.module.scss
│ │ │ ├── Icon.spec.ts
│ │ │ ├── Icon.tsx
│ │ │ ├── IconNative.tsx
│ │ │ ├── ImageFileIcon.tsx
│ │ │ ├── Inspect.tsx
│ │ │ ├── LightToDark.tsx
│ │ │ ├── LinkIcon.tsx
│ │ │ ├── ListIcon.tsx
│ │ │ ├── LooseListIcon.tsx
│ │ │ ├── MoonIcon.tsx
│ │ │ ├── MoreOptionsIcon.tsx
│ │ │ ├── NoSortIcon.tsx
│ │ │ ├── PDFIcon.tsx
│ │ │ ├── PenIcon.tsx
│ │ │ ├── PhoneIcon.tsx
│ │ │ ├── PhotoIcon.tsx
│ │ │ ├── PlusIcon.tsx
│ │ │ ├── SearchIcon.tsx
│ │ │ ├── ShareIcon.tsx
│ │ │ ├── SortAscendingIcon.tsx
│ │ │ ├── SortDescendingIcon.tsx
│ │ │ ├── StarsIcon.tsx
│ │ │ ├── SunIcon.tsx
│ │ │ ├── svg
│ │ │ │ ├── admonition_danger.svg
│ │ │ │ ├── admonition_info.svg
│ │ │ │ ├── admonition_note.svg
│ │ │ │ ├── admonition_tip.svg
│ │ │ │ ├── admonition_warning.svg
│ │ │ │ ├── api.svg
│ │ │ │ ├── arrow-dropdown.svg
│ │ │ │ ├── arrow-left.svg
│ │ │ │ ├── arrow-right.svg
│ │ │ │ ├── arrow-up.svg
│ │ │ │ ├── attach.svg
│ │ │ │ ├── binding.svg
│ │ │ │ ├── box.svg
│ │ │ │ ├── bulb.svg
│ │ │ │ ├── code-file.svg
│ │ │ │ ├── code-sandbox.svg
│ │ │ │ ├── dark_to_light.svg
│ │ │ │ ├── database.svg
│ │ │ │ ├── doc.svg
│ │ │ │ ├── empty-folder.svg
│ │ │ │ ├── expression.svg
│ │ │ │ ├── eye-closed.svg
│ │ │ │ ├── eye-dark.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── file-text.svg
│ │ │ │ ├── filter.svg
│ │ │ │ ├── folder.svg
│ │ │ │ ├── img.svg
│ │ │ │ ├── inspect.svg
│ │ │ │ ├── light_to_dark.svg
│ │ │ │ ├── moon.svg
│ │ │ │ ├── pdf.svg
│ │ │ │ ├── photo.svg
│ │ │ │ ├── share.svg
│ │ │ │ ├── stars.svg
│ │ │ │ ├── sun.svg
│ │ │ │ ├── trending-down.svg
│ │ │ │ ├── trending-level.svg
│ │ │ │ ├── trending-up.svg
│ │ │ │ ├── txt.svg
│ │ │ │ ├── unknown-file.svg
│ │ │ │ ├── unlink.svg
│ │ │ │ └── xls.svg
│ │ │ ├── TableDeleteColumnIcon.tsx
│ │ │ ├── TableDeleteRowIcon.tsx
│ │ │ ├── TableInsertColumnIcon.tsx
│ │ │ ├── TableInsertRowIcon.tsx
│ │ │ ├── TrashIcon.tsx
│ │ │ ├── TrendingDownIcon.tsx
│ │ │ ├── TrendingLevelIcon.tsx
│ │ │ ├── TrendingUpIcon.tsx
│ │ │ ├── TxtIcon.tsx
│ │ │ ├── UnknownFileIcon.tsx
│ │ │ ├── UnlinkIcon.tsx
│ │ │ ├── UserIcon.tsx
│ │ │ ├── WarningIcon.tsx
│ │ │ └── XlsIcon.tsx
│ │ ├── IconProvider.tsx
│ │ ├── IconRegistryContext.tsx
│ │ ├── IFrame
│ │ │ ├── IFrame.md
│ │ │ ├── IFrame.module.scss
│ │ │ ├── IFrame.spec.ts
│ │ │ ├── IFrame.tsx
│ │ │ └── IFrameNative.tsx
│ │ ├── Image
│ │ │ ├── Image.md
│ │ │ ├── Image.module.scss
│ │ │ ├── Image.spec.ts
│ │ │ ├── Image.tsx
│ │ │ └── ImageNative.tsx
│ │ ├── Input
│ │ │ ├── index.ts
│ │ │ ├── InputAdornment.module.scss
│ │ │ ├── InputAdornment.tsx
│ │ │ ├── InputDivider.module.scss
│ │ │ ├── InputDivider.tsx
│ │ │ ├── InputLabel.module.scss
│ │ │ ├── InputLabel.tsx
│ │ │ ├── PartialInput.module.scss
│ │ │ └── PartialInput.tsx
│ │ ├── InspectButton
│ │ │ ├── InspectButton.module.scss
│ │ │ └── InspectButton.tsx
│ │ ├── Items
│ │ │ ├── Items.md
│ │ │ ├── Items.spec.ts
│ │ │ ├── Items.tsx
│ │ │ └── ItemsNative.tsx
│ │ ├── Link
│ │ │ ├── Link.md
│ │ │ ├── Link.module.scss
│ │ │ ├── Link.spec.ts
│ │ │ ├── Link.tsx
│ │ │ └── LinkNative.tsx
│ │ ├── List
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── List.md
│ │ │ ├── List.module.scss
│ │ │ ├── List.spec.ts
│ │ │ ├── List.tsx
│ │ │ └── ListNative.tsx
│ │ ├── Logo
│ │ │ ├── doc-resources
│ │ │ │ └── xmlui-logo.svg
│ │ │ ├── Logo.md
│ │ │ ├── Logo.tsx
│ │ │ └── LogoNative.tsx
│ │ ├── Markdown
│ │ │ ├── CodeText.module.scss
│ │ │ ├── CodeText.tsx
│ │ │ ├── Markdown.md
│ │ │ ├── Markdown.module.scss
│ │ │ ├── Markdown.spec.ts
│ │ │ ├── Markdown.tsx
│ │ │ ├── MarkdownNative.tsx
│ │ │ ├── parse-binding-expr.ts
│ │ │ └── utils.ts
│ │ ├── metadata-helpers.ts
│ │ ├── ModalDialog
│ │ │ ├── ConfirmationModalContextProvider.tsx
│ │ │ ├── Dialog.module.scss
│ │ │ ├── Dialog.tsx
│ │ │ ├── ModalDialog.md
│ │ │ ├── ModalDialog.module.scss
│ │ │ ├── ModalDialog.spec.ts
│ │ │ ├── ModalDialog.tsx
│ │ │ ├── ModalDialogNative.tsx
│ │ │ └── ModalVisibilityContext.tsx
│ │ ├── NavGroup
│ │ │ ├── NavGroup.md
│ │ │ ├── NavGroup.module.scss
│ │ │ ├── NavGroup.spec.ts
│ │ │ ├── NavGroup.tsx
│ │ │ ├── NavGroupContext.ts
│ │ │ └── NavGroupNative.tsx
│ │ ├── NavLink
│ │ │ ├── NavLink.md
│ │ │ ├── NavLink.module.scss
│ │ │ ├── NavLink.spec.ts
│ │ │ ├── NavLink.tsx
│ │ │ └── NavLinkNative.tsx
│ │ ├── NavPanel
│ │ │ ├── NavPanel.md
│ │ │ ├── NavPanel.module.scss
│ │ │ ├── NavPanel.spec.ts
│ │ │ ├── NavPanel.tsx
│ │ │ └── NavPanelNative.tsx
│ │ ├── NestedApp
│ │ │ ├── AppWithCodeView.module.scss
│ │ │ ├── AppWithCodeView.tsx
│ │ │ ├── AppWithCodeViewNative.tsx
│ │ │ ├── defaultProps.tsx
│ │ │ ├── logo.svg
│ │ │ ├── NestedApp.module.scss
│ │ │ ├── NestedApp.tsx
│ │ │ ├── NestedAppNative.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── utils.ts
│ │ ├── NoResult
│ │ │ ├── NoResult.md
│ │ │ ├── NoResult.module.scss
│ │ │ ├── NoResult.spec.ts
│ │ │ ├── NoResult.tsx
│ │ │ └── NoResultNative.tsx
│ │ ├── NumberBox
│ │ │ ├── numberbox-abstractions.ts
│ │ │ ├── NumberBox.md
│ │ │ ├── NumberBox.module.scss
│ │ │ ├── NumberBox.spec.ts
│ │ │ ├── NumberBox.tsx
│ │ │ └── NumberBoxNative.tsx
│ │ ├── Option
│ │ │ ├── Option.md
│ │ │ ├── Option.spec.ts
│ │ │ ├── Option.tsx
│ │ │ ├── OptionNative.tsx
│ │ │ └── OptionTypeProvider.tsx
│ │ ├── PageMetaTitle
│ │ │ ├── PageMetaTilteNative.tsx
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── PageMetaTitle.spec.ts
│ │ │ └── PageMetaTitle.tsx
│ │ ├── Pages
│ │ │ ├── Page.md
│ │ │ ├── Pages.md
│ │ │ ├── Pages.module.scss
│ │ │ ├── Pages.tsx
│ │ │ └── PagesNative.tsx
│ │ ├── Pagination
│ │ │ ├── Pagination.md
│ │ │ ├── Pagination.module.scss
│ │ │ ├── Pagination.spec.ts
│ │ │ ├── Pagination.tsx
│ │ │ └── PaginationNative.tsx
│ │ ├── PositionedContainer
│ │ │ ├── PositionedContainer.module.scss
│ │ │ ├── PositionedContainer.tsx
│ │ │ └── PositionedContainerNative.tsx
│ │ ├── ProfileMenu
│ │ │ ├── ProfileMenu.module.scss
│ │ │ └── ProfileMenu.tsx
│ │ ├── ProgressBar
│ │ │ ├── ProgressBar.md
│ │ │ ├── ProgressBar.module.scss
│ │ │ ├── ProgressBar.spec.ts
│ │ │ ├── ProgressBar.tsx
│ │ │ └── ProgressBarNative.tsx
│ │ ├── Queue
│ │ │ ├── Queue.md
│ │ │ ├── Queue.spec.ts
│ │ │ ├── Queue.tsx
│ │ │ ├── queueActions.ts
│ │ │ └── QueueNative.tsx
│ │ ├── RadioGroup
│ │ │ ├── RadioGroup.md
│ │ │ ├── RadioGroup.module.scss
│ │ │ ├── RadioGroup.spec.ts
│ │ │ ├── RadioGroup.tsx
│ │ │ ├── RadioGroupNative.tsx
│ │ │ ├── RadioItem.tsx
│ │ │ └── RadioItemNative.tsx
│ │ ├── RealTimeAdapter
│ │ │ ├── RealTimeAdapter.tsx
│ │ │ └── RealTimeAdapterNative.tsx
│ │ ├── Redirect
│ │ │ ├── Redirect.md
│ │ │ ├── Redirect.spec.ts
│ │ │ └── Redirect.tsx
│ │ ├── ResponsiveBar
│ │ │ ├── README.md
│ │ │ ├── ResponsiveBar.md
│ │ │ ├── ResponsiveBar.module.scss
│ │ │ ├── ResponsiveBar.spec.ts
│ │ │ ├── ResponsiveBar.tsx
│ │ │ └── ResponsiveBarNative.tsx
│ │ ├── Select
│ │ │ ├── HiddenOption.tsx
│ │ │ ├── OptionContext.ts
│ │ │ ├── Select.md
│ │ │ ├── Select.module.scss
│ │ │ ├── Select.spec.ts
│ │ │ ├── Select.tsx
│ │ │ ├── SelectContext.tsx
│ │ │ └── SelectNative.tsx
│ │ ├── SelectionStore
│ │ │ ├── SelectionStore.md
│ │ │ ├── SelectionStore.tsx
│ │ │ └── SelectionStoreNative.tsx
│ │ ├── Slider
│ │ │ ├── Slider.md
│ │ │ ├── Slider.module.scss
│ │ │ ├── Slider.spec.ts
│ │ │ ├── Slider.tsx
│ │ │ └── SliderNative.tsx
│ │ ├── Slot
│ │ │ ├── Slot.md
│ │ │ ├── Slot.spec.ts
│ │ │ └── Slot.ts
│ │ ├── SlotItem.tsx
│ │ ├── SpaceFiller
│ │ │ ├── SpaceFiller.md
│ │ │ ├── SpaceFiller.module.scss
│ │ │ ├── SpaceFiller.spec.ts
│ │ │ ├── SpaceFiller.tsx
│ │ │ └── SpaceFillerNative.tsx
│ │ ├── Spinner
│ │ │ ├── Spinner.md
│ │ │ ├── Spinner.module.scss
│ │ │ ├── Spinner.spec.ts
│ │ │ ├── Spinner.tsx
│ │ │ └── SpinnerNative.tsx
│ │ ├── Splitter
│ │ │ ├── HSplitter.md
│ │ │ ├── HSplitter.spec.ts
│ │ │ ├── Splitter.md
│ │ │ ├── Splitter.module.scss
│ │ │ ├── Splitter.spec.ts
│ │ │ ├── Splitter.tsx
│ │ │ ├── SplitterNative.tsx
│ │ │ ├── utils.ts
│ │ │ ├── VSplitter.md
│ │ │ └── VSplitter.spec.ts
│ │ ├── Stack
│ │ │ ├── CHStack.md
│ │ │ ├── CHStack.spec.ts
│ │ │ ├── CVStack.md
│ │ │ ├── CVStack.spec.ts
│ │ │ ├── HStack.md
│ │ │ ├── HStack.spec.ts
│ │ │ ├── Stack.md
│ │ │ ├── Stack.module.scss
│ │ │ ├── Stack.spec.ts
│ │ │ ├── Stack.tsx
│ │ │ ├── StackNative.tsx
│ │ │ ├── VStack.md
│ │ │ └── VStack.spec.ts
│ │ ├── StickyBox
│ │ │ ├── StickyBox.md
│ │ │ ├── StickyBox.module.scss
│ │ │ ├── StickyBox.tsx
│ │ │ └── StickyBoxNative.tsx
│ │ ├── Switch
│ │ │ ├── Switch.md
│ │ │ ├── Switch.spec.ts
│ │ │ └── Switch.tsx
│ │ ├── Table
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── react-table-config.d.ts
│ │ │ ├── Table.md
│ │ │ ├── Table.module.scss
│ │ │ ├── Table.spec.ts
│ │ │ ├── Table.tsx
│ │ │ ├── TableNative.tsx
│ │ │ └── useRowSelection.tsx
│ │ ├── TableOfContents
│ │ │ ├── TableOfContents.module.scss
│ │ │ ├── TableOfContents.spec.ts
│ │ │ ├── TableOfContents.tsx
│ │ │ └── TableOfContentsNative.tsx
│ │ ├── Tabs
│ │ │ ├── TabContext.tsx
│ │ │ ├── TabItem.md
│ │ │ ├── TabItem.tsx
│ │ │ ├── TabItemNative.tsx
│ │ │ ├── Tabs.md
│ │ │ ├── Tabs.module.scss
│ │ │ ├── Tabs.spec.ts
│ │ │ ├── Tabs.tsx
│ │ │ └── TabsNative.tsx
│ │ ├── Text
│ │ │ ├── Text.md
│ │ │ ├── Text.module.scss
│ │ │ ├── Text.spec.ts
│ │ │ ├── Text.tsx
│ │ │ └── TextNative.tsx
│ │ ├── TextArea
│ │ │ ├── TextArea.md
│ │ │ ├── TextArea.module.scss
│ │ │ ├── TextArea.spec.ts
│ │ │ ├── TextArea.tsx
│ │ │ ├── TextAreaNative.tsx
│ │ │ ├── TextAreaResizable.tsx
│ │ │ └── useComposedRef.ts
│ │ ├── TextBox
│ │ │ ├── TextBox.md
│ │ │ ├── TextBox.module.scss
│ │ │ ├── TextBox.spec.ts
│ │ │ ├── TextBox.tsx
│ │ │ └── TextBoxNative.tsx
│ │ ├── Theme
│ │ │ ├── NotificationToast.tsx
│ │ │ ├── Theme.md
│ │ │ ├── Theme.module.scss
│ │ │ ├── Theme.spec.ts
│ │ │ ├── Theme.tsx
│ │ │ └── ThemeNative.tsx
│ │ ├── TimeInput
│ │ │ ├── TimeInput.md
│ │ │ ├── TimeInput.module.scss
│ │ │ ├── TimeInput.spec.ts
│ │ │ ├── TimeInput.tsx
│ │ │ ├── TimeInputNative.tsx
│ │ │ └── utils.ts
│ │ ├── Timer
│ │ │ ├── Timer.md
│ │ │ ├── Timer.spec.ts
│ │ │ ├── Timer.tsx
│ │ │ └── TimerNative.tsx
│ │ ├── Toggle
│ │ │ ├── Toggle.module.scss
│ │ │ └── Toggle.tsx
│ │ ├── ToneChangerButton
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneChangerButton.spec.ts
│ │ │ └── ToneChangerButton.tsx
│ │ ├── ToneSwitch
│ │ │ ├── ToneSwitch.md
│ │ │ ├── ToneSwitch.module.scss
│ │ │ ├── ToneSwitch.spec.ts
│ │ │ ├── ToneSwitch.tsx
│ │ │ └── ToneSwitchNative.tsx
│ │ ├── Tooltip
│ │ │ ├── Tooltip.md
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.spec.ts
│ │ │ ├── Tooltip.tsx
│ │ │ └── TooltipNative.tsx
│ │ ├── Tree
│ │ │ ├── testData.ts
│ │ │ ├── Tree-dynamic.spec.ts
│ │ │ ├── Tree-icons.spec.ts
│ │ │ ├── Tree.md
│ │ │ ├── Tree.spec.ts
│ │ │ ├── TreeComponent.module.scss
│ │ │ ├── TreeComponent.tsx
│ │ │ └── TreeNative.tsx
│ │ ├── TreeDisplay
│ │ │ ├── TreeDisplay.md
│ │ │ ├── TreeDisplay.module.scss
│ │ │ ├── TreeDisplay.tsx
│ │ │ └── TreeDisplayNative.tsx
│ │ ├── ValidationSummary
│ │ │ ├── ValidationSummary.module.scss
│ │ │ └── ValidationSummary.tsx
│ │ └── VisuallyHidden.tsx
│ ├── components-core
│ │ ├── abstractions
│ │ │ ├── ComponentRenderer.ts
│ │ │ ├── LoaderRenderer.ts
│ │ │ ├── standalone.ts
│ │ │ └── treeAbstractions.ts
│ │ ├── action
│ │ │ ├── actions.ts
│ │ │ ├── APICall.tsx
│ │ │ ├── FileDownloadAction.tsx
│ │ │ ├── FileUploadAction.tsx
│ │ │ ├── NavigateAction.tsx
│ │ │ └── TimedAction.tsx
│ │ ├── ApiBoundComponent.tsx
│ │ ├── appContext
│ │ │ ├── date-functions.ts
│ │ │ ├── math-function.ts
│ │ │ └── misc-utils.ts
│ │ ├── AppContext.tsx
│ │ ├── behaviors
│ │ │ ├── Behavior.tsx
│ │ │ └── CoreBehaviors.tsx
│ │ ├── component-hooks.ts
│ │ ├── ComponentDecorator.tsx
│ │ ├── ComponentViewer.tsx
│ │ ├── CompoundComponent.tsx
│ │ ├── constants.ts
│ │ ├── DebugViewProvider.tsx
│ │ ├── descriptorHelper.ts
│ │ ├── devtools
│ │ │ ├── InspectorDialog.module.scss
│ │ │ ├── InspectorDialog.tsx
│ │ │ └── InspectorDialogVisibilityContext.tsx
│ │ ├── EngineError.ts
│ │ ├── event-handlers.ts
│ │ ├── InspectorButton.module.scss
│ │ ├── InspectorContext.tsx
│ │ ├── interception
│ │ │ ├── abstractions.ts
│ │ │ ├── ApiInterceptor.ts
│ │ │ ├── ApiInterceptorProvider.tsx
│ │ │ ├── apiInterceptorWorker.ts
│ │ │ ├── Backend.ts
│ │ │ ├── Errors.ts
│ │ │ ├── IndexedDb.ts
│ │ │ ├── initMock.ts
│ │ │ ├── InMemoryDb.ts
│ │ │ ├── ReadonlyCollection.ts
│ │ │ └── useApiInterceptorContext.tsx
│ │ ├── loader
│ │ │ ├── ApiLoader.tsx
│ │ │ ├── DataLoader.tsx
│ │ │ ├── ExternalDataLoader.tsx
│ │ │ ├── Loader.tsx
│ │ │ ├── MockLoaderRenderer.tsx
│ │ │ └── PageableLoader.tsx
│ │ ├── LoaderComponent.tsx
│ │ ├── markup-check.ts
│ │ ├── parts.ts
│ │ ├── renderers.ts
│ │ ├── rendering
│ │ │ ├── AppContent.tsx
│ │ │ ├── AppRoot.tsx
│ │ │ ├── AppWrapper.tsx
│ │ │ ├── buildProxy.ts
│ │ │ ├── collectFnVarDeps.ts
│ │ │ ├── ComponentAdapter.tsx
│ │ │ ├── ComponentWrapper.tsx
│ │ │ ├── Container.tsx
│ │ │ ├── containers.ts
│ │ │ ├── ContainerWrapper.tsx
│ │ │ ├── ErrorBoundary.module.scss
│ │ │ ├── ErrorBoundary.tsx
│ │ │ ├── InvalidComponent.module.scss
│ │ │ ├── InvalidComponent.tsx
│ │ │ ├── nodeUtils.ts
│ │ │ ├── reducer.ts
│ │ │ ├── renderChild.tsx
│ │ │ ├── StandaloneComponent.tsx
│ │ │ ├── StateContainer.tsx
│ │ │ ├── UnknownComponent.module.scss
│ │ │ ├── UnknownComponent.tsx
│ │ │ └── valueExtractor.ts
│ │ ├── reportEngineError.ts
│ │ ├── RestApiProxy.ts
│ │ ├── script-runner
│ │ │ ├── asyncProxy.ts
│ │ │ ├── AttributeValueParser.ts
│ │ │ ├── bannedFunctions.ts
│ │ │ ├── BindingTreeEvaluationContext.ts
│ │ │ ├── eval-tree-async.ts
│ │ │ ├── eval-tree-common.ts
│ │ │ ├── eval-tree-sync.ts
│ │ │ ├── ParameterParser.ts
│ │ │ ├── process-statement-async.ts
│ │ │ ├── process-statement-common.ts
│ │ │ ├── process-statement-sync.ts
│ │ │ ├── ScriptingSourceTree.ts
│ │ │ ├── simplify-expression.ts
│ │ │ ├── statement-queue.ts
│ │ │ └── visitors.ts
│ │ ├── StandaloneApp.tsx
│ │ ├── StandaloneExtensionManager.ts
│ │ ├── TableOfContentsContext.tsx
│ │ ├── theming
│ │ │ ├── _themes.scss
│ │ │ ├── component-layout-resolver.ts
│ │ │ ├── extendThemeUtils.ts
│ │ │ ├── hvar.ts
│ │ │ ├── layout-resolver.ts
│ │ │ ├── parse-layout-props.ts
│ │ │ ├── StyleContext.tsx
│ │ │ ├── StyleRegistry.ts
│ │ │ ├── ThemeContext.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── themes
│ │ │ │ ├── base-utils.ts
│ │ │ │ ├── palette.ts
│ │ │ │ ├── root.ts
│ │ │ │ ├── solid.ts
│ │ │ │ ├── theme-colors.ts
│ │ │ │ └── xmlui.ts
│ │ │ ├── themeVars.module.scss
│ │ │ ├── themeVars.ts
│ │ │ ├── transformThemeVars.ts
│ │ │ └── utils.ts
│ │ ├── utils
│ │ │ ├── actionUtils.ts
│ │ │ ├── audio-utils.ts
│ │ │ ├── base64-utils.ts
│ │ │ ├── compound-utils.ts
│ │ │ ├── css-utils.ts
│ │ │ ├── DataLoaderQueryKeyGenerator.ts
│ │ │ ├── date-utils.ts
│ │ │ ├── extractParam.ts
│ │ │ ├── hooks.tsx
│ │ │ ├── LruCache.ts
│ │ │ ├── mergeProps.ts
│ │ │ ├── misc.ts
│ │ │ ├── request-params.ts
│ │ │ ├── statementUtils.ts
│ │ │ └── treeUtils.ts
│ │ └── xmlui-parser.ts
│ ├── index-standalone.ts
│ ├── index.scss
│ ├── index.ts
│ ├── language-server
│ │ ├── server-common.ts
│ │ ├── server-web-worker.ts
│ │ ├── server.ts
│ │ ├── services
│ │ │ ├── common
│ │ │ │ ├── docs-generation.ts
│ │ │ │ ├── lsp-utils.ts
│ │ │ │ ├── metadata-utils.ts
│ │ │ │ └── syntax-node-utilities.ts
│ │ │ ├── completion.ts
│ │ │ ├── diagnostic.ts
│ │ │ ├── format.ts
│ │ │ └── hover.ts
│ │ └── xmlui-metadata-generated.mjs
│ ├── 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
│ │ │ ├── ModalDialogDriver.ts
│ │ │ ├── NumberBoxDriver.ts
│ │ │ ├── TextBoxDriver.ts
│ │ │ ├── TimeInputDriver.ts
│ │ │ ├── TimerDriver.ts
│ │ │ └── TreeDriver.ts
│ │ ├── fixtures.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.bin.json
├── tsconfig.json
├── tsconfig.node.json
├── vite.config.ts
└── vitest.config.ts
```
# Files
--------------------------------------------------------------------------------
/xmlui/tests/components/playground-pattern.test.ts:
--------------------------------------------------------------------------------
```typescript
1 | import { describe, expect, it } from "vitest";
2 | import {
3 | convertPlaygroundPatternToMarkdown,
4 | observePlaygroundPattern,
5 | parsePlaygroundPattern,
6 | parseSegmentProps,
7 | } from "../../src/components/Markdown/utils";
8 |
9 | describe("Playground pattern parsing", () => {
10 | it("No playground #1", () => {
11 | // --- Act
12 | const source = "```xmlui-pg\n";
13 |
14 | const result = observePlaygroundPattern(source);
15 |
16 | // --- Assert
17 | expect(result).toBeNull();
18 | });
19 |
20 | it("No playground #2", () => {
21 | // --- Act
22 | const source = "```xmlui\n";
23 |
24 | const result = observePlaygroundPattern(source);
25 |
26 | // --- Assert
27 | expect(result).toBeNull();
28 | });
29 |
30 | it("No playground #3", () => {
31 | // --- Act
32 | const source = "```xmlui\n```";
33 |
34 | const result = observePlaygroundPattern(source);
35 |
36 | // --- Assert
37 | expect(result).toBeNull();
38 | });
39 |
40 | it("Empty playground #1", () => {
41 | // --- Act
42 | const source = "```xmlui-pg\n```";
43 |
44 | const result = observePlaygroundPattern(source);
45 |
46 | // --- Assert
47 | expect(result).not.toBeNull();
48 | expect(result[0]).toBe(0);
49 | expect(result[1]).toBe(15);
50 | expect(result[2]).toBe("```xmlui-pg\n```");
51 | });
52 |
53 | it("Empty playground #2", () => {
54 | // --- Act
55 | const source = "some text before```xmlui-pg\n```some text after";
56 |
57 | const result = observePlaygroundPattern(source);
58 |
59 | // --- Assert
60 | expect(result).not.toBeNull();
61 | expect(result[0]).toBe(16);
62 | expect(result[1]).toBe(31);
63 | expect(result[2]).toBe("```xmlui-pg\n```");
64 | });
65 |
66 | it("Playground with \\``` literal #1", () => {
67 | // --- Act
68 | const source = "```xmlui-pg\nsome text \\``` more text\n```";
69 |
70 | const result = observePlaygroundPattern(source);
71 |
72 | // --- Assert
73 | expect(result).not.toBeNull();
74 | expect(result[0]).toBe(0);
75 | expect(result[1]).toBe(40);
76 | expect(result[2]).toBe("```xmlui-pg\nsome text \\``` more text\n```");
77 | });
78 |
79 | it("Playground with \\``` literal #2", () => {
80 | // --- Act
81 | const source = "```xmlui-pg\nsome text \\``` more \\``` text\n```";
82 |
83 | const result = observePlaygroundPattern(source);
84 |
85 | // --- Assert
86 | expect(result).not.toBeNull();
87 | expect(result[0]).toBe(0);
88 | expect(result[1]).toBe(45);
89 | expect(result[2]).toBe("```xmlui-pg\nsome text \\``` more \\``` text\n```");
90 | });
91 |
92 | it("Parses display and copy flags", () => {
93 | // --- Act
94 | const input = "display copy";
95 |
96 | const result = parseSegmentProps(input);
97 |
98 | // --- Assert
99 | expect(result.display).toBe(true);
100 | expect(result.copy).toBe(true);
101 | expect(result.highlights).toBeUndefined();
102 | expect(result.filename).toBeUndefined();
103 | expect(result.name).toBeUndefined();
104 | });
105 |
106 | it("Parses highlights", () => {
107 | // --- Act
108 | const input = "{1,2,4-6}";
109 |
110 | const result = parseSegmentProps(input);
111 |
112 | // --- Assert
113 | expect(result.highlights).toEqual([1, 2, [4, 6]]);
114 | expect(result.display).toBeUndefined();
115 | expect(result.copy).toBeUndefined();
116 | expect(result.filename).toBeUndefined();
117 | expect(result.name).toBeUndefined();
118 | });
119 |
120 | it("Parses filename and name", () => {
121 | // --- Act
122 | const input = 'filename="Main.xmlui" name="MyApp example"';
123 |
124 | const result = parseSegmentProps(input);
125 |
126 | // --- Assert
127 | expect(result.filename).toBe("Main.xmlui");
128 | expect(result.name).toBe("MyApp example");
129 | expect(result.display).toBeUndefined();
130 | expect(result.copy).toBeUndefined();
131 | expect(result.highlights).toBeUndefined();
132 | });
133 |
134 | it("Parses all properties together", () => {
135 | // --- Act
136 | const input = 'display copy {1,2,4-10} filename="Main.xmlui" name="MyApp example"';
137 |
138 | const result = parseSegmentProps(input);
139 |
140 | // --- Assert
141 | expect(result.display).toBe(true);
142 | expect(result.copy).toBe(true);
143 | expect(result.highlights).toEqual([1, 2, [4, 10]]);
144 | expect(result.filename).toBe("Main.xmlui");
145 | expect(result.name).toBe("MyApp example");
146 | });
147 |
148 | it("Handles empty input", () => {
149 | // --- Act
150 | const input = "";
151 |
152 | const result = parseSegmentProps(input);
153 |
154 | // --- Assert
155 | expect(result).toEqual({});
156 | });
157 |
158 | it("Handles input with no matching properties", () => {
159 | // --- Act
160 | const input = "some random text";
161 |
162 | const result = parseSegmentProps(input);
163 |
164 | // --- Assert
165 | expect(result).toEqual({});
166 | });
167 |
168 | it("Extracts the 'default' PlaygroundPattern property", () => {
169 | // --- Act
170 | const content =
171 | '```xmlui-pg display copy {1,2,4-6} height="300px" filename="Main.xmlui" name="MyApp example"\n```';
172 |
173 | const result = parsePlaygroundPattern(content);
174 |
175 | // --- Assert
176 | expect(result.default).toBeDefined();
177 | expect(result.default?.display).toBe(true);
178 | expect(result.default?.copy).toBe(true);
179 | expect(result.default?.highlights).toEqual([1, 2, [4, 6]]);
180 | expect(result.default.height).toEqual("300px");
181 | expect(result.default?.filename).toBe("Main.xmlui");
182 | expect(result.default?.name).toBe("MyApp example");
183 | });
184 |
185 | it("Extracts PlaygroundPattern with only display and copy flags", () => {
186 | // --- Act
187 | const content = `\`\`\`xmlui-pg display copy
188 | \`\`\``;
189 |
190 | const result = parsePlaygroundPattern(content);
191 |
192 | // --- Assert
193 | expect(result.default).toBeDefined();
194 | expect(result.default?.display).toBe(true);
195 | expect(result.default?.copy).toBe(true);
196 | expect(result.default?.highlights).toBeUndefined();
197 | expect(result.default?.filename).toBeUndefined();
198 | expect(result.default?.name).toBeUndefined();
199 | });
200 |
201 | it("Extracts PlaygroundPattern with noPopup flags", () => {
202 | // --- Act
203 | const content = `\`\`\`xmlui-pg noPopup
204 | \`\`\``;
205 |
206 | const result = parsePlaygroundPattern(content);
207 |
208 | // --- Assert
209 | expect(result.default).toBeDefined();
210 | expect(result.default?.display).toBeUndefined();
211 | expect(result.default?.copy).toBeUndefined();
212 | expect(result.default?.highlights).toBeUndefined();
213 | expect(result.default?.filename).toBeUndefined();
214 | expect(result.default?.name).toBeUndefined();
215 | expect(result.default?.noPopup).toBe(true);
216 | });
217 |
218 | it("Extracts PlaygroundPattern with filename only", () => {
219 | // --- Act
220 | const content = `\`\`\`xmlui-pg filename="Example.xmlui"
221 | \`\`\``;
222 |
223 | const result = parsePlaygroundPattern(content);
224 |
225 | // --- Assert
226 | expect(result.default).toBeDefined();
227 | expect(result.default?.display).toBeUndefined();
228 | expect(result.default?.copy).toBeUndefined();
229 | expect(result.default?.highlights).toBeUndefined();
230 | expect(result.default?.filename).toBe("Example.xmlui");
231 | expect(result.default?.name).toBeUndefined();
232 | });
233 |
234 | it("Extracts PlaygroundPattern with name only", () => {
235 | // --- Act
236 | const content = `\`\`\`xmlui-pg name="Sample App"
237 | \`\`\``;
238 |
239 | const result = parsePlaygroundPattern(content);
240 |
241 | // --- Assert
242 | expect(result.default).toBeDefined();
243 | expect(result.default?.display).toBeUndefined();
244 | expect(result.default?.copy).toBeUndefined();
245 | expect(result.default?.highlights).toBeUndefined();
246 | expect(result.default?.filename).toBeUndefined();
247 | expect(result.default?.name).toBe("Sample App");
248 | });
249 |
250 | it("Extracts PlaygroundPattern with highlights only", () => {
251 | // --- Act
252 | const content = `\`\`\`xmlui-pg {3,5,7-9}
253 | \`\`\``;
254 |
255 | const result = parsePlaygroundPattern(content);
256 |
257 | // --- Assert
258 | expect(result.default).toBeDefined();
259 | expect(result.default?.display).toBeUndefined();
260 | expect(result.default?.copy).toBeUndefined();
261 | expect(result.default?.highlights).toEqual([3, 5, [7, 9]]);
262 | expect(result.default?.filename).toBeUndefined();
263 | expect(result.default?.name).toBeUndefined();
264 | });
265 |
266 | it("Extracts PlaygroundPattern with all properties missing", () => {
267 | // --- Act
268 | const content = `\`\`\`xmlui-pg
269 | \`\`\``;
270 |
271 | const result = parsePlaygroundPattern(content);
272 |
273 | // --- Assert
274 | expect(result.default).toBeDefined();
275 | expect(result.default).toEqual({});
276 | });
277 |
278 | it("Extracts default app #1", () => {
279 | // --- Act
280 | const content = `\`\`\`xmlui-pg
281 | <Button>Click me</Button>
282 | \`\`\``;
283 |
284 | const result = parsePlaygroundPattern(content);
285 |
286 | // --- Assert
287 | expect(result.app).toBeDefined();
288 | expect(result.app.copy).toBeUndefined();
289 | expect(result.app.display).toBeUndefined();
290 | expect(result.app.highlights).toBeUndefined();
291 | expect(result.app.filename).toBeUndefined();
292 | expect(result.app.name).toBeUndefined();
293 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
294 | });
295 |
296 | it("Extracts default app #2", () => {
297 | // --- Act
298 | const content = `\`\`\`xmlui-pg copy
299 | <Button>Click me</Button>
300 | \`\`\``;
301 |
302 | const result = parsePlaygroundPattern(content);
303 |
304 | // --- Assert
305 | expect(result.app).toBeDefined();
306 | expect(result.app.copy).toBe(true);
307 | expect(result.app.display).toBeUndefined();
308 | expect(result.app.highlights).toBeUndefined();
309 | expect(result.app.filename).toBeUndefined();
310 | expect(result.app.name).toBeUndefined();
311 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
312 | });
313 |
314 | it("Extracts default app #3", () => {
315 | // --- Act
316 | const content = `\`\`\`xmlui-pg display
317 | <Button>Click me</Button>
318 | \`\`\``;
319 |
320 | const result = parsePlaygroundPattern(content);
321 |
322 | // --- Assert
323 | expect(result.app).toBeDefined();
324 | expect(result.app.copy).toBeUndefined();
325 | expect(result.app.display).toBe(true);
326 | expect(result.app.highlights).toBeUndefined();
327 | expect(result.app.filename).toBeUndefined();
328 | expect(result.app.name).toBeUndefined();
329 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
330 | });
331 |
332 | it("Extracts default app #4", () => {
333 | // --- Act
334 | const content = `\`\`\`xmlui-pg {1,2,4-6}
335 | <Button>Click me</Button>
336 | \`\`\``;
337 | const result = parsePlaygroundPattern(content);
338 |
339 | // --- Assert
340 | expect(result.app).toBeDefined();
341 | expect(result.app.copy).toBeUndefined();
342 | expect(result.app.display).toBeUndefined();
343 | expect(result.app.highlights).toEqual([1, 2, [4, 6]]);
344 | expect(result.app.filename).toBeUndefined();
345 | expect(result.app.name).toBeUndefined();
346 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
347 | });
348 |
349 | it("Extracts default app #5", () => {
350 | // --- Act
351 | const content = `\`\`\`xmlui-pg filename="Main.xmlui"
352 | <Button>Click me</Button>
353 | \`\`\``;
354 | const result = parsePlaygroundPattern(content);
355 | // --- Assert
356 | expect(result.app).toBeDefined();
357 | expect(result.app.copy).toBeUndefined();
358 | expect(result.app.display).toBeUndefined();
359 | expect(result.app.highlights).toBeUndefined();
360 | expect(result.app.filename).toBe("Main.xmlui");
361 | expect(result.app.name).toBeUndefined();
362 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
363 | });
364 |
365 | it("Extracts default app #6", () => {
366 | // --- Act
367 | const content = `\`\`\`xmlui-pg name="MyApp example"
368 | <Button>Click me</Button>
369 | \`\`\``;
370 | const result = parsePlaygroundPattern(content);
371 | // --- Assert
372 | expect(result.app).toBeDefined();
373 | expect(result.app.copy).toBeUndefined();
374 | expect(result.app.display).toBeUndefined();
375 | expect(result.app.highlights).toBeUndefined();
376 | expect(result.app.filename).toBeUndefined();
377 | expect(result.app.name).toBe("MyApp example");
378 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
379 | });
380 |
381 | it("Extracts explicit app #1", () => {
382 | // --- Act
383 | const content = `\`\`\`xmlui-pg
384 | ---app
385 | <Button>Click me</Button>
386 | \`\`\``;
387 |
388 | const result = parsePlaygroundPattern(content);
389 |
390 | // --- Assert
391 | expect(result.app).toBeDefined();
392 | expect(result.app.copy).toBeUndefined();
393 | expect(result.app.display).toBeUndefined();
394 | expect(result.app.highlights).toBeUndefined();
395 | expect(result.app.filename).toBeUndefined();
396 | expect(result.app.name).toBeUndefined();
397 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
398 | });
399 |
400 | it("Extracts explicit app #2", () => {
401 | // --- Act
402 | const content = `\`\`\`xmlui-pg
403 | ---app copy
404 | <Button>Click me</Button>
405 | \`\`\``;
406 | const result = parsePlaygroundPattern(content);
407 |
408 | // --- Assert
409 | expect(result.app).toBeDefined();
410 | expect(result.app.copy).toBe(true);
411 | expect(result.app.display).toBeUndefined();
412 | expect(result.app.highlights).toBeUndefined();
413 | expect(result.app.filename).toBeUndefined();
414 | expect(result.app.name).toBeUndefined();
415 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
416 | });
417 |
418 | it("Extracts explicit app #3", () => {
419 | // --- Act
420 | const content = `\`\`\`xmlui-pg
421 | ---app display
422 | <Button>Click me</Button>
423 | \`\`\``;
424 | const result = parsePlaygroundPattern(content);
425 | // --- Assert
426 | expect(result.app).toBeDefined();
427 | expect(result.app.copy).toBeUndefined();
428 | expect(result.app.display).toBe(true);
429 | expect(result.app.highlights).toBeUndefined();
430 | expect(result.app.filename).toBeUndefined();
431 | expect(result.app.name).toBeUndefined();
432 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
433 | });
434 |
435 | it("Extracts explicit app #4", () => {
436 | // --- Act
437 | const content = `\`\`\`xmlui-pg
438 | ---app {1,2,4-6}
439 | <Button>Click me</Button>
440 | \`\`\``;
441 | const result = parsePlaygroundPattern(content);
442 |
443 | // --- Assert
444 | expect(result.app).toBeDefined();
445 | expect(result.app.copy).toBeUndefined();
446 | expect(result.app.display).toBeUndefined();
447 | expect(result.app.highlights).toEqual([1, 2, [4, 6]]);
448 | expect(result.app.filename).toBeUndefined();
449 | expect(result.app.name).toBeUndefined();
450 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
451 | });
452 |
453 | it("Extracts explicit app #5", () => {
454 | // --- Act
455 | const content = `\`\`\`xmlui-pg
456 | ---app filename="Main.xmlui"
457 | <Button>Click me</Button>
458 | \`\`\``;
459 | const result = parsePlaygroundPattern(content);
460 | // --- Assert
461 | expect(result.app).toBeDefined();
462 | expect(result.app.copy).toBeUndefined();
463 | expect(result.app.display).toBeUndefined();
464 | expect(result.app.highlights).toBeUndefined();
465 | expect(result.app.filename).toBe("Main.xmlui");
466 | expect(result.app.name).toBeUndefined();
467 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
468 | });
469 |
470 | it("Extracts explicit app #6", () => {
471 | // --- Act
472 | const content = `\`\`\`xmlui-pg
473 | ---app name="MyApp example"
474 | <Button>Click me</Button>
475 | \`\`\``;
476 | const result = parsePlaygroundPattern(content);
477 | // --- Assert
478 | expect(result.app).toBeDefined();
479 | expect(result.app.copy).toBeUndefined();
480 | expect(result.app.display).toBeUndefined();
481 | expect(result.app.highlights).toBeUndefined();
482 | expect(result.app.filename).toBeUndefined();
483 | expect(result.app.name).toBe("MyApp example");
484 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
485 | });
486 |
487 | it("Extracts app with empty lines", () => {
488 | // --- Act
489 | const content = `\`\`\`xmlui-pg
490 | ---app
491 |
492 | <Button>Click me</Button>
493 | <Text>Hello</Text>
494 |
495 | <Text>World</Text>
496 | \`\`\``;
497 | const result = parsePlaygroundPattern(content);
498 | // --- Assert
499 | expect(result.app).toBeDefined();
500 | expect(result.app.copy).toBeUndefined();
501 | expect(result.app.display).toBeUndefined();
502 | expect(result.app.highlights).toBeUndefined();
503 | expect(result.app.filename).toBeUndefined();
504 | expect(result.app.name).toBeUndefined();
505 | expect(result.app.content).toBe(
506 | "\n<Button>Click me</Button>\n<Text>Hello</Text>\n\n<Text>World</Text>\n",
507 | );
508 | });
509 |
510 | it("Explicit app overrides app #1", () => {
511 | // --- Act
512 | const content = `\`\`\`xmlui-pg
513 | <Something />
514 | ---app
515 | <Button>Click me</Button>
516 | \`\`\``;
517 |
518 | const result = parsePlaygroundPattern(content);
519 |
520 | // --- Assert
521 | expect(result.app).toBeDefined();
522 | expect(result.app.copy).toBeUndefined();
523 | expect(result.app.display).toBeUndefined();
524 | expect(result.app.highlights).toBeUndefined();
525 | expect(result.app.filename).toBeUndefined();
526 | expect(result.app.name).toBeUndefined();
527 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
528 | });
529 |
530 | it("Next explicit app overrides the previous #1", () => {
531 | // --- Act
532 | const content = `\`\`\`xmlui-pg
533 | <Something />
534 | ---app
535 | <Text>Hello</Text>
536 | ---app
537 | <Button>Click me</Button>
538 | \`\`\``;
539 |
540 | const result = parsePlaygroundPattern(content);
541 |
542 | // --- Assert
543 | expect(result.app).toBeDefined();
544 | expect(result.app.copy).toBeUndefined();
545 | expect(result.app.display).toBeUndefined();
546 | expect(result.app.highlights).toBeUndefined();
547 | expect(result.app.filename).toBeUndefined();
548 | expect(result.app.name).toBeUndefined();
549 | expect(result.app.content).toBe("<Button>Click me</Button>\n");
550 | });
551 |
552 | it("Extracts components #1", () => {
553 | // --- Act
554 | const content = `\`\`\`xmlui-pg
555 | ---comp
556 | <Button>Click me</Button>
557 | \`\`\``;
558 |
559 | const result = parsePlaygroundPattern(content);
560 |
561 | // --- Assert
562 | expect(result.components).toBeDefined();
563 | expect(result.components?.length).toBe(1);
564 | expect(result.components?.[0].copy).toBeUndefined();
565 | expect(result.components?.[0].display).toBeUndefined();
566 | expect(result.components?.[0].highlights).toBeUndefined();
567 | expect(result.components?.[0].filename).toBeUndefined();
568 | expect(result.components?.[0].name).toBeUndefined();
569 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
570 | });
571 |
572 | it("Extracts components #2", () => {
573 | // --- Act
574 | const content = `\`\`\`xmlui-pg
575 | ---comp copy
576 | <Button>Click me</Button>
577 | \`\`\``;
578 | const result = parsePlaygroundPattern(content);
579 |
580 | // --- Assert
581 | expect(result.components).toBeDefined();
582 | expect(result.components?.length).toBe(1);
583 | expect(result.components?.[0].copy).toBe(true);
584 | expect(result.components?.[0].display).toBeUndefined();
585 | expect(result.components?.[0].highlights).toBeUndefined();
586 | expect(result.components?.[0].filename).toBeUndefined();
587 | expect(result.components?.[0].name).toBeUndefined();
588 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
589 | });
590 |
591 | it("Extracts components #3", () => {
592 | // --- Act
593 | const content = `\`\`\`xmlui-pg
594 | ---comp display
595 | <Button>Click me</Button>
596 | \`\`\``;
597 | const result = parsePlaygroundPattern(content);
598 | // --- Assert
599 | expect(result.components).toBeDefined();
600 | expect(result.components?.length).toBe(1);
601 | expect(result.components?.[0].copy).toBeUndefined();
602 | expect(result.components?.[0].display).toBe(true);
603 | expect(result.components?.[0].highlights).toBeUndefined();
604 | expect(result.components?.[0].filename).toBeUndefined();
605 | expect(result.components?.[0].name).toBeUndefined();
606 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
607 | });
608 |
609 | it("Extracts components #4", () => {
610 | // --- Act
611 | const content = `\`\`\`xmlui-pg
612 | ---comp {1,2,4-6}
613 | <Button>Click me</Button>
614 | \`\`\``;
615 | const result = parsePlaygroundPattern(content);
616 | // --- Assert
617 | expect(result.components).toBeDefined();
618 | expect(result.components?.length).toBe(1);
619 | expect(result.components?.[0].copy).toBeUndefined();
620 | expect(result.components?.[0].display).toBeUndefined();
621 | expect(result.components?.[0].highlights).toEqual([1, 2, [4, 6]]);
622 | expect(result.components?.[0].filename).toBeUndefined();
623 | expect(result.components?.[0].name).toBeUndefined();
624 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
625 | });
626 |
627 | it("Extracts components #5", () => {
628 | // --- Act
629 | const content = `\`\`\`xmlui-pg
630 | ---comp filename="Main.xmlui"
631 | <Button>Click me</Button>
632 | \`\`\``;
633 | const result = parsePlaygroundPattern(content);
634 |
635 | // --- Assert
636 | expect(result.components).toBeDefined();
637 | expect(result.components?.length).toBe(1);
638 | expect(result.components?.[0].copy).toBeUndefined();
639 | expect(result.components?.[0].display).toBeUndefined();
640 | expect(result.components?.[0].highlights).toBeUndefined();
641 | expect(result.components?.[0].filename).toBe("Main.xmlui");
642 | expect(result.components?.[0].name).toBeUndefined();
643 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
644 | });
645 |
646 | it("Extracts components #6", () => {
647 | // --- Act
648 | const content = `\`\`\`xmlui-pg
649 | ---comp name="MyApp example"
650 | <Button>Click me</Button>
651 | \`\`\``;
652 | const result = parsePlaygroundPattern(content);
653 | // --- Assert
654 | expect(result.components).toBeDefined();
655 | expect(result.components?.length).toBe(1);
656 | expect(result.components?.[0].copy).toBeUndefined();
657 | expect(result.components?.[0].display).toBeUndefined();
658 | expect(result.components?.[0].highlights).toBeUndefined();
659 | expect(result.components?.[0].filename).toBeUndefined();
660 | expect(result.components?.[0].name).toBe("MyApp example");
661 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
662 | });
663 |
664 | it("Extracts multiple components #1", () => {
665 | // --- Act
666 | const content = `\`\`\`xmlui-pg
667 | ---comp
668 | <Button>Click me</Button>
669 | ---comp
670 | <Text>Hello</Text>
671 | \`\`\``;
672 | const result = parsePlaygroundPattern(content);
673 | // --- Assert
674 | expect(result.components).toBeDefined();
675 | expect(result.components?.length).toBe(2);
676 | expect(result.components?.[0].copy).toBeUndefined();
677 | expect(result.components?.[0].display).toBeUndefined();
678 | expect(result.components?.[0].highlights).toBeUndefined();
679 | expect(result.components?.[0].filename).toBeUndefined();
680 | expect(result.components?.[0].name).toBeUndefined();
681 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
682 | expect(result.components?.[1].copy).toBeUndefined();
683 | expect(result.components?.[1].display).toBeUndefined();
684 | expect(result.components?.[1].highlights).toBeUndefined();
685 | expect(result.components?.[1].filename).toBeUndefined();
686 | expect(result.components?.[1].name).toBeUndefined();
687 | expect(result.components?.[1].content).toBe("<Text>Hello</Text>\n");
688 | });
689 |
690 | it("Extracts multiple components #2", () => {
691 | // --- Act
692 | const content = `\`\`\`xmlui-pg
693 | ---comp
694 | <Button>Click me</Button>
695 | ---comp
696 | <Text>Hello</Text>
697 | ---comp
698 | <Text>World</Text>
699 | \`\`\``;
700 | const result = parsePlaygroundPattern(content);
701 | // --- Assert
702 | expect(result.components).toBeDefined();
703 | expect(result.components?.length).toBe(3);
704 | expect(result.components?.[0].copy).toBeUndefined();
705 | expect(result.components?.[0].display).toBeUndefined();
706 | expect(result.components?.[0].highlights).toBeUndefined();
707 | expect(result.components?.[0].filename).toBeUndefined();
708 | expect(result.components?.[0].name).toBeUndefined();
709 | expect(result.components?.[0].content).toBe("<Button>Click me</Button>\n");
710 | expect(result.components?.[1].copy).toBeUndefined();
711 | expect(result.components?.[1].display).toBeUndefined();
712 | expect(result.components?.[1].highlights).toBeUndefined();
713 | expect(result.components?.[1].filename).toBeUndefined();
714 | expect(result.components?.[1].name).toBeUndefined();
715 | expect(result.components?.[1].content).toBe("<Text>Hello</Text>\n");
716 | expect(result.components?.[2].copy).toBeUndefined();
717 | expect(result.components?.[2].display).toBeUndefined();
718 | expect(result.components?.[2].highlights).toBeUndefined();
719 | expect(result.components?.[2].filename).toBeUndefined();
720 | expect(result.components?.[2].name).toBeUndefined();
721 | expect(result.components?.[2].content).toBe("<Text>World</Text>\n");
722 | });
723 |
724 | it("Extracts config #1", () => {
725 | // --- Act
726 | const content = `\`\`\`xmlui-pg
727 | ---config
728 | { apiUrl: "/api"}
729 | \`\`\``;
730 | const result = parsePlaygroundPattern(content);
731 |
732 | // --- Assert
733 | expect(result.config).toBeDefined();
734 | expect(result.config.copy).toBeUndefined();
735 | expect(result.config.display).toBeUndefined();
736 | expect(result.config.highlights).toBeUndefined();
737 | expect(result.config.filename).toBeUndefined();
738 | expect(result.config.name).toBeUndefined();
739 | expect(result.config.content).toBe('{ apiUrl: "/api"}\n');
740 | });
741 |
742 | it("Extracts config #2", () => {
743 | // --- Act
744 | const content = `\`\`\`xmlui-pg
745 | ---config copy
746 | { apiUrl: "/api"}
747 | \`\`\``;
748 | const result = parsePlaygroundPattern(content);
749 | // --- Assert
750 | expect(result.config).toBeDefined();
751 | expect(result.config.copy).toBe(true);
752 | expect(result.config.display).toBeUndefined();
753 | expect(result.config.highlights).toBeUndefined();
754 | expect(result.config.filename).toBeUndefined();
755 | expect(result.config.name).toBeUndefined();
756 | expect(result.config.content).toBe('{ apiUrl: "/api"}\n');
757 | });
758 |
759 | it("Extracts config #3", () => {
760 | // --- Act
761 | const content = `\`\`\`xmlui-pg
762 | ---config display
763 | { apiUrl: "/api"}
764 | \`\`\``;
765 | const result = parsePlaygroundPattern(content);
766 | // --- Assert
767 | expect(result.config).toBeDefined();
768 | expect(result.config.copy).toBeUndefined();
769 | expect(result.config.display).toBe(true);
770 | expect(result.config.highlights).toBeUndefined();
771 | expect(result.config.filename).toBeUndefined();
772 | expect(result.config.name).toBeUndefined();
773 | expect(result.config.content).toBe('{ apiUrl: "/api"}\n');
774 | });
775 |
776 | it("Extracts config #4", () => {
777 | // --- Act
778 | const content = `\`\`\`xmlui-pg
779 | ---config {1,2,4-6}
780 | { apiUrl: "/api"}
781 | \`\`\``;
782 | const result = parsePlaygroundPattern(content);
783 |
784 | // --- Assert
785 | expect(result.config).toBeDefined();
786 | expect(result.config.copy).toBeUndefined();
787 | expect(result.config.display).toBeUndefined();
788 | expect(result.config.highlights).toEqual([1, 2, [4, 6]]);
789 | expect(result.config.filename).toBeUndefined();
790 | expect(result.config.name).toBeUndefined();
791 | expect(result.config.content).toBe('{ apiUrl: "/api"}\n');
792 | });
793 |
794 | it("Extracts config #5", () => {
795 | // --- Act
796 | const content = `\`\`\`xmlui-pg
797 | ---config filename="Main.xmlui"
798 | { apiUrl: "/api"}
799 | \`\`\``;
800 | const result = parsePlaygroundPattern(content);
801 | // --- Assert
802 | expect(result.config).toBeDefined();
803 | expect(result.config.copy).toBeUndefined();
804 | expect(result.config.display).toBeUndefined();
805 | expect(result.config.highlights).toBeUndefined();
806 | expect(result.config.filename).toBe("Main.xmlui");
807 | expect(result.config.name).toBeUndefined();
808 | expect(result.config.content).toBe('{ apiUrl: "/api"}\n');
809 | });
810 |
811 | it("Extracts config #6", () => {
812 | // --- Act
813 | const content = `\`\`\`xmlui-pg
814 | ---config name="MyApp example"
815 | { apiUrl: "/api"}
816 | \`\`\``;
817 | const result = parsePlaygroundPattern(content);
818 | // --- Assert
819 | expect(result.config).toBeDefined();
820 | expect(result.config.copy).toBeUndefined();
821 | expect(result.config.display).toBeUndefined();
822 | expect(result.config.highlights).toBeUndefined();
823 | expect(result.config.filename).toBeUndefined();
824 | expect(result.config.name).toBe("MyApp example");
825 | expect(result.config.content).toBe('{ apiUrl: "/api"}\n');
826 | });
827 |
828 | it("Extracts api #1", () => {
829 | // --- Act
830 | const content = `\`\`\`xmlui-pg
831 | ---api
832 | { apiUrl: "/api"}
833 | \`\`\``;
834 | const result = parsePlaygroundPattern(content);
835 | // --- Assert
836 | expect(result.api).toBeDefined();
837 | expect(result.api.copy).toBeUndefined();
838 | expect(result.api.display).toBeUndefined();
839 | expect(result.api.highlights).toBeUndefined();
840 | expect(result.api.filename).toBeUndefined();
841 | expect(result.api.name).toBeUndefined();
842 | expect(result.api.content).toBe('{ apiUrl: "/api"}\n');
843 | });
844 |
845 | it("Extracts api #2", () => {
846 | // --- Act
847 | const content = `\`\`\`xmlui-pg
848 | ---api copy
849 | { apiUrl: "/api"}
850 | \`\`\``;
851 | const result = parsePlaygroundPattern(content);
852 | // --- Assert
853 | expect(result.api).toBeDefined();
854 | expect(result.api.copy).toBe(true);
855 | expect(result.api.display).toBeUndefined();
856 | expect(result.api.highlights).toBeUndefined();
857 | expect(result.api.filename).toBeUndefined();
858 | expect(result.api.name).toBeUndefined();
859 | expect(result.api.content).toBe('{ apiUrl: "/api"}\n');
860 | });
861 |
862 | it("Extracts api #3", () => {
863 | // --- Act
864 | const content = `\`\`\`xmlui-pg
865 | ---api display
866 | { apiUrl: "/api"}
867 | \`\`\``;
868 | const result = parsePlaygroundPattern(content);
869 | // --- Assert
870 | expect(result.api).toBeDefined();
871 | expect(result.api.copy).toBeUndefined();
872 | expect(result.api.display).toBe(true);
873 | expect(result.api.highlights).toBeUndefined();
874 | expect(result.api.filename).toBeUndefined();
875 | expect(result.api.name).toBeUndefined();
876 | expect(result.api.content).toBe('{ apiUrl: "/api"}\n');
877 | });
878 |
879 | it("Extracts api #4", () => {
880 | // --- Act
881 | const content = `\`\`\`xmlui-pg
882 | ---api {1,2,4-6}
883 | { apiUrl: "/api"}
884 | \`\`\``;
885 | const result = parsePlaygroundPattern(content);
886 | // --- Assert
887 | expect(result.api).toBeDefined();
888 | expect(result.api.copy).toBeUndefined();
889 | expect(result.api.display).toBeUndefined();
890 | expect(result.api.highlights).toEqual([1, 2, [4, 6]]);
891 | expect(result.api.filename).toBeUndefined();
892 | expect(result.api.name).toBeUndefined();
893 | expect(result.api.content).toBe('{ apiUrl: "/api"}\n');
894 | });
895 |
896 | it("Extracts api #5", () => {
897 | // --- Act
898 | const content = `\`\`\`xmlui-pg
899 | ---api filename="Main.xmlui"
900 | { apiUrl: "/api"}
901 | \`\`\``;
902 | const result = parsePlaygroundPattern(content);
903 | // --- Assert
904 | expect(result.api).toBeDefined();
905 | expect(result.api.copy).toBeUndefined();
906 | expect(result.api.display).toBeUndefined();
907 | expect(result.api.highlights).toBeUndefined();
908 | expect(result.api.filename).toBe("Main.xmlui");
909 | expect(result.api.name).toBeUndefined();
910 | expect(result.api.content).toBe('{ apiUrl: "/api"}\n');
911 | });
912 |
913 | it("Extracts api #6", () => {
914 | // --- Act
915 | const content = `\`\`\`xmlui-pg
916 | ---api name="MyApp example"
917 | { apiUrl: "/api"}
918 | \`\`\``;
919 | const result = parsePlaygroundPattern(content);
920 | // --- Assert
921 | expect(result.api).toBeDefined();
922 | expect(result.api.copy).toBeUndefined();
923 | expect(result.api.display).toBeUndefined();
924 | expect(result.api.highlights).toBeUndefined();
925 | expect(result.api.filename).toBeUndefined();
926 | expect(result.api.name).toBe("MyApp example");
927 | expect(result.api.content).toBe('{ apiUrl: "/api"}\n');
928 | });
929 |
930 | it("Extracts descriptions #1", () => {
931 | // --- Act
932 | const content = `\`\`\`xmlui-pg
933 | ---desc
934 | **This is a description**.
935 | \`\`\``;
936 |
937 | const result = parsePlaygroundPattern(content);
938 |
939 | // --- Assert
940 | expect(result.descriptions).toBeDefined();
941 | expect(result.descriptions?.length).toBe(1);
942 | expect(result.descriptions?.[0].copy).toBeUndefined();
943 | expect(result.descriptions?.[0].display).toBeUndefined();
944 | expect(result.descriptions?.[0].highlights).toBeUndefined();
945 | expect(result.descriptions?.[0].filename).toBeUndefined();
946 | expect(result.descriptions?.[0].name).toBeUndefined();
947 | expect(result.descriptions?.[0].content).toBe("**This is a description**.\n");
948 | });
949 |
950 | it("Extracts descriptions #2", () => {
951 | // --- Act
952 | const content = `\`\`\`xmlui-pg
953 | ---desc copy
954 | **This is a description**.
955 | \`\`\``;
956 | const result = parsePlaygroundPattern(content);
957 | // --- Assert
958 | expect(result.descriptions).toBeDefined();
959 | expect(result.descriptions?.length).toBe(1);
960 | expect(result.descriptions?.[0].copy).toBe(true);
961 | expect(result.descriptions?.[0].display).toBeUndefined();
962 | expect(result.descriptions?.[0].highlights).toBeUndefined();
963 | expect(result.descriptions?.[0].filename).toBeUndefined();
964 | expect(result.descriptions?.[0].name).toBeUndefined();
965 | expect(result.descriptions?.[0].content).toBe("**This is a description**.\n");
966 | });
967 |
968 | it("Extracts descriptions #3", () => {
969 | // --- Act
970 | const content = `\`\`\`xmlui-pg
971 | ---desc display
972 | **This is a description**.
973 | \`\`\``;
974 | const result = parsePlaygroundPattern(content);
975 | // --- Assert
976 | expect(result.descriptions).toBeDefined();
977 | expect(result.descriptions?.length).toBe(1);
978 | expect(result.descriptions?.[0].copy).toBeUndefined();
979 | expect(result.descriptions?.[0].display).toBe(true);
980 | expect(result.descriptions?.[0].highlights).toBeUndefined();
981 | expect(result.descriptions?.[0].filename).toBeUndefined();
982 | expect(result.descriptions?.[0].name).toBeUndefined();
983 | expect(result.descriptions?.[0].content).toBe("**This is a description**.\n");
984 | });
985 |
986 | it("Extracts descriptions #4", () => {
987 | // --- Act
988 | const content = `\`\`\`xmlui-pg
989 | ---desc {1,2,4-6}
990 | **This is a description**.
991 | \`\`\``;
992 | const result = parsePlaygroundPattern(content);
993 | // --- Assert
994 | expect(result.descriptions).toBeDefined();
995 | expect(result.descriptions?.length).toBe(1);
996 | expect(result.descriptions?.[0].copy).toBeUndefined();
997 | expect(result.descriptions?.[0].display).toBeUndefined();
998 | expect(result.descriptions?.[0].highlights).toEqual([1, 2, [4, 6]]);
999 | expect(result.descriptions?.[0].filename).toBeUndefined();
1000 | expect(result.descriptions?.[0].name).toBeUndefined();
1001 | expect(result.descriptions?.[0].content).toBe("**This is a description**.\n");
1002 | });
1003 |
1004 | it("Extracts descriptions #5", () => {
1005 | // --- Act
1006 | const content = `\`\`\`xmlui-pg
1007 | ---desc filename="Main.xmlui"
1008 | **This is a description**.
1009 | \`\`\``;
1010 | const result = parsePlaygroundPattern(content);
1011 | // --- Assert
1012 | expect(result.descriptions).toBeDefined();
1013 | expect(result.descriptions?.length).toBe(1);
1014 | expect(result.descriptions?.[0].copy).toBeUndefined();
1015 | expect(result.descriptions?.[0].display).toBeUndefined();
1016 | expect(result.descriptions?.[0].highlights).toBeUndefined();
1017 | expect(result.descriptions?.[0].filename).toBe("Main.xmlui");
1018 | expect(result.descriptions?.[0].name).toBeUndefined();
1019 | expect(result.descriptions?.[0].content).toBe("**This is a description**.\n");
1020 | });
1021 |
1022 | it("Extracts descriptions #6", () => {
1023 | // --- Act
1024 | const content = `\`\`\`xmlui-pg
1025 | ---desc name="MyApp example"
1026 | **This is a description**.
1027 | \`\`\``;
1028 | const result = parsePlaygroundPattern(content);
1029 | // --- Assert
1030 | expect(result.descriptions).toBeDefined();
1031 | expect(result.descriptions?.length).toBe(1);
1032 | expect(result.descriptions?.[0].copy).toBeUndefined();
1033 | expect(result.descriptions?.[0].display).toBeUndefined();
1034 | expect(result.descriptions?.[0].highlights).toBeUndefined();
1035 | expect(result.descriptions?.[0].filename).toBeUndefined();
1036 | expect(result.descriptions?.[0].name).toBe("MyApp example");
1037 | expect(result.descriptions?.[0].content).toBe("**This is a description**.\n");
1038 | });
1039 |
1040 | it("Convert default app #1", () => {
1041 | // --- Act
1042 | const content = `\`\`\`xmlui-pg
1043 | <Button>Click me</Button>
1044 | \`\`\``;
1045 |
1046 | const base64 = "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==";
1047 | const result = convertPlaygroundPatternToMarkdown(content);
1048 |
1049 | // --- Assert
1050 | expect(result).toBe(
1051 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==" data-pg-markdown=""></samp>\n\n`,
1052 | );
1053 | });
1054 |
1055 | it("Convert default app #2", () => {
1056 | // --- Act
1057 | const base64 = "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==";
1058 | const content = `\`\`\`xmlui-pg display
1059 | <Button>Click me</Button>
1060 | \`\`\``;
1061 |
1062 | const result = convertPlaygroundPatternToMarkdown(content);
1063 |
1064 | // --- Assert
1065 | expect(result).toBe(
1066 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgo="></samp>\n\n`,
1067 | );
1068 | expect(base64ToJson(base64)).toStrictEqual({
1069 | app: "<Button>Click me</Button>\n",
1070 | });
1071 | });
1072 |
1073 | it("Convert default app #3", () => {
1074 | // --- Act
1075 | const base64 = "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==";
1076 | const content = `\`\`\`xmlui-pg display copy
1077 | <Button>Click me</Button>
1078 | \`\`\``;
1079 | const result = convertPlaygroundPatternToMarkdown(content);
1080 | // --- Assert
1081 | expect(result).toBe(
1082 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==" data-pg-markdown="YGBgeG1sdWkgY29weQo8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+CmBgYAoK"></samp>\n\n`,
1083 | );
1084 | expect(base64ToJson(base64)).toStrictEqual({
1085 | app: "<Button>Click me</Button>\n",
1086 | });
1087 | });
1088 |
1089 | it("Convert explicit app #1", () => {
1090 | // --- Act
1091 | const content = `\`\`\`xmlui-pg
1092 | ---app
1093 | <Button>Click me</Button>
1094 | \`\`\``;
1095 |
1096 | const base64 = "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==";
1097 | const result = convertPlaygroundPatternToMarkdown(content);
1098 |
1099 | // --- Assert
1100 | expect(result).toBe(
1101 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==" data-pg-markdown=""></samp>\n\n`,
1102 | );
1103 | });
1104 |
1105 | it("Convert explicit app #2", () => {
1106 | // --- Act
1107 | const base64 = "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==";
1108 | const content = `\`\`\`xmlui-pg
1109 | ---app display
1110 | <Button>Click me</Button>
1111 | \`\`\``;
1112 |
1113 | const result = convertPlaygroundPatternToMarkdown(content);
1114 |
1115 | // --- Assert
1116 | expect(result).toBe(
1117 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgo="></samp>\n\n`,
1118 | );
1119 | expect(base64ToJson(base64)).toStrictEqual({
1120 | app: "<Button>Click me</Button>\n",
1121 | });
1122 | });
1123 |
1124 | it("Convert explicit app #3", () => {
1125 | // --- Act
1126 | const base64 = "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==";
1127 | const content = `\`\`\`xmlui-pg
1128 | ---app display copy
1129 | <Button>Click me</Button>
1130 | \`\`\``;
1131 | const result = convertPlaygroundPatternToMarkdown(content);
1132 | // --- Assert
1133 | expect(result).toBe(
1134 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4ifQ==" data-pg-markdown="YGBgeG1sdWkgY29weQo8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+CmBgYAoK"></samp>\n\n`,
1135 | );
1136 | expect(base64ToJson(base64)).toStrictEqual({
1137 | app: "<Button>Click me</Button>\n",
1138 | });
1139 | });
1140 |
1141 | it("Convert explicit app+comp #1", () => {
1142 | // --- Act
1143 | const base64 =
1144 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==";
1145 | const content = `\`\`\`xmlui-pg
1146 | ---app display
1147 | <Button>Click me</Button>
1148 | ---comp
1149 | <Component name="MyComponent" />
1150 | \`\`\``;
1151 |
1152 | const result = convertPlaygroundPatternToMarkdown(content);
1153 |
1154 | // --- Assert
1155 | expect(result).toBe(
1156 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgo="></samp>\n\n`,
1157 | );
1158 | expect(base64ToJson(base64)).toStrictEqual({
1159 | app: "<Button>Click me</Button>\n",
1160 | components: ['<Component name="MyComponent" />\n'],
1161 | });
1162 | });
1163 |
1164 | it("Convert explicit app+comp #2", () => {
1165 | // --- Act
1166 | const base64 =
1167 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==";
1168 | const content = `\`\`\`xmlui-pg
1169 | ---app display
1170 | <Button>Click me</Button>
1171 | ---comp display
1172 | <Component name="MyComponent" />
1173 | \`\`\``;
1174 |
1175 | const result = convertPlaygroundPatternToMarkdown(content);
1176 |
1177 | // --- Assert
1178 | expect(result).toBe(
1179 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgpgYGB4bWx1aSAKPENvbXBvbmVudCBuYW1lPSJNeUNvbXBvbmVudCIgLz4KYGBgCgo="></samp>\n\n`,
1180 | );
1181 | expect(base64ToJson(base64)).toStrictEqual({
1182 | app: "<Button>Click me</Button>\n",
1183 | components: ['<Component name="MyComponent" />\n'],
1184 | });
1185 | });
1186 |
1187 | it("Convert explicit app+comp #3", () => {
1188 | // --- Act
1189 | const base64 =
1190 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiIsIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==";
1191 | const content = `\`\`\`xmlui-pg
1192 | ---app display
1193 | <Button>Click me</Button>
1194 | ---comp display
1195 | <Component name="MyComponent" />
1196 | ---comp display
1197 | <Component name="MyComponent" />
1198 | \`\`\``;
1199 |
1200 | const result = convertPlaygroundPatternToMarkdown(content);
1201 |
1202 | // --- Assert
1203 | expect(result).toBe(
1204 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiIsIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgpgYGB4bWx1aSAKPENvbXBvbmVudCBuYW1lPSJNeUNvbXBvbmVudCIgLz4KYGBgCgpgYGB4bWx1aSAKPENvbXBvbmVudCBuYW1lPSJNeUNvbXBvbmVudCIgLz4KYGBgCgo="></samp>\n\n`,
1205 | );
1206 | expect(base64ToJson(base64)).toStrictEqual({
1207 | app: "<Button>Click me</Button>\n",
1208 | components: ['<Component name="MyComponent" />\n', '<Component name="MyComponent" />\n'],
1209 | });
1210 | });
1211 |
1212 | it("Convert explicit app+comp+config #1", () => {
1213 | // --- Act
1214 | const base64 =
1215 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIn0=";
1216 | const content = `\`\`\`xmlui-pg
1217 | ---app display
1218 | <Button>Click me</Button>
1219 | ---comp display
1220 | <Component name="MyComponent" />
1221 | ---config
1222 | { apiUrl: "/api" }
1223 | \`\`\``;
1224 |
1225 | const result = convertPlaygroundPatternToMarkdown(content);
1226 |
1227 | // --- Assert
1228 | expect(result).toBe(
1229 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIn0=" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgpgYGB4bWx1aSAKPENvbXBvbmVudCBuYW1lPSJNeUNvbXBvbmVudCIgLz4KYGBgCgo="></samp>\n\n`,
1230 | );
1231 | expect(base64ToJson(base64)).toStrictEqual({
1232 | app: "<Button>Click me</Button>\n",
1233 | components: ['<Component name="MyComponent" />\n'],
1234 | config: '{ apiUrl: "/api" }\n',
1235 | });
1236 | });
1237 |
1238 | it("Convert explicit app+comp+config #2", () => {
1239 | // --- Act
1240 | const base64 =
1241 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIn0=";
1242 | const content = `\`\`\`xmlui-pg
1243 | ---app display
1244 | <Button>Click me</Button>
1245 | ---comp display
1246 | <Component name="MyComponent" />
1247 | ---config display
1248 | { apiUrl: "/api" }
1249 | \`\`\``;
1250 |
1251 | const result = convertPlaygroundPatternToMarkdown(content);
1252 |
1253 | // --- Assert
1254 | expect(result).toBe(
1255 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIn0=" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgpgYGB4bWx1aSAKPENvbXBvbmVudCBuYW1lPSJNeUNvbXBvbmVudCIgLz4KYGBgCgpgYGBqc29uIAp7IGFwaVVybDogIi9hcGkiIH0KYGBgCgo="></samp>\n\n`,
1256 | );
1257 | expect(base64ToJson(base64)).toStrictEqual({
1258 | app: "<Button>Click me</Button>\n",
1259 | components: ['<Component name="MyComponent" />\n'],
1260 | config: '{ apiUrl: "/api" }\n',
1261 | });
1262 | });
1263 |
1264 | it("Convert explicit app+comp+config+api #1", () => {
1265 | // --- Act
1266 | const base64 =
1267 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIiwiYXBpIjoieyBvcGVyYXRpb246IFwiL3NvbWVcIiB9XG4ifQ==";
1268 | const content = `\`\`\`xmlui-pg
1269 | ---app display
1270 | <Button>Click me</Button>
1271 | ---comp display
1272 | <Component name="MyComponent" />
1273 | ---config
1274 | { apiUrl: "/api" }
1275 | ---api
1276 | { operation: "/some" }
1277 | \`\`\``;
1278 |
1279 | const result = convertPlaygroundPatternToMarkdown(content);
1280 |
1281 | // --- Assert
1282 | expect(result).toBe(
1283 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIiwiYXBpIjoieyBvcGVyYXRpb246IFwiL3NvbWVcIiB9XG4ifQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgpgYGB4bWx1aSAKPENvbXBvbmVudCBuYW1lPSJNeUNvbXBvbmVudCIgLz4KYGBgCgo="></samp>\n\n`,
1284 | );
1285 | expect(base64ToJson(base64)).toStrictEqual({
1286 | app: "<Button>Click me</Button>\n",
1287 | components: ['<Component name="MyComponent" />\n'],
1288 | config: '{ apiUrl: "/api" }\n',
1289 | api: '{ operation: "/some" }\n',
1290 | });
1291 | });
1292 |
1293 | it("Convert explicit app+comp+config+api #2", () => {
1294 | // --- Act
1295 | const base64 =
1296 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIiwiYXBpIjoieyBvcGVyYXRpb246IFwiL3NvbWVcIiB9XG4ifQ==";
1297 | const content = `\`\`\`xmlui-pg
1298 | ---app display
1299 | <Button>Click me</Button>
1300 | ---comp display
1301 | <Component name="MyComponent" />
1302 | ---config
1303 | { apiUrl: "/api" }
1304 | ---api display
1305 | { operation: "/some" }
1306 | \`\`\``;
1307 |
1308 | const result = convertPlaygroundPatternToMarkdown(content);
1309 |
1310 | // --- Assert
1311 | expect(result).toBe(
1312 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdLCJjb25maWciOiJ7IGFwaVVybDogXCIvYXBpXCIgfVxuIiwiYXBpIjoieyBvcGVyYXRpb246IFwiL3NvbWVcIiB9XG4ifQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgpgYGB4bWx1aSAKPENvbXBvbmVudCBuYW1lPSJNeUNvbXBvbmVudCIgLz4KYGBgCgo="></samp>\n\n`,
1313 | );
1314 | expect(base64ToJson(base64)).toStrictEqual({
1315 | app: "<Button>Click me</Button>\n",
1316 | components: ['<Component name="MyComponent" />\n'],
1317 | config: '{ apiUrl: "/api" }\n',
1318 | api: '{ operation: "/some" }\n',
1319 | });
1320 | });
1321 |
1322 | it("Convert explicit app+desc+comp #1", () => {
1323 | // --- Act
1324 | const base64 =
1325 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==";
1326 | const content = `\`\`\`xmlui-pg
1327 | ---app display
1328 | <Button>Click me</Button>
1329 | ---desc
1330 | **This is a description #1**.
1331 | ---comp display
1332 | <Component name="MyComponent" />
1333 | \`\`\``;
1334 |
1335 | const result = convertPlaygroundPatternToMarkdown(content);
1336 |
1337 | // --- Assert
1338 | expect(result).toBe(
1339 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgoqKlRoaXMgaXMgYSBkZXNjcmlwdGlvbiAjMSoqLgoKYGBgeG1sdWkgCjxDb21wb25lbnQgbmFtZT0iTXlDb21wb25lbnQiIC8+CmBgYAoK"></samp>\n\n`,
1340 | );
1341 | expect(base64ToJson(base64)).toStrictEqual({
1342 | app: "<Button>Click me</Button>\n",
1343 | components: ['<Component name="MyComponent" />\n'],
1344 | });
1345 | });
1346 |
1347 | it("Convert explicit app+desc+comp #2", () => {
1348 | // --- Act
1349 | const base64 =
1350 | "eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==";
1351 | const content = `\`\`\`xmlui-pg
1352 | ---app display
1353 | <Button>Click me</Button>
1354 | ---desc
1355 | **This is a description #1**.
1356 | ---comp display
1357 | <Component name="MyComponent" />
1358 | ---desc
1359 | **This is a description #2**.
1360 | \`\`\``;
1361 |
1362 | const result = convertPlaygroundPatternToMarkdown(content);
1363 |
1364 | // --- Assert
1365 | expect(result).toBe(
1366 | `<samp data-pg-content="eyJhcHAiOiI8QnV0dG9uPkNsaWNrIG1lPC9CdXR0b24+XG4iLCJjb21wb25lbnRzIjpbIjxDb21wb25lbnQgbmFtZT1cIk15Q29tcG9uZW50XCIgLz5cbiJdfQ==" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgoqKlRoaXMgaXMgYSBkZXNjcmlwdGlvbiAjMSoqLgoKYGBgeG1sdWkgCjxDb21wb25lbnQgbmFtZT0iTXlDb21wb25lbnQiIC8+CmBgYAoKKipUaGlzIGlzIGEgZGVzY3JpcHRpb24gIzIqKi4KCg=="></samp>\n\n`,
1367 | );
1368 | expect(base64ToJson(base64)).toStrictEqual({
1369 | app: "<Button>Click me</Button>\n",
1370 | components: ['<Component name="MyComponent" />\n'],
1371 | });
1372 | });
1373 |
1374 | it("Convert wight height", () => {
1375 | // --- Act
1376 | const base64 = "eyJoZWlnaHQiOiIzMDBweCIsImFwcCI6IjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj5cbiJ9";
1377 | const content = `\`\`\`xmlui-pg display height="300px"
1378 | <Button>Click me</Button>
1379 | \`\`\``;
1380 |
1381 | const result = convertPlaygroundPatternToMarkdown(content);
1382 |
1383 | // --- Assert
1384 | expect(result).toBe(`<samp data-pg-content="eyJoZWlnaHQiOiIzMDBweCIsImFwcCI6IjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj5cbiJ9" data-pg-markdown="YGBgeG1sdWkgCjxCdXR0b24+Q2xpY2sgbWU8L0J1dHRvbj4KYGBgCgo="></samp>\n\n`);
1385 | expect(base64ToJson(base64)).toStrictEqual({
1386 | app: "<Button>Click me</Button>\n",
1387 | height: "300px",
1388 | });
1389 | });
1390 | });
1391 |
1392 | function base64ToString(base64: string) {
1393 | return Buffer.from(base64, "base64").toString("utf-8");
1394 | }
1395 |
1396 | function base64ToJson(base64: string) {
1397 | const jsonString = base64ToString(base64);
1398 | return JSON.parse(jsonString);
1399 | }
1400 |
```