@morphemecms/cms 0.11.0 → 0.13.0-next-20261106203613

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.
Files changed (186) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/astro.mjs +2 -1
  3. package/defaults/blockTexts.ts +9 -9
  4. package/defaults/collections.ts +257 -257
  5. package/defaults/colors.ts +74 -74
  6. package/defaults/company.ts +9 -9
  7. package/defaults/editor.ts +65 -65
  8. package/defaults/i18n/da-DK/blockTexts.ts +12 -0
  9. package/defaults/i18n/da-DK/collections.ts +220 -0
  10. package/defaults/i18n/da-DK/colors.ts +102 -0
  11. package/defaults/i18n/da-DK/company.ts +7 -0
  12. package/defaults/i18n/da-DK/editor.ts +13 -0
  13. package/defaults/i18n/da-DK/index.ts +31 -0
  14. package/defaults/i18n/da-DK/internalLinks.ts +12 -0
  15. package/defaults/i18n/da-DK/opens.ts +7 -0
  16. package/defaults/i18n/da-DK/popup.ts +9 -0
  17. package/defaults/i18n/da-DK/privacy.ts +38 -0
  18. package/defaults/i18n/da-DK/rules.ts +56 -0
  19. package/defaults/i18n/da-DK/sitedata.ts +8 -0
  20. package/defaults/i18n/da-DK/standard.ts +8 -0
  21. package/defaults/i18n/da-DK/standardPages.ts +17 -0
  22. package/defaults/internalLinks.ts +8 -8
  23. package/defaults/opens.ts +2 -2
  24. package/defaults/popup.tsx +7 -7
  25. package/defaults/privacy.ts +37 -37
  26. package/defaults/rules.ts +68 -66
  27. package/defaults/schema.ts +1 -1
  28. package/defaults/sitedata.ts +4 -4
  29. package/defaults/standard.ts +9 -6
  30. package/defaults/standardPages.ts +14 -14
  31. package/defaults/texts.ts +7 -510
  32. package/lib/appId.d.mts +1 -0
  33. package/lib/appId.mjs +6 -0
  34. package/lib/appRoute.d.mts +2 -2
  35. package/lib/appRoute.mjs +3 -3
  36. package/lib/appRoute.test.mjs +8 -8
  37. package/lib/apps.mjs +13 -3
  38. package/lib/apps.test.mjs +10 -1
  39. package/lib/contracts.d.mts +3 -2
  40. package/lib/contracts.mjs +3 -2
  41. package/lib/folderChanges.d.mts +29 -0
  42. package/lib/folderChanges.mjs +34 -0
  43. package/lib/licenses.mjs +2 -2
  44. package/lib/licenses.owner.test.mjs +9 -0
  45. package/lib/menu.mjs +4 -4
  46. package/lib/menu.test.mjs +101 -101
  47. package/lib/scheduled.mjs +1 -1
  48. package/lib/section-ranges.d.mts +1 -1
  49. package/lib/section-ranges.mjs +8 -14
  50. package/lib/section-ranges.test.mjs +26 -5
  51. package/lib/storeEntries.d.mts +3 -1
  52. package/lib/storeEntries.mjs +22 -8
  53. package/lib/storeEntries.test.mjs +59 -7
  54. package/lib/text-sections.d.mts +11 -1
  55. package/lib/text-sections.mjs +18 -8
  56. package/lib/text-sections.test.mjs +34 -1
  57. package/lib/translate.d.mts +11 -0
  58. package/lib/translate.mjs +13 -1
  59. package/lib/translate.test.mjs +23 -2
  60. package/lib/video-id.d.mts +6 -2
  61. package/lib/video-id.mjs +5 -1
  62. package/lib/video.d.mts +6 -2
  63. package/lib/video.mjs +5 -1
  64. package/lib/without-h1.d.mts +1 -0
  65. package/lib/without-h1.mjs +19 -4
  66. package/lib/without-h1.test.mjs +30 -1
  67. package/package.json +3 -2
  68. package/scripts/app-screenshots.mjs +9 -8
  69. package/scripts/check-content.mjs +12 -2
  70. package/scripts/check-language.mjs +0 -1
  71. package/scripts/check-site-types.mjs +26 -0
  72. package/scripts/editor-screens.mjs +3 -3
  73. package/scripts/site-types.mjs +14 -0
  74. package/scripts/site-types.test.mjs +21 -0
  75. package/site/activeTheme.test.mjs +52 -0
  76. package/site/appSelf.d.mts +2 -0
  77. package/site/appSelf.mjs +23 -0
  78. package/site/appSelf.test.mjs +35 -0
  79. package/site/content.ts +5 -2
  80. package/site/defineSite.mjs +2 -2
  81. package/site/schema.ts +3 -3
  82. package/site/siteModules.mjs +2 -1
  83. package/site/theme.mjs +19 -8
  84. package/src/Advanced.tsx +2 -2
  85. package/src/App.tsx +79 -78
  86. package/src/AppAdds.tsx +1 -1
  87. package/src/AppList.tsx +39 -24
  88. package/src/BlockDialog.tsx +39 -18
  89. package/src/BlockParts.tsx +6 -6
  90. package/src/BlockSettings.tsx +2 -2
  91. package/src/BrandForm.tsx +2 -2
  92. package/src/Colors.tsx +6 -6
  93. package/src/CompanyForm.tsx +1 -1
  94. package/src/Consents.tsx +3 -3
  95. package/src/CreateFab.tsx +8 -0
  96. package/src/DataForm.tsx +10 -20
  97. package/src/Deleted.tsx +3 -3
  98. package/src/EditorFooter.tsx +2 -2
  99. package/src/EntryForm.tsx +3 -3
  100. package/src/FooterSettings.tsx +2 -2
  101. package/src/FormFrame.tsx +4 -3
  102. package/src/HeaderSettings.tsx +3 -3
  103. package/src/Keywords.tsx +5 -5
  104. package/src/Library.tsx +75 -82
  105. package/src/Licenses.tsx +8 -8
  106. package/src/ListFab.tsx +13 -0
  107. package/src/MainDrawerParts.tsx +3 -3
  108. package/src/MainMenu.tsx +1 -1
  109. package/src/MarkdownEditor.tsx +88 -47
  110. package/src/Media.tsx +11 -20
  111. package/src/MediaTags.tsx +2 -2
  112. package/src/Notifications.tsx +2 -2
  113. package/src/Parts.tsx +17 -17
  114. package/src/Redirects.tsx +14 -22
  115. package/src/Screen.tsx +16 -6
  116. package/src/SeoScores.tsx +6 -6
  117. package/src/SideColumn.tsx +2 -2
  118. package/src/StartFab.tsx +6 -8
  119. package/src/ThemeStore.tsx +37 -16
  120. package/src/Tokens.tsx +2 -2
  121. package/src/apps.ts +7 -8
  122. package/src/checkSite.ts +86 -20
  123. package/src/drawerYield.d.mts +3 -0
  124. package/src/drawerYield.mjs +10 -0
  125. package/src/drawerYield.test.mjs +22 -0
  126. package/src/editor.css +59 -38
  127. package/src/examples.ts +1 -1
  128. package/src/fabScreens.test.mjs +28 -0
  129. package/src/fabScreens.ts +16 -0
  130. package/src/i18n/da-DK/library.ts +2 -2
  131. package/src/i18n/da-DK/text.ts +1 -1
  132. package/src/i18n/en-US/apps.ts +1 -1
  133. package/src/i18n/en-US/common.ts +8 -8
  134. package/src/i18n/en-US/library.ts +5 -5
  135. package/src/i18n/en-US/parts.ts +3 -3
  136. package/src/i18n/en-US/text.ts +1 -1
  137. package/src/i18n/index.ts +4 -8
  138. package/src/images.ts +2 -2
  139. package/src/legacyMove.test.mjs +137 -0
  140. package/src/legacyMove.ts +131 -0
  141. package/src/licenseData.ts +3 -3
  142. package/src/markdown.mjs +10 -7
  143. package/src/markdown.test.mjs +16 -2
  144. package/src/menuChildren.ts +5 -5
  145. package/src/menuOpen.ts +20 -4
  146. package/src/movedRoutes.d.mts +8 -1
  147. package/src/movedRoutes.mjs +102 -21
  148. package/src/movedRoutes.test.mjs +128 -6
  149. package/src/nav.ts +1 -1
  150. package/src/notificationData.ts +1 -1
  151. package/src/pageH1Panel.d.mts +4 -0
  152. package/src/pageH1Panel.mjs +31 -0
  153. package/src/pageH1Panel.test.mjs +56 -0
  154. package/src/pagePreview.tsx +22 -12
  155. package/src/schema.ts +2 -2
  156. package/src/sectionFrame.ts +3 -3
  157. package/src/sectionState.d.mts +3 -3
  158. package/src/sectionState.mjs +6 -6
  159. package/src/sectionState.test.mjs +14 -2
  160. package/src/sheetPlacement.d.mts +6 -4
  161. package/src/sheetPlacement.mjs +15 -10
  162. package/src/sheetPlacement.test.mjs +16 -9
  163. package/src/sidePanel.ts +38 -0
  164. package/src/site.ts +37 -13
  165. package/src/standard/accordion/index.tsx +1 -1
  166. package/src/standard/accordion/shared.ts +1 -1
  167. package/src/standard/buttons/index.tsx +1 -1
  168. package/src/standard/cards/index.tsx +1 -1
  169. package/src/standard/cards/shared.ts +1 -1
  170. package/src/standard/cookies/index.tsx +1 -1
  171. package/src/standard/posts/index.tsx +1 -1
  172. package/src/standard/testimonials/index.tsx +1 -1
  173. package/src/standard/testimonials/list.ts +1 -1
  174. package/src/store.ts +36 -31
  175. package/src/tagUses.d.mts +1 -1
  176. package/src/tagUses.mjs +2 -2
  177. package/src/tagUses.test.mjs +1 -1
  178. package/src/topBarSlot.tsx +7 -15
  179. package/src/ui.tsx +33 -22
  180. package/src/virtual.d.ts +6 -0
  181. package/starter/package.json +1 -1
  182. package/theme/components/PageHeading.astro +22 -0
  183. package/theme/layouts/Base.astro +2 -2
  184. package/theme/layouts/PageLayout.astro +37 -20
  185. package/theme/styles/global.css +2 -1
  186. package/theme/styles/ui.css +40 -10
