@cloudcannon/editable-regions 0.0.9 → 0.0.11
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/components/ui/editable-array-item-controls.ts +9 -0
- package/components/ui/editable-component-controls.ts +67 -11
- package/helpers/checks.ts +14 -37
- package/helpers/cloudcannon.mjs +10 -2
- package/helpers/hydrate-editable-regions.ts +7 -1
- package/integrations/astro/astro-integration.mjs +109 -100
- package/integrations/astro/index.mjs +21 -8
- 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 +155 -97
- package/nodes/editable-source.ts +8 -2
- package/nodes/editable.ts +197 -33
- package/package.json +3 -3
- package/styles/editable-array-item.css +5 -3
- package/styles/editable-component.css +5 -3
- package/styles/ui/editable-component-controls.css +21 -0
- 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,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
|
-
};
|