@templatical/editor 0.0.6 → 0.1.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/LICENSE +56 -0
- package/README.md +69 -0
- package/dist/{AiChatSidebar-CNhSl_ty.js → AiChatSidebar-DgAjDWO1.js} +68 -68
- package/dist/{AiFeatureMenu-BFVsjUJY.js → AiFeatureMenu-j6oaiRVi.js} +25 -25
- package/dist/{CloudEditor-Bz5Xkxej.js → CloudEditor-yCOkIkZ-.js} +428 -437
- package/dist/{CollaboratorBar-D2Gu5Xj2.js → CollaboratorBar-CWVdp2Y6.js} +23 -23
- package/dist/CommentsSidebar-CSPHhbQH.js +439 -0
- package/dist/CountdownBlock-DK6P_RaQ.js +92 -0
- package/dist/CountdownToolbar-Dv-Sz4ui.js +210 -0
- package/dist/{DesignReferenceSidebar-u2tKSQK0.js → DesignReferenceSidebar-D7zfvux6.js} +58 -58
- package/dist/LoadingTrack-Cdz2SSq9.js +10 -0
- package/dist/ModuleBrowserModal-BLYuCZht.js +205 -0
- package/dist/ModulePreviewCanvas-CHYqP6K3.js +106 -0
- package/dist/NumberWithSuffix-D-5-AZc3.js +424 -0
- package/dist/{ParagraphEditor-CYrzYJO5.js → ParagraphEditor-DivLBNWv.js} +237 -236
- package/dist/{RichTextEditorContent-BeqlWlWB.js → RichTextEditorContent-G1lXgVJR.js} +42 -42
- package/dist/{SaveModuleDialog-Kde6X13X.js → SaveModuleDialog-DGVfiOmE.js} +29 -29
- package/dist/{SnapshotHistory-B3EfIcLW.js → SnapshotHistory-DM__MqSu.js} +38 -38
- package/dist/{TemplateScoringPanel-D2vCRGgx.js → TemplateScoringPanel-CW13Tlol.js} +80 -80
- package/dist/{TestEmailModal-Egk0DFDf.js → TestEmailModal-B8bYqWCY.js} +28 -28
- package/dist/TitleEditor-4Jrp3C4m.js +167 -0
- package/dist/{TplModal-BCruYWks.js → TplModal-BkoIz0oz.js} +14 -14
- package/dist/{_plugin-vue_export-helper-5TQrnOhO.js → _plugin-vue_export-helper-OO6pH1Dh.js} +11 -11
- package/dist/{blockTypeIcons-rW4BUUNC.js → blockTypeIcons-4AS3CvXn.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js → AiFeatureMenu-BcHyzTQy.js} +4 -4
- package/dist/cdn/chunks/{AiFeatureMenu-Dcbshcfu.js.map → AiFeatureMenu-BcHyzTQy.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Bca3RyBW.js → CloudEditor-TaEZq-YW.js} +179 -188
- package/dist/cdn/chunks/CloudEditor-TaEZq-YW.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js → CollaboratorBar-DbC5-3If.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-sToKJfHi.js.map → CollaboratorBar-DbC5-3If.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-CfPmCQ7j.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-CB0EVxwN.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js → ModuleBrowserModal-Df2fp9dj.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-BNhwXbWw.js.map → ModuleBrowserModal-Df2fp9dj.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js → ModulePreviewCanvas-Dw1OCpvV.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-DylUylPU.js.map → ModulePreviewCanvas-Dw1OCpvV.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js +425 -0
- package/dist/cdn/chunks/NumberWithSuffix-BU6ycXyG.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js → ParagraphEditor-BMRNg_BX.js} +37 -37
- package/dist/cdn/chunks/{ParagraphEditor-BBw90y_p.js.map → ParagraphEditor-BMRNg_BX.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js → RichTextEditorContent-BKYY1YMZ.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DvyIO3nR.js.map → RichTextEditorContent-BKYY1YMZ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js → SaveModuleDialog-D977Tg7t.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-DvbSHvhF.js.map → SaveModuleDialog-D977Tg7t.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js → TitleEditor-q9IzNy38.js} +11 -11
- package/dist/cdn/chunks/{TitleEditor-tS3mgoVr.js.map → TitleEditor-q9IzNy38.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js → blockTypeIcons-L0fRc3qs.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-DbnbyEQE.js.map → blockTypeIcons-L0fRc3qs.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js → de-3exf7MYE.js} +1 -1
- package/dist/cdn/chunks/{de-CgUR_S5I.js.map → de-3exf7MYE.js.map} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js → de-C8LxVUsb.js} +1 -1
- package/dist/cdn/chunks/{de-D8oDPhBD.js.map → de-C8LxVUsb.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BUmN5e4r.js → dist-D5g00M8N.js} +6 -2
- package/dist/cdn/chunks/dist-D5g00M8N.js.map +1 -0
- package/dist/cdn/chunks/{draggable-m78lz0gI.js → draggable-Bcb86AsV.js} +5 -5
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js → emojiData-DUHzsh4j.js} +1 -1
- package/dist/cdn/chunks/{emojiData-CNNgvDqx.js.map → emojiData-DUHzsh4j.js.map} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js → en-BoEycuqw.js} +1 -1
- package/dist/cdn/chunks/{en-HseRPPeK.js.map → en-BoEycuqw.js.map} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js → en-KNPUKxYp.js} +1 -1
- package/dist/cdn/chunks/{en-BBmfBDqY.js.map → en-KNPUKxYp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js → extensions-BZ1POyiv.js} +11 -11
- package/dist/cdn/chunks/{extensions-ClpY3m0W.js.map → extensions-BZ1POyiv.js.map} +1 -1
- package/dist/cdn/chunks/{features-B5dGxWLi.js → features-Ccqmm6-M.js} +549 -627
- package/dist/cdn/chunks/features-Ccqmm6-M.js.map +1 -0
- package/dist/cdn/chunks/{icons-hflTyPmb.js → icons-x53__2GC.js} +8 -8
- package/dist/cdn/chunks/icons-x53__2GC.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BxyRVCKv.js → liquid.browser-CEMn-ZqL.js} +2 -2
- package/dist/cdn/chunks/liquid.browser-CEMn-ZqL.js.map +1 -0
- package/dist/cdn/chunks/{media-library-Dgy-V-JA.js → media-library-DUoQk-w7.js} +97 -97
- package/dist/cdn/chunks/media-library-DUoQk-w7.js.map +1 -0
- package/dist/cdn/chunks/{pusher-D-m2WSdL.js → pusher-DwSQn6BA.js} +2 -2
- package/dist/cdn/chunks/pusher-DwSQn6BA.js.map +1 -0
- package/dist/cdn/chunks/{src-TDwMmqm0.js → src-DskCIAr8.js} +8 -8
- package/dist/cdn/chunks/{src-TDwMmqm0.js.map → src-DskCIAr8.js.map} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js → styleConstants-DP1VOca8.js} +1 -1
- package/dist/cdn/chunks/{styleConstants-DFe3I4Op.js.map → styleConstants-DP1VOca8.js.map} +1 -1
- package/dist/cdn/chunks/{styles-hCOCOR6K.js → styles-BIlpNe52.js} +622 -1238
- package/dist/cdn/chunks/styles-BIlpNe52.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C28NLMX8.js → tiptap-hPC_BgDO.js} +850 -826
- package/dist/cdn/chunks/tiptap-hPC_BgDO.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +92 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B5S-C0bz.js → check-Bff5NzCh.js} +1 -1
- package/dist/{chevron-down-CjsV1T0W.js → chevron-down-Bbv4SJwx.js} +1 -1
- package/dist/{circle-alert-CVTmJHKW.js → circle-alert-Dpr8MgkR.js} +1 -1
- package/dist/{clock-CAjdSHBy.js → clock-raVPKfl4.js} +1 -1
- package/dist/{dist-DJrDTuRr.js → dist-BHgEdO-M.js} +1001 -983
- package/dist/dist-BibwE8Y0.js +5 -0
- package/dist/{dist-DPM-DFvh.js → dist-BnlZ_HwX.js} +340 -340
- package/dist/{dist-BTtKPcd2.js → dist-C9yhcxsf.js} +2 -2
- package/dist/{dist-COguaIvm.js → dist-CGffNO8z.js} +2 -2
- package/dist/dist-CfGpCUSx.js +5 -0
- package/dist/{dist-COOFiBFV.js → dist-Chd-H2S3.js} +5 -5
- package/dist/{dist-DfqLGwSF.js → dist-Cq0OFLMj.js} +2 -2
- package/dist/{dist-B4LTlrAn.js → dist-D42og5Sc.js} +191 -185
- package/dist/{dist-CBr-qhie.js → dist-Owxo48fF.js} +2 -2
- package/dist/{dist-Crqkuf-w.js → dist-UZ8UzVZ-.js} +15 -15
- package/dist/dist-n0PkFNGl.js +314 -0
- package/dist/{dist-DHYuVJ_7.js → dist-skgH9dyo.js} +2 -2
- package/dist/{extensions-C6xp_B7K.js → extensions-DQKaICBH.js} +81 -81
- package/dist/{image-up-vZa1Txr-.js → image-up-B1AEiHCh.js} +1 -1
- package/dist/index.d.ts +17 -6
- package/dist/{keys-C0MQRs8d.js → keys-CIw9mUI2.js} +1 -1
- package/dist/{liquid.browser-C02owkex.js → liquid.browser-Bm53dnK1.js} +1 -1
- package/dist/{loader-circle-DilFjHSk.js → loader-circle-BYeKJ3to.js} +1 -1
- package/dist/{message-circle-Dpcnc2oa.js → message-circle-PhNlI7e7.js} +1 -1
- package/dist/{refresh-cw-4r7rkHHX.js → refresh-cw-DhDYRBDd.js} +1 -1
- package/dist/{rolldown-runtime-gEudmnaM.js → rolldown-runtime-BZGGJVDF.js} +2 -5
- package/dist/{scan-line-684IxPQ0.js → scan-line-Bw8bauvt.js} +1 -1
- package/dist/{send-ChDw64yL.js → send-CJPSzbLO.js} +1 -1
- package/dist/{shield-check-9dhLdyST.js → shield-check-DdEvVYMH.js} +1 -1
- package/dist/{sparkles-Co9fkDcv.js → sparkles-DT_27AYs.js} +1 -1
- package/dist/style.css +2 -0
- package/dist/{styleConstants-RV3eYwkD.js → styleConstants-Dqz9z3aa.js} +6 -45
- package/dist/styles-tcwlvlEB.js +2942 -0
- package/dist/templatical-editor.js +114 -119
- package/dist/text-align-start-4Hx15GUf.js +43 -0
- package/dist/{trash-2-CZkMtjeC.js → trash-2-BY-xp5hg.js} +1 -1
- package/dist/{triangle-alert-Dvt51agD.js → triangle-alert-DG72vdb2.js} +1 -1
- package/dist/useEditorCore-DMH2QpUL.js +8946 -0
- package/dist/{useI18n-D6m7ZUgY.js → useI18n-B8CN2iWs.js} +4 -4
- package/dist/{useMergeTag-CSXcnFBc.js → useMergeTag-Dz_Dx2Jz.js} +3 -3
- package/dist/vue.runtime.esm-bundler-DryoQb-v.js +5775 -0
- package/dist/{x-CU2XZOkQ.js → x-D-7GkO6Z.js} +1 -1
- package/package.json +31 -15
- package/dist/CommentsSidebar-CTeEAZTj.js +0 -439
- package/dist/LoadingTrack--aUassFH.js +0 -10
- package/dist/ModuleBrowserModal-DNxODPlX.js +0 -205
- package/dist/ModulePreviewCanvas-DnGe1Y-2.js +0 -106
- package/dist/TitleEditor-DwUpo4gF.js +0 -167
- package/dist/cdn/chunks/CloudEditor-Bca3RyBW.js.map +0 -1
- package/dist/cdn/chunks/dist-BUmN5e4r.js.map +0 -1
- package/dist/cdn/chunks/draggable-m78lz0gI.js.map +0 -1
- package/dist/cdn/chunks/features-B5dGxWLi.js.map +0 -1
- package/dist/cdn/chunks/icons-hflTyPmb.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BxyRVCKv.js.map +0 -1
- package/dist/cdn/chunks/media-library-Dgy-V-JA.js.map +0 -1
- package/dist/cdn/chunks/pusher-D-m2WSdL.js.map +0 -1
- package/dist/cdn/chunks/styles-hCOCOR6K.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C28NLMX8.js.map +0 -1
- package/dist/dist-Ac4o1O4a.js +0 -314
- package/dist/dist-DEJZ9iAU.js +0 -5
- package/dist/dist-DmVOCJjI.js +0 -5
- package/dist/styles-nvxFh6L6.js +0 -3557
- package/dist/templatical-editor.css +0 -2
- package/dist/templatical-editor.umd.cjs +0 -178
- package/dist/useEditorCore-ColJh1ST.js +0 -5695
- /package/dist/cdn/chunks/{_rolldown_dynamic_import_helper-DMEI4TQ3.js → _rolldown_dynamic_import_helper-BRcA6nWq.js} +0 -0
- /package/dist/{de-Dh8ON-dm.js → de-CN0xu_Tp.js} +0 -0
- /package/dist/{emojiData-Qc8mH_zW.js → emojiData-CwKEDxVf.js} +0 -0
- /package/dist/{en-C7IShRSD.js → en-DXvHkaUF.js} +0 -0
- /package/dist/{formatRelativeTime-D8f6NR7i.js → formatRelativeTime-BSpx5DHC.js} +0 -0
- /package/dist/{readableTextColor-B809bF5J.js → readableTextColor-CYCxm1jQ.js} +0 -0
- /package/dist/{timeouts-CmBrLeZA.js → timeouts-BSGxjuUF.js} +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Functional Source License, Version 1.1, MIT Future License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Templatical
|
|
4
|
+
|
|
5
|
+
## Terms and Conditions
|
|
6
|
+
|
|
7
|
+
### Licensor ("We")
|
|
8
|
+
|
|
9
|
+
Templatical
|
|
10
|
+
|
|
11
|
+
### The Software
|
|
12
|
+
|
|
13
|
+
Templatical Email Editor — the visual drag-and-drop email template editor
|
|
14
|
+
(@templatical/core, @templatical/editor, and @templatical/media-library
|
|
15
|
+
packages).
|
|
16
|
+
|
|
17
|
+
### Grant of Rights
|
|
18
|
+
|
|
19
|
+
Subject to the terms and conditions of this License, We hereby grant You a
|
|
20
|
+
non-exclusive, worldwide, non-transferable license to use, copy, modify,
|
|
21
|
+
create derivative works, and redistribute the Software, subject to the
|
|
22
|
+
following conditions:
|
|
23
|
+
|
|
24
|
+
### Permitted Uses
|
|
25
|
+
|
|
26
|
+
You may use the Software for any purpose, including commercial purposes,
|
|
27
|
+
**provided that** you do not offer the Software, or a substantially similar
|
|
28
|
+
product built using the Software, as a hosted or managed service that
|
|
29
|
+
competes with Templatical's commercial offerings.
|
|
30
|
+
|
|
31
|
+
### Change Date
|
|
32
|
+
|
|
33
|
+
Two (2) years from the date of each release of the Software.
|
|
34
|
+
|
|
35
|
+
### Change License
|
|
36
|
+
|
|
37
|
+
MIT License
|
|
38
|
+
|
|
39
|
+
On the Change Date, the above copyright notice and this permission notice
|
|
40
|
+
shall be replaced with the MIT License, and the Software will be available
|
|
41
|
+
under the MIT License for all purposes without restriction.
|
|
42
|
+
|
|
43
|
+
### Notices
|
|
44
|
+
|
|
45
|
+
You must retain this license notice in all copies or substantial portions
|
|
46
|
+
of the Software.
|
|
47
|
+
|
|
48
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
49
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
50
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
Note: The @templatical/types, @templatical/renderer, and
|
|
55
|
+
@templatical/import-beefree packages are licensed separately under the MIT
|
|
56
|
+
License. See LICENSE-MIT for those packages' terms.
|
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @templatical/editor
|
|
2
|
+
|
|
3
|
+
> Vue 3 visual drag-and-drop email editor — drop into any web app with one function call.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@templatical/editor)
|
|
6
|
+
[](https://github.com/templatical/sdk/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
The visual editor for [Templatical](https://github.com/templatical/sdk) — an open-source drag-and-drop email editor with JSON templates and MJML output.
|
|
9
|
+
|
|
10
|
+
- 🧩 **14 block types** — title, paragraph, image, button, section, divider, spacer, social icons, menu, table, HTML, video, countdown, custom
|
|
11
|
+
- 🎨 **27 design tokens** — full theming, dark mode, custom fonts
|
|
12
|
+
- 🔌 **Framework-agnostic** — works in React, Vue, Svelte, Angular, vanilla
|
|
13
|
+
- 📦 **JSON in, MJML out** — portable templates, render with any email provider
|
|
14
|
+
- 🌍 **Bilingual** — English + German built in
|
|
15
|
+
- 🔒 **TypeScript strict** — full type safety end to end
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
Install the editor alongside `@templatical/renderer` — the renderer is what enables `editor.toMjml()` (the editor auto-detects it at runtime).
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @templatical/editor @templatical/renderer
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { init } from '@templatical/editor';
|
|
29
|
+
import '@templatical/editor/style.css';
|
|
30
|
+
|
|
31
|
+
const editor = await init({
|
|
32
|
+
container: '#editor',
|
|
33
|
+
onChange(content) {
|
|
34
|
+
// content is JSON — store/version/sync however you want
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Render to MJML when sending email
|
|
39
|
+
const mjml = editor.toMjml();
|
|
40
|
+
|
|
41
|
+
// Always unmount when removing the editor (cleans up listeners + DOM)
|
|
42
|
+
editor.unmount();
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<div id="editor" style="height: 100vh"></div>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Framework integration
|
|
50
|
+
|
|
51
|
+
First-class examples for **React, Vue, Svelte, Angular, and vanilla JS** are in the [installation guide](https://docs.templatical.com/getting-started/installation).
|
|
52
|
+
|
|
53
|
+
## Cloud features
|
|
54
|
+
|
|
55
|
+
For AI rewrite, real-time collaboration, comments, snapshots, and saved modules, use `initCloud()` instead. See the [Cloud guide](https://docs.templatical.com/cloud/getting-started).
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
- [Quick Start](https://docs.templatical.com/getting-started/quick-start)
|
|
60
|
+
- [Editor API reference](https://docs.templatical.com/api/editor)
|
|
61
|
+
- [Block reference](https://docs.templatical.com/guide/blocks)
|
|
62
|
+
- [Theming](https://docs.templatical.com/guide/theming)
|
|
63
|
+
- [Custom blocks](https://docs.templatical.com/guide/custom-blocks)
|
|
64
|
+
|
|
65
|
+
Full docs at **[docs.templatical.com](https://docs.templatical.com)**.
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
[FSL-1.1-MIT](https://github.com/templatical/sdk/blob/main/LICENSE) — free for any non-competing commercial use, automatically converts to MIT after 2 years per release. [License FAQ](https://docs.templatical.com/license-faq).
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import { useAiChat as
|
|
13
|
-
var
|
|
1
|
+
import { Ct as e, E as t, H as n, M as r, O as i, Ot as a, P as o, S as s, V as ee, Y as c, _ as l, b as u, d, g as f, h as p, k as m, m as h, s as te, t as ne, tt as g, y as _, z as v } from "./vue.runtime.esm-bundler-DryoQb-v.js";
|
|
2
|
+
import { o as re, s as ie } from "./dist-n0PkFNGl.js";
|
|
3
|
+
import { C as ae, T as y, f as oe, g as se, r as ce } from "./keys-CIw9mUI2.js";
|
|
4
|
+
import { n as b, t as x } from "./_plugin-vue_export-helper-OO6pH1Dh.js";
|
|
5
|
+
import { t as le } from "./circle-alert-Dpr8MgkR.js";
|
|
6
|
+
import { t as ue } from "./loader-circle-BYeKJ3to.js";
|
|
7
|
+
import { t as de } from "./send-CJPSzbLO.js";
|
|
8
|
+
import { t as S } from "./sparkles-DT_27AYs.js";
|
|
9
|
+
import { t as fe } from "./trash-2-BY-xp5hg.js";
|
|
10
|
+
import { t as pe } from "./x-D-7GkO6Z.js";
|
|
11
|
+
import { t as me } from "./LoadingTrack-Cdz2SSq9.js";
|
|
12
|
+
import { useAiChat as C } from "@templatical/core/cloud";
|
|
13
|
+
var w = b("redo-2", [["path", {
|
|
14
14
|
d: "m15 14 5-5-5-5",
|
|
15
15
|
key: "12vg1m"
|
|
16
16
|
}], ["path", {
|
|
17
17
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
18
18
|
key: "6uklza"
|
|
19
|
-
}]]),
|
|
19
|
+
}]]), T = b("undo-2", [["path", {
|
|
20
20
|
d: "M9 14 4 9l5-5",
|
|
21
21
|
key: "102s5s"
|
|
22
22
|
}], ["path", {
|
|
@@ -25,27 +25,27 @@ var T = i("redo-2", [["path", {
|
|
|
25
25
|
}]]);
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/composables/useAliveFlag.ts
|
|
28
|
-
function
|
|
28
|
+
function E() {
|
|
29
29
|
let e = { alive: !0 };
|
|
30
|
-
return
|
|
30
|
+
return m(() => {
|
|
31
31
|
e.alive = !1;
|
|
32
32
|
}), e;
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
36
|
-
var
|
|
36
|
+
var D = {
|
|
37
37
|
key: 0,
|
|
38
38
|
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
39
|
-
},
|
|
39
|
+
}, O = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, k = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, A = { class: "tpl:flex tpl:items-center tpl:gap-1" }, j = ["title"], M = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, N = {
|
|
40
40
|
key: 0,
|
|
41
41
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
42
|
-
},
|
|
42
|
+
}, P = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, F = {
|
|
43
43
|
key: 1,
|
|
44
44
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
45
|
-
},
|
|
45
|
+
}, I = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, L = {
|
|
46
46
|
key: 2,
|
|
47
47
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
48
|
-
},
|
|
48
|
+
}, R = {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
51
51
|
style: {
|
|
@@ -54,10 +54,10 @@ var O = {
|
|
|
54
54
|
"max-width": "85%",
|
|
55
55
|
"box-shadow": "var(--tpl-shadow)"
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, z = {
|
|
58
58
|
key: 1,
|
|
59
59
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
60
|
-
},
|
|
60
|
+
}, B = {
|
|
61
61
|
key: 1,
|
|
62
62
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
63
63
|
style: {
|
|
@@ -80,24 +80,24 @@ var O = {
|
|
|
80
80
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
81
81
|
"backdrop-filter": "blur(2px)"
|
|
82
82
|
}
|
|
83
|
-
}, _e = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ve = ["onClick"], ye = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, xe = ["placeholder", "disabled"], Se = ["disabled"], Ce = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, V = /* @__PURE__ */
|
|
83
|
+
}, _e = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ve = ["onClick"], ye = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, be = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, xe = ["placeholder", "disabled"], Se = ["disabled"], Ce = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, V = /* @__PURE__ */ x(/* @__PURE__ */ s({
|
|
84
84
|
__name: "AiChatSidebar",
|
|
85
85
|
props: {
|
|
86
86
|
visible: { type: Boolean },
|
|
87
87
|
onApply: { type: Function }
|
|
88
88
|
},
|
|
89
89
|
emits: ["close"],
|
|
90
|
-
setup(
|
|
91
|
-
let
|
|
90
|
+
setup(s, { emit: m }) {
|
|
91
|
+
let b = s, x = m, V = y(ae, "AiChatSidebar"), H = y(oe, "AiChatSidebar"), we = y(ce, "AiChatSidebar"), U = t(se, []), W = E(), G = C({
|
|
92
92
|
authManager: we,
|
|
93
93
|
getTemplateId: () => H.state.template?.id ?? null,
|
|
94
|
-
onApply:
|
|
94
|
+
onApply: b.onApply,
|
|
95
95
|
onError: void 0
|
|
96
|
-
}), K =
|
|
96
|
+
}), K = c(""), q = c(null), J = c(!1), Y = c(0), { pause: X, resume: Te } = re(() => {
|
|
97
97
|
let e = G.suggestions.value?.length ?? 0;
|
|
98
98
|
Y.value < e ? Y.value++ : X();
|
|
99
|
-
}, 150, { immediate: !1 }), { start: Ee } =
|
|
100
|
-
|
|
99
|
+
}, 150, { immediate: !1 }), { start: Ee } = ie(() => Te(), 100, { immediate: !1 });
|
|
100
|
+
v(() => G.suggestions.value?.length ?? 0, (e) => {
|
|
101
101
|
if (X(), e === 0) {
|
|
102
102
|
Y.value = 0;
|
|
103
103
|
return;
|
|
@@ -105,11 +105,11 @@ var O = {
|
|
|
105
105
|
Y.value = 0, Ee();
|
|
106
106
|
});
|
|
107
107
|
function Z() {
|
|
108
|
-
|
|
108
|
+
i(() => {
|
|
109
109
|
q.value && (q.value.scrollTop = q.value.scrollHeight);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
v(() => G.messages.value?.length ?? 0, () => Z()), v(() => b.visible, async (e) => {
|
|
113
113
|
if (e && !J.value) {
|
|
114
114
|
if (J.value = !0, await G.loadConversation(), !W.alive) return;
|
|
115
115
|
(G.messages.value?.length ?? 0) === 0 && H.content.value.blocks.length === 0 && G.loadSuggestions(H.content.value, U);
|
|
@@ -128,7 +128,7 @@ var O = {
|
|
|
128
128
|
function Oe(e) {
|
|
129
129
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), Q());
|
|
130
130
|
}
|
|
131
|
-
return (
|
|
131
|
+
return (t, i) => (r(), p(ne, {
|
|
132
132
|
"enter-active-class": "tpl-ai-slide-enter-active",
|
|
133
133
|
"enter-from-class": "tpl:translate-x-full",
|
|
134
134
|
"enter-to-class": "tpl:translate-x-0",
|
|
@@ -136,42 +136,42 @@ var O = {
|
|
|
136
136
|
"leave-from-class": "tpl:translate-x-0",
|
|
137
137
|
"leave-to-class": "tpl:translate-x-full"
|
|
138
138
|
}, {
|
|
139
|
-
default:
|
|
140
|
-
|
|
139
|
+
default: ee(() => [s.visible ? (r(), l("div", D, [
|
|
140
|
+
h("div", O, [h("div", k, [u(g(S), {
|
|
141
141
|
size: 13,
|
|
142
142
|
"stroke-width": 2
|
|
143
|
-
}),
|
|
143
|
+
}), h("span", null, a(g(V).aiChat.title), 1)]), h("div", A, [(g(G).messages.value?.length ?? 0) > 0 ? (r(), l("button", {
|
|
144
144
|
key: 0,
|
|
145
145
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
146
|
-
title:
|
|
147
|
-
onClick:
|
|
148
|
-
}, [
|
|
146
|
+
title: g(V).aiChat.clear,
|
|
147
|
+
onClick: i[0] ||= (e) => g(G).clearChat()
|
|
148
|
+
}, [u(g(fe), {
|
|
149
149
|
size: 14,
|
|
150
150
|
"stroke-width": 2
|
|
151
|
-
})], 8,
|
|
151
|
+
})], 8, j)) : f("", !0), h("button", {
|
|
152
152
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
153
|
-
onClick:
|
|
154
|
-
}, [
|
|
153
|
+
onClick: i[1] ||= (e) => x("close")
|
|
154
|
+
}, [u(g(pe), {
|
|
155
155
|
size: 14,
|
|
156
156
|
"stroke-width": 2
|
|
157
157
|
})])])]),
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
h("div", M, [
|
|
159
|
+
h("div", {
|
|
160
160
|
ref_key: "messagesContainer",
|
|
161
161
|
ref: q,
|
|
162
162
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
163
|
-
}, [
|
|
163
|
+
}, [g(G).isLoadingHistory.value ? (r(), l("div", N, [u(g(ue), {
|
|
164
164
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
165
165
|
size: 24,
|
|
166
166
|
"stroke-width": 2
|
|
167
|
-
}),
|
|
167
|
+
}), h("p", P, a(g(V).aiChat.loadingHistory), 1)])) : (g(G).messages.value?.length ?? 0) === 0 ? (r(), l("div", F, [u(g(S), {
|
|
168
168
|
size: 32,
|
|
169
169
|
"stroke-width": 1.5,
|
|
170
170
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
171
|
-
}),
|
|
171
|
+
}), h("p", I, a(g(V).aiChat.placeholder), 1)])) : (r(), l("div", L, [(r(!0), l(d, null, o(g(G).messages.value, (e, t) => (r(), l("div", {
|
|
172
172
|
key: e.id,
|
|
173
173
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
174
|
-
}, [e.role === "user" ? (
|
|
174
|
+
}, [e.role === "user" ? (r(), l("div", R, a(e.content), 1)) : (r(), l("div", z, [!$(e.content) && g(G).isGenerating.value && t === (g(G).messages.value?.length ?? 0) - 1 ? (r(), p(me, { key: 0 })) : (r(), l("div", B, a($(e.content) || g(V).aiChat.applied), 1)), e.id === g(G).lastApplyMessageId.value && !g(G).isGenerating.value ? (r(), l("button", {
|
|
175
175
|
key: 2,
|
|
176
176
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
177
177
|
style: {
|
|
@@ -179,47 +179,47 @@ var O = {
|
|
|
179
179
|
color: "var(--tpl-text-muted)",
|
|
180
180
|
"background-color": "transparent"
|
|
181
181
|
},
|
|
182
|
-
onClick:
|
|
183
|
-
}, [
|
|
182
|
+
onClick: i[2] ||= (e) => g(G).toggleLastRevert()
|
|
183
|
+
}, [g(G).isLastChangeReverted.value ? (r(), l(d, { key: 0 }, [u(g(w), {
|
|
184
184
|
size: 12,
|
|
185
185
|
"stroke-width": 2
|
|
186
|
-
}),
|
|
186
|
+
}), _(" " + a(g(V).aiChat.reapply), 1)], 64)) : (r(), l(d, { key: 1 }, [u(g(T), {
|
|
187
187
|
size: 12,
|
|
188
188
|
"stroke-width": 2
|
|
189
|
-
}),
|
|
190
|
-
|
|
189
|
+
}), _(" " + a(g(V).aiChat.revert), 1)], 64))])) : f("", !0)]))]))), 128))]))], 512),
|
|
190
|
+
g(G).error.value ? (r(), l("div", he, [u(g(le), {
|
|
191
191
|
size: 14,
|
|
192
192
|
"stroke-width": 2,
|
|
193
193
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
194
|
-
}),
|
|
195
|
-
(
|
|
196
|
-
key:
|
|
197
|
-
class:
|
|
194
|
+
}), h("span", null, a(g(G).error.value === "ai_apply_failed" ? g(V).aiChat.applyFailed : g(V).aiChat.error), 1)])) : f("", !0),
|
|
195
|
+
(g(G).suggestions.value?.length ?? 0) > 0 ? (r(), l("div", ge, [h("div", _e, [(r(!0), l(d, null, o(g(G).suggestions.value ?? [], (t, n) => (r(), l("button", {
|
|
196
|
+
key: n,
|
|
197
|
+
class: e(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (g(G).suggestions.value?.length ?? 0) - 1 - n < Y.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
198
198
|
style: {
|
|
199
199
|
"border-color": "var(--tpl-border)",
|
|
200
200
|
color: "var(--tpl-primary)",
|
|
201
201
|
"background-color": "var(--tpl-bg)",
|
|
202
202
|
"box-shadow": "var(--tpl-shadow)"
|
|
203
203
|
},
|
|
204
|
-
onClick: (
|
|
205
|
-
},
|
|
204
|
+
onClick: (e) => De(t)
|
|
205
|
+
}, a(t), 11, ve))), 128))])])) : f("", !0)
|
|
206
206
|
]),
|
|
207
|
-
|
|
208
|
-
"onUpdate:modelValue":
|
|
207
|
+
h("div", ye, [h("div", be, [n(h("textarea", {
|
|
208
|
+
"onUpdate:modelValue": i[3] ||= (e) => K.value = e,
|
|
209
209
|
class: "tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
210
|
-
placeholder:
|
|
211
|
-
disabled:
|
|
210
|
+
placeholder: g(V).aiChat.inputPlaceholder,
|
|
211
|
+
disabled: g(G).isGenerating.value,
|
|
212
212
|
rows: "3",
|
|
213
213
|
onKeydown: Oe
|
|
214
|
-
}, null, 40, xe), [[
|
|
214
|
+
}, null, 40, xe), [[te, K.value]]), h("button", {
|
|
215
215
|
class: "tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
216
|
-
disabled: !K.value.trim() ||
|
|
216
|
+
disabled: !K.value.trim() || g(G).isGenerating.value,
|
|
217
217
|
onClick: Q
|
|
218
|
-
}, [
|
|
218
|
+
}, [u(g(de), {
|
|
219
219
|
size: 16,
|
|
220
220
|
"stroke-width": 2
|
|
221
|
-
})], 8, Se)]),
|
|
222
|
-
])) :
|
|
221
|
+
})], 8, Se)]), h("p", Ce, a(g(V).aiMenu.disclaimer), 1)])
|
|
222
|
+
])) : f("", !0)]),
|
|
223
223
|
_: 1
|
|
224
224
|
}));
|
|
225
225
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import "./
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
1
|
+
import { L as e, M as t, Ot as n, P as r, S as i, _ as a, d as o, h as s, m as c, p as l, wt as u } from "./vue.runtime.esm-bundler-DryoQb-v.js";
|
|
2
|
+
import { T as d, t as f } from "./keys-CIw9mUI2.js";
|
|
3
|
+
import { t as p } from "./useI18n-B8CN2iWs.js";
|
|
4
|
+
import "./useEditorCore-DMH2QpUL.js";
|
|
5
|
+
import { t as m } from "./_plugin-vue_export-helper-OO6pH1Dh.js";
|
|
6
|
+
import { t as h } from "./image-up-B1AEiHCh.js";
|
|
7
|
+
import { t as g } from "./shield-check-DdEvVYMH.js";
|
|
8
|
+
import { t as _ } from "./sparkles-DT_27AYs.js";
|
|
9
9
|
//#region src/cloud/components/AiFeatureMenu.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var v = {
|
|
11
11
|
class: "tpl-ai-feature-menu tpl:w-[280px] tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:py-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
@@ -13,50 +13,50 @@ var v = {
|
|
|
13
13
|
"backdrop-filter": "blur(8px)",
|
|
14
14
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
15
15
|
}
|
|
16
|
-
}, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /* @__PURE__ */
|
|
16
|
+
}, y = ["onClick"], b = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, x = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, S = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text-muted)]" }, C = /* @__PURE__ */ m(/* @__PURE__ */ i({
|
|
17
17
|
__name: "AiFeatureMenu",
|
|
18
18
|
props: { activeFeature: {} },
|
|
19
19
|
emits: ["select"],
|
|
20
|
-
setup(
|
|
21
|
-
let C =
|
|
20
|
+
setup(i, { emit: m }) {
|
|
21
|
+
let C = m, { t: w } = p(), T = d(f, "AiFeatureMenu"), E = {
|
|
22
22
|
"ai-chat": "chat",
|
|
23
23
|
"design-reference": "designToTemplate",
|
|
24
24
|
scoring: "scoring"
|
|
25
25
|
}, D = [
|
|
26
26
|
{
|
|
27
27
|
key: "ai-chat",
|
|
28
|
-
icon:
|
|
28
|
+
icon: _
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
key: "design-reference",
|
|
32
|
-
icon:
|
|
32
|
+
icon: h
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
key: "scoring",
|
|
36
|
-
icon:
|
|
36
|
+
icon: g
|
|
37
37
|
}
|
|
38
|
-
], O =
|
|
38
|
+
], O = l(() => D.filter((e) => T.isFeatureEnabled(E[e.key])));
|
|
39
39
|
function k(e) {
|
|
40
40
|
return e === "ai-chat" ? w.aiMenu.aiAssistant : e === "design-reference" ? w.aiMenu.designToTemplate : w.aiMenu.templateScore;
|
|
41
41
|
}
|
|
42
42
|
function A(e) {
|
|
43
43
|
return e === "ai-chat" ? w.aiMenu.aiAssistantDesc : e === "design-reference" ? w.aiMenu.designToTemplateDesc : w.aiMenu.templateScoreDesc;
|
|
44
44
|
}
|
|
45
|
-
return (
|
|
46
|
-
key:
|
|
45
|
+
return (l, d) => (t(), a("div", v, [(t(!0), a(o, null, r(O.value, (r) => (t(), a("button", {
|
|
46
|
+
key: r.key,
|
|
47
47
|
class: "tpl-ai-feature-menu-item tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-start tpl:gap-3 tpl:border-none tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-colors tpl:duration-100",
|
|
48
|
-
style:
|
|
49
|
-
onClick: (
|
|
50
|
-
}, [
|
|
48
|
+
style: u({ backgroundColor: i.activeFeature === r.key ? "var(--tpl-primary-light)" : "transparent" }),
|
|
49
|
+
onClick: (e) => C("select", r.key)
|
|
50
|
+
}, [c("div", {
|
|
51
51
|
class: "tpl:mt-0.5 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)]",
|
|
52
|
-
style:
|
|
53
|
-
backgroundColor:
|
|
54
|
-
color:
|
|
52
|
+
style: u({
|
|
53
|
+
backgroundColor: i.activeFeature === r.key ? "var(--tpl-primary)" : "var(--tpl-bg-active)",
|
|
54
|
+
color: i.activeFeature === r.key ? "var(--tpl-bg)" : "var(--tpl-text-muted)"
|
|
55
55
|
})
|
|
56
|
-
}, [(
|
|
56
|
+
}, [(t(), s(e(r.icon), {
|
|
57
57
|
size: 15,
|
|
58
58
|
"stroke-width": 2
|
|
59
|
-
}))], 4),
|
|
59
|
+
}))], 4), c("div", b, [c("span", x, n(k(r.key)), 1), c("span", S, n(A(r.key)), 1)])], 12, y))), 128))]));
|
|
60
60
|
}
|
|
61
61
|
}), [["__scopeId", "data-v-638e1be2"]]);
|
|
62
62
|
//#endregion
|