@cardstack/boxel-cli 0.2.0 → 0.3.0-unstable.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-types/base/-private.d.ts +1 -0
- package/bundled-types/base/address.d.ts +17 -0
- package/bundled-types/base/ai-app-generator.d.ts +14 -0
- package/bundled-types/base/amount-with-currency.d.ts +10 -0
- package/bundled-types/base/avif-image-def.d.ts +12 -0
- package/bundled-types/base/avif-meta-extractor.d.ts +4 -0
- package/bundled-types/base/base64-image.d.ts +25 -0
- package/bundled-types/base/big-integer.d.ts +12 -0
- package/bundled-types/base/boolean.d.ts +14 -0
- package/bundled-types/base/brand-functional-palette.d.ts +16 -0
- package/bundled-types/base/brand-guide.d.ts +26 -0
- package/bundled-types/base/brand-logo.d.ts +29 -0
- package/bundled-types/base/card-api.d.ts +513 -0
- package/bundled-types/base/card-serialization.d.ts +47 -0
- package/bundled-types/base/cards-grid.d.ts +10 -0
- package/bundled-types/base/code-ref.d.ts +14 -0
- package/bundled-types/base/codemirror-editor.d.ts +135 -0
- package/bundled-types/base/color-field/components/advanced-color-picker.d.ts +66 -0
- package/bundled-types/base/color-field/components/color-picker-field.d.ts +22 -0
- package/bundled-types/base/color-field/components/color-wheel-picker.d.ts +44 -0
- package/bundled-types/base/color-field/components/contrast-checker-addon.d.ts +14 -0
- package/bundled-types/base/color-field/components/recent-colors-addon.d.ts +19 -0
- package/bundled-types/base/color-field/components/slider-picker.d.ts +40 -0
- package/bundled-types/base/color-field/components/swatches-picker.d.ts +5 -0
- package/bundled-types/base/color-field/modifiers/setup-element-modifier.d.ts +10 -0
- package/bundled-types/base/color-field/util/color-field-signature.d.ts +9 -0
- package/bundled-types/base/color-field/util/color-utils.d.ts +96 -0
- package/bundled-types/base/color-field/util/css-color-parsers.d.ts +11 -0
- package/bundled-types/base/color.d.ts +10 -0
- package/bundled-types/base/command.d.ts +593 -0
- package/bundled-types/base/commands/search-card-result.d.ts +36 -0
- package/bundled-types/base/components/age.d.ts +22 -0
- package/bundled-types/base/components/business-days.d.ts +16 -0
- package/bundled-types/base/components/card-list.d.ts +25 -0
- package/bundled-types/base/components/cards-grid-layout.d.ts +58 -0
- package/bundled-types/base/components/countdown.d.ts +31 -0
- package/bundled-types/base/components/expiration-warning.d.ts +24 -0
- package/bundled-types/base/components/time-ago.d.ts +24 -0
- package/bundled-types/base/components/time-slots.d.ts +20 -0
- package/bundled-types/base/components/timeline.d.ts +22 -0
- package/bundled-types/base/contains-many-component.d.ts +7 -0
- package/bundled-types/base/coordinate.d.ts +7 -0
- package/bundled-types/base/country.d.ts +23 -0
- package/bundled-types/base/css-value.d.ts +6 -0
- package/bundled-types/base/csv-file-def.d.ts +29 -0
- package/bundled-types/base/currency.d.ts +16 -0
- package/bundled-types/base/date/day.d.ts +9 -0
- package/bundled-types/base/date/month-day.d.ts +10 -0
- package/bundled-types/base/date/month-year.d.ts +9 -0
- package/bundled-types/base/date/month.d.ts +9 -0
- package/bundled-types/base/date/quarter.d.ts +10 -0
- package/bundled-types/base/date/week.d.ts +9 -0
- package/bundled-types/base/date/year.d.ts +9 -0
- package/bundled-types/base/date-range-field.d.ts +12 -0
- package/bundled-types/base/date.d.ts +12 -0
- package/bundled-types/base/datetime-stamp.d.ts +7 -0
- package/bundled-types/base/datetime.d.ts +12 -0
- package/bundled-types/base/default-templates/atom.d.ts +10 -0
- package/bundled-types/base/default-templates/card-info.d.ts +32 -0
- package/bundled-types/base/default-templates/embedded.d.ts +11 -0
- package/bundled-types/base/default-templates/field-edit.d.ts +10 -0
- package/bundled-types/base/default-templates/file-def-edit.d.ts +8 -0
- package/bundled-types/base/default-templates/fitted.d.ts +12 -0
- package/bundled-types/base/default-templates/head.d.ts +13 -0
- package/bundled-types/base/default-templates/image-def-atom.d.ts +8 -0
- package/bundled-types/base/default-templates/image-def-embedded.d.ts +8 -0
- package/bundled-types/base/default-templates/image-def-fitted.d.ts +8 -0
- package/bundled-types/base/default-templates/image-def-isolated.d.ts +8 -0
- package/bundled-types/base/default-templates/isolated-and-edit.d.ts +15 -0
- package/bundled-types/base/default-templates/markdown-fallback.d.ts +19 -0
- package/bundled-types/base/default-templates/markdown.d.ts +60 -0
- package/bundled-types/base/default-templates/missing-template.d.ts +13 -0
- package/bundled-types/base/default-templates/theme-dashboard.d.ts +126 -0
- package/bundled-types/base/detailed-style-reference.d.ts +48 -0
- package/bundled-types/base/email.d.ts +10 -0
- package/bundled-types/base/enum.d.ts +30 -0
- package/bundled-types/base/ethereum-address.d.ts +13 -0
- package/bundled-types/base/field-component.d.ts +65 -0
- package/bundled-types/base/field-support.d.ts +55 -0
- package/bundled-types/base/file-api.d.ts +2 -0
- package/bundled-types/base/file-menu-items.d.ts +4 -0
- package/bundled-types/base/gif-image-def.d.ts +12 -0
- package/bundled-types/base/gif-meta-extractor.d.ts +4 -0
- package/bundled-types/base/gts-file-def.d.ts +7 -0
- package/bundled-types/base/helpers/country.d.ts +3198 -0
- package/bundled-types/base/helpers/sanitized-html.d.ts +2 -0
- package/bundled-types/base/helpers/set-background-image.d.ts +2 -0
- package/bundled-types/base/image-file-def.d.ts +1 -0
- package/bundled-types/base/image.d.ts +8 -0
- package/bundled-types/base/index.d.ts +1 -0
- package/bundled-types/base/join-the-community.d.ts +14 -0
- package/bundled-types/base/jpg-image-def.d.ts +12 -0
- package/bundled-types/base/jpg-meta-extractor.d.ts +4 -0
- package/bundled-types/base/json-file-def.d.ts +23 -0
- package/bundled-types/base/links-to-editor.d.ts +22 -0
- package/bundled-types/base/links-to-many-component.d.ts +7 -0
- package/bundled-types/base/llm-model.d.ts +6 -0
- package/bundled-types/base/markdown-file-def.d.ts +25 -0
- package/bundled-types/base/markdown-helpers.d.ts +26 -0
- package/bundled-types/base/markdown.d.ts +1 -0
- package/bundled-types/base/matrix-event.d.ts +400 -0
- package/bundled-types/base/menu-items.d.ts +21 -0
- package/bundled-types/base/number/components/badge-counter.d.ts +32 -0
- package/bundled-types/base/number/components/badge-metric.d.ts +34 -0
- package/bundled-types/base/number/components/badge-notification.d.ts +38 -0
- package/bundled-types/base/number/components/gauge.d.ts +45 -0
- package/bundled-types/base/number/components/number-input.d.ts +27 -0
- package/bundled-types/base/number/components/progress-bar.d.ts +44 -0
- package/bundled-types/base/number/components/progress-circle.d.ts +41 -0
- package/bundled-types/base/number/components/score.d.ts +41 -0
- package/bundled-types/base/number/components/stat.d.ts +38 -0
- package/bundled-types/base/number/util/index.d.ts +29 -0
- package/bundled-types/base/number.d.ts +52 -0
- package/bundled-types/base/percentage.d.ts +9 -0
- package/bundled-types/base/phone-number.d.ts +25 -0
- package/bundled-types/base/png-image-def.d.ts +12 -0
- package/bundled-types/base/png-meta-extractor.d.ts +4 -0
- package/bundled-types/base/positioned-card.d.ts +7 -0
- package/bundled-types/base/query-field-support.d.ts +6 -0
- package/bundled-types/base/realm-config.d.ts +16 -0
- package/bundled-types/base/realm.d.ts +7 -0
- package/bundled-types/base/resources/command-data.d.ts +43 -0
- package/bundled-types/base/response-field.d.ts +6 -0
- package/bundled-types/base/rich-markdown.d.ts +30 -0
- package/bundled-types/base/shared-state.d.ts +1 -0
- package/bundled-types/base/skill-plus.d.ts +79 -0
- package/bundled-types/base/skill-reference.d.ts +12 -0
- package/bundled-types/base/skill-set.d.ts +18 -0
- package/bundled-types/base/skill.d.ts +21 -0
- package/bundled-types/base/spec.d.ts +108 -0
- package/bundled-types/base/string.d.ts +2 -0
- package/bundled-types/base/structured-theme-variables.d.ts +85 -0
- package/bundled-types/base/structured-theme.d.ts +32 -0
- package/bundled-types/base/style-reference.d.ts +14 -0
- package/bundled-types/base/svg-image-def.d.ts +12 -0
- package/bundled-types/base/svg-meta-extractor.d.ts +12 -0
- package/bundled-types/base/system-card.d.ts +17 -0
- package/bundled-types/base/tag.d.ts +15 -0
- package/bundled-types/base/text-area.d.ts +2 -0
- package/bundled-types/base/text-file-def.d.ts +23 -0
- package/bundled-types/base/text-input-validator.d.ts +13 -0
- package/bundled-types/base/theme.d.ts +2 -0
- package/bundled-types/base/time/duration.d.ts +14 -0
- package/bundled-types/base/time/relative-time.d.ts +10 -0
- package/bundled-types/base/time/time-range.d.ts +11 -0
- package/bundled-types/base/time.d.ts +9 -0
- package/bundled-types/base/ts-file-def.d.ts +26 -0
- package/bundled-types/base/ts-highlight.d.ts +1 -0
- package/bundled-types/base/types/@cardstack/boxel-host/index.d.ts +5 -0
- package/bundled-types/base/types/ember-css-url/index.d.ts +15 -0
- package/bundled-types/base/typography.d.ts +14 -0
- package/bundled-types/base/url.d.ts +13 -0
- package/bundled-types/base/watched-array.d.ts +7 -0
- package/bundled-types/base/webp-image-def.d.ts +12 -0
- package/bundled-types/base/webp-meta-extractor.d.ts +4 -0
- package/bundled-types/base/website.d.ts +8 -0
- package/bundled-types/base/welcome-to-boxel.d.ts +22 -0
- package/bundled-types/boxel-ui/components/accordion/index.gts +50 -0
- package/bundled-types/boxel-ui/components/accordion/item/index.gts +156 -0
- package/bundled-types/boxel-ui/components/accordion/usage.gts +157 -0
- package/bundled-types/boxel-ui/components/add-button/index.gts +46 -0
- package/bundled-types/boxel-ui/components/add-button/usage.gts +54 -0
- package/bundled-types/boxel-ui/components/alert/index.gts +151 -0
- package/bundled-types/boxel-ui/components/alert/usage.gts +66 -0
- package/bundled-types/boxel-ui/components/avatar/index.gts +79 -0
- package/bundled-types/boxel-ui/components/avatar/usage.gts +96 -0
- package/bundled-types/boxel-ui/components/basic-fitted/index.gts +340 -0
- package/bundled-types/boxel-ui/components/basic-fitted/usage.gts +223 -0
- package/bundled-types/boxel-ui/components/button/index.gts +416 -0
- package/bundled-types/boxel-ui/components/button/usage.gts +334 -0
- package/bundled-types/boxel-ui/components/card-container/index.gts +251 -0
- package/bundled-types/boxel-ui/components/card-container/usage.gts +53 -0
- package/bundled-types/boxel-ui/components/card-header/index.gts +473 -0
- package/bundled-types/boxel-ui/components/card-header/usage.gts +295 -0
- package/bundled-types/boxel-ui/components/circle-spinner/index.gts +42 -0
- package/bundled-types/boxel-ui/components/circle-spinner/usage.gts +48 -0
- package/bundled-types/boxel-ui/components/color-palette/index.gts +134 -0
- package/bundled-types/boxel-ui/components/color-palette/usage.gts +69 -0
- package/bundled-types/boxel-ui/components/color-picker/index.gts +125 -0
- package/bundled-types/boxel-ui/components/color-picker/usage.gts +56 -0
- package/bundled-types/boxel-ui/components/container/index.gts +67 -0
- package/bundled-types/boxel-ui/components/container/usage.gts +59 -0
- package/bundled-types/boxel-ui/components/context-button/index.gts +184 -0
- package/bundled-types/boxel-ui/components/context-button/usage.gts +125 -0
- package/bundled-types/boxel-ui/components/copy-button/index.gts +79 -0
- package/bundled-types/boxel-ui/components/copy-button/usage.gts +25 -0
- package/bundled-types/boxel-ui/components/date-range-picker/index.gts +211 -0
- package/bundled-types/boxel-ui/components/date-range-picker/setup.gts +11 -0
- package/bundled-types/boxel-ui/components/date-range-picker/usage.gts +52 -0
- package/bundled-types/boxel-ui/components/drag-and-drop/index.gts +256 -0
- package/bundled-types/boxel-ui/components/drag-and-drop/usage.gts +142 -0
- package/bundled-types/boxel-ui/components/dropdown/index.gts +478 -0
- package/bundled-types/boxel-ui/components/dropdown/trigger/index.gts +70 -0
- package/bundled-types/boxel-ui/components/dropdown/trigger/usage.gts +54 -0
- package/bundled-types/boxel-ui/components/dropdown/usage.gts +119 -0
- package/bundled-types/boxel-ui/components/email-input/index.gts +111 -0
- package/bundled-types/boxel-ui/components/email-input/usage.gts +75 -0
- package/bundled-types/boxel-ui/components/entity-icon-display/index.gts +144 -0
- package/bundled-types/boxel-ui/components/entity-icon-display/usage.gts +54 -0
- package/bundled-types/boxel-ui/components/entity-thumbnail-display/index.gts +148 -0
- package/bundled-types/boxel-ui/components/entity-thumbnail-display/usage.gts +76 -0
- package/bundled-types/boxel-ui/components/field-container/index.gts +150 -0
- package/bundled-types/boxel-ui/components/field-container/usage.gts +188 -0
- package/bundled-types/boxel-ui/components/filter-list/index.gts +255 -0
- package/bundled-types/boxel-ui/components/filter-list/usage.gts +153 -0
- package/bundled-types/boxel-ui/components/fitted-card-container/index.gts +66 -0
- package/bundled-types/boxel-ui/components/fitted-card-container/usage.gts +81 -0
- package/bundled-types/boxel-ui/components/grid-container/grid-item-container/index.gts +37 -0
- package/bundled-types/boxel-ui/components/grid-container/index.gts +116 -0
- package/bundled-types/boxel-ui/components/grid-container/usage.gts +105 -0
- package/bundled-types/boxel-ui/components/header/index.gts +101 -0
- package/bundled-types/boxel-ui/components/header/usage.gts +116 -0
- package/bundled-types/boxel-ui/components/icon-button/index.gts +148 -0
- package/bundled-types/boxel-ui/components/icon-button/usage.gts +249 -0
- package/bundled-types/boxel-ui/components/input/index.gts +560 -0
- package/bundled-types/boxel-ui/components/input/usage.gts +449 -0
- package/bundled-types/boxel-ui/components/input-group/accessories/index.gts +191 -0
- package/bundled-types/boxel-ui/components/input-group/controls/index.gts +54 -0
- package/bundled-types/boxel-ui/components/input-group/index.gts +347 -0
- package/bundled-types/boxel-ui/components/input-group/usage.gts +437 -0
- package/bundled-types/boxel-ui/components/kanban/card.gts +89 -0
- package/bundled-types/boxel-ui/components/kanban/column-header.gts +151 -0
- package/bundled-types/boxel-ui/components/kanban/drag.gts +1007 -0
- package/bundled-types/boxel-ui/components/kanban/engine.ts +247 -0
- package/bundled-types/boxel-ui/components/kanban/ghost.gts +64 -0
- package/bundled-types/boxel-ui/components/kanban/index.gts +16 -0
- package/bundled-types/boxel-ui/components/kanban/modifiers.gts +42 -0
- package/bundled-types/boxel-ui/components/kanban/plane-inner.gts +525 -0
- package/bundled-types/boxel-ui/components/kanban/plane.gts +163 -0
- package/bundled-types/boxel-ui/components/kanban/usage.gts +392 -0
- package/bundled-types/boxel-ui/components/label/index.gts +64 -0
- package/bundled-types/boxel-ui/components/loading-indicator/index.gts +78 -0
- package/bundled-types/boxel-ui/components/loading-indicator/usage.gts +72 -0
- package/bundled-types/boxel-ui/components/menu/index.gts +267 -0
- package/bundled-types/boxel-ui/components/menu/usage.gts +100 -0
- package/bundled-types/boxel-ui/components/message/index.gts +146 -0
- package/bundled-types/boxel-ui/components/message/usage.gts +263 -0
- package/bundled-types/boxel-ui/components/modal/index.gts +159 -0
- package/bundled-types/boxel-ui/components/modal/usage.gts +206 -0
- package/bundled-types/boxel-ui/components/multi-select/after-options.gts +59 -0
- package/bundled-types/boxel-ui/components/multi-select/index.gts +230 -0
- package/bundled-types/boxel-ui/components/multi-select/selected-item.gts +91 -0
- package/bundled-types/boxel-ui/components/multi-select/trigger.gts +190 -0
- package/bundled-types/boxel-ui/components/multi-select/usage.gts +420 -0
- package/bundled-types/boxel-ui/components/phone-input/index.gts +149 -0
- package/bundled-types/boxel-ui/components/phone-input/usage.gts +73 -0
- package/bundled-types/boxel-ui/components/picker/before-options-with-search.gts +340 -0
- package/bundled-types/boxel-ui/components/picker/index.gts +427 -0
- package/bundled-types/boxel-ui/components/picker/option-row.gts +270 -0
- package/bundled-types/boxel-ui/components/picker/selected-item.gts +171 -0
- package/bundled-types/boxel-ui/components/picker/trigger-labeled.gts +216 -0
- package/bundled-types/boxel-ui/components/picker/usage.gts +179 -0
- package/bundled-types/boxel-ui/components/pill/index.gts +231 -0
- package/bundled-types/boxel-ui/components/pill/usage.gts +230 -0
- package/bundled-types/boxel-ui/components/progress-bar/index.gts +124 -0
- package/bundled-types/boxel-ui/components/progress-bar/usage.gts +131 -0
- package/bundled-types/boxel-ui/components/progress-radial/index.gts +95 -0
- package/bundled-types/boxel-ui/components/progress-radial/usage.gts +79 -0
- package/bundled-types/boxel-ui/components/radio-input/index.gts +143 -0
- package/bundled-types/boxel-ui/components/radio-input/item.gts +210 -0
- package/bundled-types/boxel-ui/components/radio-input/usage.gts +303 -0
- package/bundled-types/boxel-ui/components/realm-icon/index.gts +129 -0
- package/bundled-types/boxel-ui/components/realm-icon/usage.gts +62 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/handle.gts +180 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/index.gts +341 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/panel.gts +86 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/usage.gts +350 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/adjust-layout-by-delta.ts +231 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/assert.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/calculate-delta-percentage.ts +41 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/calculate-unsafe-default-layout.ts +53 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/compare-layouts.ts +12 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/const.ts +6 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/determine-pivot-indices.ts +15 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-panel-element.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-panel-elements-for-group.ts +8 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-panel-group-element.ts +21 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-resize-handle-element-index.ts +14 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-resize-handle-element.ts +12 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/dom/get-resize-handle-elements-for-group.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/fuzzy-layouts-equal.ts +22 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/fuzzy-numbers.ts +21 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/get-resize-event-coordinates.ts +8 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/get-resize-event-cursor-position.ts +10 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/panel-resize-handle-registry.ts +446 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/resize-panel.ts +35 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/types.ts +23 -0
- package/bundled-types/boxel-ui/components/resizable-panel-group/utils/validate-panel-group-layout.ts +86 -0
- package/bundled-types/boxel-ui/components/select/index.gts +882 -0
- package/bundled-types/boxel-ui/components/select/trigger.gts +132 -0
- package/bundled-types/boxel-ui/components/select/usage.gts +353 -0
- package/bundled-types/boxel-ui/components/skeleton-placeholder/index.gts +89 -0
- package/bundled-types/boxel-ui/components/skeleton-placeholder/usage.gts +102 -0
- package/bundled-types/boxel-ui/components/sort-dropdown/index.gts +91 -0
- package/bundled-types/boxel-ui/components/sort-dropdown/usage.gts +77 -0
- package/bundled-types/boxel-ui/components/swatch/index.gts +81 -0
- package/bundled-types/boxel-ui/components/swatch/usage.gts +57 -0
- package/bundled-types/boxel-ui/components/switch/index.gts +95 -0
- package/bundled-types/boxel-ui/components/switch/usage.gts +79 -0
- package/bundled-types/boxel-ui/components/tabbed-header/index.gts +141 -0
- package/bundled-types/boxel-ui/components/tabbed-header/usage.gts +103 -0
- package/bundled-types/boxel-ui/components/tag/index.gts +50 -0
- package/bundled-types/boxel-ui/components/tag/usage.gts +89 -0
- package/bundled-types/boxel-ui/components/tag-list/index.gts +85 -0
- package/bundled-types/boxel-ui/components/tag-list/usage.gts +129 -0
- package/bundled-types/boxel-ui/components/tooltip/index.gts +306 -0
- package/bundled-types/boxel-ui/components/tooltip/usage.gts +168 -0
- package/bundled-types/boxel-ui/components/view-selector/index.gts +166 -0
- package/bundled-types/boxel-ui/components/view-selector/usage.gts +149 -0
- package/bundled-types/boxel-ui/components.ts +169 -0
- package/bundled-types/boxel-ui/helpers/add-class-to-svg.ts +8 -0
- package/bundled-types/boxel-ui/helpers/clipboard.ts +21 -0
- package/bundled-types/boxel-ui/helpers/cn.ts +12 -0
- package/bundled-types/boxel-ui/helpers/color-tools.ts +331 -0
- package/bundled-types/boxel-ui/helpers/compact.ts +3 -0
- package/bundled-types/boxel-ui/helpers/contrast-color.ts +32 -0
- package/bundled-types/boxel-ui/helpers/css-var.ts +41 -0
- package/bundled-types/boxel-ui/helpers/currency-format.ts +25 -0
- package/bundled-types/boxel-ui/helpers/dayjs-format.ts +27 -0
- package/bundled-types/boxel-ui/helpers/deterministic-color-from-string.ts +45 -0
- package/bundled-types/boxel-ui/helpers/element.ts +16 -0
- package/bundled-types/boxel-ui/helpers/extract-css-variables.ts +126 -0
- package/bundled-types/boxel-ui/helpers/format-age.ts +72 -0
- package/bundled-types/boxel-ui/helpers/format-countdown.ts +110 -0
- package/bundled-types/boxel-ui/helpers/format-currency.ts +95 -0
- package/bundled-types/boxel-ui/helpers/format-date-time.ts +567 -0
- package/bundled-types/boxel-ui/helpers/format-duration.ts +143 -0
- package/bundled-types/boxel-ui/helpers/format-file-size.ts +49 -0
- package/bundled-types/boxel-ui/helpers/format-list.ts +73 -0
- package/bundled-types/boxel-ui/helpers/format-names.ts +103 -0
- package/bundled-types/boxel-ui/helpers/format-number.ts +140 -0
- package/bundled-types/boxel-ui/helpers/format-ordinal.ts +115 -0
- package/bundled-types/boxel-ui/helpers/format-period.ts +188 -0
- package/bundled-types/boxel-ui/helpers/format-relative-time.ts +789 -0
- package/bundled-types/boxel-ui/helpers/generate-css-variables.ts +47 -0
- package/bundled-types/boxel-ui/helpers/markdown-escape.ts +36 -0
- package/bundled-types/boxel-ui/helpers/math-helpers.ts +18 -0
- package/bundled-types/boxel-ui/helpers/menu-divider.ts +15 -0
- package/bundled-types/boxel-ui/helpers/menu-item.ts +76 -0
- package/bundled-types/boxel-ui/helpers/optional.ts +7 -0
- package/bundled-types/boxel-ui/helpers/pick.ts +11 -0
- package/bundled-types/boxel-ui/helpers/sanitize-html.ts +45 -0
- package/bundled-types/boxel-ui/helpers/string.ts +15 -0
- package/bundled-types/boxel-ui/helpers/theme-css.ts +148 -0
- package/bundled-types/boxel-ui/helpers/truth-helpers.ts +48 -0
- package/bundled-types/boxel-ui/helpers/validate-email-format.ts +138 -0
- package/bundled-types/boxel-ui/helpers/validate-phone-format.ts +201 -0
- package/bundled-types/boxel-ui/helpers.ts +134 -0
- package/bundled-types/boxel-ui/icons/ai-bw.gts +22 -0
- package/bundled-types/boxel-ui/icons/arrow-left.gts +25 -0
- package/bundled-types/boxel-ui/icons/arrow-right.gts +28 -0
- package/bundled-types/boxel-ui/icons/arrow-top-left.gts +22 -0
- package/bundled-types/boxel-ui/icons/arrow-up.gts +25 -0
- package/bundled-types/boxel-ui/icons/atom.gts +26 -0
- package/bundled-types/boxel-ui/icons/boxel-icon-with-text.gts +29 -0
- package/bundled-types/boxel-ui/icons/boxel-icon.gts +34 -0
- package/bundled-types/boxel-ui/icons/card-definition.gts +26 -0
- package/bundled-types/boxel-ui/icons/card-instance.gts +26 -0
- package/bundled-types/boxel-ui/icons/card.gts +24 -0
- package/bundled-types/boxel-ui/icons/cardbot-lg.gts +24 -0
- package/bundled-types/boxel-ui/icons/caret-down.gts +23 -0
- package/bundled-types/boxel-ui/icons/caret-up.gts +23 -0
- package/bundled-types/boxel-ui/icons/check-mark.gts +23 -0
- package/bundled-types/boxel-ui/icons/chevron-right.gts +23 -0
- package/bundled-types/boxel-ui/icons/copy.gts +28 -0
- package/bundled-types/boxel-ui/icons/diagonal-arrow-left-up.gts +21 -0
- package/bundled-types/boxel-ui/icons/download.gts +19 -0
- package/bundled-types/boxel-ui/icons/dropdown-arrow-down.gts +20 -0
- package/bundled-types/boxel-ui/icons/dropdown-arrow-filled.gts +19 -0
- package/bundled-types/boxel-ui/icons/dropdown-arrow-up.gts +20 -0
- package/bundled-types/boxel-ui/icons/edit.gts +14 -0
- package/bundled-types/boxel-ui/icons/embedded.gts +34 -0
- package/bundled-types/boxel-ui/icons/exclamation-circle.gts +26 -0
- package/bundled-types/boxel-ui/icons/exclamation.gts +20 -0
- package/bundled-types/boxel-ui/icons/eye.gts +19 -0
- package/bundled-types/boxel-ui/icons/failure-bordered.gts +26 -0
- package/bundled-types/boxel-ui/icons/field.gts +26 -0
- package/bundled-types/boxel-ui/icons/file-alert.gts +28 -0
- package/bundled-types/boxel-ui/icons/file.gts +27 -0
- package/bundled-types/boxel-ui/icons/fitted.gts +42 -0
- package/bundled-types/boxel-ui/icons/folder.gts +26 -0
- package/bundled-types/boxel-ui/icons/form.gts +38 -0
- package/bundled-types/boxel-ui/icons/four-lines.gts +21 -0
- package/bundled-types/boxel-ui/icons/grid-3x3.gts +26 -0
- package/bundled-types/boxel-ui/icons/group.gts +22 -0
- package/bundled-types/boxel-ui/icons/head.gts +28 -0
- package/bundled-types/boxel-ui/icons/highlight-icon.gts +46 -0
- package/bundled-types/boxel-ui/icons/icon-circle-selected.gts +25 -0
- package/bundled-types/boxel-ui/icons/icon-circle.gts +25 -0
- package/bundled-types/boxel-ui/icons/icon-code.gts +22 -0
- package/bundled-types/boxel-ui/icons/icon-funnel.gts +23 -0
- package/bundled-types/boxel-ui/icons/icon-globe.gts +19 -0
- package/bundled-types/boxel-ui/icons/icon-grid.gts +68 -0
- package/bundled-types/boxel-ui/icons/icon-hexagon.gts +22 -0
- package/bundled-types/boxel-ui/icons/icon-inherit.gts +19 -0
- package/bundled-types/boxel-ui/icons/icon-link.gts +20 -0
- package/bundled-types/boxel-ui/icons/icon-list.gts +40 -0
- package/bundled-types/boxel-ui/icons/icon-minus-circle.gts +26 -0
- package/bundled-types/boxel-ui/icons/icon-pencil-crossed-out.gts +33 -0
- package/bundled-types/boxel-ui/icons/icon-pencil-not-crossed-out.gts +21 -0
- package/bundled-types/boxel-ui/icons/icon-pencil.gts +23 -0
- package/bundled-types/boxel-ui/icons/icon-plus-circle.gts +31 -0
- package/bundled-types/boxel-ui/icons/icon-plus-thin.gts +19 -0
- package/bundled-types/boxel-ui/icons/icon-plus.gts +20 -0
- package/bundled-types/boxel-ui/icons/icon-search-thick.gts +27 -0
- package/bundled-types/boxel-ui/icons/icon-search.gts +25 -0
- package/bundled-types/boxel-ui/icons/icon-table.gts +44 -0
- package/bundled-types/boxel-ui/icons/icon-trash.gts +24 -0
- package/bundled-types/boxel-ui/icons/icon-turn-down-right.gts +18 -0
- package/bundled-types/boxel-ui/icons/icon-x.gts +21 -0
- package/bundled-types/boxel-ui/icons/image-placeholder.gts +30 -0
- package/bundled-types/boxel-ui/icons/isolated.gts +20 -0
- package/bundled-types/boxel-ui/icons/loading-indicator.gts +26 -0
- package/bundled-types/boxel-ui/icons/lock.gts +23 -0
- package/bundled-types/boxel-ui/icons/markdown.gts +19 -0
- package/bundled-types/boxel-ui/icons/profile.gts +23 -0
- package/bundled-types/boxel-ui/icons/publish-site-icon.gts +25 -0
- package/bundled-types/boxel-ui/icons/rows-4.gts +26 -0
- package/bundled-types/boxel-ui/icons/select-all.gts +25 -0
- package/bundled-types/boxel-ui/icons/send.gts +21 -0
- package/bundled-types/boxel-ui/icons/sparkle.gts +21 -0
- package/bundled-types/boxel-ui/icons/star-filled.gts +25 -0
- package/bundled-types/boxel-ui/icons/star-half-fill.gts +27 -0
- package/bundled-types/boxel-ui/icons/star.gts +25 -0
- package/bundled-types/boxel-ui/icons/success-bordered.gts +30 -0
- package/bundled-types/boxel-ui/icons/three-dots-horizontal.gts +21 -0
- package/bundled-types/boxel-ui/icons/triangle-left.gts +23 -0
- package/bundled-types/boxel-ui/icons/triangle-right.gts +23 -0
- package/bundled-types/boxel-ui/icons/types.ts +10 -0
- package/bundled-types/boxel-ui/icons/upload.gts +20 -0
- package/bundled-types/boxel-ui/icons/warning.gts +19 -0
- package/bundled-types/boxel-ui/icons.gts +249 -0
- package/bundled-types/boxel-ui/modifiers/auto-focus.ts +7 -0
- package/bundled-types/boxel-ui/modifiers/set-css-var.ts +24 -0
- package/bundled-types/boxel-ui/modifiers.ts +14 -0
- package/bundled-types/boxel-ui/types/@cardstack/boxel-ui/index.d.ts +3 -0
- package/bundled-types/boxel-ui/types/ember-css-url/index.d.ts +15 -0
- package/bundled-types/boxel-ui/types/ember-draggable-modifiers/index.d.ts +109 -0
- package/bundled-types/boxel-ui/types/ember-draggable-modifiers/utils.d.ts +7 -0
- package/bundled-types/boxel-ui/types/ember-focus-trap/index.d.ts +20 -0
- package/bundled-types/boxel-ui/types/ember-power-calendar/components/index.d.ts +9 -0
- package/bundled-types/boxel-ui/types/ember-resize-modifier/index.d.ts +14 -0
- package/bundled-types/boxel-ui/types/ember-set-body-class/index.d.ts +12 -0
- package/bundled-types/boxel-ui/types/ember-sortable/index.d.ts +52 -0
- package/bundled-types/boxel-ui/types/global.d.ts +7 -0
- package/bundled-types/boxel-ui/usage.ts +112 -0
- package/bundled-types/boxel-ui/utils/date-utils.ts +192 -0
- package/bundled-types/boxel-ui/utils/fitted-formats.ts +161 -0
- package/bundled-types/host-app/app.ts +22 -0
- package/bundled-types/host-app/commands/add-field-to-card-definition.ts +74 -0
- package/bundled-types/host-app/commands/ai-assistant.ts +203 -0
- package/bundled-types/host-app/commands/apply-markdown-edit.ts +203 -0
- package/bundled-types/host-app/commands/apply-search-replace-block.ts +225 -0
- package/bundled-types/host-app/commands/ask-ai.ts +66 -0
- package/bundled-types/host-app/commands/authed-fetch.ts +53 -0
- package/bundled-types/host-app/commands/bot-requests/create-listing-pr-request.ts +77 -0
- package/bundled-types/host-app/commands/bot-requests/send-bot-trigger-event.ts +53 -0
- package/bundled-types/host-app/commands/can-read-realm.ts +34 -0
- package/bundled-types/host-app/commands/cancel-indexing-job.ts +29 -0
- package/bundled-types/host-app/commands/check-correctness.ts +309 -0
- package/bundled-types/host-app/commands/copy-and-edit.ts +311 -0
- package/bundled-types/host-app/commands/copy-card-as-markdown.ts +41 -0
- package/bundled-types/host-app/commands/copy-card-to-stack.ts +70 -0
- package/bundled-types/host-app/commands/copy-card.ts +67 -0
- package/bundled-types/host-app/commands/copy-file-to-realm.ts +82 -0
- package/bundled-types/host-app/commands/copy-source.ts +46 -0
- package/bundled-types/host-app/commands/create-ai-assistant-room.ts +144 -0
- package/bundled-types/host-app/commands/create-and-open-submission-workflow-card.ts +30 -0
- package/bundled-types/host-app/commands/create-specs.ts +422 -0
- package/bundled-types/host-app/commands/create-submission-workflow.ts +172 -0
- package/bundled-types/host-app/commands/evaluate-module.ts +119 -0
- package/bundled-types/host-app/commands/execute-atomic-operations.ts +44 -0
- package/bundled-types/host-app/commands/fetch-card-json.ts +33 -0
- package/bundled-types/host-app/commands/full-reindex-realm.ts +30 -0
- package/bundled-types/host-app/commands/generate-example-cards.ts +298 -0
- package/bundled-types/host-app/commands/generate-readme-spec.ts +116 -0
- package/bundled-types/host-app/commands/generate-theme-example.ts +147 -0
- package/bundled-types/host-app/commands/generate-thumbnail.ts +247 -0
- package/bundled-types/host-app/commands/get-all-realm-metas.ts +38 -0
- package/bundled-types/host-app/commands/get-available-realm-identifiers.ts +29 -0
- package/bundled-types/host-app/commands/get-card-type-schema.ts +59 -0
- package/bundled-types/host-app/commands/get-card.ts +34 -0
- package/bundled-types/host-app/commands/get-catalog-realm-identifiers.ts +29 -0
- package/bundled-types/host-app/commands/get-default-writable-realm.ts +28 -0
- package/bundled-types/host-app/commands/get-events-from-room.ts +70 -0
- package/bundled-types/host-app/commands/get-realm-of-resource-identifier.ts +37 -0
- package/bundled-types/host-app/commands/get-user-system-card.ts +38 -0
- package/bundled-types/host-app/commands/index.ts +590 -0
- package/bundled-types/host-app/commands/instantiate-card.ts +185 -0
- package/bundled-types/host-app/commands/invalidate-realm-identifiers.ts +33 -0
- package/bundled-types/host-app/commands/invite-user-to-room.ts +34 -0
- package/bundled-types/host-app/commands/lint-and-fix.ts +60 -0
- package/bundled-types/host-app/commands/listing-action-build.ts +79 -0
- package/bundled-types/host-app/commands/listing-action-init.ts +106 -0
- package/bundled-types/host-app/commands/listing-create.ts +632 -0
- package/bundled-types/host-app/commands/listing-generate-example.ts +83 -0
- package/bundled-types/host-app/commands/listing-install.ts +227 -0
- package/bundled-types/host-app/commands/listing-remix.ts +150 -0
- package/bundled-types/host-app/commands/listing-update-specs.ts +116 -0
- package/bundled-types/host-app/commands/listing-use.ts +97 -0
- package/bundled-types/host-app/commands/one-shot-llm-request.ts +209 -0
- package/bundled-types/host-app/commands/open-ai-assistant-room.ts +38 -0
- package/bundled-types/host-app/commands/open-create-listing-modal.ts +52 -0
- package/bundled-types/host-app/commands/open-in-interact-mode.ts +36 -0
- package/bundled-types/host-app/commands/open-workspace.ts +38 -0
- package/bundled-types/host-app/commands/patch-card-instance.ts +108 -0
- package/bundled-types/host-app/commands/patch-code.ts +243 -0
- package/bundled-types/host-app/commands/patch-fields.ts +304 -0
- package/bundled-types/host-app/commands/patch-theme.ts +52 -0
- package/bundled-types/host-app/commands/persist-module-inspector-view.ts +41 -0
- package/bundled-types/host-app/commands/populate-with-sample-data.ts +84 -0
- package/bundled-types/host-app/commands/preview-format.ts +52 -0
- package/bundled-types/host-app/commands/read-binary-file.ts +62 -0
- package/bundled-types/host-app/commands/read-card-for-ai-assistant.ts +50 -0
- package/bundled-types/host-app/commands/read-file-for-ai-assistant.ts +46 -0
- package/bundled-types/host-app/commands/read-source.ts +46 -0
- package/bundled-types/host-app/commands/read-text-file.ts +44 -0
- package/bundled-types/host-app/commands/register-bot.ts +42 -0
- package/bundled-types/host-app/commands/reindex-realm.ts +30 -0
- package/bundled-types/host-app/commands/retry-submission-workflow.ts +119 -0
- package/bundled-types/host-app/commands/sanitize-module-list.ts +83 -0
- package/bundled-types/host-app/commands/save-card.ts +44 -0
- package/bundled-types/host-app/commands/screenshot-card.ts +148 -0
- package/bundled-types/host-app/commands/search-and-choose.ts +180 -0
- package/bundled-types/host-app/commands/search-cards.ts +102 -0
- package/bundled-types/host-app/commands/search-google-images.ts +100 -0
- package/bundled-types/host-app/commands/send-ai-assistant-message.ts +122 -0
- package/bundled-types/host-app/commands/send-request-via-proxy.ts +70 -0
- package/bundled-types/host-app/commands/serialize-card.ts +45 -0
- package/bundled-types/host-app/commands/set-active-llm.ts +39 -0
- package/bundled-types/host-app/commands/set-user-system-card.ts +29 -0
- package/bundled-types/host-app/commands/show-card.ts +102 -0
- package/bundled-types/host-app/commands/show-file.ts +39 -0
- package/bundled-types/host-app/commands/store-add.ts +37 -0
- package/bundled-types/host-app/commands/summarize-session.ts +82 -0
- package/bundled-types/host-app/commands/switch-submode.ts +112 -0
- package/bundled-types/host-app/commands/sync-openrouter-models.ts +373 -0
- package/bundled-types/host-app/commands/transform-cards.ts +59 -0
- package/bundled-types/host-app/commands/unregister-bot.ts +29 -0
- package/bundled-types/host-app/commands/update-code-path-with-selection.ts +45 -0
- package/bundled-types/host-app/commands/update-playground-selection.ts +37 -0
- package/bundled-types/host-app/commands/update-room-skills.ts +231 -0
- package/bundled-types/host-app/commands/utils.ts +178 -0
- package/bundled-types/host-app/commands/validate-realm.ts +40 -0
- package/bundled-types/host-app/commands/write-binary-file.ts +142 -0
- package/bundled-types/host-app/commands/write-text-file.ts +104 -0
- package/bundled-types/host-app/components/.gitkeep +0 -0
- package/bundled-types/host-app/components/ai-assistant/action-bar.gts +188 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-button-active-bg.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-button-active-bg@2x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-button-active-bg@3x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-animated.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-bw.png +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-bw@2x.png +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon-bw@3x.png +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon@2x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/ai-assist-icon@3x.webp +0 -0
- package/bundled-types/host-app/components/ai-assistant/apply-button/index.gts +226 -0
- package/bundled-types/host-app/components/ai-assistant/apply-button/usage.gts +81 -0
- package/bundled-types/host-app/components/ai-assistant/attached-file-dropdown-menu.gts +179 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/attach-button.gts +176 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/attached-items.gts +271 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/index.gts +144 -0
- package/bundled-types/host-app/components/ai-assistant/attachment-picker/usage.gts +127 -0
- package/bundled-types/host-app/components/ai-assistant/button.gts +60 -0
- package/bundled-types/host-app/components/ai-assistant/chat-input/index.gts +203 -0
- package/bundled-types/host-app/components/ai-assistant/chat-input/usage.gts +68 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/actions.gts +58 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/apply-code-patch-button.gts +66 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/command-header.gts +115 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/diff-editor-header.gts +209 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/index.gts +228 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/patch-footer.gts +32 -0
- package/bundled-types/host-app/components/ai-assistant/code-block/view-code-button.gts +73 -0
- package/bundled-types/host-app/components/ai-assistant/focus-pill/index.gts +60 -0
- package/bundled-types/host-app/components/ai-assistant/focus-pill/usage.gts +45 -0
- package/bundled-types/host-app/components/ai-assistant/llm-mode-toggle.gts +113 -0
- package/bundled-types/host-app/components/ai-assistant/llm-select.gts +158 -0
- package/bundled-types/host-app/components/ai-assistant/message/aibot-message.gts +374 -0
- package/bundled-types/host-app/components/ai-assistant/message/attachments.gts +153 -0
- package/bundled-types/host-app/components/ai-assistant/message/index.gts +678 -0
- package/bundled-types/host-app/components/ai-assistant/message/meta.gts +66 -0
- package/bundled-types/host-app/components/ai-assistant/message/text-content.gts +32 -0
- package/bundled-types/host-app/components/ai-assistant/message/usage.gts +182 -0
- package/bundled-types/host-app/components/ai-assistant/message/user-message.gts +52 -0
- package/bundled-types/host-app/components/ai-assistant/new-session-button.gts +126 -0
- package/bundled-types/host-app/components/ai-assistant/new-session-settings.gts +180 -0
- package/bundled-types/host-app/components/ai-assistant/new-session.gts +83 -0
- package/bundled-types/host-app/components/ai-assistant/panel-popover.gts +102 -0
- package/bundled-types/host-app/components/ai-assistant/panel.gts +453 -0
- package/bundled-types/host-app/components/ai-assistant/past-session-item.gts +323 -0
- package/bundled-types/host-app/components/ai-assistant/past-sessions.gts +115 -0
- package/bundled-types/host-app/components/ai-assistant/rename-session.gts +144 -0
- package/bundled-types/host-app/components/ai-assistant/restore-file-modal.gts +105 -0
- package/bundled-types/host-app/components/ai-assistant/skill-menu/index.gts +190 -0
- package/bundled-types/host-app/components/ai-assistant/skill-menu/skill-toggle.gts +168 -0
- package/bundled-types/host-app/components/ai-assistant/skill-menu/usage.gts +48 -0
- package/bundled-types/host-app/components/ai-assistant/toast.gts +293 -0
- package/bundled-types/host-app/components/card-catalog/modal.gts +579 -0
- package/bundled-types/host-app/components/card-error.gts +41 -0
- package/bundled-types/host-app/components/card-instance-picker/index.gts +54 -0
- package/bundled-types/host-app/components/card-pill.gts +189 -0
- package/bundled-types/host-app/components/card-prerender.gts +880 -0
- package/bundled-types/host-app/components/card-renderer.gts +84 -0
- package/bundled-types/host-app/components/card-search/constants.ts +76 -0
- package/bundled-types/host-app/components/card-search/item-button.gts +243 -0
- package/bundled-types/host-app/components/card-search/panel.gts +150 -0
- package/bundled-types/host-app/components/card-search/search-bar.gts +218 -0
- package/bundled-types/host-app/components/card-search/search-content.gts +604 -0
- package/bundled-types/host-app/components/card-search/search-result-header.gts +165 -0
- package/bundled-types/host-app/components/card-search/search-result-section.gts +545 -0
- package/bundled-types/host-app/components/card-search/section-header.gts +117 -0
- package/bundled-types/host-app/components/editor/directory.gts +308 -0
- package/bundled-types/host-app/components/editor/file-tree.gts +69 -0
- package/bundled-types/host-app/components/editor/import-module.gts +27 -0
- package/bundled-types/host-app/components/editor/indexed-file-tree.gts +572 -0
- package/bundled-types/host-app/components/editor/recent-files.gts +141 -0
- package/bundled-types/host-app/components/file-pill.gts +206 -0
- package/bundled-types/host-app/components/head-format-preview.gts +781 -0
- package/bundled-types/host-app/components/host-mode/breadcrumb-item.gts +150 -0
- package/bundled-types/host-app/components/host-mode/breadcrumbs.gts +131 -0
- package/bundled-types/host-app/components/host-mode/card.gts +199 -0
- package/bundled-types/host-app/components/host-mode/content.gts +195 -0
- package/bundled-types/host-app/components/host-mode/stack-item.gts +310 -0
- package/bundled-types/host-app/components/host-mode/stack.gts +91 -0
- package/bundled-types/host-app/components/matrix/auth-container.gts +66 -0
- package/bundled-types/host-app/components/matrix/auth.gts +73 -0
- package/bundled-types/host-app/components/matrix/forgot-password.gts +487 -0
- package/bundled-types/host-app/components/matrix/login.gts +241 -0
- package/bundled-types/host-app/components/matrix/register-user.gts +843 -0
- package/bundled-types/host-app/components/matrix/room-message-command.gts +330 -0
- package/bundled-types/host-app/components/matrix/room-message.gts +261 -0
- package/bundled-types/host-app/components/matrix/room.gts +1872 -0
- package/bundled-types/host-app/components/matrix/user-profile.gts +99 -0
- package/bundled-types/host-app/components/modal-container.gts +171 -0
- package/bundled-types/host-app/components/operator-mode/binary-file-info.gts +77 -0
- package/bundled-types/host-app/components/operator-mode/card-adoption-chain.gts +99 -0
- package/bundled-types/host-app/components/operator-mode/card-error-detail.gts +87 -0
- package/bundled-types/host-app/components/operator-mode/card-error.gts +177 -0
- package/bundled-types/host-app/components/operator-mode/card-schema-editor.gts +616 -0
- package/bundled-types/host-app/components/operator-mode/card-url-bar.gts +197 -0
- package/bundled-types/host-app/components/operator-mode/choose-file-modal.gts +562 -0
- package/bundled-types/host-app/components/operator-mode/choose-subscription-plan-modal.gts +517 -0
- package/bundled-types/host-app/components/operator-mode/code-editor.gts +736 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/editor-indicator.gts +128 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/format-chooser.gts +589 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/inner-container.gts +162 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/left-panel-toggle.gts +267 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/module-inspector.gts +836 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/field-chooser-modal.gts +97 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/instance-chooser-dropdown.gts +346 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground-background.png +0 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground-panel.gts +1274 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground-preview.gts +155 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/playground.gts +98 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/playground/spec-search.gts +70 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/schema-editor.gts +205 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/spec-preview-badge.gts +72 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/spec-preview.gts +432 -0
- package/bundled-types/host-app/components/operator-mode/code-submode/toggle-button.gts +72 -0
- package/bundled-types/host-app/components/operator-mode/code-submode.gts +1030 -0
- package/bundled-types/host-app/components/operator-mode/container.gts +270 -0
- package/bundled-types/host-app/components/operator-mode/context-menu-button.gts +95 -0
- package/bundled-types/host-app/components/operator-mode/copy-button.gts +277 -0
- package/bundled-types/host-app/components/operator-mode/create-file-modal.gts +1087 -0
- package/bundled-types/host-app/components/operator-mode/create-listing-modal.gts +513 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/base.gts +222 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/clickable.gts +59 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/divider.gts +48 -0
- package/bundled-types/host-app/components/operator-mode/definition-container/index.gts +108 -0
- package/bundled-types/host-app/components/operator-mode/delete-modal.gts +123 -0
- package/bundled-types/host-app/components/operator-mode/detail-panel-selector.gts +320 -0
- package/bundled-types/host-app/components/operator-mode/detail-panel.gts +834 -0
- package/bundled-types/host-app/components/operator-mode/edit-field-modal.gts +450 -0
- package/bundled-types/host-app/components/operator-mode/error-display.gts +590 -0
- package/bundled-types/host-app/components/operator-mode/host-submode/open-site-popover.gts +127 -0
- package/bundled-types/host-app/components/operator-mode/host-submode/publishing-realm-popover.gts +159 -0
- package/bundled-types/host-app/components/operator-mode/host-submode.gts +373 -0
- package/bundled-types/host-app/components/operator-mode/interact-submode/neighbor-stack-trigger.gts +116 -0
- package/bundled-types/host-app/components/operator-mode/interact-submode.gts +1021 -0
- package/bundled-types/host-app/components/operator-mode/new-file-button.gts +187 -0
- package/bundled-types/host-app/components/operator-mode/operator-mode-overlays.gts +511 -0
- package/bundled-types/host-app/components/operator-mode/overlays.gts +342 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/fitted-format-gallery.gts +127 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/index.gts +443 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/markdown-preview.gts +175 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/metadata-panel.gts +214 -0
- package/bundled-types/host-app/components/operator-mode/preview-panel/rendered-markdown.gts +718 -0
- package/bundled-types/host-app/components/operator-mode/private-dependency-violation.gts +70 -0
- package/bundled-types/host-app/components/operator-mode/profile/profile-email.gts +686 -0
- package/bundled-types/host-app/components/operator-mode/profile/profile-settings-modal.gts +454 -0
- package/bundled-types/host-app/components/operator-mode/profile/profile-subscription.gts +170 -0
- package/bundled-types/host-app/components/operator-mode/profile-info-popover.gts +263 -0
- package/bundled-types/host-app/components/operator-mode/publish-realm-modal.gts +1529 -0
- package/bundled-types/host-app/components/operator-mode/remove-field-modal.gts +135 -0
- package/bundled-types/host-app/components/operator-mode/send-error-to-ai-assistant.gts +195 -0
- package/bundled-types/host-app/components/operator-mode/stack-item.gts +1341 -0
- package/bundled-types/host-app/components/operator-mode/stack.gts +191 -0
- package/bundled-types/host-app/components/operator-mode/submode-layout.gts +781 -0
- package/bundled-types/host-app/components/operator-mode/syntax-error-display.gts +72 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/add-workspace.gts +282 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/index.gts +299 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/item-container.gts +50 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/workspace-loading-indicator.gts +50 -0
- package/bundled-types/host-app/components/operator-mode/workspace-chooser/workspace.gts +1079 -0
- package/bundled-types/host-app/components/pill-menu/index.gts +281 -0
- package/bundled-types/host-app/components/pill-menu/usage.gts +64 -0
- package/bundled-types/host-app/components/prerendered-card-search.gts +274 -0
- package/bundled-types/host-app/components/realm-dropdown.gts +209 -0
- package/bundled-types/host-app/components/realm-picker/index.gts +142 -0
- package/bundled-types/host-app/components/search-sheet/index.gts +426 -0
- package/bundled-types/host-app/components/search-sheet/usage.gts +99 -0
- package/bundled-types/host-app/components/submode-switcher.gts +260 -0
- package/bundled-types/host-app/components/type-picker/index.gts +111 -0
- package/bundled-types/host-app/components/with-known-realms-loaded.gts +47 -0
- package/bundled-types/host-app/components/with-loaded-realm.gts +39 -0
- package/bundled-types/host-app/components/with-subscription-data.gts +247 -0
- package/bundled-types/host-app/config/environment.ts +66 -0
- package/bundled-types/host-app/deprecation-workflow.js +30 -0
- package/bundled-types/host-app/lib/browser-queue.ts +198 -0
- package/bundled-types/host-app/lib/codemirror-context.ts +1081 -0
- package/bundled-types/host-app/lib/command-definitions.ts +41 -0
- package/bundled-types/host-app/lib/download-realm.ts +9 -0
- package/bundled-types/host-app/lib/example-card-helpers.ts +99 -0
- package/bundled-types/host-app/lib/externals.ts +247 -0
- package/bundled-types/host-app/lib/field-path-parser.ts +520 -0
- package/bundled-types/host-app/lib/file-def-manager.ts +712 -0
- package/bundled-types/host-app/lib/file-upload-state.ts +6 -0
- package/bundled-types/host-app/lib/formatted-message/utils.ts +272 -0
- package/bundled-types/host-app/lib/gc-card-store.ts +1084 -0
- package/bundled-types/host-app/lib/host-base-command.ts +29 -0
- package/bundled-types/host-app/lib/html-component.ts +144 -0
- package/bundled-types/host-app/lib/html-to-markdown.ts +96 -0
- package/bundled-types/host-app/lib/isolated-render.gts +90 -0
- package/bundled-types/host-app/lib/known-file-meta-urls.ts +17 -0
- package/bundled-types/host-app/lib/limited-set.ts +68 -0
- package/bundled-types/host-app/lib/matrix-classes/member.ts +28 -0
- package/bundled-types/host-app/lib/matrix-classes/message-builder.ts +444 -0
- package/bundled-types/host-app/lib/matrix-classes/message-code-patch-result.ts +44 -0
- package/bundled-types/host-app/lib/matrix-classes/message-command.ts +109 -0
- package/bundled-types/host-app/lib/matrix-classes/message.ts +239 -0
- package/bundled-types/host-app/lib/matrix-classes/room.ts +174 -0
- package/bundled-types/host-app/lib/matrix-utils.ts +114 -0
- package/bundled-types/host-app/lib/mutex.ts +62 -0
- package/bundled-types/host-app/lib/prerender-fetch-headers.ts +46 -0
- package/bundled-types/host-app/lib/prerender-util.ts +31 -0
- package/bundled-types/host-app/lib/public-path.ts +1 -0
- package/bundled-types/host-app/lib/random-name.ts +26 -0
- package/bundled-types/host-app/lib/realm-utils.ts +45 -0
- package/bundled-types/host-app/lib/search-cache-key.ts +33 -0
- package/bundled-types/host-app/lib/search-in-flight-key.ts +28 -0
- package/bundled-types/host-app/lib/search-replace-block-parsing.ts +101 -0
- package/bundled-types/host-app/lib/setup-globals.ts +15 -0
- package/bundled-types/host-app/lib/sqlite-adapter.ts +510 -0
- package/bundled-types/host-app/lib/stack-item.ts +164 -0
- package/bundled-types/host-app/lib/utils.ts +84 -0
- package/bundled-types/host-app/lib/window-error-handler.ts +132 -0
- package/bundled-types/host-app/router.ts +31 -0
- package/bundled-types/host-app/services/ai-assistant-panel-service.ts +850 -0
- package/bundled-types/host-app/services/billing-service.ts +208 -0
- package/bundled-types/host-app/services/card-service.ts +373 -0
- package/bundled-types/host-app/services/card-type-service.ts +226 -0
- package/bundled-types/host-app/services/code-semantics-service.ts +297 -0
- package/bundled-types/host-app/services/command-service.ts +975 -0
- package/bundled-types/host-app/services/environment-service.ts +26 -0
- package/bundled-types/host-app/services/error-display.ts +42 -0
- package/bundled-types/host-app/services/file-upload.ts +212 -0
- package/bundled-types/host-app/services/host-mode-service.ts +381 -0
- package/bundled-types/host-app/services/host-mode-state-service.ts +160 -0
- package/bundled-types/host-app/services/loader-service.ts +148 -0
- package/bundled-types/host-app/services/local-indexer.ts +68 -0
- package/bundled-types/host-app/services/local-persistence-service.ts +296 -0
- package/bundled-types/host-app/services/logger-service.ts +13 -0
- package/bundled-types/host-app/services/matrix-sdk-loader.ts +346 -0
- package/bundled-types/host-app/services/matrix-service.ts +2287 -0
- package/bundled-types/host-app/services/message-service.ts +84 -0
- package/bundled-types/host-app/services/module-contents-service.ts +333 -0
- package/bundled-types/host-app/services/monaco-service.ts +333 -0
- package/bundled-types/host-app/services/network.ts +101 -0
- package/bundled-types/host-app/services/operator-mode-state-service.ts +1591 -0
- package/bundled-types/host-app/services/playground-panel-service.ts +236 -0
- package/bundled-types/host-app/services/queue.ts +30 -0
- package/bundled-types/host-app/services/realm-info-service.ts +37 -0
- package/bundled-types/host-app/services/realm-server.ts +1209 -0
- package/bundled-types/host-app/services/realm.ts +1413 -0
- package/bundled-types/host-app/services/recent-cards-service.ts +174 -0
- package/bundled-types/host-app/services/recent-files-service.ts +224 -0
- package/bundled-types/host-app/services/render-error-state.ts +55 -0
- package/bundled-types/host-app/services/render-service.ts +362 -0
- package/bundled-types/host-app/services/render-store.ts +27 -0
- package/bundled-types/host-app/services/reset.ts +19 -0
- package/bundled-types/host-app/services/scroll-position-service.ts +81 -0
- package/bundled-types/host-app/services/spec-panel-service.ts +107 -0
- package/bundled-types/host-app/services/store.ts +2540 -0
- package/bundled-types/host-app/utils/assert-never.ts +3 -0
- package/bundled-types/host-app/utils/auth-error-guard.ts +183 -0
- package/bundled-types/host-app/utils/auth-service-worker-registration.ts +123 -0
- package/bundled-types/host-app/utils/card-search/query-builder.ts +169 -0
- package/bundled-types/host-app/utils/card-search/section-pagination.ts +57 -0
- package/bundled-types/host-app/utils/card-search/sections.ts +240 -0
- package/bundled-types/host-app/utils/card-search/type-filter.ts +124 -0
- package/bundled-types/host-app/utils/card-search/types.ts +11 -0
- package/bundled-types/host-app/utils/card-search/url.ts +23 -0
- package/bundled-types/host-app/utils/clipboard.ts +23 -0
- package/bundled-types/host-app/utils/editor/boxel-formatter.ts +65 -0
- package/bundled-types/host-app/utils/editor/editor-language.ts +88 -0
- package/bundled-types/host-app/utils/editor/monaco-test-waiter.ts +302 -0
- package/bundled-types/host-app/utils/file-def-attributes-extractor.ts +438 -0
- package/bundled-types/host-app/utils/file-name.ts +38 -0
- package/bundled-types/host-app/utils/id-from-card-or-url.ts +11 -0
- package/bundled-types/host-app/utils/lint-formatting.ts +57 -0
- package/bundled-types/host-app/utils/local-storage-keys.ts +28 -0
- package/bundled-types/host-app/utils/normalized-dir-path.ts +3 -0
- package/bundled-types/host-app/utils/prettify-messages.ts +21 -0
- package/bundled-types/host-app/utils/prettify-prompts.ts +21 -0
- package/bundled-types/host-app/utils/realm-index-boilerplate.ts +27 -0
- package/bundled-types/host-app/utils/register-boxel-transition.ts +17 -0
- package/bundled-types/host-app/utils/render-desync-detector.ts +362 -0
- package/bundled-types/host-app/utils/render-error.ts +455 -0
- package/bundled-types/host-app/utils/render-timer-stub.ts +249 -0
- package/bundled-types/host-app/utils/run-while-active.ts +14 -0
- package/bundled-types/host-app/utils/schema-editor.ts +25 -0
- package/bundled-types/host-app/utils/text-suggestion.ts +82 -0
- package/bundled-types/host-app/utils/titleize.ts +10 -0
- package/bundled-types/host-app/utils/uuid.ts +13 -0
- package/bundled-types/host-tests/helpers/adapter.ts +464 -0
- package/bundled-types/host-tests/helpers/base-realm.ts +464 -0
- package/bundled-types/host-tests/helpers/cards/view-card-demo.ts +119 -0
- package/bundled-types/host-tests/helpers/field-test-helpers.gts +54 -0
- package/bundled-types/host-tests/helpers/image-fixture.ts +3 -0
- package/bundled-types/host-tests/helpers/index.gts +2099 -0
- package/bundled-types/host-tests/helpers/indexer.ts +293 -0
- package/bundled-types/host-tests/helpers/interact-submode-setup.gts +551 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_client.ts +1042 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_sdk.ts +71 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_server-state.ts +343 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_sliding-sync.ts +140 -0
- package/bundled-types/host-tests/helpers/mock-matrix/_utils.ts +146 -0
- package/bundled-types/host-tests/helpers/mock-matrix.ts +200 -0
- package/bundled-types/host-tests/helpers/operator-mode-parameters-match.ts +71 -0
- package/bundled-types/host-tests/helpers/operator-mode-state.ts +18 -0
- package/bundled-types/host-tests/helpers/percy-snapshot.ts +228 -0
- package/bundled-types/host-tests/helpers/playground.ts +130 -0
- package/bundled-types/host-tests/helpers/realm-server-mock/index.ts +100 -0
- package/bundled-types/host-tests/helpers/realm-server-mock/routes.ts +617 -0
- package/bundled-types/host-tests/helpers/realm-server-mock/types.ts +24 -0
- package/bundled-types/host-tests/helpers/recent-files-cards.ts +86 -0
- package/bundled-types/host-tests/helpers/render-component.ts +40 -0
- package/bundled-types/host-tests/helpers/setup-qunit.js +164 -0
- package/bundled-types/host-tests/helpers/setup.ts +349 -0
- package/bundled-types/host-tests/helpers/shard-warmup.ts +72 -0
- package/bundled-types/host-tests/helpers/stream.ts +60 -0
- package/bundled-types/host-tests/helpers/test-auth.ts +27 -0
- package/bundled-types/host-tests/helpers/test-realm-registry.ts +23 -0
- package/bundled-types/host-tests/helpers/test-realm-service-worker.ts +92 -0
- package/bundled-types/host-tests/helpers/uncaught-exceptions.ts +16 -0
- package/bundled-types/host-tests/helpers/visit-operator-mode.ts +39 -0
- package/bundled-types/host-types/@cardstack/host/index.d.ts +3 -0
- package/bundled-types/host-types/@joplin/turndown-plugin-gfm/index.d.ts +15 -0
- package/bundled-types/host-types/@sqlite.org/sqlite-wasm/index.d.ts +122 -0
- package/bundled-types/host-types/ember-click-outside/modifiers/on-click-outside.ts +16 -0
- package/bundled-types/host-types/ember-concurrency/helpers/perform.d.ts +3 -0
- package/bundled-types/host-types/ember-css-url/index.d.ts +15 -0
- package/bundled-types/host-types/ember-data/types/registries/model.d.ts +6 -0
- package/bundled-types/host-types/ember-elsewhere/from-elsewhere.d.ts +12 -0
- package/bundled-types/host-types/ember-elsewhere/to-elsewhere.d.ts +16 -0
- package/bundled-types/host-types/ember-focus-trap/index.d.ts +4 -0
- package/bundled-types/host-types/ember-keyboard/modifiers/on-key.d.ts +15 -0
- package/bundled-types/host-types/index.d.ts +6 -0
- package/bundled-types/local-types/eslint-js.d.ts +5 -0
- package/bundled-types/local-types/index.d.ts +115 -0
- package/bundled-types/local-types/marked-gfm-heading-id.d.ts +12 -0
- package/bundled-types/local-types/matrix-js-sdk/index.d.ts +11 -0
- package/bundled-types/local-types/package.json +13 -0
- package/bundled-types/shims/boxel-cli-shims.d.ts +10 -0
- package/dist/index.js +100 -100
- package/package.json +13 -7
- package/src/commands/parse.ts +277 -34
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
import { registerDestructor } from '@ember/destroyable';
|
|
2
|
+
import { on } from '@ember/modifier';
|
|
3
|
+
import { service } from '@ember/service';
|
|
4
|
+
import Component from '@glimmer/component';
|
|
5
|
+
import { tracked } from '@glimmer/tracking';
|
|
6
|
+
|
|
7
|
+
import { dropTask } from 'ember-concurrency';
|
|
8
|
+
|
|
9
|
+
import perform from 'ember-concurrency/helpers/perform';
|
|
10
|
+
|
|
11
|
+
import { CopyButton, Button } from '@cardstack/boxel-ui/components';
|
|
12
|
+
import {
|
|
13
|
+
DropdownArrowDown,
|
|
14
|
+
DropdownArrowUp,
|
|
15
|
+
Warning,
|
|
16
|
+
} from '@cardstack/boxel-ui/icons';
|
|
17
|
+
|
|
18
|
+
import SwitchSubmodeCommand from '@cardstack/host/commands/switch-submode';
|
|
19
|
+
import type CommandService from '@cardstack/host/services/command-service';
|
|
20
|
+
|
|
21
|
+
import type ErrorDisplayService from '@cardstack/host/services/error-display';
|
|
22
|
+
import type { DisplayedErrorProvider } from '@cardstack/host/services/error-display';
|
|
23
|
+
|
|
24
|
+
import type { FileDef } from 'https://cardstack.com/base/file-api';
|
|
25
|
+
import type { BoxelErrorForContext } from 'https://cardstack.com/base/matrix-event';
|
|
26
|
+
|
|
27
|
+
import SendErrorToAIAssistant from './send-error-to-ai-assistant';
|
|
28
|
+
|
|
29
|
+
interface Signature {
|
|
30
|
+
Element: HTMLElement;
|
|
31
|
+
Args: {
|
|
32
|
+
type: 'syntax' | 'runtime';
|
|
33
|
+
headerText?: string;
|
|
34
|
+
message?: string;
|
|
35
|
+
stack?: string;
|
|
36
|
+
// CS-10872: structured prerender-timeout diagnostics carried from
|
|
37
|
+
// the error doc's meta.diagnostics. Rendered in the details section
|
|
38
|
+
// beneath the stack trace so operators can classify a timeout
|
|
39
|
+
// without opening the DB or correlating CloudWatch logs.
|
|
40
|
+
diagnostics?: Record<string, unknown>;
|
|
41
|
+
// CS-10977: additional errors carried on the error doc — typically
|
|
42
|
+
// browser console errors captured by the prerender runner.
|
|
43
|
+
// Shown as a collapsed list under the stack trace so the operator
|
|
44
|
+
// can see the underlying template throw that the runloop swallowed.
|
|
45
|
+
additionalErrors?: Array<{
|
|
46
|
+
message?: string;
|
|
47
|
+
stack?: string;
|
|
48
|
+
status?: number;
|
|
49
|
+
title?: string;
|
|
50
|
+
}> | null;
|
|
51
|
+
openDetails?: boolean;
|
|
52
|
+
fileToAttach?: FileDef;
|
|
53
|
+
viewInCodeMode?: boolean;
|
|
54
|
+
cardId?: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Truncation budgets for the human-facing pane. The serialized error doc
|
|
59
|
+
// is already clamped server-side (see clampSerializedError), but the
|
|
60
|
+
// operator shouldn't see a 64KiB stack trace inline. These count UTF-16
|
|
61
|
+
// code units (string.length), not bytes.
|
|
62
|
+
const ADDITIONAL_ERRORS_DISPLAY_LIMIT = 20;
|
|
63
|
+
const ADDITIONAL_ERROR_MESSAGE_MAX_CHARS = 2 * 1024;
|
|
64
|
+
const ADDITIONAL_ERROR_STACK_MAX_CHARS = 4 * 1024;
|
|
65
|
+
|
|
66
|
+
// Tighter budget for the context payload that flows to AI assistant
|
|
67
|
+
// chat sends via getError() / errorsDisplayed. Every chat message
|
|
68
|
+
// includes this on every error currently visible, so it has to fit
|
|
69
|
+
// well below the Matrix event size limit even with multiple errors
|
|
70
|
+
// on screen. Tuned for ~7-8KB max per error.
|
|
71
|
+
const ADDITIONAL_ERRORS_CONTEXT_LIMIT = 5;
|
|
72
|
+
const ADDITIONAL_ERROR_CONTEXT_MESSAGE_MAX_CHARS = 512;
|
|
73
|
+
const ADDITIONAL_ERROR_CONTEXT_STACK_MAX_CHARS = 1024;
|
|
74
|
+
const CONTEXT_STACK_MAX_CHARS = 4 * 1024;
|
|
75
|
+
const CONTEXT_MESSAGE_MAX_CHARS = 2 * 1024;
|
|
76
|
+
|
|
77
|
+
const TRUNCATION_SUFFIX = ' …[truncated]';
|
|
78
|
+
|
|
79
|
+
function truncate(s: string | undefined, max: number): string | undefined {
|
|
80
|
+
if (s == null) return s;
|
|
81
|
+
if (s.length <= max) return s;
|
|
82
|
+
let body = Math.max(0, max - TRUNCATION_SUFFIX.length);
|
|
83
|
+
return s.slice(0, body) + TRUNCATION_SUFFIX;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export default class ErrorDisplay
|
|
87
|
+
extends Component<Signature>
|
|
88
|
+
implements DisplayedErrorProvider
|
|
89
|
+
{
|
|
90
|
+
@tracked private showDetails = this.args.openDetails ?? false;
|
|
91
|
+
|
|
92
|
+
@service declare private commandService: CommandService;
|
|
93
|
+
@service declare private errorDisplay: ErrorDisplayService;
|
|
94
|
+
|
|
95
|
+
constructor(owner: any, args: any) {
|
|
96
|
+
super(owner, args);
|
|
97
|
+
this.errorDisplay.register(this);
|
|
98
|
+
registerDestructor(this, () => this.errorDisplay.unregister(this));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
private viewInCodeMode = dropTask(async () => {
|
|
102
|
+
let switchSubmodeCommand = new SwitchSubmodeCommand(
|
|
103
|
+
this.commandService.commandContext,
|
|
104
|
+
);
|
|
105
|
+
await switchSubmodeCommand.execute({
|
|
106
|
+
submode: 'code',
|
|
107
|
+
codePath: `${this.args.cardId}.json`,
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
private toggleDetails = () => (this.showDetails = !this.showDetails);
|
|
112
|
+
|
|
113
|
+
// Payload for CopyButton (clipboard copy, no transit constraint) and
|
|
114
|
+
// the Fix-with-AI button (which applies its own AI-prompt budget on
|
|
115
|
+
// top). Uses the display-pane bounds so users get the same view they
|
|
116
|
+
// see in the overlay.
|
|
117
|
+
private get errorObject() {
|
|
118
|
+
return {
|
|
119
|
+
message: this.args.message ?? '',
|
|
120
|
+
stack: this.args.stack,
|
|
121
|
+
additionalErrors: this.normalizedAdditionalErrors,
|
|
122
|
+
diagnostics: this.args.diagnostics,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
private get normalizedAdditionalErrors():
|
|
127
|
+
| Array<{
|
|
128
|
+
message?: string;
|
|
129
|
+
stack?: string;
|
|
130
|
+
status?: number;
|
|
131
|
+
title?: string;
|
|
132
|
+
}>
|
|
133
|
+
| undefined {
|
|
134
|
+
return this.boundAdditionalErrors(
|
|
135
|
+
ADDITIONAL_ERRORS_DISPLAY_LIMIT,
|
|
136
|
+
ADDITIONAL_ERROR_MESSAGE_MAX_CHARS,
|
|
137
|
+
ADDITIONAL_ERROR_STACK_MAX_CHARS,
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
private get contextAdditionalErrors():
|
|
142
|
+
| Array<{
|
|
143
|
+
message?: string;
|
|
144
|
+
stack?: string;
|
|
145
|
+
status?: number;
|
|
146
|
+
title?: string;
|
|
147
|
+
}>
|
|
148
|
+
| undefined {
|
|
149
|
+
return this.boundAdditionalErrors(
|
|
150
|
+
ADDITIONAL_ERRORS_CONTEXT_LIMIT,
|
|
151
|
+
ADDITIONAL_ERROR_CONTEXT_MESSAGE_MAX_CHARS,
|
|
152
|
+
ADDITIONAL_ERROR_CONTEXT_STACK_MAX_CHARS,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
private boundAdditionalErrors(
|
|
157
|
+
entryLimit: number,
|
|
158
|
+
messageMax: number,
|
|
159
|
+
stackMax: number,
|
|
160
|
+
):
|
|
161
|
+
| Array<{
|
|
162
|
+
message?: string;
|
|
163
|
+
stack?: string;
|
|
164
|
+
status?: number;
|
|
165
|
+
title?: string;
|
|
166
|
+
}>
|
|
167
|
+
| undefined {
|
|
168
|
+
let raw = this.args.additionalErrors;
|
|
169
|
+
if (!raw || raw.length === 0) return undefined;
|
|
170
|
+
let entries = raw.slice(0, entryLimit).map((e) => ({
|
|
171
|
+
message: truncate(e?.message, messageMax),
|
|
172
|
+
stack: truncate(e?.stack, stackMax),
|
|
173
|
+
status: e?.status,
|
|
174
|
+
title: e?.title,
|
|
175
|
+
}));
|
|
176
|
+
if (raw.length > entryLimit) {
|
|
177
|
+
let omitted = raw.length - entryLimit;
|
|
178
|
+
entries.push({
|
|
179
|
+
title: 'Errors omitted',
|
|
180
|
+
message: `${omitted} additional errors hidden`,
|
|
181
|
+
stack: undefined,
|
|
182
|
+
status: undefined,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
return entries;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
private get additionalErrorsCount(): number {
|
|
189
|
+
return this.args.additionalErrors?.length ?? 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// diagnostics/additionalErrors can in principle contain
|
|
193
|
+
// non-JSON-serializable values (circulars, getters that throw). Fall
|
|
194
|
+
// back to the minimal payload so the overlay never breaks on a copy
|
|
195
|
+
// request.
|
|
196
|
+
private get errorText() {
|
|
197
|
+
try {
|
|
198
|
+
return JSON.stringify(this.errorObject);
|
|
199
|
+
} catch {
|
|
200
|
+
return JSON.stringify({
|
|
201
|
+
message: this.args.message ?? '',
|
|
202
|
+
stack: this.args.stack,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// errorsDisplayed flows on every chat message context build (see
|
|
208
|
+
// OperatorModeStateService.getSummaryForAIBot → errorDisplay
|
|
209
|
+
// .getDisplayedErrors), so this payload has to stay small even with
|
|
210
|
+
// multiple errors visible. Tighter than errorObject's display bounds:
|
|
211
|
+
// 5 entries, 1KiB stack, 512B message per entry, plus top-level
|
|
212
|
+
// message/stack capped. Fix-with-AI receives errorObject directly
|
|
213
|
+
// (full display bounds) and runs its own AI-prompt budget on top.
|
|
214
|
+
getError(): BoxelErrorForContext {
|
|
215
|
+
return {
|
|
216
|
+
message:
|
|
217
|
+
truncate(this.args.message ?? '', CONTEXT_MESSAGE_MAX_CHARS) ?? '',
|
|
218
|
+
stack: truncate(this.args.stack, CONTEXT_STACK_MAX_CHARS),
|
|
219
|
+
additionalErrors: this.contextAdditionalErrors,
|
|
220
|
+
diagnostics: this.args.diagnostics,
|
|
221
|
+
sourceUrl: this.args.fileToAttach?.sourceUrl,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
private get headerText() {
|
|
226
|
+
return this.args.headerText ?? `${this.args.type} Error`;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// CS-10872: pretty-print the diagnostics block so the details
|
|
230
|
+
// section is human-readable at a glance. JSON.stringify with indent
|
|
231
|
+
// keeps the structure (waits sub-object, per-item arrays) visible
|
|
232
|
+
// without imposing a bespoke layout on every possible field.
|
|
233
|
+
private get diagnosticsText(): string | undefined {
|
|
234
|
+
let d = this.args.diagnostics;
|
|
235
|
+
if (!d || typeof d !== 'object' || Object.keys(d).length === 0) {
|
|
236
|
+
return undefined;
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
return JSON.stringify(d, null, 2);
|
|
240
|
+
} catch {
|
|
241
|
+
return undefined;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Summary line: pick the small handful of fields that nearly always
|
|
246
|
+
// point at the triage category (see
|
|
247
|
+
// .claude/skills/prerender-timeout-diagnostics/SKILL.md). Shown
|
|
248
|
+
// above the full JSON so operators don't have to parse the block.
|
|
249
|
+
private get diagnosticsSummary(): string | undefined {
|
|
250
|
+
let d = this.args.diagnostics as
|
|
251
|
+
| {
|
|
252
|
+
launchMs?: number;
|
|
253
|
+
renderElapsedMs?: number;
|
|
254
|
+
totalElapsedMs?: number;
|
|
255
|
+
waits?: {
|
|
256
|
+
semaphoreMs?: number;
|
|
257
|
+
tabQueueMs?: number;
|
|
258
|
+
tabStartupMs?: number;
|
|
259
|
+
};
|
|
260
|
+
renderStage?: string;
|
|
261
|
+
stageAgeMs?: number;
|
|
262
|
+
requestId?: string;
|
|
263
|
+
}
|
|
264
|
+
| undefined;
|
|
265
|
+
if (!d) return undefined;
|
|
266
|
+
let parts: string[] = [];
|
|
267
|
+
if (typeof d.totalElapsedMs === 'number') {
|
|
268
|
+
parts.push(`total=${d.totalElapsedMs}ms`);
|
|
269
|
+
}
|
|
270
|
+
if (typeof d.launchMs === 'number') {
|
|
271
|
+
let waits = d.waits;
|
|
272
|
+
if (
|
|
273
|
+
waits &&
|
|
274
|
+
(typeof waits.semaphoreMs === 'number' ||
|
|
275
|
+
typeof waits.tabQueueMs === 'number' ||
|
|
276
|
+
typeof waits.tabStartupMs === 'number')
|
|
277
|
+
) {
|
|
278
|
+
parts.push(
|
|
279
|
+
`launch=${d.launchMs}ms (semaphore=${waits.semaphoreMs ?? 0}ms, tabQueue=${waits.tabQueueMs ?? 0}ms, tabStartup=${waits.tabStartupMs ?? 0}ms)`,
|
|
280
|
+
);
|
|
281
|
+
} else {
|
|
282
|
+
parts.push(`launch=${d.launchMs}ms`);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if (typeof d.renderElapsedMs === 'number') {
|
|
286
|
+
parts.push(`render=${d.renderElapsedMs}ms`);
|
|
287
|
+
}
|
|
288
|
+
if (d.renderStage) {
|
|
289
|
+
parts.push(
|
|
290
|
+
typeof d.stageAgeMs === 'number'
|
|
291
|
+
? `stage=${d.renderStage} (age=${d.stageAgeMs}ms)`
|
|
292
|
+
: `stage=${d.renderStage}`,
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
if (d.requestId) {
|
|
296
|
+
parts.push(`requestId=${d.requestId}`);
|
|
297
|
+
}
|
|
298
|
+
return parts.length > 0 ? parts.join(' · ') : undefined;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
<template>
|
|
302
|
+
<div class='error-display' data-test-error-display>
|
|
303
|
+
<div class='error-header'>
|
|
304
|
+
<div class='error-type' data-test-error-type>
|
|
305
|
+
<Warning class='error-icon' />
|
|
306
|
+
<span>{{this.headerText}}</span>
|
|
307
|
+
</div>
|
|
308
|
+
{{#if @fileToAttach}}
|
|
309
|
+
<SendErrorToAIAssistant
|
|
310
|
+
@error={{this.errorObject}}
|
|
311
|
+
@errorType={{@type}}
|
|
312
|
+
@fileToAttach={{@fileToAttach}}
|
|
313
|
+
/>
|
|
314
|
+
{{/if}}
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
{{#if @message}}
|
|
318
|
+
<div class='error-message' data-test-error-message>
|
|
319
|
+
{{@message}}
|
|
320
|
+
</div>
|
|
321
|
+
{{/if}}
|
|
322
|
+
|
|
323
|
+
<div class='error-actions'>
|
|
324
|
+
<CopyButton
|
|
325
|
+
@textToCopy={{this.errorText}}
|
|
326
|
+
@width='16px'
|
|
327
|
+
@heigth='16px'
|
|
328
|
+
/>
|
|
329
|
+
<Button
|
|
330
|
+
class='toggle-details-button'
|
|
331
|
+
@kind='text-only'
|
|
332
|
+
@size='extra-small'
|
|
333
|
+
{{on 'click' this.toggleDetails}}
|
|
334
|
+
data-test-toggle-details
|
|
335
|
+
>
|
|
336
|
+
{{if this.showDetails 'Hide Details' 'Show Details'}}
|
|
337
|
+
{{#if this.showDetails}}
|
|
338
|
+
<DropdownArrowUp width='12px' height='12px' />
|
|
339
|
+
{{else}}
|
|
340
|
+
<DropdownArrowDown width='12px' height='12px' />
|
|
341
|
+
{{/if}}
|
|
342
|
+
</Button>
|
|
343
|
+
</div>
|
|
344
|
+
|
|
345
|
+
{{#if this.showDetails}}
|
|
346
|
+
<div class='error-details' data-test-error-details>
|
|
347
|
+
{{#if @viewInCodeMode}}
|
|
348
|
+
<div class='actions'>
|
|
349
|
+
<Button
|
|
350
|
+
data-test-view-in-code-mode-button
|
|
351
|
+
@kind='primary'
|
|
352
|
+
{{on 'click' (perform this.viewInCodeMode)}}
|
|
353
|
+
>View in Code Mode</Button>
|
|
354
|
+
</div>
|
|
355
|
+
{{/if}}
|
|
356
|
+
<div class='detail-item'>
|
|
357
|
+
<div class='detail-title'>Stack trace:</div>
|
|
358
|
+
{{#if @stack}}
|
|
359
|
+
<pre data-test-error-stack data-test-percy-hide>{{@stack}}</pre>
|
|
360
|
+
{{else}}
|
|
361
|
+
<p class='no-stack-message'>No stack trace is available. This
|
|
362
|
+
could be because the error occurred in a context where stack
|
|
363
|
+
traces are not captured, or the error was handled before a stack
|
|
364
|
+
trace could be generated.</p>
|
|
365
|
+
{{/if}}
|
|
366
|
+
</div>
|
|
367
|
+
{{#if this.diagnosticsText}}
|
|
368
|
+
<div class='detail-item' data-test-error-diagnostics>
|
|
369
|
+
<div class='detail-title'>Prerender diagnostics:</div>
|
|
370
|
+
{{#if this.diagnosticsSummary}}
|
|
371
|
+
<p
|
|
372
|
+
class='diagnostics-summary'
|
|
373
|
+
data-test-error-diagnostics-summary
|
|
374
|
+
>{{this.diagnosticsSummary}}</p>
|
|
375
|
+
{{/if}}
|
|
376
|
+
<pre
|
|
377
|
+
data-test-error-diagnostics-json
|
|
378
|
+
data-test-percy-hide
|
|
379
|
+
>{{this.diagnosticsText}}</pre>
|
|
380
|
+
</div>
|
|
381
|
+
{{/if}}
|
|
382
|
+
{{#if this.normalizedAdditionalErrors}}
|
|
383
|
+
<div
|
|
384
|
+
class='detail-item'
|
|
385
|
+
data-test-error-additional-errors
|
|
386
|
+
data-test-error-additional-errors-count={{this.additionalErrorsCount}}
|
|
387
|
+
>
|
|
388
|
+
<div class='detail-title'>Additional Errors:</div>
|
|
389
|
+
{{#each this.normalizedAdditionalErrors as |entry index|}}
|
|
390
|
+
<div
|
|
391
|
+
class='additional-error-entry'
|
|
392
|
+
data-test-error-additional-error
|
|
393
|
+
data-test-error-additional-error-index={{index}}
|
|
394
|
+
>
|
|
395
|
+
{{#if entry.title}}
|
|
396
|
+
<div
|
|
397
|
+
class='additional-error-heading'
|
|
398
|
+
data-test-error-additional-heading
|
|
399
|
+
>{{entry.title}}</div>
|
|
400
|
+
{{/if}}
|
|
401
|
+
{{#if entry.message}}
|
|
402
|
+
<p
|
|
403
|
+
class='additional-error-message'
|
|
404
|
+
data-test-error-additional-message
|
|
405
|
+
>{{entry.message}}</p>
|
|
406
|
+
{{/if}}
|
|
407
|
+
{{#if entry.stack}}
|
|
408
|
+
<pre
|
|
409
|
+
data-test-error-additional-stack
|
|
410
|
+
data-test-percy-hide
|
|
411
|
+
>{{entry.stack}}</pre>
|
|
412
|
+
{{/if}}
|
|
413
|
+
</div>
|
|
414
|
+
{{/each}}
|
|
415
|
+
</div>
|
|
416
|
+
{{/if}}
|
|
417
|
+
</div>
|
|
418
|
+
{{/if}}
|
|
419
|
+
</div>
|
|
420
|
+
|
|
421
|
+
<style scoped>
|
|
422
|
+
.error-display {
|
|
423
|
+
background: var(--boxel-warning-200);
|
|
424
|
+
border-radius: var(--boxel-border-radius-lg);
|
|
425
|
+
padding-bottom: var(--boxel-sp-xs);
|
|
426
|
+
color: black;
|
|
427
|
+
min-width: fit-content;
|
|
428
|
+
width: 100%;
|
|
429
|
+
box-shadow: var(--boxel-deep-box-shadow);
|
|
430
|
+
overflow: auto;
|
|
431
|
+
display: flex;
|
|
432
|
+
flex-direction: column;
|
|
433
|
+
gap: var(--boxel-sp-xs);
|
|
434
|
+
max-height: 100%;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.error-header {
|
|
438
|
+
display: flex;
|
|
439
|
+
justify-content: space-between;
|
|
440
|
+
align-items: center;
|
|
441
|
+
margin-bottom: var(--boxel-sp-xs);
|
|
442
|
+
flex-wrap: wrap;
|
|
443
|
+
gap: var(--boxel-sp-xs);
|
|
444
|
+
padding: var(--boxel-sp) var(--boxel-sp) 0 var(--boxel-sp);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.error-type {
|
|
448
|
+
display: flex;
|
|
449
|
+
align-items: center;
|
|
450
|
+
gap: var(--boxel-sp-xs);
|
|
451
|
+
font-weight: 600;
|
|
452
|
+
text-transform: uppercase;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.error-icon {
|
|
456
|
+
width: 20px;
|
|
457
|
+
height: 20px;
|
|
458
|
+
color: black;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.error-message {
|
|
462
|
+
font-size: var(--boxel-font-size-sm);
|
|
463
|
+
padding: 0 var(--boxel-sp) 0
|
|
464
|
+
calc(var(--boxel-sp) + 20px + var(--boxel-sp-xs));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.error-actions {
|
|
468
|
+
display: flex;
|
|
469
|
+
justify-content: flex-end;
|
|
470
|
+
align-items: center;
|
|
471
|
+
margin-top: var(--boxel-sp);
|
|
472
|
+
padding: 0 var(--boxel-sp);
|
|
473
|
+
|
|
474
|
+
--boxel-icon-button-height: 20px;
|
|
475
|
+
--boxel-icon-button-width: 20px;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.toggle-details-button {
|
|
479
|
+
padding: 0;
|
|
480
|
+
cursor: pointer;
|
|
481
|
+
display: flex;
|
|
482
|
+
align-items: center;
|
|
483
|
+
gap: var(--boxel-sp-xxs);
|
|
484
|
+
width: 100px;
|
|
485
|
+
justify-content: flex-end;
|
|
486
|
+
font-weight: 400;
|
|
487
|
+
border: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.toggle-details-button:hover {
|
|
491
|
+
background-color: transparent;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.error-details {
|
|
495
|
+
background: white;
|
|
496
|
+
padding: var(--boxel-sp);
|
|
497
|
+
width: 100%;
|
|
498
|
+
margin-bottom: calc(-1 * var(--boxel-sp));
|
|
499
|
+
overflow: auto;
|
|
500
|
+
scrollbar-width: thin;
|
|
501
|
+
flex: 1;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.error-details::-webkit-scrollbar {
|
|
505
|
+
width: 8px;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.error-details::-webkit-scrollbar-track {
|
|
509
|
+
background: var(--boxel-light);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.error-details::-webkit-scrollbar-thumb {
|
|
513
|
+
background: var(--boxel-dark);
|
|
514
|
+
border-radius: 4px;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.detail-item {
|
|
518
|
+
margin-bottom: var(--boxel-sp);
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.detail-item:last-child {
|
|
522
|
+
margin-bottom: 0;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.detail-title {
|
|
526
|
+
font-weight: 600;
|
|
527
|
+
margin-bottom: var(--boxel-sp-xs);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.detail-contents {
|
|
531
|
+
word-break: break-word;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
pre {
|
|
535
|
+
margin: 0;
|
|
536
|
+
white-space: pre-wrap;
|
|
537
|
+
word-break: break-all;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.no-stack-message {
|
|
541
|
+
color: var(--boxel-purple-700);
|
|
542
|
+
font-style: italic;
|
|
543
|
+
margin: 0;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.diagnostics-summary {
|
|
547
|
+
margin: 0 0 var(--boxel-sp-xs) 0;
|
|
548
|
+
font-family: var(--boxel-monospace-font-family, monospace);
|
|
549
|
+
font-size: var(--boxel-font-size-xs);
|
|
550
|
+
line-height: 1.5;
|
|
551
|
+
word-break: break-word;
|
|
552
|
+
background: #fff6d6;
|
|
553
|
+
padding: var(--boxel-sp-xs) var(--boxel-sp-xs);
|
|
554
|
+
border-radius: var(--boxel-border-radius);
|
|
555
|
+
border-left: 3px solid var(--boxel-warning-200);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.actions {
|
|
559
|
+
display: flex;
|
|
560
|
+
justify-content: center;
|
|
561
|
+
gap: var(--boxel-sp);
|
|
562
|
+
margin-top: var(--boxel-sp-lg);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.additional-error-entry {
|
|
566
|
+
margin-bottom: var(--boxel-sp);
|
|
567
|
+
padding-bottom: var(--boxel-sp-xs);
|
|
568
|
+
border-bottom: 1px solid var(--boxel-200, #ddd);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.additional-error-entry:last-child {
|
|
572
|
+
margin-bottom: 0;
|
|
573
|
+
padding-bottom: 0;
|
|
574
|
+
border-bottom: none;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.additional-error-heading {
|
|
578
|
+
font-weight: 600;
|
|
579
|
+
margin-bottom: var(--boxel-sp-xxs);
|
|
580
|
+
word-break: break-word;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.additional-error-message {
|
|
584
|
+
margin: 0 0 var(--boxel-sp-xs) 0;
|
|
585
|
+
font-size: var(--boxel-font-size-sm);
|
|
586
|
+
word-break: break-word;
|
|
587
|
+
}
|
|
588
|
+
</style>
|
|
589
|
+
</template>
|
|
590
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { service } from '@ember/service';
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
|
|
4
|
+
import ExternalLink from '@cardstack/boxel-icons/external-link';
|
|
5
|
+
|
|
6
|
+
import { BoxelButton } from '@cardstack/boxel-ui/components';
|
|
7
|
+
|
|
8
|
+
import type HostModeService from '@cardstack/host/services/host-mode-service';
|
|
9
|
+
|
|
10
|
+
interface OpenSitePopoverArgs {
|
|
11
|
+
isOpen: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default class OpenSitePopover extends Component<OpenSitePopoverArgs> {
|
|
15
|
+
@service declare hostModeService: HostModeService;
|
|
16
|
+
|
|
17
|
+
get hasPublishedRealms() {
|
|
18
|
+
return this.hostModeService.publishedRealmMetadata.length > 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
{{#if @isOpen}}
|
|
23
|
+
<div class='open-site-popover' data-test-open-site-popover>
|
|
24
|
+
{{#if this.hasPublishedRealms}}
|
|
25
|
+
<div class='published-realms'>
|
|
26
|
+
{{#each
|
|
27
|
+
this.hostModeService.publishedRealmMetadata
|
|
28
|
+
as |realmMetadata|
|
|
29
|
+
}}
|
|
30
|
+
<div
|
|
31
|
+
class='realm-item'
|
|
32
|
+
data-test-published-realm-item={{realmMetadata.currentCardUrlString}}
|
|
33
|
+
>
|
|
34
|
+
<div class='realm-url'>
|
|
35
|
+
{{realmMetadata.currentCardUrlString}}
|
|
36
|
+
</div>
|
|
37
|
+
<BoxelButton
|
|
38
|
+
@as='anchor'
|
|
39
|
+
@kind='secondary-light'
|
|
40
|
+
@size='small'
|
|
41
|
+
@href={{realmMetadata.currentCardUrlString}}
|
|
42
|
+
class='open-site-button'
|
|
43
|
+
target='_blank'
|
|
44
|
+
rel='noopener noreferrer'
|
|
45
|
+
data-test-open-site-button
|
|
46
|
+
>
|
|
47
|
+
<ExternalLink
|
|
48
|
+
width='16'
|
|
49
|
+
height='16'
|
|
50
|
+
class='external-link-icon'
|
|
51
|
+
/>
|
|
52
|
+
Open
|
|
53
|
+
</BoxelButton>
|
|
54
|
+
</div>
|
|
55
|
+
{{/each}}
|
|
56
|
+
</div>
|
|
57
|
+
{{else}}
|
|
58
|
+
<p class='no-published-message'>No sites are currently published.</p>
|
|
59
|
+
{{/if}}
|
|
60
|
+
</div>
|
|
61
|
+
{{/if}}
|
|
62
|
+
|
|
63
|
+
<style scoped>
|
|
64
|
+
.open-site-popover {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 100%;
|
|
67
|
+
right: 0;
|
|
68
|
+
background: white;
|
|
69
|
+
border: solid 1px rgba(0, 0, 0, 0.35);
|
|
70
|
+
border-radius: 8px;
|
|
71
|
+
box-shadow: 0 10px 15px 0 rgba(0, 0, 0, 0.25);
|
|
72
|
+
z-index: 1000;
|
|
73
|
+
margin-top: 4px;
|
|
74
|
+
padding: var(--boxel-sp-xs);
|
|
75
|
+
min-width: 320px;
|
|
76
|
+
max-width: 450px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.published-realms {
|
|
80
|
+
max-height: 200px;
|
|
81
|
+
overflow-y: auto;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.realm-item {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: space-between;
|
|
88
|
+
border-bottom: 1px solid var(--boxel-light-200);
|
|
89
|
+
padding: 0.5rem 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.realm-item:last-child {
|
|
93
|
+
border-bottom: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.realm-url {
|
|
97
|
+
flex: 1;
|
|
98
|
+
font: 500 var(--boxel-font-sm);
|
|
99
|
+
color: var(--boxel-dark);
|
|
100
|
+
text-wrap: nowrap;
|
|
101
|
+
overflow: hidden;
|
|
102
|
+
text-overflow: ellipsis;
|
|
103
|
+
margin-right: 0.75rem;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.open-site-button {
|
|
107
|
+
flex-shrink: 0;
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
gap: var(--boxel-sp-xxxs);
|
|
111
|
+
font-size: var(--boxel-font-size-xs);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.external-link-icon {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.no-published-message {
|
|
119
|
+
text-align: center;
|
|
120
|
+
color: var(--boxel-light-600);
|
|
121
|
+
font-style: italic;
|
|
122
|
+
padding: 1rem;
|
|
123
|
+
font-size: var(--boxel-font-size-xs);
|
|
124
|
+
}
|
|
125
|
+
</style>
|
|
126
|
+
</template>
|
|
127
|
+
}
|