@morphemecms/cms 0.11.0 → 0.12.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/CHANGELOG.md +20 -0
- package/astro.mjs +2 -1
- package/lib/appId.d.mts +1 -0
- package/lib/appId.mjs +6 -0
- package/lib/apps.mjs +13 -3
- package/lib/apps.test.mjs +10 -1
- package/lib/contracts.d.mts +3 -2
- package/lib/contracts.mjs +3 -2
- package/lib/folderChanges.d.mts +29 -0
- package/lib/folderChanges.mjs +34 -0
- package/lib/section-ranges.d.mts +1 -1
- package/lib/section-ranges.mjs +8 -14
- package/lib/section-ranges.test.mjs +26 -5
- package/lib/storeEntries.d.mts +3 -1
- package/lib/storeEntries.mjs +22 -8
- package/lib/storeEntries.test.mjs +56 -7
- package/lib/text-sections.d.mts +11 -1
- package/lib/text-sections.mjs +18 -8
- package/lib/text-sections.test.mjs +34 -1
- package/lib/video-id.d.mts +6 -2
- package/lib/video-id.mjs +5 -1
- package/lib/video.d.mts +6 -2
- package/lib/video.mjs +5 -1
- package/lib/without-h1.d.mts +1 -0
- package/lib/without-h1.mjs +19 -4
- package/lib/without-h1.test.mjs +30 -1
- package/package.json +3 -2
- package/scripts/app-screenshots.mjs +2 -1
- package/scripts/check-content.mjs +2 -1
- package/scripts/check-site-types.mjs +26 -0
- package/scripts/site-types.mjs +14 -0
- package/scripts/site-types.test.mjs +21 -0
- package/site/activeTheme.test.mjs +52 -0
- package/site/appSelf.d.mts +2 -0
- package/site/appSelf.mjs +23 -0
- package/site/appSelf.test.mjs +35 -0
- package/site/content.ts +5 -2
- package/site/siteModules.mjs +2 -1
- package/site/theme.mjs +19 -8
- package/src/App.tsx +1 -1
- package/src/AppList.tsx +24 -9
- package/src/BlockDialog.tsx +38 -17
- package/src/CreateFab.tsx +8 -0
- package/src/DataForm.tsx +7 -17
- package/src/EntryForm.tsx +1 -1
- package/src/FormFrame.tsx +4 -3
- package/src/Library.tsx +4 -11
- package/src/ListFab.tsx +13 -0
- package/src/MarkdownEditor.tsx +88 -47
- package/src/Media.tsx +4 -13
- package/src/Redirects.tsx +6 -14
- package/src/Screen.tsx +13 -3
- package/src/StartFab.tsx +5 -7
- package/src/ThemeStore.tsx +33 -12
- package/src/apps.ts +2 -3
- package/src/drawerYield.d.mts +3 -0
- package/src/drawerYield.mjs +10 -0
- package/src/drawerYield.test.mjs +22 -0
- package/src/editor.css +55 -22
- package/src/fabScreens.test.mjs +28 -0
- package/src/fabScreens.ts +16 -0
- package/src/legacyMove.test.mjs +137 -0
- package/src/legacyMove.ts +131 -0
- package/src/markdown.mjs +10 -7
- package/src/markdown.test.mjs +16 -2
- package/src/menuOpen.ts +20 -4
- package/src/movedRoutes.mjs +2 -2
- package/src/movedRoutes.test.mjs +5 -0
- package/src/pageH1Panel.d.mts +4 -0
- package/src/pageH1Panel.mjs +31 -0
- package/src/pageH1Panel.test.mjs +56 -0
- package/src/pagePreview.tsx +22 -12
- package/src/sectionFrame.ts +3 -3
- package/src/sectionState.d.mts +3 -3
- package/src/sectionState.mjs +6 -6
- package/src/sectionState.test.mjs +14 -2
- package/src/sheetPlacement.d.mts +6 -4
- package/src/sheetPlacement.mjs +15 -10
- package/src/sheetPlacement.test.mjs +16 -9
- package/src/sidePanel.ts +38 -0
- package/src/store.ts +32 -27
- package/src/topBarSlot.tsx +7 -15
- package/src/ui.tsx +26 -15
- package/src/virtual.d.ts +6 -0
- package/starter/package.json +1 -1
- package/theme/components/PageHeading.astro +22 -0
- package/theme/layouts/PageLayout.astro +37 -20
- package/theme/styles/global.css +2 -1
- package/theme/styles/ui.css +40 -10
package/theme/styles/ui.css
CHANGED
|
@@ -1913,14 +1913,12 @@
|
|
|
1913
1913
|
display: none;
|
|
1914
1914
|
}
|
|
1915
1915
|
.bottom-sheet-standard[data-wide='side-sheet'] > .bottom-sheet-header {
|
|
1916
|
-
min-height: 4.5rem;
|
|
1917
|
-
padding: 1rem 0.75rem 0.5rem var(--side-sheet-padding, 1.5rem);
|
|
1918
1916
|
border-bottom-color: transparent;
|
|
1919
1917
|
cursor: auto;
|
|
1920
1918
|
touch-action: auto;
|
|
1921
1919
|
}
|
|
1922
1920
|
.bottom-sheet-standard[data-wide='side-sheet'] > .bottom-sheet-content {
|
|
1923
|
-
padding:
|
|
1921
|
+
padding: var(--side-sheet-content-top, 1rem) var(--side-sheet-padding, 1.5rem) var(--side-sheet-padding, 1.5rem);
|
|
1924
1922
|
}
|
|
1925
1923
|
.bottom-sheet-standard[data-wide='side-sheet'] > :is(.bottom-sheet-content, .bottom-sheet-footer) {
|
|
1926
1924
|
display: revert;
|
|
@@ -1963,10 +1961,29 @@
|
|
|
1963
1961
|
display: none;
|
|
1964
1962
|
}
|
|
1965
1963
|
.bottom-sheet-container:not(.bottom-sheet-standard)[data-wide='side-sheet'] > .bottom-sheet-header {
|
|
1966
|
-
min-height: 4.5rem;
|
|
1967
|
-
padding: 1rem 0.75rem 0.5rem var(--side-sheet-padding, 1.5rem);
|
|
1968
1964
|
border-bottom-color: transparent;
|
|
1969
1965
|
}
|
|
1966
|
+
/* Both side sheet looks: the header as .side-sheet-header's (its close icon at the standard size, 24 to the glyph from
|
|
1967
|
+
the top and end edges, 12 from the headline), the headline in title large, and the actions row of M3's measures. */
|
|
1968
|
+
.bottom-sheet-container[data-wide='side-sheet'] > .bottom-sheet-header {
|
|
1969
|
+
--icon-button-size: 3rem;
|
|
1970
|
+
--icon-button-icon-size: 1.5rem;
|
|
1971
|
+
--side-sheet-icon-inset: calc((var(--icon-button-size) - var(--icon-button-icon-size)) / 2);
|
|
1972
|
+
gap: 0;
|
|
1973
|
+
padding-block: calc(var(--side-sheet-padding, 1.5rem) - var(--side-sheet-icon-inset)) 0;
|
|
1974
|
+
padding-inline: var(--side-sheet-padding, 1.5rem) calc(var(--side-sheet-padding, 1.5rem) - var(--side-sheet-icon-inset));
|
|
1975
|
+
}
|
|
1976
|
+
.bottom-sheet-container[data-wide='side-sheet'] .bottom-sheet-headline {
|
|
1977
|
+
font-size: var(--side-sheet-headline-size, var(--type-title-large-size));
|
|
1978
|
+
font-weight: var(--side-sheet-headline-weight, var(--type-title-large-weight));
|
|
1979
|
+
line-height: var(--type-title-large-line-height);
|
|
1980
|
+
letter-spacing: var(--type-title-large-tracking);
|
|
1981
|
+
}
|
|
1982
|
+
.bottom-sheet-container[data-wide='side-sheet'] > .bottom-sheet-footer {
|
|
1983
|
+
min-height: 4.5rem;
|
|
1984
|
+
padding: 1rem var(--side-sheet-padding, 1.5rem) max(var(--side-sheet-padding, 1.5rem), env(safe-area-inset-bottom));
|
|
1985
|
+
text-align: start;
|
|
1986
|
+
}
|
|
1970
1987
|
.bottom-sheet:has(> [data-wide='sheet']) {
|
|
1971
1988
|
width: calc(100% - 2 * var(--bottom-sheet-margin-wide, 3.5rem));
|
|
1972
1989
|
max-width: var(--bottom-sheet-max-width, 40rem);
|
|
@@ -4281,6 +4298,12 @@
|
|
|
4281
4298
|
--side-sheet-scrim the shade over the page behind a modal one (else --theme-scrim-colour, as the dialog's)
|
|
4282
4299
|
--side-sheet-padding, --side-sheet-headline-size, --side-sheet-headline-weight, --side-sheet-actions-line the
|
|
4283
4300
|
room inside it, the headline, and the line over the actions
|
|
4301
|
+
--side-sheet-content-top the room over the content (1rem: the first outlined field's label stands above its edge)
|
|
4302
|
+
M3's measures (m3.material.io/components/side-sheets/specs), the same in the standard and the modal look and in the
|
|
4303
|
+
bottom sheet's 'side-sheet' look: --side-sheet-padding (24) at the start and end; the close icon's glyph 24 from the top
|
|
4304
|
+
and the end edge, 12 from the headline (its 48 button holds 12 round the glyph, so the header's top and end padding is
|
|
4305
|
+
--side-sheet-padding less that, with no gap); the actions at least 72 high, 16 above and 24 below (not less than
|
|
4306
|
+
the safe area), at the start. Headline and close icon in on-surface-variant (--muted).
|
|
4284
4307
|
*/
|
|
4285
4308
|
@layer components {
|
|
4286
4309
|
/* A setting's row (SettingRow.tsx): the name and the line under it, then what sets it, on one line; the switch's
|
|
@@ -4821,13 +4844,17 @@
|
|
|
4821
4844
|
background: var(--side-sheet-modal-surface, var(--side-sheet-surface, var(--elevation-1-surface)));
|
|
4822
4845
|
box-shadow: var(--side-sheet-shadow, var(--elevation-1-rest-shadow));
|
|
4823
4846
|
}
|
|
4847
|
+
/* M3's measures run to the close icon's glyph, and its button holds the space round the glyph (--side-sheet-icon-inset),
|
|
4848
|
+
so the header takes that off its top and end padding and has no gap: 24 from the top and the end edges to the glyph,
|
|
4849
|
+
12 between the headline and the glyph. */
|
|
4824
4850
|
.side-sheet-header {
|
|
4851
|
+
--side-sheet-icon-inset: calc((var(--icon-button-size, 3rem) - var(--icon-button-icon-size, 1.5rem)) / 2);
|
|
4825
4852
|
display: flex;
|
|
4826
|
-
min-height: 4.5rem;
|
|
4827
4853
|
flex-shrink: 0;
|
|
4828
4854
|
align-items: center;
|
|
4829
|
-
gap: 0
|
|
4830
|
-
padding:
|
|
4855
|
+
gap: 0;
|
|
4856
|
+
padding-block: calc(var(--side-sheet-padding, 1.5rem) - var(--side-sheet-icon-inset)) 0;
|
|
4857
|
+
padding-inline: var(--side-sheet-padding, 1.5rem) calc(var(--side-sheet-padding, 1.5rem) - var(--side-sheet-icon-inset));
|
|
4831
4858
|
}
|
|
4832
4859
|
.side-sheet-headline {
|
|
4833
4860
|
flex: 1;
|
|
@@ -4842,15 +4869,18 @@
|
|
|
4842
4869
|
flex: 1;
|
|
4843
4870
|
min-height: 0;
|
|
4844
4871
|
overflow-y: auto;
|
|
4845
|
-
padding:
|
|
4872
|
+
padding: var(--side-sheet-content-top, 1rem) var(--side-sheet-padding, 1.5rem) var(--side-sheet-padding, 1.5rem);
|
|
4846
4873
|
}
|
|
4874
|
+
/* M3's actions: at least 72 high, 16 above and 24 below (more where the screen has a safe area), at the start. */
|
|
4847
4875
|
.side-sheet-actions {
|
|
4848
4876
|
display: flex;
|
|
4877
|
+
min-height: 4.5rem;
|
|
4849
4878
|
flex-shrink: 0;
|
|
4850
4879
|
flex-wrap: wrap;
|
|
4880
|
+
justify-content: flex-start;
|
|
4851
4881
|
gap: 0.5rem;
|
|
4852
4882
|
border-top: 1px solid var(--side-sheet-actions-line, var(--block-line));
|
|
4853
|
-
padding: 1rem var(--side-sheet-padding, 1.5rem) max(
|
|
4883
|
+
padding: 1rem var(--side-sheet-padding, 1.5rem) max(var(--side-sheet-padding, 1.5rem), env(safe-area-inset-bottom));
|
|
4854
4884
|
}
|
|
4855
4885
|
/* A modal side sheet: in a <dialog> at the end of the screen, as high as it, over the scrim. */
|
|
4856
4886
|
.side-sheet {
|