@sveltia/ui 0.20.1 → 0.21.0
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/package/components/text-editor/core.d.ts +3 -1
- package/package/components/text-editor/core.js +34 -14
- package/package/components/text-editor/lexical-root.svelte +0 -6
- package/package/components/text-editor/text-editor.svelte +9 -6
- package/package/components/text-editor/text-editor.svelte.d.ts +8 -0
- package/package/components/text-editor/toolbar/editor-toolbar.svelte +15 -0
- package/package/components/text-editor/toolbar/insert-image-button.svelte +43 -0
- package/package/components/text-editor/toolbar/insert-image-button.svelte.d.ts +17 -0
- package/package/components/text-editor/toolbar/insert-menu-button.svelte +53 -0
- package/package/components/text-editor/toolbar/insert-menu-button.svelte.d.ts +17 -0
- package/package/components/util/app-shell.svelte +469 -2
- package/package/styles/core.scss +151 -149
- package/package/styles/variables.scss +198 -196
- package/package/typedefs.d.ts +31 -0
- package/package/typedefs.js +12 -0
- package/package.json +7 -7
package/package/styles/core.scss
CHANGED
|
@@ -6,181 +6,183 @@
|
|
|
6
6
|
// Use `font-display: block;` @see https://stackoverflow.com/q/41710834
|
|
7
7
|
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block");
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
*,
|
|
18
|
-
::before,
|
|
19
|
-
::after {
|
|
20
|
-
overflow-anchor: none;
|
|
21
|
-
scroll-behavior: smooth;
|
|
22
|
-
box-sizing: border-box;
|
|
23
|
-
outline-offset: 0px;
|
|
24
|
-
outline-width: var(--sui-focus-ring-width) !important;
|
|
25
|
-
outline-style: solid;
|
|
26
|
-
outline-color: transparent;
|
|
27
|
-
border-width: 0;
|
|
28
|
-
border-style: solid;
|
|
29
|
-
vertical-align: top;
|
|
30
|
-
|
|
31
|
-
@media (prefers-reduced-motion) {
|
|
32
|
-
scroll-behavior: auto;
|
|
33
|
-
// Disable transition but make sure the `transitionend` event works
|
|
34
|
-
transition-duration: 1ms !important;
|
|
9
|
+
:global {
|
|
10
|
+
.material-symbols-outlined {
|
|
11
|
+
font-variation-settings:
|
|
12
|
+
"FILL" 0,
|
|
13
|
+
"wght" 300,
|
|
14
|
+
"GRAD" 0,
|
|
15
|
+
"opsz" 24;
|
|
35
16
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
::selection {
|
|
39
|
-
background-color: var(--sui-primary-accent-color-translucent);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
* {
|
|
43
|
-
-webkit-tap-highlight-color: transparent;
|
|
44
|
-
}
|
|
45
17
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
18
|
+
*,
|
|
19
|
+
::before,
|
|
20
|
+
::after {
|
|
21
|
+
overflow-anchor: none;
|
|
22
|
+
scroll-behavior: smooth;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
outline-offset: 0px;
|
|
25
|
+
outline-width: var(--sui-focus-ring-width) !important;
|
|
26
|
+
outline-style: solid;
|
|
27
|
+
outline-color: transparent;
|
|
28
|
+
border-width: 0;
|
|
29
|
+
border-style: solid;
|
|
30
|
+
vertical-align: top;
|
|
31
|
+
|
|
32
|
+
@media (prefers-reduced-motion) {
|
|
33
|
+
scroll-behavior: auto;
|
|
34
|
+
// Disable transition but make sure the `transitionend` event works
|
|
35
|
+
transition-duration: 1ms !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
50
38
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
39
|
+
::selection {
|
|
40
|
+
background-color: var(--sui-primary-accent-color-translucent);
|
|
41
|
+
}
|
|
55
42
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
h4,
|
|
60
|
-
h5,
|
|
61
|
-
h6 {
|
|
62
|
-
margin: 0;
|
|
63
|
-
font-weight: var(--sui-font-weight-bold, bold);
|
|
64
|
-
line-height: var(--sui-line-height-default);
|
|
65
|
-
}
|
|
43
|
+
* {
|
|
44
|
+
-webkit-tap-highlight-color: transparent;
|
|
45
|
+
}
|
|
66
46
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
47
|
+
:focus {
|
|
48
|
+
z-index: 1;
|
|
49
|
+
outline-width: 0;
|
|
50
|
+
}
|
|
70
51
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
52
|
+
:focus-visible {
|
|
53
|
+
outline-color: var(--sui-primary-accent-color-translucent);
|
|
54
|
+
z-index: 2;
|
|
55
|
+
}
|
|
74
56
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
57
|
+
h1,
|
|
58
|
+
h2,
|
|
59
|
+
h3,
|
|
60
|
+
h4,
|
|
61
|
+
h5,
|
|
62
|
+
h6 {
|
|
63
|
+
margin: 0;
|
|
64
|
+
font-weight: var(--sui-font-weight-bold, bold);
|
|
65
|
+
line-height: var(--sui-line-height-default);
|
|
66
|
+
}
|
|
78
67
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
68
|
+
h1 {
|
|
69
|
+
font-size: 32px;
|
|
70
|
+
}
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
72
|
+
h2 {
|
|
73
|
+
font-size: 28px;
|
|
74
|
+
}
|
|
86
75
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
76
|
+
h3 {
|
|
77
|
+
font-size: 24px;
|
|
78
|
+
}
|
|
90
79
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
80
|
+
h4 {
|
|
81
|
+
font-size: 20px;
|
|
82
|
+
}
|
|
94
83
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
text-underline-offset: 2px;
|
|
84
|
+
h5 {
|
|
85
|
+
font-size: 16px;
|
|
86
|
+
}
|
|
99
87
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
&:active {
|
|
103
|
-
text-decoration: underline;
|
|
88
|
+
h6 {
|
|
89
|
+
font-size: 12px;
|
|
104
90
|
}
|
|
105
91
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
text-decoration: underline;
|
|
92
|
+
strong {
|
|
93
|
+
font-weight: var(--sui-font-weight-bold, bold);
|
|
109
94
|
}
|
|
110
|
-
}
|
|
111
95
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
96
|
+
a {
|
|
97
|
+
color: var(--sui-primary-accent-color-text);
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
text-underline-offset: 2px;
|
|
100
|
+
|
|
101
|
+
&:hover,
|
|
102
|
+
&:focus,
|
|
103
|
+
&:active {
|
|
104
|
+
text-decoration: underline;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:global(:root[data-underline-links="true"]) &,
|
|
108
|
+
:global(:host[data-underline-links="true"]) & {
|
|
109
|
+
text-decoration: underline;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
119
112
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
113
|
+
p,
|
|
114
|
+
ul,
|
|
115
|
+
ol,
|
|
116
|
+
dl {
|
|
117
|
+
margin: var(--sui-paragraph-margin) 0;
|
|
118
|
+
line-height: var(--sui-line-height-comfortable);
|
|
119
|
+
}
|
|
124
120
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
font-family: var(--sui-font-family-monospace);
|
|
130
|
-
font-size: var(--sui-font-size-monospace);
|
|
131
|
-
vertical-align: -0.05em;
|
|
132
|
-
}
|
|
121
|
+
ul,
|
|
122
|
+
ol {
|
|
123
|
+
padding-inline: 2em;
|
|
124
|
+
}
|
|
133
125
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
126
|
+
code,
|
|
127
|
+
pre {
|
|
128
|
+
border-radius: 4px;
|
|
129
|
+
background-color: var(--sui-code-background-color);
|
|
130
|
+
font-family: var(--sui-font-family-monospace);
|
|
131
|
+
font-size: var(--sui-font-size-monospace);
|
|
132
|
+
vertical-align: -0.05em;
|
|
133
|
+
}
|
|
140
134
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
pre {
|
|
136
|
+
padding: 8px;
|
|
137
|
+
line-height: var(--sui-line-height-compact);
|
|
138
|
+
-webkit-user-select: text;
|
|
139
|
+
user-select: text;
|
|
140
|
+
}
|
|
144
141
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
142
|
+
code {
|
|
143
|
+
padding: 2px 4px;
|
|
144
|
+
}
|
|
148
145
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
padding: 8px;
|
|
153
|
-
}
|
|
146
|
+
table {
|
|
147
|
+
border-collapse: collapse;
|
|
148
|
+
}
|
|
154
149
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
150
|
+
th,
|
|
151
|
+
td {
|
|
152
|
+
border: 1px solid var(--sui-textbox-border-color);
|
|
153
|
+
padding: 8px;
|
|
154
|
+
}
|
|
160
155
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
cursor: default;
|
|
167
|
-
pointer-events: none;
|
|
168
|
-
-webkit-user-select: none;
|
|
169
|
-
user-select: none;
|
|
170
|
-
filter: grayscale(1) opacity(0.35);
|
|
156
|
+
blockquote {
|
|
157
|
+
margin-inline: 16px 0;
|
|
158
|
+
border-inline-start: 4px solid var(--sui-textbox-border-color);
|
|
159
|
+
padding-inline-start: 12px;
|
|
160
|
+
}
|
|
171
161
|
|
|
172
|
-
|
|
173
|
-
|
|
162
|
+
.disabled,
|
|
163
|
+
.readonly,
|
|
164
|
+
[aria-disabled="true"],
|
|
165
|
+
[aria-readonly="true"],
|
|
166
|
+
[inert]:not(body) {
|
|
167
|
+
cursor: default;
|
|
168
|
+
pointer-events: none;
|
|
169
|
+
-webkit-user-select: none;
|
|
170
|
+
user-select: none;
|
|
171
|
+
filter: grayscale(1) opacity(0.35);
|
|
172
|
+
|
|
173
|
+
:global(*) {
|
|
174
|
+
filter: grayscale(0) opacity(1); // Maintain the opacity on child nodes
|
|
175
|
+
}
|
|
174
176
|
}
|
|
175
|
-
}
|
|
176
177
|
|
|
177
|
-
.disabled *,
|
|
178
|
-
.readonly *,
|
|
179
|
-
[aria-disabled="true"] *,
|
|
180
|
-
[aria-readonly="true"] *,
|
|
181
|
-
[inert] * {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
178
|
+
.disabled *,
|
|
179
|
+
.readonly *,
|
|
180
|
+
[aria-disabled="true"] *,
|
|
181
|
+
[aria-readonly="true"] *,
|
|
182
|
+
[inert] * {
|
|
183
|
+
cursor: default;
|
|
184
|
+
pointer-events: none;
|
|
185
|
+
-webkit-user-select: none;
|
|
186
|
+
user-select: none;
|
|
187
|
+
}
|
|
186
188
|
}
|