includio-cms 0.14.0 → 0.14.2
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 +33 -0
- package/DOCS.md +4540 -0
- package/README.md +37 -42
- package/ROADMAP.md +13 -0
- package/dist/admin/client/account/preferences-section.svelte +1 -0
- package/dist/admin/client/account/profile-section.svelte +4 -1
- package/dist/admin/client/account/security-section.svelte +2 -2
- package/dist/admin/client/entry/entry-form.svelte +1 -1
- package/dist/admin/client/users/users-page.svelte +9 -9
- package/dist/admin/components/fields/blocks-field.svelte +1 -1
- package/dist/admin/components/fields/media-field.svelte +1 -0
- package/dist/admin/components/layout/layout-renderer.svelte +2 -1
- package/dist/admin/components/layout/layout-renderer.svelte.d.ts +1 -0
- package/dist/admin/components/media/bulk-action-bar.svelte +2 -0
- package/dist/admin/components/media/file/file-details.svelte +1 -0
- package/dist/admin/components/media/focal-point-input.svelte +3 -2
- package/dist/admin/components/media/tag-sidebar.svelte +1 -0
- package/dist/admin/components/tiptap/InlineBlockNodeView.svelte +2 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +17 -0
- package/dist/components/ui/spinner/spinner.svelte +2 -2
- package/dist/components/ui/spinner/spinner.svelte.d.ts +4 -0
- package/dist/core/server/fields/utils/imageStyles.js +5 -4
- package/dist/core/server/media/styles/sharp/generateImageStyle.js +27 -0
- package/dist/db-postgres/index.js +4 -4
- package/dist/db-postgres/schema/imageStyle.d.ts +17 -0
- package/dist/db-postgres/schema/imageStyle.js +3 -2
- package/dist/demo/seed.js +0 -1
- package/dist/sveltekit/components/cms-provider.svelte +17 -0
- package/dist/sveltekit/components/cms-provider.svelte.d.ts +12 -0
- package/dist/sveltekit/components/structured-content.svelte +1 -0
- package/dist/sveltekit/components/video-context.d.ts +2 -0
- package/dist/sveltekit/components/video-context.js +8 -0
- package/dist/sveltekit/components/video.svelte +12 -4
- package/dist/sveltekit/index.d.ts +2 -0
- package/dist/sveltekit/index.js +2 -0
- package/dist/sveltekit/server/handle.js +9 -0
- package/dist/sveltekit/server/index.d.ts +1 -0
- package/dist/sveltekit/server/index.js +1 -0
- package/dist/sveltekit/server/layout.d.ts +4 -0
- package/dist/sveltekit/server/layout.js +5 -0
- package/dist/types/cms-context.d.ts +3 -0
- package/dist/types/cms-context.js +1 -0
- package/dist/types/fields.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/updates/0.14.1/index.d.ts +2 -0
- package/dist/updates/0.14.1/index.js +15 -0
- package/dist/updates/0.14.2/index.d.ts +2 -0
- package/dist/updates/0.14.2/index.js +18 -0
- package/dist/updates/index.js +3 -1
- package/package.json +8 -2
|
@@ -57,10 +57,19 @@ const handleAuth = async ({ event, resolve }) => {
|
|
|
57
57
|
}
|
|
58
58
|
return svelteKitHandler({ event, resolve, auth, building });
|
|
59
59
|
};
|
|
60
|
+
const detectBrowserContext = async ({ event, resolve }) => {
|
|
61
|
+
const ua = event.request.headers.get('user-agent') ?? '';
|
|
62
|
+
const isSafari = /Safari/i.test(ua) && !/(?:Chrome|Chromium|Edg)/i.test(ua);
|
|
63
|
+
event.locals.cmsContext = {
|
|
64
|
+
preferMp4: isSafari
|
|
65
|
+
};
|
|
66
|
+
return resolve(event);
|
|
67
|
+
};
|
|
60
68
|
export function includioCMS(cmsConfig) {
|
|
61
69
|
generateRuntime(cmsConfig); // Generate runtime code based on the CMS config
|
|
62
70
|
initCMS(cmsConfig);
|
|
63
71
|
const handles = [];
|
|
72
|
+
handles.push(detectBrowserContext);
|
|
64
73
|
if (cmsConfig.auth) {
|
|
65
74
|
handles.push(handleAuth);
|
|
66
75
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { includioCMS } from './handle.js';
|
|
2
|
+
export { cmsLayoutLoad } from './layout.js';
|
|
2
3
|
export { getEntry, getEntries, countEntries } from '../../core/server/entries/operations/get.js';
|
|
3
4
|
export { createFormSubmission } from '../../core/server/forms/submissions/operations/create.js';
|
|
4
5
|
export { parseFormDataForSubmission } from '../../core/server/forms/submissions/utils/parseMultipart.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { includioCMS } from './handle.js';
|
|
2
|
+
export { cmsLayoutLoad } from './layout.js';
|
|
2
3
|
export { getEntry, getEntries, countEntries } from '../../core/server/entries/operations/get.js';
|
|
3
4
|
export { createFormSubmission } from '../../core/server/forms/submissions/operations/create.js';
|
|
4
5
|
export { parseFormDataForSubmission } from '../../core/server/forms/submissions/utils/parseMultipart.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/fields.d.ts
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export { type CMSConfig, type ApiKeyConfig, type AuthConfig, type TypographyConf
|
|
|
13
13
|
export { type PluginConfig, type CustomFieldDefinition } from './plugins.js';
|
|
14
14
|
export { type Language, type Localized } from './languages.js';
|
|
15
15
|
export { type Layout, type LayoutNode, type LayoutPreset, type LayoutNodeType, type ColumnRatio, type SectionNode, type ColumnsNode, type CardNode, type AccordionNode, type StackNode } from './layout.js';
|
|
16
|
+
export { type CmsContext } from './cms-context.js';
|
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const update = {
|
|
2
|
+
version: '0.14.1',
|
|
3
|
+
date: '2026-03-27',
|
|
4
|
+
description: 'CMS context provider, Svelte 5 compat, docs overhaul',
|
|
5
|
+
features: [
|
|
6
|
+
'CmsProvider component — sets CMS context (Safari mp4 preference) for child components',
|
|
7
|
+
'Video context API: getPreferMp4() / setPreferMp4() for Safari hardware-accelerated playback',
|
|
8
|
+
'CmsContext type + cmsLayoutLoad server helper for layout-level context injection',
|
|
9
|
+
'docs:compile script — compiles all .svx doc pages into single DOCS.md'
|
|
10
|
+
],
|
|
11
|
+
fixes: [
|
|
12
|
+
'Svelte 5 compatibility: migrated event handlers, a11y annotations, warning suppression across ~15 admin components'
|
|
13
|
+
],
|
|
14
|
+
breakingChanges: []
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const update = {
|
|
2
|
+
version: '0.14.2',
|
|
3
|
+
date: '2026-03-27',
|
|
4
|
+
description: 'Image styles: aspectRatio support, lazy generation, skip defaults when custom styles defined',
|
|
5
|
+
features: [
|
|
6
|
+
'aspectRatio option for image styles — crop to ratio without fixed dimensions',
|
|
7
|
+
'Lazy generation of custom field styles on first read',
|
|
8
|
+
'Skip default styles when field defines custom styles (prevents <source> conflicts in <picture>)'
|
|
9
|
+
],
|
|
10
|
+
fixes: [],
|
|
11
|
+
breakingChanges: [],
|
|
12
|
+
sql: `ALTER TABLE image_styles ADD COLUMN IF NOT EXISTS aspect_ratio REAL;
|
|
13
|
+
|
|
14
|
+
-- Drop old unique index and recreate with aspect_ratio
|
|
15
|
+
DROP INDEX IF EXISTS image_styles_unique_key;
|
|
16
|
+
CREATE UNIQUE INDEX image_styles_unique_key
|
|
17
|
+
ON image_styles (media_file_id, name, COALESCE(width, 0), COALESCE(height, 0), COALESCE(quality, 0), COALESCE(aspect_ratio, 0));`
|
|
18
|
+
};
|
package/dist/updates/index.js
CHANGED
|
@@ -38,7 +38,9 @@ import { update as update0132 } from './0.13.2/index.js';
|
|
|
38
38
|
import { update as update0133 } from './0.13.3/index.js';
|
|
39
39
|
import { update as update0134 } from './0.13.4/index.js';
|
|
40
40
|
import { update as update0140 } from './0.14.0/index.js';
|
|
41
|
-
|
|
41
|
+
import { update as update0141 } from './0.14.1/index.js';
|
|
42
|
+
import { update as update0142 } from './0.14.2/index.js';
|
|
43
|
+
export const updates = [update0065, update0066, update0067, update0068, update0069, update010, update011, update012, update013, update014, update015, update020, update022, update050, update051, update052, update053, update054, update055, update056, update057, update058, update060, update061, update062, update070, update071, update072, update073, update080, update090, update0100, update0110, update0120, update0130, update0131, update0132, update0133, update0134, update0140, update0141, update0142];
|
|
42
44
|
export const getUpdatesFrom = (fromVersion) => {
|
|
43
45
|
const fromParts = fromVersion.split('.').map(Number);
|
|
44
46
|
return updates.filter((update) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "includio-cms",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build && npm run prepack",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"cli": "tsx cli/init/index.ts",
|
|
25
25
|
"build:cli": "tsc cli/init/index.ts --outDir dist/cli/init --module commonjs --esModuleInterop",
|
|
26
26
|
"changelog": "tsx scripts/generate-changelog.ts",
|
|
27
|
-
"
|
|
27
|
+
"docs:compile": "tsx scripts/compile-docs.ts",
|
|
28
|
+
"prepublishOnly": "tsx scripts/generate-changelog.ts && tsx scripts/compile-docs.ts"
|
|
28
29
|
},
|
|
29
30
|
"bin": {
|
|
30
31
|
"includio": "./dist/cli/index.js"
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"README.md",
|
|
37
38
|
"CHANGELOG.md",
|
|
38
39
|
"ROADMAP.md",
|
|
40
|
+
"DOCS.md",
|
|
39
41
|
"LICENSE"
|
|
40
42
|
],
|
|
41
43
|
"sideEffects": [
|
|
@@ -45,6 +47,10 @@
|
|
|
45
47
|
"svelte": "./dist/index.js",
|
|
46
48
|
"type": "module",
|
|
47
49
|
"exports": {
|
|
50
|
+
".": {
|
|
51
|
+
"types": "./dist/index.d.ts",
|
|
52
|
+
"svelte": "./dist/index.js"
|
|
53
|
+
},
|
|
48
54
|
"./core": {
|
|
49
55
|
"types": "./dist/core/index.d.ts",
|
|
50
56
|
"svelte": "./dist/core/index.js",
|