eddev 2.0.0-beta.224 → 2.0.0-beta.226
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/dist/app/lib/blocks/editor/usePostEditor.d.ts.map +1 -1
- package/dist/app/lib/blocks/editor/usePostEditor.js +5 -0
- package/dist/node/cli/version.d.ts +1 -1
- package/dist/node/cli/version.js +1 -1
- package/dist/node/compiler/vinxi-app.d.ts.map +1 -1
- package/dist/node/compiler/vinxi-app.js +2 -5
- package/dist/node/compiler/vinxi-codegen.d.ts.map +1 -1
- package/dist/node/compiler/vinxi-codegen.js +10 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePostEditor.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/blocks/editor/usePostEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"usePostEditor.d.ts","sourceRoot":"","sources":["../../../../../src/app/lib/blocks/editor/usePostEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,sBAAsB,CAAA;AAExE,wBAAgB,aAAa;;uBAgBN,GAAG;;;EAMzB;AA+BD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,SAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAEvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,SAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAEzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,aAAa,EAC7D,GAAG,EAAE,CAAC,EACN,KAAK,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,GACvB,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAmBpC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useBlockContext } from "../inline-editing.js";
|
|
1
2
|
export function usePostEditor() {
|
|
2
3
|
const post = wp.data.useSelect((select) => {
|
|
3
4
|
const editor = select("core/editor");
|
|
@@ -20,6 +21,7 @@ export function usePostEditor() {
|
|
|
20
21
|
}
|
|
21
22
|
function usePostFieldEditor(key, value) {
|
|
22
23
|
if (env.admin) {
|
|
24
|
+
const isReadOnly = useBlockContext()?.readonly;
|
|
23
25
|
const post = wp.data.useSelect((select) => {
|
|
24
26
|
const editor = select("core/editor");
|
|
25
27
|
const post = editor.getCurrentPost();
|
|
@@ -29,6 +31,9 @@ function usePostFieldEditor(key, value) {
|
|
|
29
31
|
...edits,
|
|
30
32
|
};
|
|
31
33
|
}, []);
|
|
34
|
+
if (isReadOnly) {
|
|
35
|
+
return [value, () => { }];
|
|
36
|
+
}
|
|
32
37
|
return [
|
|
33
38
|
post[key] ?? "",
|
|
34
39
|
(title) => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-beta.
|
|
1
|
+
export declare const VERSION = "2.0.0-beta.226";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.0.0-beta.
|
|
1
|
+
export const VERSION = "2.0.0-beta.226";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vinxi-app.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/vinxi-app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAGtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"vinxi-app.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/vinxi-app.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAGtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAG/C,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAA;IACtB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,EAAE,QAAQ,CAAA;CACjB,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,MAAM,CAAA;AAC7D,KAAK,mBAAmB,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK,QAAQ,CAAA;AACrD,KAAK,iBAAiB,GAAG,MAAM,CAAC,UAAU,EAAE,mBAAmB,CAAC,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,OAAO,CAAC,iBAAiB,CAAC,CAAA;CAC1C,CAAA;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,uBAqP3C"}
|
|
@@ -88,11 +88,8 @@ export function createVinxiApp(args) {
|
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
"/_data/query/**": {
|
|
91
|
-
isr:
|
|
92
|
-
|
|
93
|
-
allowQuery: ["params"],
|
|
94
|
-
passQuery: true,
|
|
95
|
-
},
|
|
91
|
+
isr: false,
|
|
92
|
+
swr: false,
|
|
96
93
|
cache: {
|
|
97
94
|
varies: ["Authorization", "woocommerce-session"],
|
|
98
95
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vinxi-codegen.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/vinxi-codegen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC,UAExE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,OAAO,iBAIlD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"vinxi-codegen.d.ts","sourceRoot":"","sources":["../../../src/node/compiler/vinxi-codegen.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAElD,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,aAAa,GAAG,YAAY,CAAA;IAClC,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,CAAC,UAExE;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,OAAO,iBAIlD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,aA4rB/C"}
|
|
@@ -124,6 +124,16 @@ export function createVinxiCodegen(opts) {
|
|
|
124
124
|
import { createAssets } from "@vinxi/react"
|
|
125
125
|
import { devToolsStore } from 'eddev/devtools'
|
|
126
126
|
|
|
127
|
+
${process.env.VERCEL_SKEW_PROTECTION_ENABLED &&
|
|
128
|
+
code /* tsx*/ `
|
|
129
|
+
// Skew protection
|
|
130
|
+
const updateSkewCookie = () => {
|
|
131
|
+
document.cookie = "__vdpl=${process.env.VERCEL_DEPLOYMENT_ID}; expires=" + new Date(Date.now() + 24 * 60 * 60 * 1000).toUTCString() + "; path=/"
|
|
132
|
+
}
|
|
133
|
+
window.onfocus = updateSkewCookie
|
|
134
|
+
updateSkewCookie()
|
|
135
|
+
`}
|
|
136
|
+
|
|
127
137
|
// Set up a dynamic entry which will load the configured tailwind manifest
|
|
128
138
|
devToolsStore.loadTailwindConfig = () => import('./manifest/tailwind-config.js')
|
|
129
139
|
|