@@ -1,89 +1,89 @@
1
- // A site's colours under "Indstillinger › Farver" (packages/editor/src/Colors.tsx): the colours there
1
+ // A site's colors under "Settings › Colors" (packages/editor/src/Colors.tsx): the colors there
2
2
  // are, by their CSS variable in the theme (without "--"), the pairs that must be readable
3
- // (WCAG AA, checked before a save and before the build), and the colours a site has until it is given its own
4
- // ("Brug standardfarverne"), and the Material colour role each takes when they are made from one source
5
- // colour (dynamic colour, @morphemecms/cms/lib/dynamic-colors.ts). The colours themselves are in
3
+ // (WCAG AA, checked before a save and before the build), and the colors a site has until it is given its own
4
+ // ("Use standard colors"), and the Material color role each takes when they are made from one source
5
+ // color (dynamic color, @morphemecms/cms/lib/dynamic-colors.ts). The colors themselves are in
6
6
  // src/data/colors.json (config.colors).
7
7
  import type { ColorPair, Colors } from '../lib/colors';
8
8
  import { dynamicColors, type ColorRoles } from '../lib/dynamic-colors';
9
9
 
10
- /** The colours, in the order they are shown, with what they are used for. */
10
+ /** The colors, in the order they are shown, with what they are used for. */
11
11
  export const colorFields: { name: string; label: string; hint: string }[] = [
12
- { name: 'bg', label: 'Baggrund', hint: 'Bag hele siden.' },
13
- { name: 'surface', label: 'Flader', hint: 'Kort, felter og menuer.' },
14
- { name: 'surface-container-lowest', label: 'Flade (lavest)', hint: 'Flader med mindst vægt.' },
15
- { name: 'surface-container-low', label: 'Flade (lav)', hint: 'Kort med skygge, blokke og ark.' },
16
- { name: 'surface-container', label: 'Flade (mellem)', hint: 'Menuer og bjælker.' },
17
- { name: 'surface-container-high', label: 'Flade (høj)', hint: 'Dialoger og søgefeltet.' },
18
- { name: 'surface-container-highest', label: 'Flade (højest)', hint: 'Udfyldte kort, felter og kontakter.' },
19
- { name: 'inverse-surface', label: 'Omvendt flade', hint: 'Beskeder nederst og korte tooltips.' },
20
- { name: 'inverse-on-surface', label: 'Tekst på omvendt flade', hint: 'Teksten og ikonerne på den omvendte flade.' },
21
- { name: 'inverse-primary', label: 'Accentfarve på omvendt flade', hint: 'Knapperne på beskederne nederst.' },
22
- { name: 'tint', label: 'Lys farve', hint: 'Lyse bokse og markeringer.' },
23
- { name: 'ink', label: 'Tekst', hint: 'Al almindelig tekst og overskrifter.' },
24
- { name: 'muted', label: 'Stille tekst', hint: 'Undertekster, datoer og noter.' },
25
- { name: 'line', label: 'Streger', hint: 'Skillelinjer og kanten om kort.' },
26
- { name: 'outline', label: 'Kanter', hint: 'Kanten om felter, knapper og chips.' },
27
- { name: 'accent', label: 'Accentfarve', hint: 'Knapper, links, ikoner og logoet.' },
28
- { name: 'accent-hover', label: 'Accentfarve under musen', hint: 'En knap, musen er over: lidt mørkere (i mørk tilstand lysere).' },
29
- { name: 'on-accent', label: 'Tekst på accentfarven', hint: 'Teksten på knapperne.' },
30
- { name: 'accent-container', label: 'Lys accentfarve', hint: 'Knapper og flader i en lys udgave af accentfarven.' },
31
- { name: 'on-accent-container', label: 'Tekst på lys accentfarve', hint: 'Teksten og ikonerne på den lyse accentfarve.' },
32
- { name: 'secondary', label: 'Sekundær farve', hint: 'Knapper i en anden farve end accentfarven.' },
33
- { name: 'on-secondary', label: 'Tekst på sekundær farve', hint: 'Teksten og ikonerne på den sekundære farve.' },
34
- { name: 'secondary-container', label: 'Lys sekundær farve', hint: 'Knapper og flader i en lys udgave af den sekundære farve.' },
35
- { name: 'on-secondary-container', label: 'Tekst på lys sekundær farve', hint: 'Teksten og ikonerne på den lyse sekundære farve.' },
36
- { name: 'tertiary', label: 'Tertiær farve', hint: 'Knapper i en tredje farve, der skiller sig ud fra de to andre.' },
37
- { name: 'on-tertiary', label: 'Tekst på tertiær farve', hint: 'Teksten og ikonerne på den tertiære farve.' },
38
- { name: 'tertiary-container', label: 'Lys tertiær farve', hint: 'Knapper og flader i en lys udgave af den tertiære farve.' },
39
- { name: 'on-tertiary-container', label: 'Tekst på lys tertiær farve', hint: 'Teksten og ikonerne på den lyse tertiære farve.' },
40
- { name: 'error', label: 'Fejlfarve', hint: 'Fejl i felter og mærker.' },
41
- { name: 'on-error', label: 'Tekst på fejlfarven', hint: 'Teksten og ikonerne på fejlfarven.' },
42
- { name: 'error-container', label: 'Lys fejlfarve', hint: 'Flader i en lys udgave af fejlfarven.' },
43
- { name: 'on-error-container', label: 'Tekst på lys fejlfarve', hint: 'Teksten og ikonerne på den lyse fejlfarve.' },
12
+ { name: 'bg', label: 'Background', hint: 'Behind the whole page.' },
13
+ { name: 'surface', label: 'Surfaces', hint: 'Cards, fields, and menus.' },
14
+ { name: 'surface-container-lowest', label: 'Surface (lowest)', hint: 'Surfaces with the least emphasis.' },
15
+ { name: 'surface-container-low', label: 'Surface (low)', hint: 'Cards with a shadow, blocks, and sheets.' },
16
+ { name: 'surface-container', label: 'Surface (medium)', hint: 'Menus and bars.' },
17
+ { name: 'surface-container-high', label: 'Surface (high)', hint: 'Dialogs and the search field.' },
18
+ { name: 'surface-container-highest', label: 'Surface (highest)', hint: 'Filled cards, fields, and switches.' },
19
+ { name: 'inverse-surface', label: 'Inverse surface', hint: 'Messages at the bottom and short tooltips.' },
20
+ { name: 'inverse-on-surface', label: 'Text on inverse surface', hint: 'The text and icons on the inverse surface.' },
21
+ { name: 'inverse-primary', label: 'Accent color on inverse surface', hint: 'The buttons on the messages at the bottom.' },
22
+ { name: 'tint', label: 'Light color', hint: 'Light boxes and highlights.' },
23
+ { name: 'ink', label: 'Text', hint: 'All regular text and headings.' },
24
+ { name: 'muted', label: 'Muted text', hint: 'Subtitles, dates, and notes.' },
25
+ { name: 'line', label: 'Lines', hint: 'Dividers and the edge around cards.' },
26
+ { name: 'outline', label: 'Outlines', hint: 'The edge around fields, buttons, and chips.' },
27
+ { name: 'accent', label: 'Accent color', hint: 'Buttons, links, icons, and the logo.' },
28
+ { name: 'accent-hover', label: 'Accent color on hover', hint: 'A button the pointer is over: a little darker (lighter in dark mode).' },
29
+ { name: 'on-accent', label: 'Text on accent color', hint: 'The text on the buttons.' },
30
+ { name: 'accent-container', label: 'Light accent color', hint: 'Buttons and surfaces in a light version of the accent color.' },
31
+ { name: 'on-accent-container', label: 'Text on light accent color', hint: 'The text and icons on the light accent color.' },
32
+ { name: 'secondary', label: 'Secondary color', hint: 'Buttons in a different color than the accent color.' },
33
+ { name: 'on-secondary', label: 'Text on secondary color', hint: 'The text and icons on the secondary color.' },
34
+ { name: 'secondary-container', label: 'Light secondary color', hint: 'Buttons and surfaces in a light version of the secondary color.' },
35
+ { name: 'on-secondary-container', label: 'Text on light secondary color', hint: 'The text and icons on the light secondary color.' },
36
+ { name: 'tertiary', label: 'Tertiary color', hint: 'Buttons in a third color that stands out from the other two.' },
37
+ { name: 'on-tertiary', label: 'Text on tertiary color', hint: 'The text and icons on the tertiary color.' },
38
+ { name: 'tertiary-container', label: 'Light tertiary color', hint: 'Buttons and surfaces in a light version of the tertiary color.' },
39
+ { name: 'on-tertiary-container', label: 'Text on light tertiary color', hint: 'The text and icons on the light tertiary color.' },
40
+ { name: 'error', label: 'Error color', hint: 'Errors in fields and badges.' },
41
+ { name: 'on-error', label: 'Text on error color', hint: 'The text and icons on the error color.' },
42
+ { name: 'error-container', label: 'Light error color', hint: 'Surfaces in a light version of the error color.' },
43
+ { name: 'on-error-container', label: 'Text on light error color', hint: 'The text and icons on the light error color.' },
44
44
  ];
