@gxp-dev/mod-ui 2.0.0 → 2.0.1
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/.storybook/preview.ts +7 -0
- package/README.md +6 -6
- package/dist/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/_virtual/_plugin-vue_export-helper.js.map +1 -0
- package/dist/action.d.ts +4 -0
- package/dist/action.d.ts.map +1 -0
- package/dist/action.js +9 -0
- package/dist/action.js.map +1 -0
- package/dist/adapters/fieldTypeMap.d.ts.map +1 -1
- package/dist/adapters/fieldTypeMap.js +4 -8
- package/dist/adapters/fieldTypeMap.js.map +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/boolean.d.ts +5 -0
- package/dist/boolean.d.ts.map +1 -0
- package/dist/boolean.js +11 -0
- package/dist/boolean.js.map +1 -0
- package/dist/builder.d.ts +9 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/builder.js +19 -0
- package/dist/builder.js.map +1 -0
- package/dist/cards.d.ts +8 -0
- package/dist/cards.d.ts.map +1 -0
- package/dist/cards.js +17 -0
- package/dist/cards.js.map +1 -0
- package/dist/code.d.ts +6 -0
- package/dist/code.d.ts.map +1 -0
- package/dist/code.js +13 -0
- package/dist/code.js.map +1 -0
- package/dist/components/compositions/cards/CardListCard.vue.d.ts +30 -0
- package/dist/components/compositions/cards/CardListCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/cards/CardListCard.vue.js +122 -2
- package/dist/components/compositions/cards/CardListCard.vue.js.map +1 -1
- package/dist/components/compositions/cards/CardListCard.vue2.js +2 -122
- package/dist/components/compositions/cards/CardListCard.vue2.js.map +1 -1
- package/dist/components/compositions/cards/DataTableCard.vue.d.ts +58 -0
- package/dist/components/compositions/cards/DataTableCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/cards/DataTableCard.vue.js +387 -2
- package/dist/components/compositions/cards/DataTableCard.vue.js.map +1 -1
- package/dist/components/compositions/cards/DataTableCard.vue2.js +2 -387
- package/dist/components/compositions/cards/DataTableCard.vue2.js.map +1 -1
- package/dist/components/compositions/cards/ElementDisplayCard.vue.d.ts +16 -0
- package/dist/components/compositions/cards/ElementDisplayCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/cards/ElementDisplayCard.vue.js +64 -2
- package/dist/components/compositions/cards/ElementDisplayCard.vue.js.map +1 -1
- package/dist/components/compositions/cards/ElementDisplayCard.vue2.js +2 -64
- package/dist/components/compositions/cards/ElementDisplayCard.vue2.js.map +1 -1
- package/dist/components/compositions/cards/ElementListCard.vue.d.ts +22 -0
- package/dist/components/compositions/cards/ElementListCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/cards/ElementListCard.vue.js +92 -2
- package/dist/components/compositions/cards/ElementListCard.vue.js.map +1 -1
- package/dist/components/compositions/cards/ElementListCard.vue2.js +2 -92
- package/dist/components/compositions/cards/ElementListCard.vue2.js.map +1 -1
- package/dist/components/compositions/cards/GridViewCard.vue.d.ts +35 -0
- package/dist/components/compositions/cards/GridViewCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/cards/GridViewCard.vue.js +128 -2
- package/dist/components/compositions/cards/GridViewCard.vue.js.map +1 -1
- package/dist/components/compositions/cards/GridViewCard.vue2.js +2 -128
- package/dist/components/compositions/cards/GridViewCard.vue2.js.map +1 -1
- package/dist/components/compositions/cards/InfoCard.vue.d.ts +24 -0
- package/dist/components/compositions/cards/InfoCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/cards/InfoCard.vue.js +183 -2
- package/dist/components/compositions/cards/InfoCard.vue.js.map +1 -1
- package/dist/components/compositions/cards/InfoCard.vue2.js +2 -183
- package/dist/components/compositions/cards/InfoCard.vue2.js.map +1 -1
- package/dist/components/compositions/cards/TabListCard.vue.d.ts +36 -0
- package/dist/components/compositions/cards/TabListCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/cards/TabListCard.vue.js +124 -2
- package/dist/components/compositions/cards/TabListCard.vue.js.map +1 -1
- package/dist/components/compositions/cards/TabListCard.vue2.js +2 -124
- package/dist/components/compositions/cards/TabListCard.vue2.js.map +1 -1
- package/dist/components/compositions/elements/action/ButtonAction.vue.d.ts +42 -0
- package/dist/components/compositions/elements/action/ButtonAction.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/action/ButtonAction.vue.js +157 -2
- package/dist/components/compositions/elements/action/ButtonAction.vue.js.map +1 -1
- package/dist/components/compositions/elements/action/ButtonAction.vue2.js +2 -157
- package/dist/components/compositions/elements/action/ButtonAction.vue2.js.map +1 -1
- package/dist/components/compositions/elements/action/ButtonGroupAction.vue.d.ts +46 -0
- package/dist/components/compositions/elements/action/ButtonGroupAction.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/action/ButtonGroupAction.vue.js +66 -2
- package/dist/components/compositions/elements/action/ButtonGroupAction.vue.js.map +1 -1
- package/dist/components/compositions/elements/action/ButtonGroupAction.vue2.js +2 -66
- package/dist/components/compositions/elements/action/ButtonGroupAction.vue2.js.map +1 -1
- package/dist/components/compositions/elements/action/LinkAction.vue.d.ts +30 -0
- package/dist/components/compositions/elements/action/LinkAction.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/action/LinkAction.vue.js +55 -2
- package/dist/components/compositions/elements/action/LinkAction.vue.js.map +1 -1
- package/dist/components/compositions/elements/action/LinkAction.vue2.js +2 -55
- package/dist/components/compositions/elements/action/LinkAction.vue2.js.map +1 -1
- package/dist/components/compositions/elements/boolean/CheckboxBoolean.vue.d.ts +25 -0
- package/dist/components/compositions/elements/boolean/CheckboxBoolean.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/boolean/CheckboxBoolean.vue.js +68 -2
- package/dist/components/compositions/elements/boolean/CheckboxBoolean.vue.js.map +1 -1
- package/dist/components/compositions/elements/boolean/CheckboxBoolean.vue2.js +2 -68
- package/dist/components/compositions/elements/boolean/CheckboxBoolean.vue2.js.map +1 -1
- package/dist/components/compositions/elements/boolean/IconToggleBoolean.vue.d.ts +29 -0
- package/dist/components/compositions/elements/boolean/IconToggleBoolean.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/boolean/IconToggleBoolean.vue.js +75 -2
- package/dist/components/compositions/elements/boolean/IconToggleBoolean.vue.js.map +1 -1
- package/dist/components/compositions/elements/boolean/IconToggleBoolean.vue2.js +2 -75
- package/dist/components/compositions/elements/boolean/IconToggleBoolean.vue2.js.map +1 -1
- package/dist/components/compositions/elements/boolean/RadioBoolean.vue.d.ts +33 -0
- package/dist/components/compositions/elements/boolean/RadioBoolean.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/boolean/RadioBoolean.vue.js +91 -2
- package/dist/components/compositions/elements/boolean/RadioBoolean.vue.js.map +1 -1
- package/dist/components/compositions/elements/boolean/RadioBoolean.vue2.js +2 -91
- package/dist/components/compositions/elements/boolean/RadioBoolean.vue2.js.map +1 -1
- package/dist/components/compositions/elements/boolean/SwitchBoolean.vue.d.ts +29 -0
- package/dist/components/compositions/elements/boolean/SwitchBoolean.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/boolean/SwitchBoolean.vue.js +77 -2
- package/dist/components/compositions/elements/boolean/SwitchBoolean.vue.js.map +1 -1
- package/dist/components/compositions/elements/boolean/SwitchBoolean.vue2.js +2 -77
- package/dist/components/compositions/elements/boolean/SwitchBoolean.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/DependencyListBuilder.vue.d.ts +29 -0
- package/dist/components/compositions/elements/builder/DependencyListBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/DependencyListBuilder.vue.js +666 -2
- package/dist/components/compositions/elements/builder/DependencyListBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/DependencyListBuilder.vue2.js +2 -666
- package/dist/components/compositions/elements/builder/DependencyListBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/ElementListBuilder.vue.d.ts +29 -0
- package/dist/components/compositions/elements/builder/ElementListBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/ElementListBuilder.vue.js +421 -2
- package/dist/components/compositions/elements/builder/ElementListBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/ElementListBuilder.vue2.js +2 -421
- package/dist/components/compositions/elements/builder/ElementListBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/FormBuilder.vue.d.ts +30 -0
- package/dist/components/compositions/elements/builder/FormBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/FormBuilder.vue.js +857 -2
- package/dist/components/compositions/elements/builder/FormBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/FormBuilder.vue2.js +2 -857
- package/dist/components/compositions/elements/builder/FormBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/GridBuilder.vue.d.ts +37 -0
- package/dist/components/compositions/elements/builder/GridBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/GridBuilder.vue.js +452 -2
- package/dist/components/compositions/elements/builder/GridBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/GridBuilder.vue2.js +2 -452
- package/dist/components/compositions/elements/builder/GridBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/ObjectBuilder.vue.d.ts +33 -0
- package/dist/components/compositions/elements/builder/ObjectBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/ObjectBuilder.vue.js +511 -2
- package/dist/components/compositions/elements/builder/ObjectBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/ObjectBuilder.vue2.js +2 -511
- package/dist/components/compositions/elements/builder/ObjectBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/PresetBuilder.vue.d.ts +29 -0
- package/dist/components/compositions/elements/builder/PresetBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/PresetBuilder.vue.js +163 -2
- package/dist/components/compositions/elements/builder/PresetBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/PresetBuilder.vue2.js +2 -163
- package/dist/components/compositions/elements/builder/PresetBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/QuizBuilder.vue.d.ts +34 -0
- package/dist/components/compositions/elements/builder/QuizBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/QuizBuilder.vue.js +591 -2
- package/dist/components/compositions/elements/builder/QuizBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/QuizBuilder.vue2.js +2 -591
- package/dist/components/compositions/elements/builder/QuizBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/builder/ReactiveCanvasBuilder.vue.d.ts +29 -0
- package/dist/components/compositions/elements/builder/ReactiveCanvasBuilder.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/builder/ReactiveCanvasBuilder.vue.js +580 -2
- package/dist/components/compositions/elements/builder/ReactiveCanvasBuilder.vue.js.map +1 -1
- package/dist/components/compositions/elements/builder/ReactiveCanvasBuilder.vue2.js +2 -580
- package/dist/components/compositions/elements/builder/ReactiveCanvasBuilder.vue2.js.map +1 -1
- package/dist/components/compositions/elements/card/ListCard.vue.d.ts +21 -0
- package/dist/components/compositions/elements/card/ListCard.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/code/BuildStatus.vue.d.ts +43 -0
- package/dist/components/compositions/elements/code/BuildStatus.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/code/BuildStatus.vue.js +246 -2
- package/dist/components/compositions/elements/code/BuildStatus.vue.js.map +1 -1
- package/dist/components/compositions/elements/code/BuildStatus.vue2.js +2 -246
- package/dist/components/compositions/elements/code/BuildStatus.vue2.js.map +1 -1
- package/dist/components/compositions/elements/code/ChatMessage.vue.d.ts +39 -0
- package/dist/components/compositions/elements/code/ChatMessage.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/code/ChatMessage.vue.js +267 -2
- package/dist/components/compositions/elements/code/ChatMessage.vue.js.map +1 -1
- package/dist/components/compositions/elements/code/ChatMessage.vue2.js +2 -267
- package/dist/components/compositions/elements/code/ChatMessage.vue2.js.map +1 -1
- package/dist/components/compositions/elements/code/FileTree.vue.d.ts +42 -0
- package/dist/components/compositions/elements/code/FileTree.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/code/FileTree.vue.js +251 -2
- package/dist/components/compositions/elements/code/FileTree.vue.js.map +1 -1
- package/dist/components/compositions/elements/code/FileTree.vue2.js +2 -251
- package/dist/components/compositions/elements/code/FileTree.vue2.js.map +1 -1
- package/dist/components/compositions/elements/code/GitCodeEditor.vue.d.ts +54 -0
- package/dist/components/compositions/elements/code/GitCodeEditor.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/code/GitCodeEditor.vue.js +273 -2
- package/dist/components/compositions/elements/code/GitCodeEditor.vue.js.map +1 -1
- package/dist/components/compositions/elements/code/GitCodeEditor.vue2.js +2 -273
- package/dist/components/compositions/elements/code/GitCodeEditor.vue2.js.map +1 -1
- package/dist/components/compositions/elements/code/PullRequestsList.vue.d.ts +46 -0
- package/dist/components/compositions/elements/code/PullRequestsList.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/code/PullRequestsList.vue.js +303 -2
- package/dist/components/compositions/elements/code/PullRequestsList.vue.js.map +1 -1
- package/dist/components/compositions/elements/code/PullRequestsList.vue2.js +2 -303
- package/dist/components/compositions/elements/code/PullRequestsList.vue2.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/DialogBlock.vue.d.ts +17 -0
- package/dist/components/compositions/elements/configuration-block/DialogBlock.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/configuration-block/DialogBlock.vue.js +101 -2
- package/dist/components/compositions/elements/configuration-block/DialogBlock.vue.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/DialogBlock.vue2.js +2 -101
- package/dist/components/compositions/elements/configuration-block/DialogBlock.vue2.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/ElementsBlock.vue.d.ts +20 -0
- package/dist/components/compositions/elements/configuration-block/ElementsBlock.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/configuration-block/ElementsBlock.vue.js +33 -2
- package/dist/components/compositions/elements/configuration-block/ElementsBlock.vue.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/ElementsBlock.vue2.js +2 -33
- package/dist/components/compositions/elements/configuration-block/ElementsBlock.vue2.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/ModalBlock.vue.d.ts +17 -0
- package/dist/components/compositions/elements/configuration-block/ModalBlock.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/configuration-block/ModalBlock.vue.js +103 -2
- package/dist/components/compositions/elements/configuration-block/ModalBlock.vue.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/ModalBlock.vue2.js +2 -103
- package/dist/components/compositions/elements/configuration-block/ModalBlock.vue2.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/RepeatableBlock.vue.d.ts +29 -0
- package/dist/components/compositions/elements/configuration-block/RepeatableBlock.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/configuration-block/RepeatableBlock.vue.js +172 -2
- package/dist/components/compositions/elements/configuration-block/RepeatableBlock.vue.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/RepeatableBlock.vue2.js +2 -140
- package/dist/components/compositions/elements/configuration-block/RepeatableBlock.vue2.js.map +1 -1
- package/dist/components/compositions/elements/configuration-block/RepeatableRow.vue.d.ts +12 -0
- package/dist/components/compositions/elements/configuration-block/RepeatableRow.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/configuration-block/RepeatableRow.vue.js +5 -0
- package/dist/components/compositions/elements/configuration-block/RepeatableRow.vue.js.map +1 -0
- package/dist/components/compositions/elements/configuration-block/RepeatableRow.vue2.js +25 -0
- package/dist/components/compositions/elements/configuration-block/RepeatableRow.vue2.js.map +1 -0
- package/dist/components/compositions/elements/display/BannerDisplay.vue.d.ts +13 -0
- package/dist/components/compositions/elements/display/BannerDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/BannerDisplay.vue.js +63 -2
- package/dist/components/compositions/elements/display/BannerDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/BannerDisplay.vue2.js +2 -63
- package/dist/components/compositions/elements/display/BannerDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/BarcodeDisplay.vue.d.ts +12 -0
- package/dist/components/compositions/elements/display/BarcodeDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/BarcodeDisplay.vue.js +52 -2
- package/dist/components/compositions/elements/display/BarcodeDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/BarcodeDisplay.vue2.js +2 -52
- package/dist/components/compositions/elements/display/BarcodeDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/CarouselDisplay.vue.d.ts +27 -0
- package/dist/components/compositions/elements/display/CarouselDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/CarouselDisplay.vue.js +144 -2
- package/dist/components/compositions/elements/display/CarouselDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/CarouselDisplay.vue2.js +2 -144
- package/dist/components/compositions/elements/display/CarouselDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/ChartDisplay.vue.d.ts +17 -0
- package/dist/components/compositions/elements/display/ChartDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/ChartDisplay.vue.js +78 -2
- package/dist/components/compositions/elements/display/ChartDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/ChartDisplay.vue2.js +2 -78
- package/dist/components/compositions/elements/display/ChartDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/HtmlDisplay.vue.d.ts +7 -0
- package/dist/components/compositions/elements/display/HtmlDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/HtmlDisplay.vue.js +20 -2
- package/dist/components/compositions/elements/display/HtmlDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/HtmlDisplay.vue2.js +2 -20
- package/dist/components/compositions/elements/display/HtmlDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/IconDisplay.vue.d.ts +10 -0
- package/dist/components/compositions/elements/display/IconDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/IconDisplay.vue.js +55 -2
- package/dist/components/compositions/elements/display/IconDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/IconDisplay.vue2.js +2 -55
- package/dist/components/compositions/elements/display/IconDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/IframeDisplay.vue.d.ts +11 -0
- package/dist/components/compositions/elements/display/IframeDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/IframeDisplay.vue.js +32 -2
- package/dist/components/compositions/elements/display/IframeDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/IframeDisplay.vue2.js +2 -32
- package/dist/components/compositions/elements/display/IframeDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/ImageDisplay.vue.d.ts +8 -0
- package/dist/components/compositions/elements/display/ImageDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/ImageDisplay.vue.js +35 -2
- package/dist/components/compositions/elements/display/ImageDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/ImageDisplay.vue2.js +2 -35
- package/dist/components/compositions/elements/display/ImageDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/MarkdownDisplay.vue.d.ts +7 -0
- package/dist/components/compositions/elements/display/MarkdownDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/MarkdownDisplay.vue.js +39 -2
- package/dist/components/compositions/elements/display/MarkdownDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/MarkdownDisplay.vue2.js +2 -39
- package/dist/components/compositions/elements/display/MarkdownDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/ProgressBarDisplay.vue.d.ts +11 -0
- package/dist/components/compositions/elements/display/ProgressBarDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/ProgressBarDisplay.vue.js +42 -2
- package/dist/components/compositions/elements/display/ProgressBarDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/ProgressBarDisplay.vue2.js +2 -42
- package/dist/components/compositions/elements/display/ProgressBarDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/QrCodeDisplay.vue.d.ts +9 -0
- package/dist/components/compositions/elements/display/QrCodeDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/QrCodeDisplay.vue.js +46 -2
- package/dist/components/compositions/elements/display/QrCodeDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/QrCodeDisplay.vue2.js +2 -46
- package/dist/components/compositions/elements/display/QrCodeDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/ReactiveCanvasDisplay.vue.d.ts +7 -0
- package/dist/components/compositions/elements/display/ReactiveCanvasDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/ReactiveCanvasDisplay.vue.js +64 -2
- package/dist/components/compositions/elements/display/ReactiveCanvasDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/ReactiveCanvasDisplay.vue2.js +2 -64
- package/dist/components/compositions/elements/display/ReactiveCanvasDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/SpriteDisplay.vue.d.ts +7 -0
- package/dist/components/compositions/elements/display/SpriteDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/SpriteDisplay.vue.js +64 -2
- package/dist/components/compositions/elements/display/SpriteDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/SpriteDisplay.vue2.js +2 -64
- package/dist/components/compositions/elements/display/SpriteDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/TypeDisplay.vue.d.ts +11 -0
- package/dist/components/compositions/elements/display/TypeDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/TypeDisplay.vue.js +42 -2
- package/dist/components/compositions/elements/display/TypeDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/TypeDisplay.vue2.js +2 -42
- package/dist/components/compositions/elements/display/TypeDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/display/VideoPlayerDisplay.vue.d.ts +10 -0
- package/dist/components/compositions/elements/display/VideoPlayerDisplay.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/display/VideoPlayerDisplay.vue.js +33 -2
- package/dist/components/compositions/elements/display/VideoPlayerDisplay.vue.js.map +1 -1
- package/dist/components/compositions/elements/display/VideoPlayerDisplay.vue2.js +2 -33
- package/dist/components/compositions/elements/display/VideoPlayerDisplay.vue2.js.map +1 -1
- package/dist/components/compositions/elements/editor/CodeEditor.vue.d.ts +33 -0
- package/dist/components/compositions/elements/editor/CodeEditor.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/editor/CodeEditor.vue.js +5 -2
- package/dist/components/compositions/elements/editor/CodeEditor.vue.js.map +1 -1
- package/dist/components/compositions/elements/editor/CodeEditor.vue2.js +211 -53
- package/dist/components/compositions/elements/editor/CodeEditor.vue2.js.map +1 -1
- package/dist/components/compositions/elements/editor/HtmlEditor.vue.d.ts +24 -0
- package/dist/components/compositions/elements/editor/HtmlEditor.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/editor/HtmlEditor.vue.js +5 -2
- package/dist/components/compositions/elements/editor/HtmlEditor.vue.js.map +1 -1
- package/dist/components/compositions/elements/editor/HtmlEditor.vue2.js +1333 -50
- package/dist/components/compositions/elements/editor/HtmlEditor.vue2.js.map +1 -1
- package/dist/components/compositions/elements/editor/ImageEditor.vue.d.ts +24 -0
- package/dist/components/compositions/elements/editor/ImageEditor.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/editor/ImageEditor.vue.js +67 -2
- package/dist/components/compositions/elements/editor/ImageEditor.vue.js.map +1 -1
- package/dist/components/compositions/elements/editor/ImageEditor.vue2.js +2 -67
- package/dist/components/compositions/elements/editor/ImageEditor.vue2.js.map +1 -1
- package/dist/components/compositions/elements/editor/MarkdownEditor.vue.d.ts +28 -0
- package/dist/components/compositions/elements/editor/MarkdownEditor.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/editor/MarkdownEditor.vue.js +82 -2
- package/dist/components/compositions/elements/editor/MarkdownEditor.vue.js.map +1 -1
- package/dist/components/compositions/elements/editor/MarkdownEditor.vue2.js +2 -82
- package/dist/components/compositions/elements/editor/MarkdownEditor.vue2.js.map +1 -1
- package/dist/components/compositions/elements/editor/RichTextEditor.vue.d.ts +26 -0
- package/dist/components/compositions/elements/editor/RichTextEditor.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/editor/RichTextEditor.vue.js +262 -2
- package/dist/components/compositions/elements/editor/RichTextEditor.vue.js.map +1 -1
- package/dist/components/compositions/elements/editor/RichTextEditor.vue2.js +2 -262
- package/dist/components/compositions/elements/editor/RichTextEditor.vue2.js.map +1 -1
- package/dist/components/compositions/elements/file/AssetPickerFile.vue.d.ts +47 -0
- package/dist/components/compositions/elements/file/AssetPickerFile.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/file/AssetPickerFile.vue.js +293 -2
- package/dist/components/compositions/elements/file/AssetPickerFile.vue.js.map +1 -1
- package/dist/components/compositions/elements/file/AssetPickerFile.vue2.js +2 -293
- package/dist/components/compositions/elements/file/AssetPickerFile.vue2.js.map +1 -1
- package/dist/components/compositions/elements/file/DropzoneFile.vue.d.ts +33 -0
- package/dist/components/compositions/elements/file/DropzoneFile.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/file/DropzoneFile.vue.js +171 -2
- package/dist/components/compositions/elements/file/DropzoneFile.vue.js.map +1 -1
- package/dist/components/compositions/elements/file/DropzoneFile.vue2.js +2 -171
- package/dist/components/compositions/elements/file/DropzoneFile.vue2.js.map +1 -1
- package/dist/components/compositions/elements/file/UploadFile.vue.d.ts +33 -0
- package/dist/components/compositions/elements/file/UploadFile.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/file/UploadFile.vue.js +149 -2
- package/dist/components/compositions/elements/file/UploadFile.vue.js.map +1 -1
- package/dist/components/compositions/elements/file/UploadFile.vue2.js +2 -149
- package/dist/components/compositions/elements/file/UploadFile.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/BarcodeScannerInput.vue.d.ts +48 -0
- package/dist/components/compositions/elements/input/BarcodeScannerInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/BarcodeScannerInput.vue.js +166 -2
- package/dist/components/compositions/elements/input/BarcodeScannerInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/BarcodeScannerInput.vue2.js +2 -166
- package/dist/components/compositions/elements/input/BarcodeScannerInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/EmailInput.vue.d.ts +48 -0
- package/dist/components/compositions/elements/input/EmailInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/EmailInput.vue.js +62 -2
- package/dist/components/compositions/elements/input/EmailInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/EmailInput.vue2.js +2 -62
- package/dist/components/compositions/elements/input/EmailInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/NumberInput.vue.d.ts +49 -0
- package/dist/components/compositions/elements/input/NumberInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/NumberInput.vue.js +73 -2
- package/dist/components/compositions/elements/input/NumberInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/NumberInput.vue2.js +2 -73
- package/dist/components/compositions/elements/input/NumberInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/PasswordInput.vue.d.ts +49 -0
- package/dist/components/compositions/elements/input/PasswordInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/PasswordInput.vue.js +98 -2
- package/dist/components/compositions/elements/input/PasswordInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/PasswordInput.vue2.js +2 -98
- package/dist/components/compositions/elements/input/PasswordInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/RangeSliderInput.vue.d.ts +31 -0
- package/dist/components/compositions/elements/input/RangeSliderInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/RangeSliderInput.vue.js +69 -2
- package/dist/components/compositions/elements/input/RangeSliderInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/RangeSliderInput.vue2.js +2 -69
- package/dist/components/compositions/elements/input/RangeSliderInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/SearchInput.vue.d.ts +48 -0
- package/dist/components/compositions/elements/input/SearchInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/SearchInput.vue.js +69 -2
- package/dist/components/compositions/elements/input/SearchInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/SearchInput.vue2.js +2 -69
- package/dist/components/compositions/elements/input/SearchInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/TelInput.vue.d.ts +48 -0
- package/dist/components/compositions/elements/input/TelInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/TelInput.vue.js +62 -2
- package/dist/components/compositions/elements/input/TelInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/TelInput.vue2.js +2 -62
- package/dist/components/compositions/elements/input/TelInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/TextInput.vue.d.ts +48 -0
- package/dist/components/compositions/elements/input/TextInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/TextInput.vue.js +62 -2
- package/dist/components/compositions/elements/input/TextInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/TextInput.vue2.js +2 -62
- package/dist/components/compositions/elements/input/TextInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/TextareaInput.vue.d.ts +54 -0
- package/dist/components/compositions/elements/input/TextareaInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/TextareaInput.vue.js +63 -2
- package/dist/components/compositions/elements/input/TextareaInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/TextareaInput.vue2.js +2 -63
- package/dist/components/compositions/elements/input/TextareaInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/input/UrlInput.vue.d.ts +48 -0
- package/dist/components/compositions/elements/input/UrlInput.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/input/UrlInput.vue.js +62 -2
- package/dist/components/compositions/elements/input/UrlInput.vue.js.map +1 -1
- package/dist/components/compositions/elements/input/UrlInput.vue2.js +2 -62
- package/dist/components/compositions/elements/input/UrlInput.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/AsyncSelectOption.vue.d.ts +44 -0
- package/dist/components/compositions/elements/option-select/AsyncSelectOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/AsyncSelectOption.vue.js +167 -2
- package/dist/components/compositions/elements/option-select/AsyncSelectOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/AsyncSelectOption.vue2.js +2 -167
- package/dist/components/compositions/elements/option-select/AsyncSelectOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/AutoCompleteOption.vue.d.ts +31 -0
- package/dist/components/compositions/elements/option-select/AutoCompleteOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/AutoCompleteOption.vue.js +121 -2
- package/dist/components/compositions/elements/option-select/AutoCompleteOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/AutoCompleteOption.vue2.js +2 -121
- package/dist/components/compositions/elements/option-select/AutoCompleteOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/CheckboxOption.vue.d.ts +29 -0
- package/dist/components/compositions/elements/option-select/CheckboxOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/CheckboxOption.vue.js +87 -2
- package/dist/components/compositions/elements/option-select/CheckboxOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/CheckboxOption.vue2.js +2 -87
- package/dist/components/compositions/elements/option-select/CheckboxOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/IntegrationConnectorOption.vue.d.ts +41 -0
- package/dist/components/compositions/elements/option-select/IntegrationConnectorOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/IntegrationConnectorOption.vue.js +237 -2
- package/dist/components/compositions/elements/option-select/IntegrationConnectorOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/IntegrationConnectorOption.vue2.js +2 -237
- package/dist/components/compositions/elements/option-select/IntegrationConnectorOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/ListOption.vue.d.ts +29 -0
- package/dist/components/compositions/elements/option-select/ListOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/ListOption.vue.js +89 -2
- package/dist/components/compositions/elements/option-select/ListOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/ListOption.vue2.js +2 -89
- package/dist/components/compositions/elements/option-select/ListOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/PillSelectOption.vue.d.ts +28 -0
- package/dist/components/compositions/elements/option-select/PillSelectOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/PillSelectOption.vue.js +85 -2
- package/dist/components/compositions/elements/option-select/PillSelectOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/PillSelectOption.vue2.js +2 -85
- package/dist/components/compositions/elements/option-select/PillSelectOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/RadioOption.vue.d.ts +29 -0
- package/dist/components/compositions/elements/option-select/RadioOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/RadioOption.vue.js +98 -2
- package/dist/components/compositions/elements/option-select/RadioOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/RadioOption.vue2.js +2 -98
- package/dist/components/compositions/elements/option-select/RadioOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/SelectMultipleOption.vue.d.ts +29 -0
- package/dist/components/compositions/elements/option-select/SelectMultipleOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/SelectMultipleOption.vue.js +151 -2
- package/dist/components/compositions/elements/option-select/SelectMultipleOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/SelectMultipleOption.vue2.js +2 -151
- package/dist/components/compositions/elements/option-select/SelectMultipleOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/option-select/SelectOption.vue.d.ts +29 -0
- package/dist/components/compositions/elements/option-select/SelectOption.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/option-select/SelectOption.vue.js +116 -2
- package/dist/components/compositions/elements/option-select/SelectOption.vue.js.map +1 -1
- package/dist/components/compositions/elements/option-select/SelectOption.vue2.js +2 -116
- package/dist/components/compositions/elements/option-select/SelectOption.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/AsyncSelectPicker.vue.d.ts +40 -0
- package/dist/components/compositions/elements/picker/AsyncSelectPicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/AsyncSelectPicker.vue.js +182 -2
- package/dist/components/compositions/elements/picker/AsyncSelectPicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/AsyncSelectPicker.vue2.js +2 -182
- package/dist/components/compositions/elements/picker/AsyncSelectPicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/ColorPicker.vue.d.ts +29 -0
- package/dist/components/compositions/elements/picker/ColorPicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/ColorPicker.vue.js +155 -2
- package/dist/components/compositions/elements/picker/ColorPicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/ColorPicker.vue2.js +2 -155
- package/dist/components/compositions/elements/picker/ColorPicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/DataModelPicker.vue.d.ts +29 -0
- package/dist/components/compositions/elements/picker/DataModelPicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/DataModelPicker.vue.js +104 -2
- package/dist/components/compositions/elements/picker/DataModelPicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/DataModelPicker.vue2.js +2 -104
- package/dist/components/compositions/elements/picker/DataModelPicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/DatePicker.vue.d.ts +32 -0
- package/dist/components/compositions/elements/picker/DatePicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/DatePicker.vue.js +140 -2
- package/dist/components/compositions/elements/picker/DatePicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/DatePicker.vue2.js +2 -140
- package/dist/components/compositions/elements/picker/DatePicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/DateTimePicker.vue.d.ts +26 -0
- package/dist/components/compositions/elements/picker/DateTimePicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/DateTimePicker.vue.js +171 -2
- package/dist/components/compositions/elements/picker/DateTimePicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/DateTimePicker.vue2.js +2 -171
- package/dist/components/compositions/elements/picker/DateTimePicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/IconPicker.vue.d.ts +26 -0
- package/dist/components/compositions/elements/picker/IconPicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/IconPicker.vue.js +190 -2
- package/dist/components/compositions/elements/picker/IconPicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/IconPicker.vue2.js +2 -190
- package/dist/components/compositions/elements/picker/IconPicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/IconPickerInline.vue.d.ts +24 -0
- package/dist/components/compositions/elements/picker/IconPickerInline.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/{components/IconPickerInline.vue2.js → picker/IconPickerInline.vue.js} +23 -23
- package/dist/components/compositions/elements/picker/IconPickerInline.vue.js.map +1 -0
- package/dist/components/compositions/elements/picker/IconPickerInline.vue2.js +5 -0
- package/dist/components/compositions/elements/picker/IconPickerInline.vue2.js.map +1 -0
- package/dist/components/compositions/elements/picker/IntegrationConnectorPicker.vue.d.ts +41 -0
- package/dist/components/compositions/elements/picker/IntegrationConnectorPicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/IntegrationConnectorPicker.vue.js +271 -2
- package/dist/components/compositions/elements/picker/IntegrationConnectorPicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/IntegrationConnectorPicker.vue2.js +2 -271
- package/dist/components/compositions/elements/picker/IntegrationConnectorPicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/MapPicker.vue.d.ts +55 -0
- package/dist/components/compositions/elements/picker/MapPicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/MapPicker.vue.js +118 -2
- package/dist/components/compositions/elements/picker/MapPicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/MapPicker.vue2.js +2 -118
- package/dist/components/compositions/elements/picker/MapPicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/TimePicker.vue.d.ts +26 -0
- package/dist/components/compositions/elements/picker/TimePicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/TimePicker.vue.js +106 -2
- package/dist/components/compositions/elements/picker/TimePicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/TimePicker.vue2.js +2 -106
- package/dist/components/compositions/elements/picker/TimePicker.vue2.js.map +1 -1
- package/dist/components/compositions/elements/picker/TimezonePicker.vue.d.ts +26 -0
- package/dist/components/compositions/elements/picker/TimezonePicker.vue.d.ts.map +1 -0
- package/dist/components/compositions/elements/picker/TimezonePicker.vue.js +124 -2
- package/dist/components/compositions/elements/picker/TimezonePicker.vue.js.map +1 -1
- package/dist/components/compositions/elements/picker/TimezonePicker.vue2.js +2 -124
- package/dist/components/compositions/elements/picker/TimezonePicker.vue2.js.map +1 -1
- package/dist/components/ui/index.d.ts +3 -3
- package/dist/components/ui/toast/index.d.ts +1 -1
- package/dist/components/ui/toast/index.js.map +1 -1
- package/dist/configuration-block.d.ts +5 -0
- package/dist/configuration-block.d.ts.map +1 -0
- package/dist/configuration-block.js +11 -0
- package/dist/configuration-block.js.map +1 -0
- package/dist/definitions/elements/PickerElement.d.ts +1 -1
- package/dist/definitions/elements/PickerElement.d.ts.map +1 -1
- package/dist/definitions/elements/PickerElement.js +3 -2
- package/dist/definitions/elements/PickerElement.js.map +1 -1
- package/dist/definitions/elements/index.d.ts +1 -155
- package/dist/definitions/elements/index.d.ts.map +1 -1
- package/dist/definitions/elements/index.js +112 -121
- package/dist/definitions/elements/index.js.map +1 -1
- package/dist/definitions/index.d.ts +1 -1
- package/dist/definitions/shared/base.d.ts +1 -1
- package/dist/definitions/shared/base.d.ts.map +1 -1
- package/dist/definitions/shared/base.js.map +1 -1
- package/dist/display.d.ts +16 -0
- package/dist/display.d.ts.map +1 -0
- package/dist/display.js +33 -0
- package/dist/display.js.map +1 -0
- package/dist/editor.d.ts +6 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/editor.js +13 -0
- package/dist/editor.js.map +1 -0
- package/dist/engine/registry.d.ts +0 -2
- package/dist/engine/registry.d.ts.map +1 -1
- package/dist/engine/registry.js +1 -5
- package/dist/engine/registry.js.map +1 -1
- package/dist/engine/useCardLoader.js +1 -1
- package/dist/engine/useCardLoader.js.map +1 -1
- package/dist/engine/useElementLoader.js +1 -1
- package/dist/engine/useElementLoader.js.map +1 -1
- package/dist/engine/useFormData.d.ts.map +1 -1
- package/dist/engine/useFormData.js +13 -13
- package/dist/engine/useFormData.js.map +1 -1
- package/dist/file.d.ts +4 -0
- package/dist/file.d.ts.map +1 -0
- package/dist/file.js +9 -0
- package/dist/file.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +71 -75
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +11 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +23 -0
- package/dist/input.js.map +1 -0
- package/dist/lib/storybook.d.ts +45 -0
- package/dist/lib/storybook.d.ts.map +1 -0
- package/dist/option-select.d.ts +10 -0
- package/dist/option-select.d.ts.map +1 -0
- package/dist/option-select.js +21 -0
- package/dist/option-select.js.map +1 -0
- package/dist/pages/ShowPage.vue.js +1 -1
- package/dist/pages/ShowPage.vue.js.map +1 -1
- package/dist/picker.d.ts +12 -0
- package/dist/picker.d.ts.map +1 -0
- package/dist/picker.js +25 -0
- package/dist/picker.js.map +1 -0
- package/dist/stores/dependencyListBuilderStore.d.ts +1 -1
- package/dist/stores/dependencyListBuilderStore.js +5 -5
- package/dist/stores/dependencyListBuilderStore.js.map +1 -1
- package/dist/stores/elementListBuilderStore.d.ts +1 -1
- package/dist/stores/elementListBuilderStore.js +14 -14
- package/dist/stores/elementListBuilderStore.js.map +1 -1
- package/dist/stores/formBuilderStore.d.ts +1 -1
- package/dist/stores/formBuilderStore.js +5 -5
- package/dist/stores/formBuilderStore.js.map +1 -1
- package/dist/stores/formDataStore.d.ts +1 -1
- package/dist/stores/formDataStore.js +2 -2
- package/dist/stores/formDataStore.js.map +1 -1
- package/dist/stores/gridBuilderStore.d.ts +1 -1
- package/dist/stores/gridBuilderStore.js +11 -11
- package/dist/stores/gridBuilderStore.js.map +1 -1
- package/dist/stores/objectBuilderStore.d.ts +1 -1
- package/dist/stores/objectBuilderStore.js +1 -1
- package/dist/stores/objectBuilderStore.js.map +1 -1
- package/dist/stores/presetBuilderStore.d.ts +1 -1
- package/dist/stores/presetBuilderStore.js +12 -12
- package/dist/stores/presetBuilderStore.js.map +1 -1
- package/dist/stores/quizBuilderStore.d.ts +1 -1
- package/dist/stores/quizBuilderStore.js +1 -1
- package/dist/stores/quizBuilderStore.js.map +1 -1
- package/dist/stores/reactiveCanvasBuilderStore.d.ts +1 -1
- package/dist/stores/reactiveCanvasBuilderStore.js +40 -40
- package/dist/stores/reactiveCanvasBuilderStore.js.map +1 -1
- package/dist/styles/mod-ui.css +1 -0
- package/package.json +85 -20
- package/src/action.ts +3 -0
- package/src/adapters/fieldTypeMap.ts +3 -8
- package/src/adapters/index.ts +1 -1
- package/src/boolean.ts +4 -0
- package/src/builder.ts +8 -0
- package/src/cards.ts +7 -0
- package/src/code.ts +5 -0
- package/src/components/compositions/cards/CardListCard.stories.ts +2 -0
- package/src/components/compositions/cards/DataTableCard.stories.ts +2 -0
- package/src/components/compositions/cards/ElementDisplayCard.stories.ts +2 -0
- package/src/components/compositions/cards/ElementListCard.stories.ts +2 -0
- package/src/components/compositions/cards/GridViewCard.stories.ts +2 -0
- package/src/components/compositions/cards/InfoCard.stories.ts +2 -0
- package/src/components/compositions/cards/TabListCard.stories.ts +2 -0
- package/src/components/compositions/elements/action/ButtonAction.stories.ts +3 -1
- package/src/components/compositions/elements/action/ButtonGroupAction.stories.ts +3 -1
- package/src/components/compositions/elements/action/LinkAction.stories.ts +3 -1
- package/src/components/compositions/elements/boolean/CheckboxBoolean.stories.ts +3 -1
- package/src/components/compositions/elements/boolean/IconToggleBoolean.stories.ts +3 -1
- package/src/components/compositions/elements/boolean/RadioBoolean.stories.ts +3 -1
- package/src/components/compositions/elements/boolean/SwitchBoolean.stories.ts +3 -1
- package/src/components/compositions/elements/builder/DependencyListBuilder.stories.ts +1 -1
- package/src/components/compositions/elements/builder/ElementListBuilder.stories.ts +1 -1
- package/src/components/compositions/elements/builder/ElementListBuilder.test.ts +0 -1
- package/src/components/compositions/elements/builder/FormBuilder.stories.ts +2 -0
- package/src/components/compositions/elements/builder/FormBuilder.test.ts +0 -1
- package/src/components/compositions/elements/builder/GridBuilder.stories.ts +2 -0
- package/src/components/compositions/elements/builder/ObjectBuilder.stories.ts +1 -1
- package/src/components/compositions/elements/builder/PresetBuilder.stories.ts +1 -1
- package/src/components/compositions/elements/builder/QuizBuilder.stories.ts +2 -0
- package/src/components/compositions/elements/builder/ReactiveCanvasBuilder.stories.ts +1 -1
- package/src/components/compositions/elements/code/BuildStatus.stories.ts +3 -1
- package/src/components/compositions/elements/code/ChatMessage.stories.ts +1 -1
- package/src/components/compositions/elements/code/FileTree.stories.ts +3 -1
- package/src/components/compositions/elements/code/GitCodeEditor.stories.ts +3 -1
- package/src/components/compositions/elements/code/PullRequestsList.stories.ts +3 -1
- package/src/components/compositions/elements/configuration-block/DialogBlock.stories.ts +1 -1
- package/src/components/compositions/elements/configuration-block/ElementsBlock.stories.ts +1 -1
- package/src/components/compositions/elements/configuration-block/ModalBlock.stories.ts +2 -0
- package/src/components/compositions/elements/configuration-block/RepeatableBlock.stories.ts +45 -2
- package/src/components/compositions/elements/configuration-block/RepeatableBlock.test.ts +47 -16
- package/src/components/compositions/elements/configuration-block/RepeatableBlock.vue +161 -92
- package/src/components/compositions/elements/configuration-block/RepeatableRow.vue +36 -0
- package/src/components/compositions/elements/display/BannerDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/BarcodeDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/CarouselDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/ChartDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/HtmlDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/IconDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/IframeDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/ImageDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/MarkdownDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/ProgressBarDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/QrCodeDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/ReactiveCanvasDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/SpriteDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/TypeDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/display/VideoPlayerDisplay.stories.ts +3 -1
- package/src/components/compositions/elements/editor/CodeEditor.stories.ts +88 -12
- package/src/components/compositions/elements/editor/CodeEditor.test.ts +72 -41
- package/src/components/compositions/elements/editor/CodeEditor.vue +306 -38
- package/src/components/compositions/elements/editor/HtmlEditor.stories.ts +73 -6
- package/src/components/compositions/elements/editor/HtmlEditor.test.ts +59 -50
- package/src/components/compositions/elements/editor/HtmlEditor.vue +942 -41
- package/src/components/compositions/elements/editor/ImageEditor.stories.ts +3 -1
- package/src/components/compositions/elements/editor/MarkdownEditor.stories.ts +3 -1
- package/src/components/compositions/elements/editor/RichTextEditor.stories.ts +3 -1
- package/src/components/compositions/elements/file/AssetPickerFile.stories.ts +3 -1
- package/src/components/compositions/elements/file/DropzoneFile.stories.ts +3 -1
- package/src/components/compositions/elements/file/UploadFile.stories.ts +3 -1
- package/src/components/compositions/elements/input/BarcodeScannerInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/EmailInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/NumberInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/PasswordInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/RangeSliderInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/SearchInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/TelInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/TextInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/TextareaInput.stories.ts +3 -1
- package/src/components/compositions/elements/input/UrlInput.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/AsyncSelectOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/AutoCompleteOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/CheckboxOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/IntegrationConnectorOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/ListOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/PillSelectOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/RadioOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/SelectMultipleOption.stories.ts +3 -1
- package/src/components/compositions/elements/option-select/SelectOption.stories.ts +3 -1
- package/src/components/compositions/elements/picker/AsyncSelectPicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/ColorPicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/DataModelPicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/DatePicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/DateTimePicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/IconPicker.stories.ts +3 -1
- package/src/components/compositions/elements/{components → picker}/IconPickerInline.stories.ts +3 -1
- package/src/components/compositions/elements/{components → picker}/IconPickerInline.test.ts +8 -8
- package/src/components/compositions/elements/{components → picker}/IconPickerInline.vue +4 -4
- package/src/components/compositions/elements/picker/IntegrationConnectorPicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/MapPicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/TimePicker.stories.ts +3 -1
- package/src/components/compositions/elements/picker/TimezonePicker.stories.ts +3 -1
- package/src/components/ui/accordion/Accordion.stories.ts +2 -0
- package/src/components/ui/alert/Alert.stories.ts +2 -0
- package/src/components/ui/avatar/Avatar.stories.ts +2 -0
- package/src/components/ui/badge/Badge.stories.ts +2 -0
- package/src/components/ui/button/Button.stories.ts +5 -0
- package/src/components/ui/calendar/Calendar.stories.ts +2 -0
- package/src/components/ui/card/Card.stories.ts +2 -0
- package/src/components/ui/checkbox/Checkbox.stories.ts +2 -0
- package/src/components/ui/combobox/Combobox.stories.ts +2 -0
- package/src/components/ui/command/Command.stories.ts +2 -0
- package/src/components/ui/dialog/Dialog.stories.ts +2 -0
- package/src/components/ui/dropdown-menu/DropdownMenu.stories.ts +2 -0
- package/src/components/ui/field-frame/FieldFrame.stories.ts +1 -1
- package/src/components/ui/index.ts +3 -3
- package/src/components/ui/input/Input.stories.ts +2 -0
- package/src/components/ui/label/Label.stories.ts +2 -0
- package/src/components/ui/popover/Popover.stories.ts +2 -0
- package/src/components/ui/progress/Progress.stories.ts +2 -0
- package/src/components/ui/radio-group/RadioGroup.stories.ts +2 -0
- package/src/components/ui/select/Select.stories.ts +2 -0
- package/src/components/ui/separator/Separator.stories.ts +2 -0
- package/src/components/ui/sheet/Sheet.stories.ts +2 -0
- package/src/components/ui/skeleton/Skeleton.stories.ts +2 -0
- package/src/components/ui/slider/Slider.stories.ts +2 -0
- package/src/components/ui/switch/Switch.stories.ts +2 -0
- package/src/components/ui/table/Table.stories.ts +2 -0
- package/src/components/ui/tabs/Tabs.stories.ts +2 -0
- package/src/components/ui/textarea/Textarea.stories.ts +2 -0
- package/src/components/ui/toast/Toaster.stories.ts +2 -0
- package/src/components/ui/toast/index.ts +1 -1
- package/src/components/ui/toggle/Toggle.stories.ts +2 -0
- package/src/components/ui/tooltip/Tooltip.stories.ts +2 -0
- package/src/configuration-block.ts +4 -0
- package/src/definitions/__tests__/schema.test.ts +0 -1
- package/src/definitions/elements/PickerElement.ts +2 -0
- package/src/definitions/elements/index.ts +0 -18
- package/src/definitions/index.ts +1 -1
- package/src/definitions/shared/base.ts +0 -1
- package/src/display.ts +15 -0
- package/src/editor.ts +5 -0
- package/src/engine/registry.ts +1 -7
- package/src/engine/useFormData.ts +1 -1
- package/src/file.ts +3 -0
- package/src/index.ts +3 -3
- package/src/input.ts +10 -0
- package/src/lib/storybook.ts +67 -0
- package/src/option-select.ts +9 -0
- package/src/pages/IndexPage.stories.ts +2 -1
- package/src/pages/ShowPage.stories.ts +2 -1
- package/src/pages/ShowPage.vue +1 -1
- package/src/picker.ts +11 -0
- package/src/stores/dependencyListBuilderStore.ts +1 -1
- package/src/stores/elementListBuilderStore.ts +1 -1
- package/src/stores/formBuilderStore.ts +1 -1
- package/src/stores/formDataStore.ts +1 -1
- package/src/stores/gridBuilderStore.ts +1 -1
- package/src/stores/objectBuilderStore.ts +1 -1
- package/src/stores/presetBuilderStore.ts +1 -1
- package/src/stores/quizBuilderStore.ts +1 -1
- package/src/stores/reactiveCanvasBuilderStore.ts +1 -1
- package/src/styles/themes/dark.css +1 -1
- package/src/styles/themes/default.css +1 -1
- package/src/styles/themes/kiosk.css +1 -1
- package/dist/components/compositions/elements/components/IconBadge.vue.js +0 -5
- package/dist/components/compositions/elements/components/IconBadge.vue.js.map +0 -1
- package/dist/components/compositions/elements/components/IconBadge.vue2.js +0 -77
- package/dist/components/compositions/elements/components/IconBadge.vue2.js.map +0 -1
- package/dist/components/compositions/elements/components/IconPickerInline.vue.js +0 -5
- package/dist/components/compositions/elements/components/IconPickerInline.vue.js.map +0 -1
- package/dist/components/compositions/elements/components/IconPickerInline.vue2.js.map +0 -1
- package/dist/definitions/elements/ComponentsElement.d.ts +0 -187
- package/dist/definitions/elements/ComponentsElement.d.ts.map +0 -1
- package/dist/definitions/elements/ComponentsElement.js +0 -111
- package/dist/definitions/elements/ComponentsElement.js.map +0 -1
- package/dist/styles/index.css +0 -1
- package/src/components/compositions/elements/components/IconBadge.stories.ts +0 -96
- package/src/components/compositions/elements/components/IconBadge.test.ts +0 -70
- package/src/components/compositions/elements/components/IconBadge.vue +0 -121
- package/src/definitions/elements/ComponentsElement.ts +0 -149
|
@@ -1,249 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Clock as U, Ban as P, XCircle as Q, CheckCircle2 as W, Loader2 as Y, Activity as Z, AlertTriangle as tt, ChevronDown as et, ChevronRight as st } from "lucide-vue-next";
|
|
3
|
-
import "../../../ui/badge/index.js";
|
|
4
|
-
import "../../../ui/button/index.js";
|
|
5
|
-
import "../../../ui/card/index.js";
|
|
6
|
-
import { cn as j } from "../../../../lib/utils.js";
|
|
7
|
-
import at from "../../../ui/card/Card.vue.js";
|
|
8
|
-
import it from "../../../ui/card/CardHeader.vue.js";
|
|
9
|
-
import nt from "../../../ui/card/CardTitle.vue.js";
|
|
10
|
-
import rt from "../../../ui/badge/Badge.vue.js";
|
|
11
|
-
import lt from "../../../ui/card/CardContent.vue.js";
|
|
12
|
-
import ot from "../../../ui/button/Button.vue.js";
|
|
13
|
-
const ut = { class: "flex items-center justify-between gap-2" }, ct = { class: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground" }, dt = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "font-mono",
|
|
16
|
-
"data-testid": "build-status-sha"
|
|
17
|
-
}, mt = {
|
|
18
|
-
key: 1,
|
|
19
|
-
class: "truncate",
|
|
20
|
-
"data-testid": "build-status-commit-message"
|
|
21
|
-
}, gt = {
|
|
22
|
-
key: 2,
|
|
23
|
-
"data-testid": "build-status-triggered-by"
|
|
24
|
-
}, ft = {
|
|
25
|
-
key: 3,
|
|
26
|
-
class: "flex items-center gap-1",
|
|
27
|
-
"data-testid": "build-status-duration"
|
|
28
|
-
}, vt = {
|
|
29
|
-
key: 0,
|
|
30
|
-
class: "text-xs text-destructive",
|
|
31
|
-
role: "alert",
|
|
32
|
-
"data-testid": "build-status-parse-error"
|
|
33
|
-
}, pt = {
|
|
34
|
-
key: 0,
|
|
35
|
-
class: "max-h-80 overflow-auto rounded-md bg-muted p-3 font-mono text-xs leading-snug",
|
|
36
|
-
"data-testid": "build-status-logs"
|
|
37
|
-
}, $t = /* @__PURE__ */ O({
|
|
38
|
-
__name: "BuildStatus",
|
|
39
|
-
props: {
|
|
40
|
-
initial: {},
|
|
41
|
-
eventStream: {},
|
|
42
|
-
socket: {},
|
|
43
|
-
onUnsubscribe: {},
|
|
44
|
-
showLogs: { type: Boolean, default: !0 },
|
|
45
|
-
label: { default: "Build Status" },
|
|
46
|
-
name: {},
|
|
47
|
-
classList: {}
|
|
48
|
-
},
|
|
49
|
-
setup(R, { expose: T }) {
|
|
50
|
-
var S, k, w, C, $, z, L, E;
|
|
51
|
-
const a = R, s = y({
|
|
52
|
-
status: ((S = a.initial) == null ? void 0 : S.status) ?? "pending",
|
|
53
|
-
startedAt: (k = a.initial) == null ? void 0 : k.startedAt,
|
|
54
|
-
finishedAt: (w = a.initial) == null ? void 0 : w.finishedAt,
|
|
55
|
-
durationMs: (C = a.initial) == null ? void 0 : C.durationMs,
|
|
56
|
-
commitSha: ($ = a.initial) == null ? void 0 : $.commitSha,
|
|
57
|
-
commitMessage: (z = a.initial) == null ? void 0 : z.commitMessage,
|
|
58
|
-
triggeredBy: (L = a.initial) == null ? void 0 : L.triggeredBy,
|
|
59
|
-
logs: (E = a.initial) != null && E.logs ? [...a.initial.logs] : []
|
|
60
|
-
}), g = y(!0), p = y(null);
|
|
61
|
-
X(
|
|
62
|
-
() => a.initial,
|
|
63
|
-
(t) => {
|
|
64
|
-
t && (s.value = {
|
|
65
|
-
status: t.status,
|
|
66
|
-
startedAt: t.startedAt,
|
|
67
|
-
finishedAt: t.finishedAt,
|
|
68
|
-
durationMs: t.durationMs,
|
|
69
|
-
commitSha: t.commitSha,
|
|
70
|
-
commitMessage: t.commitMessage,
|
|
71
|
-
triggeredBy: t.triggeredBy,
|
|
72
|
-
logs: t.logs ? [...t.logs] : []
|
|
73
|
-
});
|
|
74
|
-
},
|
|
75
|
-
{ deep: !0 }
|
|
76
|
-
);
|
|
77
|
-
function _(t) {
|
|
78
|
-
if (!t || typeof t != "object")
|
|
79
|
-
return;
|
|
80
|
-
const e = t;
|
|
81
|
-
s.value = {
|
|
82
|
-
status: e.status ?? s.value.status,
|
|
83
|
-
startedAt: e.startedAt ?? s.value.startedAt,
|
|
84
|
-
finishedAt: e.finishedAt ?? s.value.finishedAt,
|
|
85
|
-
durationMs: e.durationMs !== void 0 ? e.durationMs : s.value.durationMs,
|
|
86
|
-
commitSha: e.commitSha ?? s.value.commitSha,
|
|
87
|
-
commitMessage: e.commitMessage ?? s.value.commitMessage,
|
|
88
|
-
triggeredBy: e.triggeredBy ?? s.value.triggeredBy,
|
|
89
|
-
logs: Array.isArray(e.logs) ? e.logs : s.value.logs
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function F(t) {
|
|
93
|
-
const e = t.data;
|
|
94
|
-
if (typeof e == "string")
|
|
95
|
-
try {
|
|
96
|
-
_(JSON.parse(e)), p.value = null;
|
|
97
|
-
} catch (r) {
|
|
98
|
-
p.value = r instanceof Error ? r.message : String(r);
|
|
99
|
-
}
|
|
100
|
-
else e && typeof e == "object" && _(e);
|
|
101
|
-
}
|
|
102
|
-
let f = null;
|
|
103
|
-
q(() => {
|
|
104
|
-
const t = a.eventStream ?? a.socket;
|
|
105
|
-
if (!t)
|
|
106
|
-
return;
|
|
107
|
-
const e = (r) => {
|
|
108
|
-
F(r);
|
|
109
|
-
};
|
|
110
|
-
t.addEventListener("message", e), f = { target: t, handler: e };
|
|
111
|
-
}), G(() => {
|
|
112
|
-
f && (f.target.removeEventListener("message", f.handler), f = null), a.onUnsubscribe && a.onUnsubscribe();
|
|
113
|
-
});
|
|
114
|
-
const H = v(() => {
|
|
115
|
-
switch (s.value.status) {
|
|
116
|
-
case "running":
|
|
117
|
-
return "info";
|
|
118
|
-
case "success":
|
|
119
|
-
return "success";
|
|
120
|
-
case "failed":
|
|
121
|
-
return "destructive";
|
|
122
|
-
case "cancelled":
|
|
123
|
-
return "warning";
|
|
124
|
-
case "pending":
|
|
125
|
-
default:
|
|
126
|
-
return "secondary";
|
|
127
|
-
}
|
|
128
|
-
}), I = v(() => {
|
|
129
|
-
switch (s.value.status) {
|
|
130
|
-
case "running":
|
|
131
|
-
return Y;
|
|
132
|
-
case "success":
|
|
133
|
-
return W;
|
|
134
|
-
case "failed":
|
|
135
|
-
return Q;
|
|
136
|
-
case "cancelled":
|
|
137
|
-
return P;
|
|
138
|
-
case "pending":
|
|
139
|
-
default:
|
|
140
|
-
return U;
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
function J(t) {
|
|
144
|
-
if (t === void 0 || Number.isNaN(t))
|
|
145
|
-
return "";
|
|
146
|
-
const e = Math.round(t / 1e3);
|
|
147
|
-
if (e < 60)
|
|
148
|
-
return `${e}s`;
|
|
149
|
-
const r = Math.floor(e / 60), b = e % 60;
|
|
150
|
-
return `${r}m ${b}s`;
|
|
151
|
-
}
|
|
152
|
-
const x = v(() => {
|
|
153
|
-
const t = s.value.commitSha;
|
|
154
|
-
return t ? t.length > 7 ? t.slice(0, 7) : t : "";
|
|
155
|
-
}), A = v(
|
|
156
|
-
() => J(s.value.durationMs)
|
|
157
|
-
), B = v(() => s.value.status === "running");
|
|
158
|
-
return T({ applyEvent: _ }), (t, e) => (n(), h(i(at), {
|
|
159
|
-
class: N(i(j)(a.classList)),
|
|
160
|
-
"data-element-name": a.name ?? void 0,
|
|
161
|
-
"data-testid": "build-status"
|
|
162
|
-
}, {
|
|
163
|
-
default: m(() => [
|
|
164
|
-
u(i(it), { class: "flex flex-col gap-2 pb-3" }, {
|
|
165
|
-
default: m(() => [
|
|
166
|
-
c("div", ut, [
|
|
167
|
-
u(i(nt), { class: "flex items-center gap-2 text-base" }, {
|
|
168
|
-
default: m(() => [
|
|
169
|
-
u(i(Z), { class: "size-5 text-muted-foreground" }),
|
|
170
|
-
c("span", null, l(a.label), 1)
|
|
171
|
-
]),
|
|
172
|
-
_: 1
|
|
173
|
-
}),
|
|
174
|
-
u(i(rt), {
|
|
175
|
-
variant: H.value,
|
|
176
|
-
size: "default",
|
|
177
|
-
class: "capitalize",
|
|
178
|
-
"data-testid": "build-status-badge"
|
|
179
|
-
}, {
|
|
180
|
-
default: m(() => [
|
|
181
|
-
(n(), h(V(I.value), {
|
|
182
|
-
class: N(
|
|
183
|
-
i(j)(
|
|
184
|
-
"size-3.5",
|
|
185
|
-
B.value ? "animate-spin" : ""
|
|
186
|
-
)
|
|
187
|
-
),
|
|
188
|
-
"data-testid": B.value ? "build-status-spinner" : "build-status-icon"
|
|
189
|
-
}, null, 8, ["class", "data-testid"])),
|
|
190
|
-
c("span", null, l(s.value.status), 1)
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
}, 8, ["variant"])
|
|
194
|
-
]),
|
|
195
|
-
c("div", ct, [
|
|
196
|
-
x.value ? (n(), o("span", dt, l(x.value), 1)) : d("", !0),
|
|
197
|
-
s.value.commitMessage ? (n(), o("span", mt, l(s.value.commitMessage), 1)) : d("", !0),
|
|
198
|
-
s.value.triggeredBy ? (n(), o("span", gt, " by " + l(s.value.triggeredBy), 1)) : d("", !0),
|
|
199
|
-
A.value ? (n(), o("span", ft, [
|
|
200
|
-
u(i(U), { class: "size-3" }),
|
|
201
|
-
M(" " + l(A.value), 1)
|
|
202
|
-
])) : d("", !0)
|
|
203
|
-
]),
|
|
204
|
-
p.value ? (n(), o("p", vt, [
|
|
205
|
-
u(i(tt), { class: "inline size-3" }),
|
|
206
|
-
M(" " + l(p.value), 1)
|
|
207
|
-
])) : d("", !0)
|
|
208
|
-
]),
|
|
209
|
-
_: 1
|
|
210
|
-
}),
|
|
211
|
-
a.showLogs && s.value.logs && s.value.logs.length > 0 ? (n(), h(i(lt), {
|
|
212
|
-
key: 0,
|
|
213
|
-
class: "flex flex-col gap-2 pt-0"
|
|
214
|
-
}, {
|
|
215
|
-
default: m(() => [
|
|
216
|
-
u(i(ot), {
|
|
217
|
-
type: "button",
|
|
218
|
-
variant: "ghost",
|
|
219
|
-
size: "sm",
|
|
220
|
-
class: "w-fit -ml-2 text-xs",
|
|
221
|
-
"data-testid": "build-status-logs-toggle",
|
|
222
|
-
onClick: e[0] || (e[0] = (r) => g.value = !g.value)
|
|
223
|
-
}, {
|
|
224
|
-
default: m(() => [
|
|
225
|
-
(n(), h(V(g.value ? i(et) : i(st)), { class: "size-4" })),
|
|
226
|
-
c("span", null, l(g.value ? "Hide logs" : "Show logs") + " (" + l(s.value.logs.length) + ")", 1)
|
|
227
|
-
]),
|
|
228
|
-
_: 1
|
|
229
|
-
}),
|
|
230
|
-
g.value ? (n(), o("pre", pt, [
|
|
231
|
-
c("code", null, [
|
|
232
|
-
(n(!0), o(D, null, K(s.value.logs, (r, b) => (n(), o(D, { key: b }, [
|
|
233
|
-
M(l(r), 1),
|
|
234
|
-
e[1] || (e[1] = c("br", null, null, -1))
|
|
235
|
-
], 64))), 128))
|
|
236
|
-
])
|
|
237
|
-
])) : d("", !0)
|
|
238
|
-
]),
|
|
239
|
-
_: 1
|
|
240
|
-
})) : d("", !0)
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
}, 8, ["class", "data-element-name"]));
|
|
244
|
-
}
|
|
245
|
-
});
|
|
1
|
+
import f from "./BuildStatus.vue.js";
|
|
246
2
|
export {
|
|
247
|
-
|
|
3
|
+
f as default
|
|
248
4
|
};
|
|
249
5
|
//# sourceMappingURL=BuildStatus.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildStatus.vue2.js","sources":["../../../../../src/components/compositions/elements/code/BuildStatus.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Props-driven real-time build status composition. Subscribes to an\n * `EventSource` OR `WebSocket` (whichever is provided) and renders the\n * latest decoded `BuildStatusEvent`. The composition does NOT open or\n * close the underlying stream — the caller owns its lifecycle. The\n * optional `onUnsubscribe` callback fires on unmount for any extra\n * cleanup the caller wants.\n *\n * <BuildStatus\n * :initial=\"{ status: 'pending' }\"\n * :event-stream=\"es\"\n * :on-unsubscribe=\"() => es.close()\"\n * />\n */\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from \"vue\"\nimport {\n Activity,\n AlertTriangle,\n Ban,\n CheckCircle2,\n ChevronDown,\n ChevronRight,\n Clock,\n Loader2,\n XCircle,\n} from \"lucide-vue-next\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n} from \"@/components/ui/card\"\nimport { cn } from \"@/lib/utils\"\n\nexport type BuildStatusValue =\n | \"pending\"\n | \"running\"\n | \"success\"\n | \"failed\"\n | \"cancelled\"\n\nexport interface BuildStatusEvent {\n status: BuildStatusValue\n startedAt?: string | Date\n finishedAt?: string | Date\n durationMs?: number\n commitSha?: string\n commitMessage?: string\n triggeredBy?: string\n logs?: string[]\n}\n\ninterface MessageEventLike {\n data?: unknown\n}\ninterface EventListenerTarget {\n addEventListener: (type: string, listener: (e: MessageEventLike) => void) => void\n removeEventListener: (\n type: string,\n listener: (e: MessageEventLike) => void,\n ) => void\n}\n\nexport interface BuildStatusProps {\n /** Initial status to show before the stream emits. */\n initial?: BuildStatusEvent\n /** Optional EventSource to subscribe to (`message` events). */\n eventStream?: EventListenerTarget\n /** Optional WebSocket to subscribe to (`message` events). */\n socket?: EventListenerTarget\n /** Cleanup callback fired on unmount. The composition does NOT close\n * the underlying stream itself — caller owns the lifecycle. */\n onUnsubscribe?: () => void\n /** When true, render `logs[]` as a collapsible monospace block. */\n showLogs?: boolean\n label?: string\n name?: string | null\n classList?: string[] | string\n}\n\nconst props = withDefaults(defineProps<BuildStatusProps>(), {\n showLogs: true,\n label: \"Build Status\",\n})\n\nconst current = ref<BuildStatusEvent>({\n status: props.initial?.status ?? \"pending\",\n startedAt: props.initial?.startedAt,\n finishedAt: props.initial?.finishedAt,\n durationMs: props.initial?.durationMs,\n commitSha: props.initial?.commitSha,\n commitMessage: props.initial?.commitMessage,\n triggeredBy: props.initial?.triggeredBy,\n logs: props.initial?.logs ? [...props.initial.logs] : [],\n})\n\nconst logsExpanded = ref<boolean>(true)\nconst parseError = ref<string | null>(null)\n\nwatch(\n () => props.initial,\n (next) => {\n if (!next) {\n return\n }\n current.value = {\n status: next.status,\n startedAt: next.startedAt,\n finishedAt: next.finishedAt,\n durationMs: next.durationMs,\n commitSha: next.commitSha,\n commitMessage: next.commitMessage,\n triggeredBy: next.triggeredBy,\n logs: next.logs ? [...next.logs] : [],\n }\n },\n { deep: true },\n)\n\nfunction applyEvent(payload: unknown): void {\n if (!payload || typeof payload !== \"object\") {\n return\n }\n const next = payload as Partial<BuildStatusEvent>\n current.value = {\n status: (next.status as BuildStatusValue) ?? current.value.status,\n startedAt: next.startedAt ?? current.value.startedAt,\n finishedAt: next.finishedAt ?? current.value.finishedAt,\n durationMs:\n next.durationMs !== undefined ? next.durationMs : current.value.durationMs,\n commitSha: next.commitSha ?? current.value.commitSha,\n commitMessage: next.commitMessage ?? current.value.commitMessage,\n triggeredBy: next.triggeredBy ?? current.value.triggeredBy,\n logs: Array.isArray(next.logs) ? next.logs : current.value.logs,\n }\n}\n\nfunction handleMessage(e: MessageEventLike): void {\n const raw = e.data\n if (typeof raw === \"string\") {\n try {\n applyEvent(JSON.parse(raw))\n parseError.value = null\n } catch (err) {\n parseError.value = err instanceof Error ? err.message : String(err)\n }\n } else if (raw && typeof raw === \"object\") {\n applyEvent(raw)\n }\n}\n\nlet attached: { target: EventListenerTarget; handler: (e: MessageEventLike) => void } | null = null\n\nonMounted(() => {\n const target = props.eventStream ?? props.socket\n if (!target) {\n return\n }\n const handler = (e: MessageEventLike): void => {\n handleMessage(e)\n }\n target.addEventListener(\"message\", handler)\n attached = { target, handler }\n})\n\nonBeforeUnmount(() => {\n if (attached) {\n attached.target.removeEventListener(\"message\", attached.handler)\n attached = null\n }\n if (props.onUnsubscribe) {\n props.onUnsubscribe()\n }\n})\n\n// -------- visual helpers ------------------------------------------------\n\nconst statusBadgeVariant = computed<\n \"secondary\" | \"info\" | \"success\" | \"destructive\" | \"warning\"\n>(() => {\n switch (current.value.status) {\n case \"running\":\n return \"info\"\n case \"success\":\n return \"success\"\n case \"failed\":\n return \"destructive\"\n case \"cancelled\":\n return \"warning\"\n case \"pending\":\n default:\n return \"secondary\"\n }\n})\n\nconst statusIcon = computed(() => {\n switch (current.value.status) {\n case \"running\":\n return Loader2\n case \"success\":\n return CheckCircle2\n case \"failed\":\n return XCircle\n case \"cancelled\":\n return Ban\n case \"pending\":\n default:\n return Clock\n }\n})\n\nfunction formatDuration(value: number | undefined): string {\n if (value === undefined || Number.isNaN(value)) {\n return \"\"\n }\n const sec = Math.round(value / 1000)\n if (sec < 60) {\n return `${sec}s`\n }\n const m = Math.floor(sec / 60)\n const s = sec % 60\n return `${m}m ${s}s`\n}\n\nconst shortSha = computed<string>(() => {\n const sha = current.value.commitSha\n if (!sha) {\n return \"\"\n }\n return sha.length > 7 ? sha.slice(0, 7) : sha\n})\n\nconst durationLabel = computed<string>(() =>\n formatDuration(current.value.durationMs),\n)\n\nconst isRunning = computed<boolean>(() => current.value.status === \"running\")\n\ndefineExpose({ applyEvent })\n</script>\n\n<template>\n <Card\n :class=\"cn(props.classList)\"\n :data-element-name=\"props.name ?? undefined\"\n data-testid=\"build-status\"\n >\n <CardHeader class=\"flex flex-col gap-2 pb-3\">\n <div class=\"flex items-center justify-between gap-2\">\n <CardTitle class=\"flex items-center gap-2 text-base\">\n <Activity class=\"size-5 text-muted-foreground\" />\n <span>{{ props.label }}</span>\n </CardTitle>\n <Badge\n :variant=\"statusBadgeVariant\"\n size=\"default\"\n class=\"capitalize\"\n data-testid=\"build-status-badge\"\n >\n <component\n :is=\"statusIcon\"\n :class=\"\n cn(\n 'size-3.5',\n isRunning ? 'animate-spin' : '',\n )\n \"\n :data-testid=\"\n isRunning\n ? 'build-status-spinner'\n : 'build-status-icon'\n \"\n />\n <span>{{ current.status }}</span>\n </Badge>\n </div>\n <div\n class=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground\"\n >\n <span\n v-if=\"shortSha\"\n class=\"font-mono\"\n data-testid=\"build-status-sha\"\n >\n {{ shortSha }}\n </span>\n <span\n v-if=\"current.commitMessage\"\n class=\"truncate\"\n data-testid=\"build-status-commit-message\"\n >\n {{ current.commitMessage }}\n </span>\n <span\n v-if=\"current.triggeredBy\"\n data-testid=\"build-status-triggered-by\"\n >\n by {{ current.triggeredBy }}\n </span>\n <span\n v-if=\"durationLabel\"\n class=\"flex items-center gap-1\"\n data-testid=\"build-status-duration\"\n >\n <Clock class=\"size-3\" />\n {{ durationLabel }}\n </span>\n </div>\n <p\n v-if=\"parseError\"\n class=\"text-xs text-destructive\"\n role=\"alert\"\n data-testid=\"build-status-parse-error\"\n >\n <AlertTriangle class=\"inline size-3\" />\n {{ parseError }}\n </p>\n </CardHeader>\n <CardContent\n v-if=\"props.showLogs && current.logs && current.logs.length > 0\"\n class=\"flex flex-col gap-2 pt-0\"\n >\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n class=\"w-fit -ml-2 text-xs\"\n data-testid=\"build-status-logs-toggle\"\n @click=\"logsExpanded = !logsExpanded\"\n >\n <component\n :is=\"logsExpanded ? ChevronDown : ChevronRight\"\n class=\"size-4\"\n />\n <span>{{ logsExpanded ? \"Hide logs\" : \"Show logs\" }} ({{ current.logs.length }})</span>\n </Button>\n <pre\n v-if=\"logsExpanded\"\n class=\"max-h-80 overflow-auto rounded-md bg-muted p-3 font-mono text-xs leading-snug\"\n data-testid=\"build-status-logs\"\n ><code><template\n v-for=\"(line, i) in current.logs\"\n :key=\"i\"\n >{{ line }}<br></template></code></pre>\n </CardContent>\n </Card>\n</template>\n"],"names":["props","__props","current","ref","_a","_b","_c","_d","_e","_f","_g","_h","logsExpanded","parseError","watch","next","applyEvent","payload","handleMessage","e","raw","err","attached","onMounted","target","handler","onBeforeUnmount","statusBadgeVariant","computed","statusIcon","Loader2","CheckCircle2","XCircle","Ban","Clock","formatDuration","value","sec","m","s","shortSha","sha","durationLabel","isRunning","__expose","_createBlock","_unref","Card","_normalizeClass","cn","_createVNode","CardHeader","_createElementVNode","_hoisted_1","CardTitle","Activity","_toDisplayString","Badge","_openBlock","_resolveDynamicComponent","_hoisted_2","_createElementBlock","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_createTextVNode","_hoisted_7","AlertTriangle","CardContent","Button","_cache","$event","ChevronDown","ChevronRight","_hoisted_8","_Fragment","line","i"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmFA,UAAMA,IAAQC,GAKRC,IAAUC,EAAsB;AAAA,MACpC,UAAQC,IAAAJ,EAAM,YAAN,gBAAAI,EAAe,WAAU;AAAA,MACjC,YAAWC,IAAAL,EAAM,YAAN,gBAAAK,EAAe;AAAA,MAC1B,aAAYC,IAAAN,EAAM,YAAN,gBAAAM,EAAe;AAAA,MAC3B,aAAYC,IAAAP,EAAM,YAAN,gBAAAO,EAAe;AAAA,MAC3B,YAAWC,IAAAR,EAAM,YAAN,gBAAAQ,EAAe;AAAA,MAC1B,gBAAeC,IAAAT,EAAM,YAAN,gBAAAS,EAAe;AAAA,MAC9B,cAAaC,IAAAV,EAAM,YAAN,gBAAAU,EAAe;AAAA,MAC5B,OAAMC,IAAAX,EAAM,YAAN,QAAAW,EAAe,OAAO,CAAC,GAAGX,EAAM,QAAQ,IAAI,IAAI,CAAA;AAAA,IAAC,CACxD,GAEKY,IAAeT,EAAa,EAAI,GAChCU,IAAaV,EAAmB,IAAI;AAE1C,IAAAW;A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HFiC,EAGEc,EAFK/C,UAAekC,EAAA2B,EAAA,IAAc3B,EAAA4B,EAAA,CAAY,GAAA,EAC9C,OAAM,UAAQ;AAAA,gBAEhBtB,EAAuF,QAAA,MAAAI,EAA9E5C,EAAA,QAAY,cAAA,WAAA,IAA+B,OAAE4C,EAAGtD,EAAA,MAAQ,KAAK,MAAM,IAAG,KAAC,CAAA;AAAA,cAAA;;;YAG1EU,EAAA,SADR8C,EAAA,GAAAG,EAOyC,OAPzCc,IAOyC;AAAA,cAHxCvB,EAGkC,QAAA,MAAA;AAAA,iBAH5BM,EAAA,EAAA,GAAAG,EAGqBe,WAFJ1E,EAAA,MAAQ,MAAI,CAAxB2E,GAAMC,wBACRA,KAAC;AAAA,sBACLD,CAAI,GAAA,CAAA;AAAA,kCAAGzB,EAAI,MAAA,MAAA,MAAA,EAAA;AAAA,gBAAA;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"BuildStatus.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type ChatMessageAlign = "auto" | "start" | "end";
|
|
2
|
+
export type ChatMessageVariant = "default" | "muted" | "accent" | "destructive";
|
|
3
|
+
export interface ChatMessageAction {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ChatMessageProps {
|
|
9
|
+
message?: string;
|
|
10
|
+
role?: "user" | "assistant" | "system" | "tool" | string;
|
|
11
|
+
authorName?: string;
|
|
12
|
+
authorAvatarUrl?: string;
|
|
13
|
+
authorAvatarFallback?: string;
|
|
14
|
+
timestamp?: string | Date;
|
|
15
|
+
pending?: boolean;
|
|
16
|
+
error?: string;
|
|
17
|
+
actions?: ChatMessageAction[];
|
|
18
|
+
align?: ChatMessageAlign;
|
|
19
|
+
variant?: ChatMessageVariant;
|
|
20
|
+
allowHtml?: boolean;
|
|
21
|
+
classList?: string[] | string;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: import('vue').DefineComponent<ChatMessageProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
24
|
+
action: (payload: {
|
|
25
|
+
id: string;
|
|
26
|
+
}) => any;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<ChatMessageProps> & Readonly<{
|
|
28
|
+
onAction?: ((payload: {
|
|
29
|
+
id: string;
|
|
30
|
+
}) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
align: ChatMessageAlign;
|
|
33
|
+
actions: ChatMessageAction[];
|
|
34
|
+
role: "user" | "assistant" | "system" | "tool" | string;
|
|
35
|
+
pending: boolean;
|
|
36
|
+
allowHtml: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
38
|
+
export default _default;
|
|
39
|
+
//# sourceMappingURL=ChatMessage.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatMessage.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/compositions/elements/code/ChatMessage.vue"],"names":[],"mappings":"AAiZA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;AACvD,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,OAAO,GACP,QAAQ,GACR,aAAa,CAAA;AAEjB,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAA;IACxD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC7B,KAAK,CAAC,EAAE,gBAAgB,CAAA;IACxB,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;CAC9B;;;YAY8B,MAAM;;;;YAAN,MAAM;;;WAhB3B,gBAAgB;aADd,iBAAiB,EAAE;UAPtB,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM;aAK9C,OAAO;eAKL,OAAO;;AAidrB,wBASG"}
|
|
@@ -1,5 +1,270 @@
|
|
|
1
|
-
import f from "
|
|
1
|
+
import { defineComponent as R, computed as i, ref as S, watch as O, openBlock as a, createElementBlock as l, normalizeClass as f, unref as r, createBlock as c, withCtx as p, createCommentVNode as o, createVNode as C, createTextVNode as x, toDisplayString as u, createElementVNode as v, Fragment as P, renderList as q, resolveDynamicComponent as G } from "vue";
|
|
2
|
+
import { cva as J } from "class-variance-authority";
|
|
3
|
+
import "../../../ui/avatar/index.js";
|
|
4
|
+
import "../../../ui/badge/index.js";
|
|
5
|
+
import "../../../ui/button/index.js";
|
|
6
|
+
import { cn as g } from "../../../../lib/utils.js";
|
|
7
|
+
import z from "../../../ui/avatar/Avatar.vue.js";
|
|
8
|
+
import T from "../../../ui/avatar/AvatarImage.vue.js";
|
|
9
|
+
import U from "../../../ui/avatar/AvatarFallback.vue.js";
|
|
10
|
+
import K from "../../../ui/badge/Badge.vue.js";
|
|
11
|
+
import Q from "../../../ui/button/Button.vue.js";
|
|
12
|
+
const W = ["data-role", "data-align", "data-variant"], X = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "font-medium",
|
|
15
|
+
"data-testid": "chat-message-author"
|
|
16
|
+
}, Y = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "flex items-center gap-1 py-1",
|
|
19
|
+
"data-testid": "chat-message-pending",
|
|
20
|
+
"aria-label": "Typing"
|
|
21
|
+
}, Z = ["innerHTML"], ee = {
|
|
22
|
+
key: 3,
|
|
23
|
+
class: "whitespace-pre-wrap leading-snug",
|
|
24
|
+
"data-testid": "chat-message-body"
|
|
25
|
+
}, te = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "text-xs text-destructive",
|
|
28
|
+
"data-testid": "chat-message-error"
|
|
29
|
+
}, fe = /* @__PURE__ */ R({
|
|
30
|
+
__name: "ChatMessage",
|
|
31
|
+
props: {
|
|
32
|
+
message: {},
|
|
33
|
+
role: { default: "user" },
|
|
34
|
+
authorName: {},
|
|
35
|
+
authorAvatarUrl: {},
|
|
36
|
+
authorAvatarFallback: {},
|
|
37
|
+
timestamp: {},
|
|
38
|
+
pending: { type: Boolean, default: !1 },
|
|
39
|
+
error: {},
|
|
40
|
+
actions: { default: () => [] },
|
|
41
|
+
align: { default: "auto" },
|
|
42
|
+
variant: {},
|
|
43
|
+
allowHtml: { type: Boolean, default: !1 },
|
|
44
|
+
classList: {}
|
|
45
|
+
},
|
|
46
|
+
emits: ["action"],
|
|
47
|
+
setup(V, { emit: B }) {
|
|
48
|
+
const e = V, F = B, b = i(() => e.align === "start" || e.align === "end" ? e.align : e.role === "user" ? "end" : "start"), d = i(() => b.value === "end"), L = {
|
|
49
|
+
user: "accent",
|
|
50
|
+
assistant: "muted",
|
|
51
|
+
system: "default",
|
|
52
|
+
tool: "muted"
|
|
53
|
+
}, h = i(() => e.variant ? e.variant : L[e.role] ?? "default"), $ = J(
|
|
54
|
+
"max-w-[36rem] min-w-0 break-words rounded-2xl border px-3 py-2 text-sm shadow-sm",
|
|
55
|
+
{
|
|
56
|
+
variants: {
|
|
57
|
+
variant: {
|
|
58
|
+
default: "bg-card text-card-foreground border-border",
|
|
59
|
+
muted: "bg-muted text-foreground border-transparent",
|
|
60
|
+
accent: "bg-primary text-primary-foreground border-transparent",
|
|
61
|
+
destructive: "bg-destructive text-destructive-foreground border-transparent"
|
|
62
|
+
},
|
|
63
|
+
align: {
|
|
64
|
+
start: "rounded-tl-sm",
|
|
65
|
+
end: "rounded-tr-sm"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
defaultVariants: {
|
|
69
|
+
variant: "default",
|
|
70
|
+
align: "start"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
), j = i(
|
|
74
|
+
() => $({
|
|
75
|
+
variant: h.value,
|
|
76
|
+
align: b.value
|
|
77
|
+
})
|
|
78
|
+
), k = i(() => {
|
|
79
|
+
if (e.authorAvatarFallback)
|
|
80
|
+
return e.authorAvatarFallback;
|
|
81
|
+
const t = (e.authorName ?? e.role ?? "?").trim();
|
|
82
|
+
return t ? t.charAt(0).toUpperCase() : "?";
|
|
83
|
+
}), _ = i(() => {
|
|
84
|
+
const t = e.timestamp;
|
|
85
|
+
if (!t)
|
|
86
|
+
return "";
|
|
87
|
+
const s = t instanceof Date ? t : new Date(t);
|
|
88
|
+
if (Number.isNaN(s.getTime()))
|
|
89
|
+
return "";
|
|
90
|
+
try {
|
|
91
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
92
|
+
hour: "numeric",
|
|
93
|
+
minute: "2-digit"
|
|
94
|
+
}).format(s);
|
|
95
|
+
} catch {
|
|
96
|
+
return s.toISOString();
|
|
97
|
+
}
|
|
98
|
+
}), D = i(() => {
|
|
99
|
+
const t = e.classList;
|
|
100
|
+
return t ? Array.isArray(t) ? t.join(" ") : t : "";
|
|
101
|
+
}), w = i(() => !!e.role && e.role !== "user"), y = S({});
|
|
102
|
+
function I(t) {
|
|
103
|
+
return t.replace(/[-_\s]+(.)?/g, (s, n) => n ? n.toUpperCase() : "").replace(/^(.)/, (s) => s.toUpperCase());
|
|
104
|
+
}
|
|
105
|
+
async function E(t) {
|
|
106
|
+
const s = t.filter((m) => m.icon).map((m) => m.icon);
|
|
107
|
+
if (s.length === 0)
|
|
108
|
+
return;
|
|
109
|
+
const A = await import("lucide-vue-next"), N = { ...y.value };
|
|
110
|
+
for (const m of s) {
|
|
111
|
+
const M = I(m);
|
|
112
|
+
N[m] = A[M] ?? null;
|
|
113
|
+
}
|
|
114
|
+
y.value = N;
|
|
115
|
+
}
|
|
116
|
+
O(
|
|
117
|
+
() => e.actions,
|
|
118
|
+
(t) => {
|
|
119
|
+
E(t ?? []);
|
|
120
|
+
},
|
|
121
|
+
{ immediate: !0, deep: !0 }
|
|
122
|
+
);
|
|
123
|
+
function H(t) {
|
|
124
|
+
F("action", { id: t });
|
|
125
|
+
}
|
|
126
|
+
return (t, s) => (a(), l("div", {
|
|
127
|
+
class: f(
|
|
128
|
+
r(g)(
|
|
129
|
+
"flex w-full items-end gap-2",
|
|
130
|
+
d.value ? "justify-end" : "justify-start",
|
|
131
|
+
D.value
|
|
132
|
+
)
|
|
133
|
+
),
|
|
134
|
+
"data-role": e.role,
|
|
135
|
+
"data-align": b.value,
|
|
136
|
+
"data-variant": h.value,
|
|
137
|
+
"data-testid": "chat-message"
|
|
138
|
+
}, [
|
|
139
|
+
d.value ? o("", !0) : (a(), c(r(z), {
|
|
140
|
+
key: 0,
|
|
141
|
+
size: "sm",
|
|
142
|
+
class: "mb-1",
|
|
143
|
+
"data-testid": "chat-message-avatar"
|
|
144
|
+
}, {
|
|
145
|
+
default: p(() => [
|
|
146
|
+
e.authorAvatarUrl ? (a(), c(r(T), {
|
|
147
|
+
key: 0,
|
|
148
|
+
src: e.authorAvatarUrl,
|
|
149
|
+
alt: e.authorName ?? e.role
|
|
150
|
+
}, null, 8, ["src", "alt"])) : o("", !0),
|
|
151
|
+
C(r(U), null, {
|
|
152
|
+
default: p(() => [
|
|
153
|
+
x(u(k.value), 1)
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
})
|
|
157
|
+
]),
|
|
158
|
+
_: 1
|
|
159
|
+
})),
|
|
160
|
+
v("div", {
|
|
161
|
+
class: f(
|
|
162
|
+
r(g)(
|
|
163
|
+
"flex min-w-0 flex-col gap-1",
|
|
164
|
+
d.value ? "items-end" : "items-start"
|
|
165
|
+
)
|
|
166
|
+
)
|
|
167
|
+
}, [
|
|
168
|
+
v("div", {
|
|
169
|
+
class: f(j.value),
|
|
170
|
+
"data-testid": "chat-message-bubble"
|
|
171
|
+
}, [
|
|
172
|
+
e.authorName || w.value || _.value ? (a(), l("div", {
|
|
173
|
+
key: 0,
|
|
174
|
+
class: f(
|
|
175
|
+
r(g)(
|
|
176
|
+
"mb-1 flex w-full items-center gap-2 text-xs",
|
|
177
|
+
d.value ? "flex-row-reverse" : "flex-row"
|
|
178
|
+
)
|
|
179
|
+
)
|
|
180
|
+
}, [
|
|
181
|
+
e.authorName ? (a(), l("span", X, u(e.authorName), 1)) : o("", !0),
|
|
182
|
+
w.value ? (a(), c(r(K), {
|
|
183
|
+
key: 1,
|
|
184
|
+
variant: "outline",
|
|
185
|
+
size: "sm",
|
|
186
|
+
"data-testid": "chat-message-role-badge"
|
|
187
|
+
}, {
|
|
188
|
+
default: p(() => [
|
|
189
|
+
x(u(e.role), 1)
|
|
190
|
+
]),
|
|
191
|
+
_: 1
|
|
192
|
+
})) : o("", !0),
|
|
193
|
+
_.value ? (a(), l("span", {
|
|
194
|
+
key: 2,
|
|
195
|
+
class: f(
|
|
196
|
+
r(g)(
|
|
197
|
+
"text-[11px] opacity-70",
|
|
198
|
+
h.value === "accent" || h.value === "destructive" ? "" : "text-muted-foreground",
|
|
199
|
+
d.value ? "mr-auto" : "ml-auto"
|
|
200
|
+
)
|
|
201
|
+
),
|
|
202
|
+
"data-testid": "chat-message-timestamp"
|
|
203
|
+
}, u(_.value), 3)) : o("", !0)
|
|
204
|
+
], 2)) : o("", !0),
|
|
205
|
+
e.pending ? (a(), l("div", Y, [...s[0] || (s[0] = [
|
|
206
|
+
v("span", { class: "size-1.5 animate-bounce rounded-full bg-current opacity-60" }, null, -1),
|
|
207
|
+
v("span", { class: "size-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:150ms]" }, null, -1),
|
|
208
|
+
v("span", { class: "size-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:300ms]" }, null, -1)
|
|
209
|
+
])])) : e.allowHtml && e.message ? (a(), l("div", {
|
|
210
|
+
key: 2,
|
|
211
|
+
class: "whitespace-pre-wrap leading-snug",
|
|
212
|
+
"data-testid": "chat-message-body",
|
|
213
|
+
innerHTML: e.message
|
|
214
|
+
}, null, 8, Z)) : e.message ? (a(), l("div", ee, u(e.message), 1)) : o("", !0)
|
|
215
|
+
], 2),
|
|
216
|
+
e.error ? (a(), l("p", te, u(e.error), 1)) : o("", !0),
|
|
217
|
+
e.actions && e.actions.length > 0 ? (a(), l("div", {
|
|
218
|
+
key: 1,
|
|
219
|
+
class: f(
|
|
220
|
+
r(g)(
|
|
221
|
+
"flex flex-wrap gap-1",
|
|
222
|
+
d.value ? "justify-end" : "justify-start"
|
|
223
|
+
)
|
|
224
|
+
),
|
|
225
|
+
"data-testid": "chat-message-actions"
|
|
226
|
+
}, [
|
|
227
|
+
(a(!0), l(P, null, q(e.actions, (n) => (a(), c(r(Q), {
|
|
228
|
+
key: n.id,
|
|
229
|
+
type: "button",
|
|
230
|
+
variant: "ghost",
|
|
231
|
+
size: "sm",
|
|
232
|
+
"data-action-id": n.id,
|
|
233
|
+
onClick: (A) => H(n.id)
|
|
234
|
+
}, {
|
|
235
|
+
default: p(() => [
|
|
236
|
+
n.icon && y.value[n.icon] ? (a(), c(G(n.icon ? y.value[n.icon] : null), { key: 0 })) : o("", !0),
|
|
237
|
+
v("span", null, u(n.label), 1)
|
|
238
|
+
]),
|
|
239
|
+
_: 2
|
|
240
|
+
}, 1032, ["data-action-id", "onClick"]))), 128))
|
|
241
|
+
], 2)) : o("", !0)
|
|
242
|
+
], 2),
|
|
243
|
+
d.value ? (a(), c(r(z), {
|
|
244
|
+
key: 1,
|
|
245
|
+
size: "sm",
|
|
246
|
+
class: "mb-1",
|
|
247
|
+
"data-testid": "chat-message-avatar"
|
|
248
|
+
}, {
|
|
249
|
+
default: p(() => [
|
|
250
|
+
e.authorAvatarUrl ? (a(), c(r(T), {
|
|
251
|
+
key: 0,
|
|
252
|
+
src: e.authorAvatarUrl,
|
|
253
|
+
alt: e.authorName ?? e.role
|
|
254
|
+
}, null, 8, ["src", "alt"])) : o("", !0),
|
|
255
|
+
C(r(U), null, {
|
|
256
|
+
default: p(() => [
|
|
257
|
+
x(u(k.value), 1)
|
|
258
|
+
]),
|
|
259
|
+
_: 1
|
|
260
|
+
})
|
|
261
|
+
]),
|
|
262
|
+
_: 1
|
|
263
|
+
})) : o("", !0)
|
|
264
|
+
], 10, W));
|
|
265
|
+
}
|
|
266
|
+
});
|
|
2
267
|
export {
|
|
3
|
-
|
|
268
|
+
fe as default
|
|
4
269
|
};
|
|
5
270
|
//# sourceMappingURL=ChatMessage.vue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"ChatMessage.vue.js","sources":["../../../../../src/components/compositions/elements/code/ChatMessage.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Generic chat-message bubble composition.\n *\n * Display-only — renders a single chat bubble in the style of Slack /\n * Discord / iMessage. Side-aligned by role, color-tinted by variant,\n * optional avatar, role badge, timestamp, typing indicator, inline\n * error, and a row of ghost-button actions.\n *\n * No platform-specific integration. Form-data store is not touched.\n *\n * <ChatMessage\n * role=\"assistant\"\n * authorName=\"Assistant\"\n * message=\"Hello, how can I help?\"\n * :timestamp=\"new Date()\"\n * />\n */\nimport { computed, ref, watch, type Component } from \"vue\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\nexport type ChatMessageAlign = \"auto\" | \"start\" | \"end\"\nexport type ChatMessageVariant =\n | \"default\"\n | \"muted\"\n | \"accent\"\n | \"destructive\"\n\nexport interface ChatMessageAction {\n id: string\n label: string\n icon?: string\n}\n\nexport interface ChatMessageProps {\n message?: string\n role?: \"user\" | \"assistant\" | \"system\" | \"tool\" | string\n authorName?: string\n authorAvatarUrl?: string\n authorAvatarFallback?: string\n timestamp?: string | Date\n pending?: boolean\n error?: string\n actions?: ChatMessageAction[]\n align?: ChatMessageAlign\n variant?: ChatMessageVariant\n allowHtml?: boolean\n classList?: string[] | string\n}\n\nconst props = withDefaults(defineProps<ChatMessageProps>(), {\n role: \"user\",\n align: \"auto\",\n pending: false,\n allowHtml: false,\n actions: () => [],\n})\n\nconst emit = defineEmits<{\n (e: \"action\", payload: { id: string }): void\n}>()\n\n/* ---------- alignment ---------- */\n\nconst resolvedAlign = computed<\"start\" | \"end\">(() => {\n if (props.align === \"start\" || props.align === \"end\") {\n return props.align\n }\n return props.role === \"user\" ? \"end\" : \"start\"\n})\n\nconst isEnd = computed<boolean>(() => resolvedAlign.value === \"end\")\n\n/* ---------- variant ---------- */\n\nconst ROLE_VARIANT: Record<string, ChatMessageVariant> = {\n user: \"accent\",\n assistant: \"muted\",\n system: \"default\",\n tool: \"muted\",\n}\n\nconst resolvedVariant = computed<ChatMessageVariant>(() => {\n if (props.variant) {\n return props.variant\n }\n return ROLE_VARIANT[props.role] ?? \"default\"\n})\n\nconst bubbleVariants = cva(\n \"max-w-[36rem] min-w-0 break-words rounded-2xl border px-3 py-2 text-sm shadow-sm\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground border-border\",\n muted: \"bg-muted text-foreground border-transparent\",\n accent: \"bg-primary text-primary-foreground border-transparent\",\n destructive:\n \"bg-destructive text-destructive-foreground border-transparent\",\n },\n align: {\n start: \"rounded-tl-sm\",\n end: \"rounded-tr-sm\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n align: \"start\",\n },\n },\n)\n\ntype BubbleVariants = VariantProps<typeof bubbleVariants>\n\nconst bubbleClass = computed<string>(() =>\n bubbleVariants({\n variant: resolvedVariant.value as BubbleVariants[\"variant\"],\n align: resolvedAlign.value,\n }),\n)\n\n/* ---------- avatar fallback ---------- */\n\nconst derivedAvatarFallback = computed<string>(() => {\n if (props.authorAvatarFallback) {\n return props.authorAvatarFallback\n }\n const source = (props.authorName ?? props.role ?? \"?\").trim()\n return source ? source.charAt(0).toUpperCase() : \"?\"\n})\n\n/* ---------- timestamp ---------- */\n\nconst formattedTimestamp = computed<string>(() => {\n const ts = props.timestamp\n if (!ts) {\n return \"\"\n }\n const date = ts instanceof Date ? ts : new Date(ts)\n if (Number.isNaN(date.getTime())) {\n return \"\"\n }\n try {\n return new Intl.DateTimeFormat(undefined, {\n hour: \"numeric\",\n minute: \"2-digit\",\n }).format(date)\n } catch {\n return date.toISOString()\n }\n})\n\n/* ---------- root class ---------- */\n\nconst rootClass = computed<string>(() => {\n const cl = props.classList\n if (!cl) {\n return \"\"\n }\n return Array.isArray(cl) ? cl.join(\" \") : cl\n})\n\n/* ---------- role badge ---------- */\n\nconst showRoleBadge = computed<boolean>(() => {\n return Boolean(props.role) && props.role !== \"user\"\n})\n\n/* ---------- actions (lucide icons, lazy) ---------- */\n\nconst ActionIcons = ref<Record<string, Component | null>>({})\n\nfunction toPascalCase(input: string): string {\n return input\n .replace(/[-_\\s]+(.)?/g, (_, ch?: string) => (ch ? ch.toUpperCase() : \"\"))\n .replace(/^(.)/, (m) => m.toUpperCase())\n}\n\nasync function loadActionIcons(actions: ChatMessageAction[]): Promise<void> {\n const needed = actions.filter((a) => a.icon).map((a) => a.icon as string)\n if (needed.length === 0) {\n return\n }\n const mod = await import(\"lucide-vue-next\")\n const registry = mod as unknown as Record<string, Component | undefined>\n const next: Record<string, Component | null> = { ...ActionIcons.value }\n for (const raw of needed) {\n const name = toPascalCase(raw)\n next[raw] = registry[name] ?? null\n }\n ActionIcons.value = next\n}\n\nwatch(\n () => props.actions,\n (next) => {\n void loadActionIcons(next ?? [])\n },\n { immediate: true, deep: true },\n)\n\nfunction onAction(id: string): void {\n emit(\"action\", { id })\n}\n</script>\n\n<template>\n <div\n :class=\"\n cn(\n 'flex w-full items-end gap-2',\n isEnd ? 'justify-end' : 'justify-start',\n rootClass,\n )\n \"\n :data-role=\"props.role\"\n :data-align=\"resolvedAlign\"\n :data-variant=\"resolvedVariant\"\n data-testid=\"chat-message\"\n >\n <!-- left-side avatar -->\n <Avatar\n v-if=\"!isEnd\"\n size=\"sm\"\n class=\"mb-1\"\n data-testid=\"chat-message-avatar\"\n >\n <AvatarImage\n v-if=\"props.authorAvatarUrl\"\n :src=\"props.authorAvatarUrl\"\n :alt=\"props.authorName ?? props.role\"\n />\n <AvatarFallback>{{ derivedAvatarFallback }}</AvatarFallback>\n </Avatar>\n\n <div\n :class=\"\n cn(\n 'flex min-w-0 flex-col gap-1',\n isEnd ? 'items-end' : 'items-start',\n )\n \"\n >\n <!-- bubble -->\n <div :class=\"bubbleClass\" data-testid=\"chat-message-bubble\">\n <!-- header -->\n <div\n v-if=\"props.authorName || showRoleBadge || formattedTimestamp\"\n :class=\"\n cn(\n 'mb-1 flex w-full items-center gap-2 text-xs',\n isEnd ? 'flex-row-reverse' : 'flex-row',\n )\n \"\n >\n <span\n v-if=\"props.authorName\"\n class=\"font-medium\"\n data-testid=\"chat-message-author\"\n >\n {{ props.authorName }}\n </span>\n <Badge\n v-if=\"showRoleBadge\"\n variant=\"outline\"\n size=\"sm\"\n data-testid=\"chat-message-role-badge\"\n >\n {{ props.role }}\n </Badge>\n <span\n v-if=\"formattedTimestamp\"\n :class=\"\n cn(\n 'text-[11px] opacity-70',\n resolvedVariant === 'accent' || resolvedVariant === 'destructive'\n ? ''\n : 'text-muted-foreground',\n isEnd ? 'mr-auto' : 'ml-auto',\n )\n \"\n data-testid=\"chat-message-timestamp\"\n >\n {{ formattedTimestamp }}\n </span>\n </div>\n\n <!-- body -->\n <div\n v-if=\"props.pending\"\n class=\"flex items-center gap-1 py-1\"\n data-testid=\"chat-message-pending\"\n aria-label=\"Typing\"\n >\n <span class=\"size-1.5 animate-bounce rounded-full bg-current opacity-60\" />\n <span\n class=\"size-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:150ms]\"\n />\n <span\n class=\"size-1.5 animate-bounce rounded-full bg-current opacity-60 [animation-delay:300ms]\"\n />\n </div>\n <div\n v-else-if=\"props.allowHtml && props.message\"\n class=\"whitespace-pre-wrap leading-snug\"\n data-testid=\"chat-message-body\"\n v-html=\"props.message\"\n />\n <div\n v-else-if=\"props.message\"\n class=\"whitespace-pre-wrap leading-snug\"\n data-testid=\"chat-message-body\"\n >\n {{ props.message }}\n </div>\n </div>\n\n <!-- error -->\n <p\n v-if=\"props.error\"\n class=\"text-xs text-destructive\"\n data-testid=\"chat-message-error\"\n >\n {{ props.error }}\n </p>\n\n <!-- actions -->\n <div\n v-if=\"props.actions && props.actions.length > 0\"\n :class=\"\n cn(\n 'flex flex-wrap gap-1',\n isEnd ? 'justify-end' : 'justify-start',\n )\n \"\n data-testid=\"chat-message-actions\"\n >\n <Button\n v-for=\"action in props.actions\"\n :key=\"action.id\"\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n :data-action-id=\"action.id\"\n @click=\"onAction(action.id)\"\n >\n <component\n :is=\"action.icon ? ActionIcons[action.icon] : null\"\n v-if=\"action.icon && ActionIcons[action.icon]\"\n />\n <span>{{ action.label }}</span>\n </Button>\n </div>\n </div>\n\n <!-- right-side avatar -->\n <Avatar\n v-if=\"isEnd\"\n size=\"sm\"\n class=\"mb-1\"\n data-testid=\"chat-message-avatar\"\n >\n <AvatarImage\n v-if=\"props.authorAvatarUrl\"\n :src=\"props.authorAvatarUrl\"\n :alt=\"props.authorName ?? props.role\"\n />\n <AvatarFallback>{{ derivedAvatarFallback }}</AvatarFallback>\n </Avatar>\n </div>\n</template>\n"],"names":["props","__props","emit","__emit","resolvedAlign","computed","isEnd","ROLE_VARIANT","resolvedVariant","bubbleVariants","cva","bubbleClass","derivedAvatarFallback","source","formattedTimestamp","ts","date","rootClass","cl","showRoleBadge","ActionIcons","ref","toPascalCase","input","_","ch","m","loadActionIcons","actions","needed","a","registry","next","raw","name","watch","onAction","id","_createElementBlock","_normalizeClass","_unref","cn","_createBlock","Avatar","AvatarImage","_createVNode","AvatarFallback","_createElementVNode","_openBlock","_hoisted_2","_toDisplayString","Badge","_createTextVNode","_hoisted_3","_cache","_hoisted_5","_hoisted_6","_Fragment","_renderList","action","Button","$event","_resolveDynamicComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,UAAMA,IAAQC,GAQRC,IAAOC,GAMPC,IAAgBC,EAA0B,MAC1CL,EAAM,UAAU,WAAWA,EAAM,UAAU,QACtCA,EAAM,QAERA,EAAM,SAAS,SAAS,QAAQ,OACxC,GAEKM,IAAQD,EAAkB,MAAMD,EAAc,UAAU,KAAK,GAI7DG,IAAmD;AAAA,MACvD,MAAM;AAAA,MACN,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,MAAM;AAAA,IAAA,GAGFC,IAAkBH,EAA6B,MAC/CL,EAAM,UACDA,EAAM,UAERO,EAAaP,EAAM,IAAI,KAAK,SACpC,GAEKS,IAAiBC;AAAA,MACrB;AAAA,MACA;AAAA,QACE,UAAU;AAAA,UACR,SAAS;AAAA,YACP,SAAS;AAAA,YACT,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,aACE;AAAA,UAAA;AAAA,UAEJ,OAAO;AAAA,YACL,OAAO;AAAA,YACP,KAAK;AAAA,UAAA;AAAA,QACP;AAAA,QAEF,iBAAiB;AAAA,UACf,SAAS;AAAA,UACT,OAAO;AAAA,QAAA;AAAA,MACT;AAAA,IACF,GAKIC,IAAcN;AAAA,MAAiB,MACnCI,EAAe;AAAA,QACb,SAASD,EAAgB;AAAA,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