domma-cms 1.8.32 → 1.8.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/docs/DommaFeatures.md +13 -1
  3. package/package.json +1 -1
  4. package/plugins/_lib/admin/games/games.css +1 -1
  5. package/plugins/_lib/admin/games/kit.js +329 -124
  6. package/plugins/_lib/games/http.js +11 -1
  7. package/plugins/_lib/games/plays.js +28 -7
  8. package/plugins/crossword/CLAUDE.md +37 -0
  9. package/plugins/crossword/admin/css/index.css +18 -1
  10. package/plugins/crossword/admin/views/crossword.js +337 -205
  11. package/plugins/crossword/docs/guide.md +53 -0
  12. package/plugins/crossword/inject/body.html +1 -1
  13. package/plugins/crossword/plugin.js +38 -5
  14. package/plugins/crossword/plugin.json +4 -3
  15. package/plugins/crossword/public/crossword.css +36 -1
  16. package/plugins/crossword/public/crossword.js +468 -6
  17. package/plugins/docs/CLAUDE.md +318 -0
  18. package/plugins/docs/admin/css/docs.css +783 -0
  19. package/plugins/docs/admin/lib/api.js +340 -0
  20. package/plugins/docs/admin/lib/convert.js +482 -0
  21. package/plugins/docs/admin/lib/drafts.js +115 -0
  22. package/plugins/docs/admin/lib/editor.js +851 -0
  23. package/plugins/docs/admin/lib/find-replace.js +426 -0
  24. package/plugins/docs/admin/lib/folders.js +203 -0
  25. package/plugins/docs/admin/lib/panel-guard.js +73 -0
  26. package/plugins/docs/admin/lib/pdf-view.js +126 -0
  27. package/plugins/docs/admin/lib/send.js +156 -0
  28. package/plugins/docs/admin/lib/settings.js +142 -0
  29. package/plugins/docs/admin/lib/share.js +323 -0
  30. package/plugins/docs/admin/lib/shortcuts.js +44 -0
  31. package/plugins/docs/admin/lib/templates.js +194 -0
  32. package/plugins/docs/admin/lib/versions.js +192 -0
  33. package/plugins/docs/admin/templates/docs.html +92 -0
  34. package/plugins/docs/admin/templates/editor.html +86 -0
  35. package/plugins/docs/admin/views/docs.js +777 -0
  36. package/plugins/docs/admin/views/editor.js +978 -0
  37. package/plugins/docs/config.js +24 -0
  38. package/plugins/docs/docs/guide.md +270 -0
  39. package/plugins/docs/lib/extensions.js +213 -0
  40. package/plugins/docs/lib/importer.js +72 -0
  41. package/plugins/docs/lib/pdf-worker.js +48 -0
  42. package/plugins/docs/lib/pdf.js +222 -0
  43. package/plugins/docs/lib/store.js +748 -0
  44. package/plugins/docs/plugin.js +1108 -0
  45. package/plugins/docs/plugin.json +89 -0
  46. package/plugins/docs/plugin.public.js +114 -0
  47. package/plugins/docs/templates/public-doc.html +36 -0
  48. package/plugins/docs/tests/_env.js +10 -0
  49. package/plugins/docs/tests/_pdf.js +73 -0
  50. package/plugins/docs/tests/convert.test.js +95 -0
  51. package/plugins/docs/tests/drafts.test.js +82 -0
  52. package/plugins/docs/tests/pdf.test.js +86 -0
  53. package/plugins/docs/tests/plugin.test.js +816 -0
  54. package/plugins/docs/tests/shortcuts.test.js +30 -0
  55. package/plugins/free-tier.lock.json +147 -1
  56. package/plugins/garage/CLAUDE.md +51 -0
  57. package/plugins/garage/admin/css/garage.css +73 -0
  58. package/plugins/garage/admin/lib/garage.js +236 -0
  59. package/plugins/garage/admin/templates/garage.html +86 -0
  60. package/plugins/garage/admin/views/garage.js +581 -0
  61. package/plugins/garage/collections/garage-vehicles/schema.json +101 -0
  62. package/plugins/garage/config.js +18 -0
  63. package/plugins/garage/docs/guide.md +118 -0
  64. package/plugins/garage/plugin.js +471 -0
  65. package/plugins/garage/plugin.json +68 -0
  66. package/plugins/garage/tests/access.test.js +134 -0
  67. package/plugins/garage/tests/garage.test.js +106 -0
  68. package/plugins/messages/CLAUDE.md +230 -0
  69. package/plugins/messages/admin/css/messages.css +117 -0
  70. package/plugins/messages/admin/lib/messages.js +452 -0
  71. package/plugins/messages/admin/templates/messages.html +76 -0
  72. package/plugins/messages/admin/views/messages.js +1219 -0
  73. package/plugins/messages/collections/user-message-threads/schema.json +22 -0
  74. package/plugins/messages/collections/user-messages/schema.json +23 -0
  75. package/plugins/messages/config.js +14 -0
  76. package/plugins/messages/docs/guide.md +176 -0
  77. package/plugins/messages/lib/call.js +138 -0
  78. package/plugins/messages/plugin.js +994 -0
  79. package/plugins/messages/plugin.json +59 -0
  80. package/plugins/messages/plugin.public.js +52 -0
  81. package/plugins/messages/templates/call.html +6 -0
  82. package/plugins/messages/tests/after-send.test.js +22 -0
  83. package/plugins/messages/tests/api.test.js +187 -0
  84. package/plugins/messages/tests/call.test.js +497 -0
  85. package/plugins/messages/tests/drafts.test.js +25 -0
  86. package/plugins/messages/tests/messages.test.js +167 -0
  87. package/plugins/quiz/CLAUDE.md +43 -0
  88. package/plugins/quiz/admin/css/index.css +13 -1
  89. package/plugins/quiz/admin/views/quiz.js +423 -245
  90. package/plugins/quiz/docs/guide.md +61 -0
  91. package/plugins/quiz/inject/body.html +1 -1
  92. package/plugins/quiz/plugin.js +39 -5
  93. package/plugins/quiz/plugin.json +4 -3
  94. package/plugins/quiz/public/quiz.css +36 -1
  95. package/plugins/quiz/public/quiz.js +298 -6
  96. package/plugins/theme-roller/CLAUDE.md +65 -0
  97. package/plugins/theme-roller/admin/css/theme-roller.css +43 -0
  98. package/plugins/theme-roller/admin/lib/prompt.js +22 -0
  99. package/plugins/theme-roller/admin/lib/themes.js +196 -0
  100. package/plugins/theme-roller/admin/lib/view.js +88 -0
  101. package/plugins/theme-roller/admin/templates/theme-roller.html +73 -0
  102. package/plugins/theme-roller/admin/views/theme-roller-view.js +639 -0
  103. package/plugins/theme-roller/config.js +1 -0
  104. package/plugins/theme-roller/docs/guide.md +104 -0
  105. package/plugins/theme-roller/plugin.js +263 -0
  106. package/plugins/theme-roller/plugin.json +42 -0
  107. package/plugins/theme-roller/tests/api.test.js +161 -0
  108. package/plugins/theme-roller/tests/prompt-values.test.js +22 -0
  109. package/plugins/theme-roller/tests/themes.test.js +77 -0
  110. package/plugins/theme-roller/tests/view.test.js +55 -0
