@astl/editor-tiptap 0.3.0 → 0.3.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/CHANGELOG.md +18 -0
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +9 -3
- package/dist/styles.js.map +1 -1
- package/package.json +6 -6
- package/src/styles.ts +9 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @astl/editor-tiptap
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 83f0eed: A Check element's card numbers each question among those of its type on its page, in page order ("Gap 1" to "Gap 4", "Closed question 1"), block questions too, which it named by their block ("Closed question 4" on a page with one).
|
|
8
|
+
|
|
9
|
+
The editor's popups (the style, font, size, colour, alignment and spacing menus, the link form, "Elements", "Templates" and "Layout") and the picture dialog stay inside the viewport: no wider or taller than it (they scroll inside), moved along to fit, and above their button where they fit only there. This holds on a page that enlarges its text with `zoom`, where they ran past the right edge (a 390 px phone at 125%), and when the viewport changes while one is open. The colour swatches stay four a row and narrow where the popup has less room.
|
|
10
|
+
- 8026e49: A narrow player gives the exercise more of its width. It sizes its spacing from its own width, in the page's root font size, so it follows larger text, by zoom or by font size. At 18rem and under the space around its card is halved and the card's sides go from 1.5rem to 0.75rem; at 12rem and under the card reaches the player's sides with 0.25rem inside them. The cards of `<astl-preview>`, `<astl-inspector>` and `<astl-issues>` do the same from their width (0.5rem at 20rem and under, 0.25rem at their sides at 13rem and under), so the cards of a narrow column switch together. A closed question on a 390 px phone with 200% text was about one letter wide and its options could not be pressed; now its words stay whole and its options take a press. A phone of 360 px or more at 100% text, and wider screens, keep the spacing they had. The player and the cards measure their width rather than being size containers, so in any layout (a block, a flex or grid item, an inline-block) they take the width they had; in a box that sizes to its content, one that narrow because its content is narrow takes the smaller padding too.
|
|
11
|
+
|
|
12
|
+
On the editor's surface, a frame's add buttons ("Add option", "Add prompt") wrap their words where one alone is wider than its row: in Polish at 320 px with 200% text, "Dodaj odpowiedź" ran past the frame and the page scrolled sideways. A page's "Remove title" goes under its title where the two do not fit side by side, rather than past the screen.
|
|
13
|
+
- Updated dependencies [83f0eed]
|
|
14
|
+
- Updated dependencies [8026e49]
|
|
15
|
+
- @astl/editor@0.3.1
|
|
16
|
+
- @astl/player@0.3.1
|
|
17
|
+
- @astl/core@0.3.1
|
|
18
|
+
- @astl/engine@0.3.1
|
|
19
|
+
- @astl/tokens@0.3.1
|
|
20
|
+
|
|
3
21
|
## 0.3.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/styles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAOA,wGAAwG;AACxG,eAAO,MAAM,aAAa,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAOA,wGAAwG;AACxG,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAksC5C,2FAA2F;AAC3F,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAKnD"}
|
package/dist/styles.js
CHANGED
|
@@ -147,9 +147,12 @@ const baseSurfaceStyles = css `
|
|
|
147
147
|
letter-spacing: var(--astl-editor-page-number-letter-spacing, normal);
|
|
148
148
|
text-transform: var(--astl-editor-page-number-text-transform, none);
|
|
149
149
|
}
|
|
150
|
+
/* The title and "Remove title" share a row while the title keeps 6rem; narrower (a phone with larger text) the button
|
|
151
|
+
goes under the title, its words wrapping only where it is wider than the row alone. */
|
|
150
152
|
.astl-surface .astl-page-field {
|
|
151
153
|
flex: 1 0 100%;
|
|
152
154
|
display: flex;
|
|
155
|
+
flex-wrap: wrap;
|
|
153
156
|
align-items: center;
|
|
154
157
|
gap: var(--astl-space-2);
|
|
155
158
|
min-inline-size: 0;
|
|
@@ -159,7 +162,7 @@ const baseSurfaceStyles = css `
|
|
|
159
162
|
}
|
|
160
163
|
.astl-surface .astl-page-label {
|
|
161
164
|
box-sizing: border-box;
|
|
162
|
-
flex: 1 1
|
|
165
|
+
flex: 1 1 6rem;
|
|
163
166
|
min-inline-size: 0;
|
|
164
167
|
min-block-size: var(--astl-target-min);
|
|
165
168
|
margin: 0;
|
|
@@ -267,6 +270,8 @@ const baseSurfaceStyles = css `
|
|
|
267
270
|
/* Beside the title the button keeps its words whole (it broke "Remove" at 320 px): the title gives way instead. */
|
|
268
271
|
.astl-surface .astl-page-remove-title {
|
|
269
272
|
flex: none;
|
|
273
|
+
max-inline-size: 100%;
|
|
274
|
+
white-space: normal;
|
|
270
275
|
}
|
|
271
276
|
|
|
272
277
|
/* A component in text (a gap): a chip with an icon, its answer and a badge counting the other answers, a long word
|
|
@@ -865,7 +870,8 @@ const baseSurfaceStyles = css `
|
|
|
865
870
|
.astl-surface .astl-block-add:not(:has(button:not([hidden]))) {
|
|
866
871
|
display: none;
|
|
867
872
|
}
|
|
868
|
-
/* A small text button under the last child, as the page heads' are.
|
|
873
|
+
/* A small text button under the last child, as the page heads' are. Its words wrap only where it is wider than its
|
|
874
|
+
row alone (larger text on a phone), not to run past the frame. */
|
|
869
875
|
.astl-surface .astl-block-add button {
|
|
870
876
|
box-sizing: border-box;
|
|
871
877
|
display: inline-flex;
|
|
@@ -885,7 +891,7 @@ const baseSurfaceStyles = css `
|
|
|
885
891
|
font-size: var(--astl-editor-control-font-size, 0.8125rem);
|
|
886
892
|
font-weight: 600;
|
|
887
893
|
line-height: 1.2;
|
|
888
|
-
|
|
894
|
+
text-align: start;
|
|
889
895
|
cursor: pointer;
|
|
890
896
|
}
|
|
891
897
|
.astl-surface .astl-block-add button:disabled {
|
package/dist/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":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C;AAC/C,MAAM,YAAY,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDvB,CAAC;AAEF,MAAM,aAAa,GAAc,GAAG,CAAA,GAAG,iBAAiB,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,EAAE,CAAC;AAErG,2FAA2F;AAC3F,MAAM,UAAU,kBAAkB,CAAC,IAAU;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAmC,CAAC;IACjE,MAAM,KAAK,GAAG,aAAa,CAAC,UAAU,CAAC;IACvC,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS;QAAE,OAAO;IACzE,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,IAAI,CAAC,kBAAkB,GAAG,CAAC,GAAG,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAC9G,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astl/editor-tiptap",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "<astl-editor>: the authoring kit around a TipTap surface, loaded only when no other editor is plugged in through an adapter.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astrolabe",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@astl/core": "0.3.
|
|
57
|
-
"@astl/editor": "0.3.
|
|
58
|
-
"@astl/engine": "0.3.
|
|
59
|
-
"@astl/player": "0.3.
|
|
60
|
-
"@astl/tokens": "0.3.
|
|
56
|
+
"@astl/core": "0.3.1",
|
|
57
|
+
"@astl/editor": "0.3.1",
|
|
58
|
+
"@astl/engine": "0.3.1",
|
|
59
|
+
"@astl/player": "0.3.1",
|
|
60
|
+
"@astl/tokens": "0.3.1",
|
|
61
61
|
"@tiptap/core": "3.32.0",
|
|
62
62
|
"@tiptap/pm": "3.32.0",
|
|
63
63
|
"@tiptap/starter-kit": "3.32.0",
|
package/src/styles.ts
CHANGED
|
@@ -149,9 +149,12 @@ const baseSurfaceStyles: CSSResult = css`
|
|
|
149
149
|
letter-spacing: var(--astl-editor-page-number-letter-spacing, normal);
|
|
150
150
|
text-transform: var(--astl-editor-page-number-text-transform, none);
|
|
151
151
|
}
|
|
152
|
+
/* The title and "Remove title" share a row while the title keeps 6rem; narrower (a phone with larger text) the button
|
|
153
|
+
goes under the title, its words wrapping only where it is wider than the row alone. */
|
|
152
154
|
.astl-surface .astl-page-field {
|
|
153
155
|
flex: 1 0 100%;
|
|
154
156
|
display: flex;
|
|
157
|
+
flex-wrap: wrap;
|
|
155
158
|
align-items: center;
|
|
156
159
|
gap: var(--astl-space-2);
|
|
157
160
|
min-inline-size: 0;
|
|
@@ -161,7 +164,7 @@ const baseSurfaceStyles: CSSResult = css`
|
|
|
161
164
|
}
|
|
162
165
|
.astl-surface .astl-page-label {
|
|
163
166
|
box-sizing: border-box;
|
|
164
|
-
flex: 1 1
|
|
167
|
+
flex: 1 1 6rem;
|
|
165
168
|
min-inline-size: 0;
|
|
166
169
|
min-block-size: var(--astl-target-min);
|
|
167
170
|
margin: 0;
|
|
@@ -269,6 +272,8 @@ const baseSurfaceStyles: CSSResult = css`
|
|
|
269
272
|
/* Beside the title the button keeps its words whole (it broke "Remove" at 320 px): the title gives way instead. */
|
|
270
273
|
.astl-surface .astl-page-remove-title {
|
|
271
274
|
flex: none;
|
|
275
|
+
max-inline-size: 100%;
|
|
276
|
+
white-space: normal;
|
|
272
277
|
}
|
|
273
278
|
|
|
274
279
|
/* A component in text (a gap): a chip with an icon, its answer and a badge counting the other answers, a long word
|
|
@@ -867,7 +872,8 @@ const baseSurfaceStyles: CSSResult = css`
|
|
|
867
872
|
.astl-surface .astl-block-add:not(:has(button:not([hidden]))) {
|
|
868
873
|
display: none;
|
|
869
874
|
}
|
|
870
|
-
/* A small text button under the last child, as the page heads' are.
|
|
875
|
+
/* A small text button under the last child, as the page heads' are. Its words wrap only where it is wider than its
|
|
876
|
+
row alone (larger text on a phone), not to run past the frame. */
|
|
871
877
|
.astl-surface .astl-block-add button {
|
|
872
878
|
box-sizing: border-box;
|
|
873
879
|
display: inline-flex;
|
|
@@ -887,7 +893,7 @@ const baseSurfaceStyles: CSSResult = css`
|
|
|
887
893
|
font-size: var(--astl-editor-control-font-size, 0.8125rem);
|
|
888
894
|
font-weight: 600;
|
|
889
895
|
line-height: 1.2;
|
|
890
|
-
|
|
896
|
+
text-align: start;
|
|
891
897
|
cursor: pointer;
|
|
892
898
|
}
|
|
893
899
|
.astl-surface .astl-block-add button:disabled {
|