45
45
 
46
46
  /** The text and its background that must be readable, in both modes. */
47
47
  export const colorPairs: ColorPair[] = [
48
- { text: 'ink', on: 'bg', what: 'Teksten på baggrunden' },
49
- { text: 'ink', on: 'surface', what: 'Teksten på flader' },
50
- { text: 'ink', on: 'tint', what: 'Teksten i lyse bokse' },
51
- { text: 'muted', on: 'bg', what: 'Den stille tekst på baggrunden' },
52
- { text: 'muted', on: 'surface', what: 'Den stille tekst på flader' },
53
- { text: 'muted', on: 'tint', what: 'Den stille tekst i lyse bokse' },
54
- { text: 'ink', on: 'surface-container-lowest', what: 'Teksten på den laveste flade' },
55
- { text: 'ink', on: 'surface-container-low', what: 'Teksten på den lave flade' },
56
- { text: 'ink', on: 'surface-container', what: 'Teksten på den mellemste flade' },
57
- { text: 'ink', on: 'surface-container-high', what: 'Teksten på den høje flade' },
58
- { text: 'ink', on: 'surface-container-highest', what: 'Teksten på den højeste flade' },
59
- { text: 'muted', on: 'surface-container-lowest', what: 'Den stille tekst på den laveste flade' },
60
- { text: 'muted', on: 'surface-container-low', what: 'Den stille tekst på den lave flade' },
61
- { text: 'muted', on: 'surface-container', what: 'Den stille tekst på den mellemste flade' },
62
- { text: 'muted', on: 'surface-container-high', what: 'Den stille tekst på den høje flade' },
63
- { text: 'muted', on: 'surface-container-highest', what: 'Den stille tekst på den højeste flade' },
64
- { text: 'accent', on: 'bg', what: 'Links på baggrunden' },
65
- { text: 'accent', on: 'surface', what: 'Links på flader' },
66
- { text: 'accent', on: 'tint', what: 'Accentfarven i lyse bokse' },
67
- { text: 'accent', on: 'surface-container-low', what: 'Links på den lave flade' },
68
- { text: 'on-accent', on: 'accent', what: 'Teksten på knapperne' },
69
- { text: 'on-accent', on: 'accent-hover', what: 'Teksten på knapperne under musen' },
70
- { text: 'on-accent-container', on: 'accent-container', what: 'Teksten på den lyse accentfarve' },
71
- { text: 'on-secondary', on: 'secondary', what: 'Teksten på den sekundære farve' },
72
- { text: 'on-secondary-container', on: 'secondary-container', what: 'Teksten på den lyse sekundære farve' },
73
- { text: 'on-tertiary', on: 'tertiary', what: 'Teksten på den tertiære farve' },
74
- { text: 'on-tertiary-container', on: 'tertiary-container', what: 'Teksten på den lyse tertiære farve' },
75
- { text: 'error', on: 'bg', what: 'Fejl på baggrunden' },
76
- { text: 'error', on: 'surface-container-highest', what: 'Fejl i udfyldte felter' },
77
- { text: 'on-error', on: 'error', what: 'Teksten på fejlfarven' },
78
- { text: 'on-error-container', on: 'error-container', what: 'Teksten på den lyse fejlfarve' },
79
- { text: 'inverse-on-surface', on: 'inverse-surface', what: 'Teksten på den omvendte flade' },
80
- { text: 'inverse-primary', on: 'inverse-surface', what: 'Knapperne på den omvendte flade' },
48
+ { text: 'ink', on: 'bg', what: 'Text on the background' },
49
+ { text: 'ink', on: 'surface', what: 'Text on surfaces' },
50
+ { text: 'ink', on: 'tint', what: 'Text in light boxes' },
51
+ { text: 'muted', on: 'bg', what: 'Muted text on the background' },
52
+ { text: 'muted', on: 'surface', what: 'Muted text on surfaces' },
53
+ { text: 'muted', on: 'tint', what: 'Muted text in light boxes' },
54
+ { text: 'ink', on: 'surface-container-lowest', what: 'Text on the lowest surface' },
55
+ { text: 'ink', on: 'surface-container-low', what: 'Text on the low surface' },
56
+ { text: 'ink', on: 'surface-container', what: 'Text on the medium surface' },
57
+ { text: 'ink', on: 'surface-container-high', what: 'Text on the high surface' },
58
+ { text: 'ink', on: 'surface-container-highest', what: 'Text on the highest surface' },
59
+ { text: 'muted', on: 'surface-container-lowest', what: 'Muted text on the lowest surface' },
60
+ { text: 'muted', on: 'surface-container-low', what: 'Muted text on the low surface' },
61
+ { text: 'muted', on: 'surface-container', what: 'Muted text on the medium surface' },
62
+ { text: 'muted', on: 'surface-container-high', what: 'Muted text on the high surface' },
63
+ { text: 'muted', on: 'surface-container-highest', what: 'Muted text on the highest surface' },
64
+ { text: 'accent', on: 'bg', what: 'Links on the background' },
65
+ { text: 'accent', on: 'surface', what: 'Links on surfaces' },
66
+ { text: 'accent', on: 'tint', what: 'The accent color in light boxes' },
67
+ { text: 'accent', on: 'surface-container-low', what: 'Links on the low surface' },
68
+ { text: 'on-accent', on: 'accent', what: 'Text on buttons' },
69
+ { text: 'on-accent', on: 'accent-hover', what: 'Text on buttons on hover' },
70
+ { text: 'on-accent-container', on: 'accent-container', what: 'Text on the light accent color' },
71
+ { text: 'on-secondary', on: 'secondary', what: 'Text on the secondary color' },
72
+ { text: 'on-secondary-container', on: 'secondary-container', what: 'Text on the light secondary color' },
73
+ { text: 'on-tertiary', on: 'tertiary', what: 'Text on the tertiary color' },
74
+ { text: 'on-tertiary-container', on: 'tertiary-container', what: 'Text on the light tertiary color' },
75
+ { text: 'error', on: 'bg', what: 'Errors on the background' },
76
+ { text: 'error', on: 'surface-container-highest', what: 'Errors in filled fields' },
77
+ { text: 'on-error', on: 'error', what: 'Text on the error color' },
78
+ { text: 'on-error-container', on: 'error-container', what: 'Text on the light error color' },
79
+ { text: 'inverse-on-surface', on: 'inverse-surface', what: 'Text on the inverse surface' },
80
+ { text: 'inverse-primary', on: 'inverse-surface', what: 'Buttons on the inverse surface' },
81
81
  ];