@@ -0,0 +1,101 @@
1
+ {
2
+ "slug": "garage-vehicles",
3
+ "title": "Garage Vehicles",
4
+ "description": "Vehicle registrations managed by the Garage plugin.",
5
+ "plugin": "garage",
6
+ "fields": [
7
+ {
8
+ "name": "userId",
9
+ "label": "User ID",
10
+ "type": "text",
11
+ "required": true
12
+ },
13
+ {
14
+ "name": "registrationNumber",
15
+ "label": "Registration",
16
+ "type": "text",
17
+ "required": true
18
+ },
19
+ {
20
+ "name": "make",
21
+ "label": "Make",
22
+ "type": "text"
23
+ },
24
+ {
25
+ "name": "colour",
26
+ "label": "Colour",
27
+ "type": "text"
28
+ },
29
+ {
30
+ "name": "yearOfManufacture",
31
+ "label": "Year",
32
+ "type": "text"
33
+ },
34
+ {
35
+ "name": "fuelType",
36
+ "label": "Fuel Type",
37
+ "type": "text"
38
+ },
39
+ {
40
+ "name": "engineCapacity",
41
+ "label": "Engine Capacity",
42
+ "type": "text"
43
+ },
44
+ {
45
+ "name": "co2Emissions",
46
+ "label": "CO2 Emissions",
47
+ "type": "text"
48
+ },
49
+ {
50
+ "name": "motStatus",
51
+ "label": "MOT Status",
52
+ "type": "text"
53
+ },
54
+ {
55
+ "name": "motExpiryDate",
56
+ "label": "MOT Expiry",
57
+ "type": "text"
58
+ },
59
+ {
60
+ "name": "taxStatus",
61
+ "label": "Tax Status",
62
+ "type": "text"
63
+ },
64
+ {
65
+ "name": "taxDueDate",
66
+ "label": "Tax Due",
67
+ "type": "text"
68
+ },
69
+ {
70
+ "name": "isSaved",
71
+ "label": "Saved",
72
+ "type": "text"
73
+ },
74
+ {
75
+ "name": "lookupDate",
76
+ "label": "Lookup Date",
77
+ "type": "text"
78
+ }
79
+ ],
80
+ "api": {
81
+ "create": {
82
+ "enabled": false,
83
+ "access": "admin"
84
+ },
85
+ "read": {
86
+ "enabled": false,
87
+ "access": "admin"
88
+ },
89
+ "update": {
90
+ "enabled": false,
91
+ "access": "admin"
92
+ },
93
+ "delete": {
94
+ "enabled": false,
95
+ "access": "admin"
96
+ }
97
+ },
98
+ "storage": {
99
+ "adapter": "file"
100
+ }
101
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Garage Plugin — Default Configuration
3
+ *
4
+ * Override any of these via config/plugins.json under "garage.settings".
5
+ */
6
+ export default {
7
+ /** DVLA Vehicle Enquiry Service API key. Obtain from developer-portal.driver-vehicle-licensing.api.gov.uk */
8
+ dvlaApiKey: '',
9
+ /** DVLA API endpoint — do not change unless DVLA updates their URL. */
10
+ dvlaApiUrl: 'https://driver-vehicle-licensing.api.gov.uk/vehicle-enquiry/v1/vehicles',
11
+ /** Per-user rate limiting for the /lookup endpoint. */
12
+ rateLimit: {
13
+ max: 10,
14
+ windowSeconds: 60
15
+ },
16
+ /** Maximum lookup history entries to retain per user (oldest unsaved entries are pruned first). */
17
+ maxHistoryItems: 100
18
+ };
@@ -0,0 +1,118 @@
1
+ ---
2
+ title: Guide
3
+ order: 1
4
+ ---
5
+
6
+ Garage looks up UK vehicles by registration using the DVLA's Vehicle Enquiry Service. Save the vehicles you care about to My Garage to see when their MOT and road tax are due, with reminders before they run out.
7
+
8
+ ## What it does
9
+
10
+ - Type a UK registration and get the make, colour, year, fuel, engine size, CO2, and the MOT and road tax status with their dates.
11
+ - Keeps every lookup in your **History**.
12
+ - **My Garage** holds the vehicles you save, with the ones needing attention first.
13
+ - The **Garage** sidebar badge counts saved vehicles that need attention.
14
+ - Admin notifications when an MOT or road tax is due soon or has run out.
15
+ - A shortcode to show one person's saved vehicles on a public page.
16
+
17
+ Everything is per person. Nobody sees anyone else's lookups or saved vehicles.
18
+
19
+ ## Getting started
20
+
21
+ Garage needs a DVLA Vehicle Enquiry Service API key, which the DVLA issues through its developer portal.
22
+
23
+ 1. Register on the DVLA developer portal (developer-portal.driver-vehicle-licensing.api.gov.uk) and request a Vehicle Enquiry Service API key.
24
+ 2. Open [Garage](#/plugins/garage) from the admin sidebar.
25
+ 3. Click the cog in the page banner (**Garage settings**), or **Add the key** in the warning.
26
+ 4. Paste the key into **DVLA API key** and click **Save key** (or press Enter). It works straight away; no restart is needed.
27
+ 5. Type a registration in the yellow plate box, for example `AB12 CDE`, and click **Look up** or press Enter.
28
+ 6. Click **Save to My Garage** to keep it.
29
+
30
+ Saving the key needs permission to change plugin settings, which admins have. Once saved, everyone with Garage access uses the site's key.
31
+
32
+ ## Screens
33
+
34
+ ### Look up a vehicle
35
+
36
+ - The result shows the plate, make and year, and two chips for MOT and tax.
37
+ - **Save to My Garage** or **Remove from My Garage**.
38
+ - **Details** lists Make, Year, Colour, Fuel, Engine, CO2, MOT, MOT expires, Road tax, Tax due and Last looked up.
39
+ - Lookups are limited per person (10 a minute by default). If you hit the limit, the message says how many seconds to wait.
40
+
41
+ ### My Garage
42
+
43
+ - **All** or **Needs attention**, and a search box for registration, make and colour.
44
+ - Vehicles are sorted by urgency:
45
+ - Red: the MOT has expired or the tax has run out.
46
+ - Amber: the MOT or tax is due within 30 days, or the vehicle is SORN.
47
+ - Click a vehicle for its details. Right-click it, or click its three-dot button, for:
48
+ - **Details...**
49
+ - **Look up again** - fetches fresh data from the DVLA
50
+ - **Remove from My Garage** or **Save to My Garage**
51
+ - **Copy registration**
52
+ - **Delete...**
53
+
54
+ The dates are as the DVLA had them at the last lookup. Use **Look up again** after renewing tax or an MOT.
55
+
56
+ ### History
57
+
58
+ - Every vehicle you have looked up, newest first. Looking one up again updates it rather than adding a copy.
59
+ - Search with **Search history...**.
60
+ - **Clear unsaved** deletes all lookups you have not saved. Vehicles in My Garage are kept.
61
+ - Once your history passes 100 lookups, the oldest unsaved ones are dropped automatically.
62
+
63
+ Deleting a vehicle removes it from both lists. Looking it up again brings it back.
64
+
65
+ ## Settings
66
+
67
+ **Garage settings** (the banner cog) holds one setting: the **DVLA API key**. Once saved it is never shown again; type a new one to replace it. If whoever runs the site has set the `DVLA_API_KEY` environment variable, that key is used instead.
68
+
69
+ Other options can only be changed in the plugin's configuration file:
70
+
71
+ | Option | Default | Meaning |
72
+ |---|---|---|
73
+ | `rateLimit.max` | 10 | Lookups allowed per person in the window |
74
+ | `rateLimit.windowSeconds` | 60 | The window, in seconds |
75
+ | `maxHistoryItems` | 100 | Lookups kept per person before the oldest unsaved are dropped |
76
+
77
+ ## Notifications
78
+
79
+ Once a day, and when the site starts, Garage checks each person's saved vehicles and tells that person only:
80
+
81
+ - MOT expired or tax run out - an urgent notification.
82
+ - MOT or tax due within 30 days - a warning.
83
+
84
+ SORN vehicles do not raise notifications. A notification clears itself at a later check once the saved dates are no longer due, so look the vehicle up again after renewing.
85
+
86
+ ## Shortcodes
87
+
88
+ Show one person's saved vehicles as cards on a public page:
89
+
90
+ ```text
91
+ [garage-vehicles user="USER-ID" /]
92
+ ```
93
+
94
+ - `user` is required. Without it the shortcode shows nothing.
95
+ - To find a person's user id, open System > Users and edit that person. The id is the last part of the address in the browser, after `#/users/edit/`.
96
+ - Only vehicles saved to My Garage appear, not unsaved history.
97
+ - Each card shows the plate, make and year, colour, fuel, engine size, CO2, and MOT and tax badges with their dates.
98
+ - If the person has no saved vehicles, nothing is shown.
99
+
100
+ Anyone who can see that page sees those vehicles. Only use it on pages meant for that.
101
+
102
+ ## Permissions and roles
103
+
104
+ In System > Roles, Garage appears in the **Plugins** group:
105
+
106
+ | Action | Label | Allows |
107
+ |---|---|---|
108
+ | `garage.read` | View | Open My Garage and your lookup history |
109
+ | `garage.create` | Look up | Look vehicles up (uses the site's DVLA key) and save them |
110
+ | `garage.delete` | Delete | Remove your saved vehicles and lookups |
111
+
112
+ The **admin** and **user** roles get all three by default. Every lookup uses the site's DVLA key, so take **Look up** away from roles that should not spend it.
113
+
114
+ ## Limitations
115
+
116
+ - UK registrations only, and only what the DVLA's Vehicle Enquiry Service returns. There is no MOT history, mileage or keeper information.
117
+ - Data is not refreshed automatically. Statuses and dates are from the last lookup; the daily check works from those saved dates.
118
+ - If the DVLA cannot be reached or does not know the registration, the lookup fails with a message and nothing is saved.