@simple-reporting/base 1.0.32 → 1.0.34
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/dev/package.json +2 -1
- package/dev/pdf/pdf-configuration-debug.xml +3 -0
- package/dev/pdf/pdf-configuration.xml +3 -0
- package/dev/src/assets/scss/app.scss +5 -0
- package/dev/src/assets/scss/components/note/accordion.scss +1 -1
- package/dev/src/assets/scss/pdf.scss +4 -0
- package/dev/srl.config.json +1 -1
- package/dev/vite.config.ts +4 -1
- package/devTools/SrlDevTools.vue +234 -0
- package/devTools/assets/Svg/Check.vue +7 -0
- package/devTools/assets/Svg/Close.vue +5 -0
- package/devTools/assets/Svg/Eye.vue +16 -0
- package/devTools/assets/Svg/Info.vue +7 -0
- package/devTools/assets/Svg/Settings.vue +5 -0
- package/devTools/assets/Svg/Uncheck.vue +7 -0
- package/devTools/box/Content.vue +93 -0
- package/devTools/components/BoxPanel.vue +23 -0
- package/devTools/components/Content.vue +17 -0
- package/devTools/config.ts +34 -0
- package/devTools/dialog/Colors.vue +33 -0
- package/devTools/dialog/Grid.vue +111 -0
- package/devTools/dialog/Settings.vue +62 -0
- package/devTools/dialog/Spacer.vue +110 -0
- package/devTools/dialog/ViewPort.vue +33 -0
- package/devTools/panel/Content.vue +50 -0
- package/devTools/settings.ts +28 -0
- package/devTools/utils/index.ts +7 -0
- package/devTools/utils/wheelResizeHandler.ts +19 -0
- package/livingdocs/010.Titles/020.title-h2/scss/editor.scss +8 -0
- package/livingdocs/010.Titles/020.title-h2/scss/general.scss +0 -11
- package/livingdocs/010.Titles/020.title-h2/scss/pdf.scss +16 -0
- package/livingdocs/010.Titles/020.title-h2/scss/web.scss +16 -0
- package/livingdocs/010.Titles/030.title-h3/scss/editor.scss +8 -0
- package/livingdocs/010.Titles/030.title-h3/scss/general.scss +0 -11
- package/livingdocs/010.Titles/030.title-h3/scss/pdf.scss +16 -0
- package/livingdocs/010.Titles/030.title-h3/scss/web.scss +16 -0
- package/livingdocs/010.Titles/040.title-h4/scss/editor.scss +8 -0
- package/livingdocs/010.Titles/040.title-h4/scss/general.scss +0 -11
- package/livingdocs/010.Titles/040.title-h4/scss/pdf.scss +16 -0
- package/livingdocs/010.Titles/040.title-h4/scss/web.scss +16 -0
- package/livingdocs/020.Text/060.quote-with-portrait/scss/web.scss +1 -1
- package/livingdocs/020.Text/070.footnote-container/scss/web.scss +1 -1
- package/livingdocs/030.Lists/010.unordered-list/scss/pdf.scss +4 -0
- package/livingdocs/030.Lists/020.ordered-list/scss/pdf.scss +5 -0
- package/livingdocs/030.Lists/030.alphanumeric-list/scss/pdf.scss +5 -0
- package/livingdocs/030.Lists/040.list-item/scss/pdf.scss +4 -0
- package/livingdocs/040.Media/010.table/scss/general.scss +6 -7
- package/livingdocs/040.Media/010.table/scss/web.scss +7 -1
- package/livingdocs/040.Media/010.table/scss/xbrl.scss +16 -1
- package/livingdocs/040.Media/020.image/scss/editor.scss +1 -1
- package/livingdocs/040.Media/020.image/scss/general.scss +1 -1
- package/livingdocs/040.Media/020.image/scss/web.scss +1 -1
- package/livingdocs/040.Media/030.video/scss/web.scss +1 -1
- package/livingdocs/060.Buttons/020.button/scss/general.scss +1 -1
- package/livingdocs/080.CV/010.cv/scss/web.scss +1 -1
- package/livingdocs/080.CV/020.cv-time-span/scss/web.scss +1 -1
- package/livingdocs/100.Misc/010.anchor/anchor.html +7 -2
- package/livingdocs/110.PDF/010.pdf-pagebreak/pdf-pagebreak.html +7 -2
- package/livingdocs/110.PDF/020.pdf-column-container/ld-conf.json +2 -1
- package/livingdocs/110.PDF/020.pdf-column-container/pdf-column-container.html +21 -3
- package/livingdocs/110.PDF/020.pdf-column-container/properties.json +15 -0
- package/livingdocs/110.PDF/020.pdf-column-container/scss/editor.scss +8 -0
- package/livingdocs/110.PDF/020.pdf-column-container/scss/pdf.scss +14 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/ld-conf.json +5 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/pdf-columnbreak.html +10 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/scss/editor.scss +12 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/scss/general.scss +5 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/scss/pdf.scss +6 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/scss/web.scss +1 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/scss/word.scss +0 -0
- package/livingdocs/110.PDF/021.pdf-columnbreak/scss/xbrl.scss +1 -0
- package/livingdocs/110.PDF/030.pdf-publication-title/pdf-publication-title.html +1 -0
- package/livingdocs/110.PDF/040.pdf-chapter-title/pdf-chapter-title.html +1 -0
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/pdf-chapter-navigation.html +1 -0
- package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/scss/editor.scss +1 -1
- package/livingdocs/110.PDF/060.pdf-chapter-navigation-item/pdf-chapter-navigation-item.html +2 -0
- package/livingdocs/110.PDF/070.pdf-cover/pdf-cover.html +7 -1
- package/livingdocs/110.PDF/080.pdf-toc-page/pdf-toc-page.html +7 -1
- package/livingdocs/110.PDF/080.pdf-toc-page/scss/pdf.scss +7 -0
- package/livingdocs/110.PDF/090.pdf-toc-item-title/pdf-toc-item-title.html +7 -1
- package/livingdocs/110.PDF/100.pdf-toc-item/pdf-toc-item.html +8 -1
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/general.scss +6 -1
- package/livingdocs/110.PDF/100.pdf-toc-item/scss/pdf.scss +10 -0
- package/package.json +8 -3
- package/plugins/viteSrlPlugin.js +19 -6
- package/scripts/build.d.ts +2 -0
- package/scripts/build.js +68 -3
- package/scripts/css/stripMediaFromCss.d.ts +17 -0
- package/scripts/css/stripMediaFromCss.js +147 -0
- package/scripts/vue/components.js +9 -2
- package/srl/.srl/App.vue +7 -1
- package/srl/.srl/components/Srl/Article/Accordion.vue +1 -0
- package/srl/.srl/components/Srl/Article/Root.vue +4 -4
- package/srl/.srl/components/Srl/Category/Accordion/Toggle.vue +2 -1
- package/srl/.srl/components/Srl/Menu/Item.vue +58 -24
- package/srl/.srl/components/Srl/Menu.vue +43 -17
- package/srl/.srl/composables/config.ts +3 -2
- package/srl/.srl/composables/index.ts +3 -0
- package/srl/.srl/composables/menu.ts +6 -3
- package/srl/.srl/composables/srlConfig.ts +3 -0
- package/srl/.srl/types/global.d.ts +11 -0
- package/srl/.srl/types/nswow.d.ts +5 -0
- package/srl/.srl/utils/index.ts +27 -25
- package/srl/.srl/utils/object.ts +60 -0
package/dev/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"postinstall": "srl prepare"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@simple-reporting/base": "^1.0.
|
|
27
|
+
"@simple-reporting/base": "^1.0.34",
|
|
28
28
|
"axios": "^1.12.2",
|
|
29
29
|
"chalk": "^5.6.2",
|
|
30
30
|
"exceljs": "^4.4.0",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"typescript": "~5.6.3",
|
|
63
63
|
"vite": "^6.3.6",
|
|
64
64
|
"vite-plugin-vue-devtools": "^7.7.7",
|
|
65
|
+
"vite-svg-loader": "^5.1.0",
|
|
65
66
|
"vitest": "^3.2.4",
|
|
66
67
|
"vue-tsc": "^2.2.12"
|
|
67
68
|
}
|
package/dev/srl.config.json
CHANGED
package/dev/vite.config.ts
CHANGED
|
@@ -3,10 +3,13 @@ import vue from '@vitejs/plugin-vue'
|
|
|
3
3
|
import VueDevTools from 'vite-plugin-vue-devtools'
|
|
4
4
|
import viteSrlPlugin from '@simple-reporting/base/plugins/viteSrlPlugin.js'
|
|
5
5
|
import { fileURLToPath, URL } from 'node:url'
|
|
6
|
+
import svgLoader from 'vite-svg-loader'
|
|
6
7
|
|
|
7
8
|
// https://vitejs.dev/config/
|
|
8
9
|
export default defineConfig({
|
|
9
|
-
plugins: [vue(), VueDevTools(),
|
|
10
|
+
plugins: [vue(), VueDevTools(), svgLoader({
|
|
11
|
+
defaultImport: 'url'
|
|
12
|
+
}), viteSrlPlugin()],
|
|
10
13
|
build: {
|
|
11
14
|
outDir: './.output/app'
|
|
12
15
|
},
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, computed, watch } from 'vue'
|
|
3
|
+
import { config } from './config.ts'
|
|
4
|
+
import { settings } from './settings.ts'
|
|
5
|
+
import Content from './components/Content.vue'
|
|
6
|
+
import DialogSettings from './dialog/Settings.vue'
|
|
7
|
+
import DialogViewPort from './dialog/ViewPort.vue'
|
|
8
|
+
import DialogGrid from './dialog/Grid.vue'
|
|
9
|
+
import DialogSpacer from './dialog/Spacer.vue'
|
|
10
|
+
import DialogColors from './dialog/Colors.vue'
|
|
11
|
+
import PanelContent from './panel/Content.vue'
|
|
12
|
+
import BoxContent from './box/Content.vue'
|
|
13
|
+
import { useViewPort, useSrlConfig } from '#composables'
|
|
14
|
+
import {
|
|
15
|
+
NConfigProvider,
|
|
16
|
+
NMessageProvider,
|
|
17
|
+
NDialogProvider,
|
|
18
|
+
NNotificationProvider,
|
|
19
|
+
NModal,
|
|
20
|
+
NCard,
|
|
21
|
+
NFlex,
|
|
22
|
+
NDivider,
|
|
23
|
+
darkTheme,
|
|
24
|
+
deDE,
|
|
25
|
+
dateDeDE
|
|
26
|
+
} from 'naive-ui'
|
|
27
|
+
|
|
28
|
+
const viewPort = useViewPort()
|
|
29
|
+
|
|
30
|
+
const srlConfig = useSrlConfig()
|
|
31
|
+
|
|
32
|
+
const dialogContent = ref<SrlDevToolsDialog>(null)
|
|
33
|
+
|
|
34
|
+
const fontSize = ref(12);
|
|
35
|
+
|
|
36
|
+
watch(
|
|
37
|
+
settings.value,
|
|
38
|
+
(newSettings) => {
|
|
39
|
+
fontSize.value = config.value.fontSizes[newSettings.size]
|
|
40
|
+
},
|
|
41
|
+
{ immediate: true }
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
const fontSizeTypo = computed(() => {
|
|
45
|
+
return `${fontSize.value}px`
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const isDark = computed(() => Boolean(settings.value.darkMode))
|
|
49
|
+
const naiveTheme = computed(() => (isDark.value ? darkTheme : null))
|
|
50
|
+
|
|
51
|
+
const mainClasses = computed(() => {
|
|
52
|
+
const c = [];
|
|
53
|
+
c.push(settings.value.position)
|
|
54
|
+
return c
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
const mainStyles = computed(() => {
|
|
58
|
+
return {
|
|
59
|
+
fontSize: fontSizeTypo.value
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const gridColumnCount = computed(() => {
|
|
64
|
+
return srlConfig.value.grid.columns[viewPort.value.viewPort]
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
const showDialog = computed(() => dialogContent.value !== null)
|
|
68
|
+
|
|
69
|
+
const dialogTitle = computed(() => {
|
|
70
|
+
switch (dialogContent.value) {
|
|
71
|
+
case 'settings':
|
|
72
|
+
return 'Settings'
|
|
73
|
+
case 'viewport':
|
|
74
|
+
return 'Viewport'
|
|
75
|
+
case 'grid':
|
|
76
|
+
return 'Grid'
|
|
77
|
+
case 'spacer':
|
|
78
|
+
return 'Spacer'
|
|
79
|
+
case 'colors':
|
|
80
|
+
return 'Colors'
|
|
81
|
+
default:
|
|
82
|
+
return ''
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
const dialogCardStyle = computed(() => {
|
|
87
|
+
if (dialogContent.value === 'grid') {
|
|
88
|
+
return { width: 'min(80vw, 1200px)' }
|
|
89
|
+
}
|
|
90
|
+
if (dialogContent.value === 'spacer') {
|
|
91
|
+
return { width: 'min(80vw, 1200px)' }
|
|
92
|
+
}
|
|
93
|
+
return { width: 'min(520px, 92vw)' }
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
function closeDialog() {
|
|
97
|
+
dialogContent.value = null
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<template>
|
|
102
|
+
<NConfigProvider
|
|
103
|
+
:theme="naiveTheme"
|
|
104
|
+
:locale="deDE"
|
|
105
|
+
:date-locale="dateDeDE"
|
|
106
|
+
>
|
|
107
|
+
<NMessageProvider>
|
|
108
|
+
<NDialogProvider>
|
|
109
|
+
<NNotificationProvider>
|
|
110
|
+
<div class="dev-tools" :style="mainStyles" :class="mainClasses">
|
|
111
|
+
<teleport to="body">
|
|
112
|
+
<div v-if="settings.overlay.grid" class="dev-tools__overlay">
|
|
113
|
+
<div class="dev-tools__overlay--grid">
|
|
114
|
+
<div v-for="i in gridColumnCount" :key="i"></div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</teleport>
|
|
118
|
+
|
|
119
|
+
<div class="dev-tools__box">
|
|
120
|
+
<NCard
|
|
121
|
+
size="small"
|
|
122
|
+
:bordered="false"
|
|
123
|
+
class="dev-tools__box-card"
|
|
124
|
+
content-style="padding: 6px"
|
|
125
|
+
>
|
|
126
|
+
<NFlex justify="end" align="center" :wrap="false" style="gap: 6px">
|
|
127
|
+
<PanelContent v-model:dialogContent="dialogContent" />
|
|
128
|
+
</NFlex>
|
|
129
|
+
|
|
130
|
+
<template v-if="settings.active">
|
|
131
|
+
<NDivider style="margin: 6px 0" />
|
|
132
|
+
<BoxContent v-model:dialogContent="dialogContent" />
|
|
133
|
+
</template>
|
|
134
|
+
</NCard>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<NModal
|
|
138
|
+
v-model:show="showDialog"
|
|
139
|
+
:mask-closable="true"
|
|
140
|
+
:auto-focus="false"
|
|
141
|
+
:trap-focus="false"
|
|
142
|
+
:block-scroll="false"
|
|
143
|
+
@close="closeDialog"
|
|
144
|
+
@mask-click="closeDialog"
|
|
145
|
+
@esc="closeDialog"
|
|
146
|
+
>
|
|
147
|
+
<NCard
|
|
148
|
+
class="dev-tools__naive-dialog"
|
|
149
|
+
:style="dialogCardStyle"
|
|
150
|
+
:bordered="false"
|
|
151
|
+
:segmented="{ content: true }"
|
|
152
|
+
:title="dialogTitle"
|
|
153
|
+
closable
|
|
154
|
+
@close="closeDialog"
|
|
155
|
+
>
|
|
156
|
+
|
|
157
|
+
<Content>
|
|
158
|
+
<DialogSettings v-if="dialogContent==='settings'" />
|
|
159
|
+
<DialogViewPort v-if="dialogContent==='viewport'" />
|
|
160
|
+
<DialogGrid v-if="dialogContent==='grid'" />
|
|
161
|
+
<DialogSpacer v-if="dialogContent==='spacer'" />
|
|
162
|
+
<DialogColors v-if="dialogContent==='colors'" />
|
|
163
|
+
</Content>
|
|
164
|
+
</NCard>
|
|
165
|
+
</NModal>
|
|
166
|
+
</div>
|
|
167
|
+
</NNotificationProvider>
|
|
168
|
+
</NDialogProvider>
|
|
169
|
+
</NMessageProvider>
|
|
170
|
+
</NConfigProvider>
|
|
171
|
+
</template>
|
|
172
|
+
|
|
173
|
+
<style scoped lang="scss">
|
|
174
|
+
@use "srl" as srl;
|
|
175
|
+
|
|
176
|
+
.dev-tools {
|
|
177
|
+
font-family: 'Segoe UI', 'Arial', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
|
178
|
+
font-weight: normal;
|
|
179
|
+
letter-spacing: 0.05em;
|
|
180
|
+
|
|
181
|
+
/* Positionierung der Box (minimal CSS, Rest kommt aus Naive UI) */
|
|
182
|
+
&__box {
|
|
183
|
+
position: fixed;
|
|
184
|
+
z-index: 3000;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&.top-right .dev-tools__box { top: 0; right: 0; }
|
|
188
|
+
&.top-left .dev-tools__box { top: 0; left: 0; }
|
|
189
|
+
&.bottom-right .dev-tools__box { bottom: 0; right: 0; }
|
|
190
|
+
&.bottom-left .dev-tools__box { bottom: 0; left: 0; }
|
|
191
|
+
|
|
192
|
+
/* Breitenlimit, damit die Box klein bleibt */
|
|
193
|
+
&__box-card {
|
|
194
|
+
width: max-content;
|
|
195
|
+
max-width: min(92vw, 420px);
|
|
196
|
+
font-size: 11px;
|
|
197
|
+
line-height: 1.2;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/* Dialog-Inhalte ebenfalls etwas kleiner */
|
|
201
|
+
:deep(.dev-tools__naive-dialog) {
|
|
202
|
+
max-height: min(70vh, 720px);
|
|
203
|
+
overflow: hidden;
|
|
204
|
+
font-size: 12px;
|
|
205
|
+
line-height: 1.25;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
:deep(.dev-tools__naive-dialog .n-card__content) {
|
|
209
|
+
max-height: min(70vh, 720px);
|
|
210
|
+
overflow: auto;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&__overlay {
|
|
214
|
+
position: fixed;
|
|
215
|
+
inset: 0;
|
|
216
|
+
pointer-events: none;
|
|
217
|
+
z-index: 1900;
|
|
218
|
+
overflow: hidden;
|
|
219
|
+
|
|
220
|
+
&--grid {
|
|
221
|
+
@include srl.grid-container();
|
|
222
|
+
@include srl.grid-row();
|
|
223
|
+
height: 100dvh;
|
|
224
|
+
margin-inline: auto;
|
|
225
|
+
& > div {
|
|
226
|
+
background-color: rgba(255, 0, 0, 0.05);
|
|
227
|
+
height: 100%;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
</style>
|
|
233
|
+
|
|
234
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 504 540"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc.--><path d="M483.4 93.1C455.3 65 409.7 65 381.6 93.1l-201.1 201.1-57.1-57.1C95.3 209 49.7 209 21.6 237.1s-28.1 73.7 0 101.8l108 108c28.1 28.1 73.7 28.1 101.8 0l252-252c28.1-28.1 28.1-73.7 0-101.8zM407 118.5c14.1-14.1 36.9-14.1 50.9 0s14.1 36.9 0 50.9l-252 252c-14.1 14.1-36.9 14.1-50.9 0L47 313.5C33 299.4 33 276.6 47 262.5s36.9-14.1 50.9 0l69.8 69.8c7 7 18.4 7 25.5 0L407 118.5z"/></svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<script setup lang="ts"></script>
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc.--><path opacity=".4" d=""/><path d="M379.3 91.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L192 233.4 27.3 68.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6L169.4 256 4.7 420.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L192 278.6 356.7 443.3c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L214.6 256 379.3 91.3z"/></svg>
|
|
5
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = withDefaults(defineProps<{
|
|
3
|
+
open?: boolean
|
|
4
|
+
}>(), {
|
|
5
|
+
open: false
|
|
6
|
+
})
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<svg v-if="props.open" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc.--><path d="M288 64c-140.8 0-229.3 128-256 192 26.7 64 115.2 192 256 192 140.8 0 229.3-128 256-192-26.7-64-115.2-192-256-192zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1 3.3 7.9 3.3 16.7 0 24.6-14.9 35.7-46.2 87.7-93 131.1-47.1 43.7-111.8 80.6-192.6 80.6S142.5 443.2 95.4 399.4c-46.8-43.5-78.1-95.4-93-131.1-3.3-7.9-3.3-16.7 0-24.6 14.9-35.7 46.2-87.7 93-131.1zM288 352c53 0 96-43 96-96 0-43.3-28.7-79.9-68.1-91.9 2.7 8.8 4.1 18.2 4.1 27.9 0 53-43 96-96 96-9.7 0-19.1-1.4-27.9-4.1 11.9 39.4 48.6 68.1 91.9 68.1zM160.2 263.8c-.2-2.6-.2-5.2-.2-7.8 0-12.2 1.7-23.9 4.9-35 .3-.9 .5-1.8 .8-2.7 12.4-40.4 44.3-72.2 84.7-84.7 11.9-3.7 24.6-5.6 37.7-5.6 2.5 0 5 .1 7.4 .2l.4 0c67.1 4 120.2 59.7 120.2 127.8 0 70.7-57.3 128-128 128-68.1 0-123.8-53.2-127.8-120.2zm32.1-16.1c9.3 5.3 20.1 8.4 31.6 8.4 35.3 0 64-28.7 64-64 0-11.5-3-22.3-8.4-31.6-46.4 4-83.3 40.9-87.3 87.3z"/></svg>
|
|
11
|
+
<svg v-else xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc.--><path d="M27.3-27.2c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l544 544c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L466.4 411.9c4.9-4.1 9.6-8.2 14.1-12.5 46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6-60 0-111.1 20.3-152.8 48.7L27.3-27.2zm131 131c36.4-23.7 79.7-39.8 129.7-39.8 140.8 0 229.3 128 256 192-13.3 32-42.1 80-85.2 120-4.9 4.5-9.9 8.9-15.1 13.2l-54.6-54.6c16.9-21.7 26.9-48.9 26.9-78.5 0-70.7-57.3-128-128-128-29.6 0-56.9 10-78.5 26.9l-51.2-51.2zM366.2 311.7L232.3 177.8c15.7-11.2 34.9-17.8 55.7-17.8 53 0 96 43 96 96 0 20.8-6.6 40-17.8 55.7zM74.8 133.3c-35.5 38.5-59.7 80.2-72.3 110.4-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6 40.6 0 77.1-9.3 109.4-24.1L373 431.5c-25.8 10.3-54.1 16.5-85 16.5-140.8 0-229.3-128-256-192 11.2-26.8 33.2-64.9 65.4-100.1L74.8 133.3z"/></svg>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<style scoped lang="scss">
|
|
15
|
+
|
|
16
|
+
</style>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc.--><path d="M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448zm0 480a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM208 352l-16 0 0 32 128 0 0-32-48 0 0-128-80 0 0 32 48 0 0 96-32 0zm72-168l0-48-48 0 0 48 48 0z"/></svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<script setup lang="ts"></script>
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc.--><path d="M16 32l96 0 0 96-96 0 0-96zm0 176l96 0 0 96-96 0 0-96zm96 176l0 96-96 0 0-96 96 0z"/></svg>
|
|
5
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 504 560"><!--!Font Awesome Pro v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2026 Fonticons, Inc.--><path d="M252.4 122.3c21.1-20.5 39.4-37.5 55.5-51.1 20.7-17.5 39.5-30.9 57.7-38.4 19.3-8 38.5-9.7 57.9-3 17.8 6.2 32.9 18.7 46.7 32.4s26.2 28.8 32.4 46.7c6.7 19.3 5 38.6-3 57.8-7.6 18.2-20.9 37-38.4 57.7-13.6 16.1-30.7 34.4-51.1 55.5 20.5 21.1 37.5 39.4 51.1 55.6 17.5 20.7 30.9 39.5 38.4 57.7 8 19.3 9.7 38.5 3 57.8-6.2 17.8-18.7 32.9-32.4 46.7s-28.8 26.2-46.7 32.4c-19.3 6.7-38.6 5-57.9-3-18.2-7.6-37-20.9-57.7-38.4-16.1-13.6-34.4-30.7-55.5-51.1-21.1 20.5-39.4 37.5-55.6 51.1-20.7 17.5-39.5 30.9-57.7 38.4-19.3 8-38.5 9.7-57.8 3-17.8-6.2-32.9-18.7-46.7-32.4S8.4 468.9 2.2 451.1c-6.7-19.3-5-38.6 3-57.8 7.6-18.2 20.9-37 38.4-57.7 13.6-16.1 30.7-34.4 51.1-55.6-20.5-21.1-37.5-39.4-51.1-55.5-17.5-20.7-30.9-39.5-38.4-57.7-8-19.3-9.7-38.5-3-57.8 6.2-17.8 18.7-32.9 32.4-46.7S63.5 36 81.3 29.8c19.3-6.7 38.6-5 57.8 3 18.2 7.6 37 20.9 57.7 38.4 16.1 13.6 34.4 30.7 55.6 51.1zM99.7 82.7c-5.6 2-13.4 7.1-25.5 19.2S57 121.7 55.1 127.3c-1.4 4.1-1.9 9 1.8 17.9 4.2 10.1 13.1 23.6 29.5 43.1 16.2 19.2 38.3 42.5 67.5 72 10.7 10.9 10.7 28.4 0 39.3-29.1 29.6-51.2 52.8-67.5 72-16.4 19.5-25.3 33-29.5 43.1-3.7 8.9-3.2 13.8-1.8 17.9 2 5.6 7.1 13.4 19.2 25.5s19.9 17.2 25.5 19.2c4.1 1.4 9 1.9 17.9-1.8 10.1-4.2 23.6-13.1 43.1-29.5 19.2-16.2 42.5-38.3 72-67.5 10.9-10.7 28.4-10.7 39.3 0 29.6 29.1 52.8 51.2 72 67.5 19.5 16.4 33 25.3 43.1 29.5 8.9 3.7 13.8 3.2 17.9 1.8 5.6-2 13.4-7.1 25.5-19.2s17.2-19.9 19.2-25.5c1.4-4.1 1.9-9-1.8-17.9-4.2-10.1-13.1-23.6-29.5-43.1-16.2-19.2-38.3-42.5-67.5-72-10.7-10.9-10.7-28.4 0-39.3 29.1-29.6 51.2-52.8 67.5-72 16.4-19.5 25.3-33 29.5-43.1 3.7-8.9 3.2-13.8 1.8-17.9-2-5.6-7.1-13.4-19.2-25.5s-19.9-17.2-25.5-19.2c-4.1-1.4-9-1.9-17.9 1.8-10.1 4.2-23.6 13.1-43.1 29.5-19.2 16.2-42.5 38.3-72 67.5-10.9 10.7-28.4 10.7-39.3 0-29.6-29.1-52.8-51.2-72-67.5-19.5-16.4-33-25.3-43.1-29.5-8.9-3.7-13.8-3.2-17.9-1.8z"/></svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import BoxPanel from '../components/BoxPanel.vue'
|
|
3
|
+
import { useViewPort } from '#composables'
|
|
4
|
+
import { settings } from '../settings.ts'
|
|
5
|
+
|
|
6
|
+
import { NButton, NIcon, NText } from 'naive-ui'
|
|
7
|
+
import { InformationCircleOutline, Eye, EyeOff } from '@vicons/ionicons5'
|
|
8
|
+
|
|
9
|
+
const viewPort = useViewPort()
|
|
10
|
+
|
|
11
|
+
const dialogContent = defineModel('dialogContent', {
|
|
12
|
+
type: String as () => SrlDevToolsDialog,
|
|
13
|
+
default: null
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
function dialogToggle(target: SrlDevToolsDialog) {
|
|
17
|
+
dialogContent.value = dialogContent.value === target ? null : target
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<BoxPanel label="Grid">
|
|
24
|
+
|
|
25
|
+
<NButton
|
|
26
|
+
quaternary
|
|
27
|
+
circle
|
|
28
|
+
size="tiny"
|
|
29
|
+
@click="dialogToggle('grid')"
|
|
30
|
+
>
|
|
31
|
+
<template #icon>
|
|
32
|
+
<NIcon :component="InformationCircleOutline" />
|
|
33
|
+
</template>
|
|
34
|
+
</NButton>
|
|
35
|
+
|
|
36
|
+
<NButton
|
|
37
|
+
quaternary
|
|
38
|
+
circle
|
|
39
|
+
size="tiny"
|
|
40
|
+
@click="settings.overlay.grid=!settings.overlay.grid"
|
|
41
|
+
:type="settings.overlay.grid?'success':'error'"
|
|
42
|
+
>
|
|
43
|
+
<template #icon>
|
|
44
|
+
<NIcon :component="settings.active?Eye:EyeOff" />
|
|
45
|
+
</template>
|
|
46
|
+
</NButton>
|
|
47
|
+
|
|
48
|
+
</BoxPanel>
|
|
49
|
+
<BoxPanel label="Spacer">
|
|
50
|
+
|
|
51
|
+
<NButton
|
|
52
|
+
quaternary
|
|
53
|
+
circle
|
|
54
|
+
size="tiny"
|
|
55
|
+
@click="dialogToggle('spacer')"
|
|
56
|
+
>
|
|
57
|
+
<template #icon>
|
|
58
|
+
<NIcon :component="InformationCircleOutline" />
|
|
59
|
+
</template>
|
|
60
|
+
</NButton>
|
|
61
|
+
|
|
62
|
+
</BoxPanel>
|
|
63
|
+
<BoxPanel label="Colors">
|
|
64
|
+
|
|
65
|
+
<NButton
|
|
66
|
+
quaternary
|
|
67
|
+
circle
|
|
68
|
+
size="tiny"
|
|
69
|
+
@click="dialogToggle('colors')"
|
|
70
|
+
>
|
|
71
|
+
<template #icon>
|
|
72
|
+
<NIcon :component="InformationCircleOutline" />
|
|
73
|
+
</template>
|
|
74
|
+
</NButton>
|
|
75
|
+
|
|
76
|
+
</BoxPanel>
|
|
77
|
+
<BoxPanel label="ViewPort">
|
|
78
|
+
|
|
79
|
+
<NButton
|
|
80
|
+
quaternary
|
|
81
|
+
circle
|
|
82
|
+
size="tiny"
|
|
83
|
+
@click="dialogToggle('viewport')"
|
|
84
|
+
>
|
|
85
|
+
<template #icon>
|
|
86
|
+
<NIcon :component="InformationCircleOutline" />
|
|
87
|
+
</template>
|
|
88
|
+
</NButton>
|
|
89
|
+
|
|
90
|
+
</BoxPanel>
|
|
91
|
+
<NText tag="div" v-text="viewPort.viewPort" :title="`currentViewPort:\n${viewPort.viewPort}`"/>
|
|
92
|
+
<NText tag="div" v-text="`w: ${viewPort.innerWidth}px`" :title="`window.innerWidth\n${viewPort.innerWidth}px`"/>
|
|
93
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { NH2, NText } from "naive-ui"
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
label: String
|
|
5
|
+
})
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div class="srl-dev-tools__box-panel">
|
|
10
|
+
<NText v-text="props.label"/>
|
|
11
|
+
<div>
|
|
12
|
+
<slot />
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style scoped lang="scss">
|
|
18
|
+
.srl-dev-tools__box-panel {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
}
|
|
23
|
+
</style>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { computed, ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export const config = ref<{
|
|
4
|
+
settingsNamespace: string
|
|
5
|
+
positions: Array<'top-right' | 'top-left'| 'bottom-right' | 'bottom-left'>
|
|
6
|
+
fontSizes: Record<string, number>
|
|
7
|
+
defaultSettings: SrlDevToolsSettings
|
|
8
|
+
}>({
|
|
9
|
+
settingsNamespace: 'srl-dev-tools-settings',
|
|
10
|
+
positions: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],
|
|
11
|
+
fontSizes: {
|
|
12
|
+
S: 12,
|
|
13
|
+
M: 14,
|
|
14
|
+
L: 16,
|
|
15
|
+
XL: 18,
|
|
16
|
+
},
|
|
17
|
+
defaultSettings: {
|
|
18
|
+
active: true,
|
|
19
|
+
size: 'S',
|
|
20
|
+
position: 'top-right',
|
|
21
|
+
opacity: 1,
|
|
22
|
+
darkMode: false,
|
|
23
|
+
overlay: {
|
|
24
|
+
grid: false,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
export const sizeOptions = computed(() => Object.keys(config.value.fontSizes))
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
config,
|
|
33
|
+
sizeOptions,
|
|
34
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { useSrlConfig } from '#composables'
|
|
4
|
+
import { NTable, NFlex } from 'naive-ui'
|
|
5
|
+
|
|
6
|
+
const srlConfig = useSrlConfig()
|
|
7
|
+
const colorView = computed(() => {
|
|
8
|
+
return srlConfig.value.colors.colors
|
|
9
|
+
})
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<NTable striped>
|
|
14
|
+
<tbody>
|
|
15
|
+
<tr v-for="(item, i) in colorView" :key="i">
|
|
16
|
+
<td v-text="item.name"/>
|
|
17
|
+
<td>
|
|
18
|
+
<NFlex>
|
|
19
|
+
<div :style="{
|
|
20
|
+
width: '30px',
|
|
21
|
+
height: '30px',
|
|
22
|
+
backgroundColor: item.color,
|
|
23
|
+
border: '1px solid #00000020',
|
|
24
|
+
borderRadius: '4px',
|
|
25
|
+
}"/>
|
|
26
|
+
{{ item.color }}
|
|
27
|
+
</NFlex>
|
|
28
|
+
</td>
|
|
29
|
+
<td v-text="item.description ?? ''"/>
|
|
30
|
+
</tr>
|
|
31
|
+
</tbody>
|
|
32
|
+
</NTable>
|
|
33
|
+
</template>
|