82
82
 
83
- /** The Material colour role of each colour, for dynamic colour: the page on Material's surface, cards a step
83
+ /** The Material color role of each color, for dynamic color: the page on Material's surface, cards a step
84
84
  * lighter (white in light mode), the light boxes on a higher container, so text and links can be read on them at
85
- * every contrast level, Material's surface containers, inverse colours, outline and error colours as themselves (the
86
- * theme's parts take them, as Material 3's do), buttons and links in the primary colour, and the other colours of the scheme (Material 3's
85
+ * every contrast level, Material's surface containers, inverse colors, outline and error colors as themselves (the
86
+ * theme's parts take them, as Material 3's do), buttons and links in the primary color, and the other colors of the scheme (Material 3's
87
87
  * containers, secondary and tertiary: the FABs and their menus) as their own roles. */
88
88
  export const colorRoles: ColorRoles = {
89
89
  bg: 'surface',
@@ -120,6 +120,6 @@ export const colorRoles: ColorRoles = {
120
120
  'on-error-container': 'onErrorContainer',
121
121
  };
122
122
 
123
- /** The colours a site has until it is given its own ("Brug standardfarverne"): Material 3's scheme of a blue (tonal
123
+ /** The colors a site has until it is given its own ("Use standard colors"): Material 3's scheme of a blue (tonal
124
124
  * spot), as the app store's pictures are taken with (packages/editor/scripts/app-screenshots.mjs). */
125
125
  export const defaultColors: Colors = dynamicColors({ source: '#1a73e8', variant: 'tonalSpot', contrast: 'standard' }, colorRoles);
@@ -1,18 +1,18 @@
1
- // "Virksomheden": the business, in parts, each a screen of its own (CompanyForm.tsx): its phone, e-mail and address
2
- // (src/data/contact.json) and its bank details (src/data/payment.json, under "Betaling", where a site may add its
1
+ // "Business": the business, in parts, each a screen of its own (CompanyForm.tsx): its phone, e-mail and address
2
+ // (src/data/contact.json) and its bank details (src/data/payment.json, under "Payment", where a site may add its
3
3
  // other ways to pay, and where the settings of the apps installed that are a way to pay come after, as MobilePay's),
4
4
  // used all over the site; and its social media (src/data/social.json): the profiles and the post's share buttons.
5
- // The logo and the icon are under "Udseende" (BrandForm.tsx); the link to the calendar in Calendly is the app Calendly's (morpheme-apps/apps/calendly/).
5
+ // The logo and the icon are under "Appearance" (BrandForm.tsx); the link to the calendar in Calendly is the app Calendly's (morpheme-apps/apps/calendly/).
6
6
  import { AddressBook, Bank, CreditCard, ShareNetwork } from '@phosphor-icons/react';
7
7
  import type { Part } from '../src/schema';
8
8
  import { bankFields, contactFields, socialFields } from '@site/collections';
9
9
 
10
- /** The parts of "Virksomheden", in their order, at #virksomheden/<id> ("Betaling"'s at #virksomheden/betaling/<id>). */
10
+ /** The parts of "Business", in their order, at #company/<id> ("Payment"'s at #company/payment/<id>). */
11
11
  export const companyParts: Part[] = [
12
- { id: 'kontakt', label: 'Kontakt', icon: AddressBook, file: 'src/data/contact.json', fields: contactFields },
12
+ { id: 'contact', label: 'Contact', icon: AddressBook, file: 'src/data/contact.json', fields: contactFields },
13
13
  {
14
- id: 'sociale-medier',
15
- label: 'Sociale medier',
14
+ id: 'social-media',
15
+ label: 'Social media',
16
16
  icon: ShareNetwork,
17
17
  file: 'src/data/social.json',
18
18
  fields: socialFields,
@@ -20,8 +20,8 @@ export const companyParts: Part[] = [
20
20
  defaults: { shareFacebook: true, shareX: true, shareLinkedin: true, sharePinterest: true, shareCopyLink: true },
21
21
  },
22
22
  {
23
- id: 'betaling',
24
- label: 'Betaling',
23
+ id: 'payment',
24
+ label: 'Payment',
25
25
  icon: CreditCard,
26
26
  apps: ['payment'],
27
27
  parts: [{ id: 'bank', label: 'Bank', icon: Bank, file: 'src/data/payment.json', fields: bankFields }],
@@ -4,20 +4,20 @@
4
4
  // may take the standard one from @morphemecms/cms/defaults/<file> and add its own.
5
5
  // collections the parts of the site and their fields (collections.ts)
6
6
  // groups, settings, lists, header, icons the menu and the start screen
7
- // appearance the site's own parts under "Udseende", after the logo and icon ("Standardsider")
8
- // companyParts, blockParts the screens under "Virksomheden" and "Blokke" (company.ts, blockTexts.ts)
7
+ // appearance the site's own parts under "Appearance", after the logo and icon ("Default pages")
8
+ // companyParts, blockParts the screens under "Business" and "Blocks" (company.ts, blockTexts.ts)
9
9
  // partScreens parts of the start screen that are screens with parts of their own (privacy.ts)
10
- // seoParts the site's own parts under "Søgemaskineoptimering" (#seo/<id>), in the menu under "Indhold" (internalLinks.ts)
10
+ // seoParts the site's own parts under "Search engine optimization" (#seo/<id>), in the menu under "Content" (internalLinks.ts)
11
11
  // relationsOf, usedBy, keptBy what a field picks from, what cannot be deleted, and what cannot be saved so (rules.ts)
12
12
  // siteProblems what is wrong by the site's own rules, before it is built (rules.ts)
13
- // usesOf, countsOf the places that use an entry (a tag's "Bruges på") and their number at it in its list (rules.ts)
13
+ // usesOf, countsOf the places that use an entry (a tag's "Used on") and their number at it in its list (rules.ts)
14
14
  // testimonialsOf the testimonials the blocks show (rules.ts)
15
15
  // siteOf what the blocks' previews show from the rest of the site (sitedata.ts)
16
16
  // fixedPages, everyFixedPage how the front page's sections look in the editor (the theme's editor/previews.tsx)
17
17
  // sectionLooks, headingLooks how the text of the front page looks in the editor (the theme's editor/looks.mjs)
18
18
  // standardPages, standardPaths, frontLeads the front page, the blog page, the 404 page and the others, and how the front page is
19
19
  // written (standardPages.ts)
20
- // colorFields, colorPairs, colorRoles, defaultColors the colours under "Farver" and their Material roles (colors.ts)
20
+ // colorFields, colorPairs, colorRoles, defaultColors the colors under "Colors" and their Material roles (colors.ts)
21
21
  // siteName the title of the start screen and the way back to it
22
22
  // sharing what a page shared on social media shows when it has nothing of its own (Base.astro)
23
23
  import {
@@ -67,7 +67,7 @@ export { config };
67
67
  import { collections, standardPageFieldsOf } from '@site/collections';
68
68
  import { drawActionBar, drawPopup } from '@site/popup';
69
69
 
70
- // A pop-up and an action bar ("Promovering") drawn beside their form (popup.tsx), and an app's kind with a
70
+ // A pop-up and an action bar ("Promotion") drawn beside their form (popup.tsx), and an app's kind with a
71
71
  // part in the pop-up's box (Mailchimp's signup: drawPart; an app's other kinds have their own drawing). Set here, as
72
72
  // collections.ts is also read by packages/editor/scripts/editor-roundtrip.mjs in plain Node, which cannot read JSX.
73
73
  const promotions = collections.find((c) => c.id === 'popups');
@@ -85,20 +85,20 @@ export { HEADINGS as headingLooks, LOOKS as sectionLooks } from '@theme/editor/l
85
85
  export { frontLeads, standardPages, standardPaths, type StandardPage } from '@site/standardPages';
86
86
  export { colorFields, colorPairs, colorRoles, defaultColors } from '@site/colors';
87
87
 
88
- /** Parts of the start screen that are a screen with parts, each a screen of its own: "Privatliv" (privacy.ts). The
88
+ /** Parts of the start screen that are a screen with parts, each a screen of its own: "Privacy" (privacy.ts). The
89
89
  * settings of the apps, also those that measure (Google Analytics …) or add a kind of promotion (Calendly, Mailchimp),
90
90
  * are on their own app pages under "Apps" (AppList.tsx settingsRoute). */
91
91
  export const partScreens: PartScreen[] = [privacy];
92
92
 
93
- /** The site's own parts under "Søgemaskineoptimering", each a screen of its own at #seo/<id>, after the editor's
94
- * "Videresendelser": "Interne links" (internalLinks.ts). */
93
+ /** The site's own parts under "Search engine optimization", each a screen of its own at #seo/<id>, after the editor's
94
+ * "Redirects": "Internal links" (internalLinks.ts). */
95
95
  export const seoParts = [internalLinks];
96
96
 
97
97
  /** The title of the start screen, and of the way back to it on every other screen. */
98
98
  export const siteName = site.name;
99
99
 
100
100
  /** What a page shared on social media shows when it has nothing of its own (Base.astro): the site's name after its
101
- * title, its description and its picture (the owner's, config.picture). For the preview under "Sociale medier" (sharedAs in seo.ts). */
101
+ * title, its description and its picture (the owner's, config.picture). For the preview under "Social media" (sharedAs in seo.ts). */
102
102
  export const sharing = { name: site.name, description: site.description, picture: site.portrait };
103
103
 
104
104
  /** The icon of each part on the start screen and in the sidebar, by its id. */
@@ -108,45 +108,45 @@ export const icons: Record<string, Icon> = {
108
108
  pages: FileText,
109
109
  header: Browser,
110
110
  menu: ListIcon,
111
- mobilmenu: DeviceMobile,
112
- kategorier: Tag,
111
+ 'mobile-menu': DeviceMobile,
112
+ tags: Tag,
113
113
  popups: Megaphone,
114
- virksomheden: Buildings,
114
+ company: Buildings,
115
115
  // The sections of the main menu that are not also a part.
116
- indhold: Article,
117
- globalt: GlobeSimple,
118
- indstillinger: GearSix,
119
- blokke: SquaresFour,
120
- filer: FolderSimple,
121
- privatliv: ShieldCheck,
122
- lister: ListChecks,
116
+ content: Article,
117
+ global: GlobeSimple,
118
+ settings: GearSix,
119
+ blocks: SquaresFour,
120
+ files: FolderSimple,
121
+ privacy: ShieldCheck,
122
+ lists: ListChecks,
123
123
  footer: SquareHalfBottom,
124
124
  seo: MagnifyingGlass,
125
- videresendelser: Signpost,
126
- udseende: PaintBrushBroad,
127
- blokvalg: ToggleRight,
125
+ redirects: Signpost,
126
+ appearance: PaintBrushBroad,
127
+ 'block-settings': ToggleRight,
128
128
  apps: PuzzlePiece,
129
129
  appstore: Storefront,
130
130
  morpheme: Sparkle,
131
- avanceret: Wrench,
132
- licenser: Certificate,
133
- // The screens under "Udseende" (Library.tsx Theme).
134
- temaer: Swatches,
135
- farver: Palette,
131
+ advanced: Wrench,
132
+ licenses: Certificate,
133
+ // The screens under "Appearance" (Library.tsx Theme).
134
+ themes: Swatches,
135
+ colors: Palette,
136
136
  logo: Sticker,
137
- ikonpakker: Smiley,
138
- bevaegelse: WaveSine,
139
- sidekolonne: SidebarSimple,
140
- dele: Shapes,
137
+ 'icon-packs': Smiley,
138
+ motion: WaveSine,
139
+ 'side-column': SidebarSimple,
140
+ parts: Shapes,
141
141
  };
142
142
 
143
- /** The site's own parts under "Udseende" (#udseende), after the logo and icon, each a screen of its own at #udseende/<id>:
144
- * "Standardsider", which pages are the front page, the blog page, the 404 page and the contact page, as a list
145
- * (standardPageFieldsOf in collections.ts; the privacy policy and the cookie policy are under "Privatliv", privacy.ts). */
143
+ /** The site's own parts under "Appearance" (#appearance), after the logo and icon, each a screen of its own at #appearance/<id>:
144
+ * "Default pages", which pages are the front page, the blog page, the 404 page and the contact page, as a list
145
+ * (standardPageFieldsOf in collections.ts; the privacy policy and the cookie policy are under "Privacy", privacy.ts). */
146
146
  export const appearance: Part[] = [
147
147
  {
148
- id: 'standardsider',
149
- label: 'Standardsider',
148
+ id: 'default-pages',
149
+ label: 'Default pages',
150
150
  icon: House,
151
151
  file: config.standardPages,
152
152
  fields: standardPageFieldsOf('front', 'blog', 'notFound', 'contact'),
@@ -154,44 +154,44 @@ export const appearance: Part[] = [
154
154
  },
155
155
  ];
156
156
 
157
- // The editor's menu: eight sections in a fixed order, shown in the order written here, never A–Å. "Oversigt" is a link to the
157
+ // The editor's menu: eight sections in a fixed order, shown in the order written here, never A–Z. "Dashboard" is a link to the
158
158
  // start screen (`href`) without a list; the others have a list of parts, each an id: the content the owner writes and
159
- // uploads ("Indhold": the pages, the blog, the short lists, the pop-ups, the tags, the files, "interne-links" (seoParts)
160
- // and "videresendelser", Redirects.tsx), what is on every page ("Globalt": the header with the menus, the footer and
161
- // "Virksomheden": name, contact and booking), the apps ("Apps": the apps that come with the site, src/apps/, AppList.tsx,
162
- // and "appstore"), the blocks ("Blokke": their shared texts, and "Blokvalg", which of them can be put in), how the site
163
- // looks ("Udseende": the theme, the icon packs, the motion, the side column (SideColumn.tsx), the colours, the logo and icon, the standard pages
164
- // (appearance) and the editor's parts: Colors.tsx, BrandForm.tsx and Parts.tsx), the parts of "Privatliv" (privacy.ts)
165
- // and the settings of the whole site ("Indstillinger").
166
- // Each part is a collection (collections.ts), except those named above, "privatliv"'s (partScreens) and the editor's own
167
- // "virksomheden" (companyParts), "blokke" (blockParts), "filer" (the pictures, PDFs, videos and zip files), "header", "lister"
168
- // and "blokvalg" (BlockSettings.tsx).
169
- const settingsIds = ['morpheme', 'avanceret'];
159
+ // uploads ("Content": the pages, the blog, the short lists, the pop-ups, the tags, the files, "internal links" (seoParts)
160
+ // and "redirects", Redirects.tsx), what is on every page ("Globals": the header with the menus, the footer and
161
+ // "Business": name, contact and booking), the apps ("Apps": the apps that come with the site, src/apps/, AppList.tsx,
162
+ // and "appstore"), the blocks ("Blocks": their shared texts, and "Block selection", which of them can be put in), how the site
163
+ // looks ("Appearance": the theme, the icon packs, the motion, the side column (SideColumn.tsx), the colors, the logo and icon, the standard pages
164
+ // (appearance) and the editor's parts: Colors.tsx, BrandForm.tsx and Parts.tsx), the parts of "Privacy" (privacy.ts)
165
+ // and the settings of the whole site ("Settings").
166
+ // Each part is a collection (collections.ts), except those named above, "privacy"'s (partScreens) and the editor's own
167
+ // "company" (companyParts), "blocks" (blockParts), id files (the pictures, PDFs, videos and zip files), "header", "lists"
168
+ // and "block-settings" (BlockSettings.tsx).
169
+ const settingsIds = ['morpheme', 'advanced'];
170
170
  export const groups: { id: string; title: string; href?: string; ids: string[] }[] = [
171
- { id: 'home', title: 'Oversigt', href: '#', ids: [] },
171
+ { id: 'home', title: 'Dashboard', href: '#', ids: [] },
172
172
  {
173
- id: 'indhold',
174
- title: 'Indhold',
175
- ids: ['pages', 'blog', 'lister', 'popups', 'kategorier', 'filer', internalLinks.id, 'videresendelser'],
173
+ id: 'content',
174
+ title: 'Content',
175
+ ids: ['pages', 'blog', 'lists', 'popups', 'tags', 'files', internalLinks.id, 'redirects'],
176
176
  },
177
- { id: 'globalt', title: 'Globalt', ids: ['header', 'footer', 'virksomheden'] },
177
+ { id: 'global', title: 'Globals', ids: ['header', 'footer', 'company'] },
178
178
  { id: 'apps', title: 'Apps', ids: ['apps', 'appstore'] },
179
- { id: 'blokke', title: 'Blokke', ids: ['blokke', 'blokvalg'] },
179
+ { id: 'blocks', title: 'Blocks', ids: ['blocks', 'block-settings'] },
180
180
  {
181
- id: 'udseende',
182
- title: 'Udseende',
183
- ids: ['temaer', 'ikonpakker', 'bevaegelse', 'sidekolonne', 'farver', 'logo', ...appearance.map((p) => p.id), 'dele'],
181
+ id: 'appearance',
182
+ title: 'Appearance',
183
+ ids: ['themes', 'icon-packs', 'motion', 'side-column', 'colors', 'logo', ...appearance.map((p) => p.id), 'parts'],
184
184
  },
185
- { id: 'privatliv', title: 'Privatliv', ids: privacy.parts.map((p) => p.id) },
186
- { id: 'indstillinger', title: 'Indstillinger', ids: settingsIds },
185
+ { id: 'privacy', title: 'Privacy', ids: privacy.parts.map((p) => p.id) },
186
+ { id: 'settings', title: 'Settings', ids: settingsIds },
187
187
  ];
188
188
 
189
- /** The settings of the whole site: the ids of the last section, "Indstillinger", written once. */
189
+ /** The settings of the whole site: the ids of the last section, "Settings", written once. */
190
190
  export const settings: string[] = settingsIds;
191
191
 
192
- /** The site's own short lists, on a screen of their own under "Lister" (#lister), with those the standard blocks
193
- * bring ("Udtalelser") and the apps (their lists.ts). */
192
+ /** The site's own short lists, on a screen of their own under "Lists" (#lists), with those the standard blocks
193
+ * bring ("Testimonials") and the apps (their lists.ts). */
194
194
  export const lists: string[] = [];
195
195
 
196
- /** What is in the header on every page, on one screen under "Udseende" › "Header" (#udseende/header, HeaderSettings.tsx). */
197
- export const header = ['menu', 'mobilmenu', 'headerknap'];
196
+ /** What is in the header on every page, on one screen under "Appearance" › "Header" (#appearance/header, HeaderSettings.tsx). */
197
+ export const header = ['menu', 'mobile-menu', 'header-button'];
@@ -0,0 +1,12 @@
1
+ // The Danish of defaults/blockTexts.ts: its English texts (the keys) in Danish (the values), as the editor
2
+ // showed them before the switch to English. Joined in defaults/i18n/da-DK/index.ts.
3
+
4
+ export const blockTexts: Record<string, string> = {
5
+ 'Block templates': 'Blokskabeloner',
6
+ 'Book an appointment': 'Book en tid',
7
+ Heading: 'Overskrift',
8
+ Text: 'Tekst',
9
+ 'Button text (book)': 'Knaptekst (book)',
10
+ 'Button text (call)': 'Knaptekst (ring)',
11
+ 'The phone number is shown after the text.': 'Telefonnummeret vises efter teksten.',
12
+ };