@cloudcannon/editable-regions 0.0.8 → 0.0.10
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/components/editable-snippet-component.ts +1 -1
- package/components/index.ts +0 -13
- package/helpers/checks.ts +9 -36
- package/helpers/cloudcannon.d.mts +20 -0
- package/helpers/cloudcannon.mjs +10 -0
- package/helpers/hydrate-editable-regions.ts +7 -1
- package/integrations/astro/astro-integration.mjs +10 -54
- package/integrations/astro/modules/content.js +7 -1
- package/integrations/astro/modules/secrets.js +4 -0
- package/nodes/editable-array-item.ts +9 -9
- package/nodes/editable-array.ts +74 -28
- package/nodes/editable-component.ts +78 -15
- package/nodes/editable-source.ts +8 -2
- package/nodes/editable.ts +197 -33
- package/package.json +2 -2
- package/helpers/loading.ts +0 -7
- package/integrations/astro/modules/actions.js +0 -74
- package/integrations/astro/modules/client-router.astro +0 -5
- package/integrations/astro/modules/i18n.js +0 -76
- package/integrations/astro/modules/middleware.js +0 -27
- package/integrations/astro/modules/transitions.js +0 -63
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
export const getRelativeLocaleUrl = () => {
|
|
2
|
-
console.warn(
|
|
3
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
4
|
-
);
|
|
5
|
-
return "";
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const getAbsoluteLocaleUrl = () => {
|
|
9
|
-
console.warn(
|
|
10
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
11
|
-
);
|
|
12
|
-
return "";
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const getRelativeLocaleUrlList = () => {
|
|
16
|
-
console.warn(
|
|
17
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
18
|
-
);
|
|
19
|
-
return [];
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const getAbsoluteLocaleUrlList = () => {
|
|
23
|
-
console.warn(
|
|
24
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
25
|
-
);
|
|
26
|
-
return [];
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const getPathByLocale = () => {
|
|
30
|
-
console.warn(
|
|
31
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
32
|
-
);
|
|
33
|
-
return "";
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const getLocaleByPath = () => {
|
|
37
|
-
console.warn(
|
|
38
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
39
|
-
);
|
|
40
|
-
return "";
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const redirectToDefaultLocale = () => {
|
|
44
|
-
console.warn(
|
|
45
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
46
|
-
);
|
|
47
|
-
return Promise.resolve(new Response());
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const redirectToFallback = () => {
|
|
51
|
-
console.warn(
|
|
52
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
53
|
-
);
|
|
54
|
-
return Promise.resolve(new Response());
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const notFound = () => {
|
|
58
|
-
console.warn(
|
|
59
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
60
|
-
);
|
|
61
|
-
return Promise.resolve(new Response());
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const middleware = () => {
|
|
65
|
-
console.warn(
|
|
66
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
67
|
-
);
|
|
68
|
-
return () => {};
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const requestHasLocale = () => {
|
|
72
|
-
console.warn(
|
|
73
|
-
"[CloudCannon] i18n routing is not supported in an editable component. Please use an editing fallback instead.",
|
|
74
|
-
);
|
|
75
|
-
return false;
|
|
76
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export const sequence = () => {
|
|
2
|
-
console.warn(
|
|
3
|
-
"[CloudCannon] middleware is not supported in an editable component. Please use an editing fallback instead.",
|
|
4
|
-
);
|
|
5
|
-
return () => {};
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const defineMiddleware = () => {
|
|
9
|
-
console.warn(
|
|
10
|
-
"[CloudCannon] middleware is not supported in an editable component. Please use an editing fallback instead.",
|
|
11
|
-
);
|
|
12
|
-
return () => {};
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const createContext = () => {
|
|
16
|
-
console.warn(
|
|
17
|
-
"[CloudCannon] middleware is not supported in an editable component. Please use an editing fallback instead.",
|
|
18
|
-
);
|
|
19
|
-
return {};
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const trySerializeLocals = () => {
|
|
23
|
-
console.warn(
|
|
24
|
-
"[CloudCannon] middleware is not supported in an editable component. Please use an editing fallback instead.",
|
|
25
|
-
);
|
|
26
|
-
return "";
|
|
27
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import ClientRouterInternal from "./client-router.astro";
|
|
2
|
-
|
|
3
|
-
export const ClientRouter = ClientRouterInternal;
|
|
4
|
-
|
|
5
|
-
export const fade = () => {
|
|
6
|
-
console.warn(
|
|
7
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
8
|
-
);
|
|
9
|
-
return {};
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const slide = () => {
|
|
13
|
-
console.warn(
|
|
14
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
15
|
-
);
|
|
16
|
-
return {};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const navigate = () => {
|
|
20
|
-
console.warn(
|
|
21
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
22
|
-
);
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const supportsViewTransitions = false;
|
|
26
|
-
|
|
27
|
-
export const transitionEnabledOnThisPage = false;
|
|
28
|
-
|
|
29
|
-
export const getFallback = () => {
|
|
30
|
-
console.warn(
|
|
31
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
32
|
-
);
|
|
33
|
-
return "none";
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export const swapFunctions = {
|
|
37
|
-
deselectScripts: () => {
|
|
38
|
-
console.warn(
|
|
39
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
40
|
-
);
|
|
41
|
-
},
|
|
42
|
-
swapRootAttributes: () => {
|
|
43
|
-
console.warn(
|
|
44
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
45
|
-
);
|
|
46
|
-
},
|
|
47
|
-
swapHeadElements: () => {
|
|
48
|
-
console.warn(
|
|
49
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
saveFocus: () => {
|
|
53
|
-
console.warn(
|
|
54
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
55
|
-
);
|
|
56
|
-
return () => {};
|
|
57
|
-
},
|
|
58
|
-
swapBodyElement: () => {
|
|
59
|
-
console.warn(
|
|
60
|
-
"[CloudCannon] view transitions are not supported in an editable component. Please use an editing fallback instead.",
|
|
61
|
-
);
|
|
62
|
-
},
|
|
63
|
-
};
|