@tinacms/app 1.0.1 → 1.0.3
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.
|
@@ -425,7 +425,14 @@ export const queryMachine =
|
|
|
425
425
|
const itemPath = path.concat(i)
|
|
426
426
|
yield [i, o[i], itemPath, o]
|
|
427
427
|
if (o[i] !== null && typeof o[i] == 'object') {
|
|
428
|
-
if (
|
|
428
|
+
if (
|
|
429
|
+
[
|
|
430
|
+
'_internalSys',
|
|
431
|
+
'_internalValues',
|
|
432
|
+
'_sys',
|
|
433
|
+
META_KEY,
|
|
434
|
+
].includes(i)
|
|
435
|
+
) {
|
|
429
436
|
//going one step down in the object tree!!
|
|
430
437
|
yield* innerTraversal(o[i], itemPath)
|
|
431
438
|
}
|
package/appFiles/src/preview.tsx
CHANGED
|
@@ -39,6 +39,13 @@ export const Preview = (
|
|
|
39
39
|
setActiveQuery(event.data)
|
|
40
40
|
}
|
|
41
41
|
})
|
|
42
|
+
window.addEventListener('message', (event: MessageEvent<PostMessage>) => {
|
|
43
|
+
if (event?.data?.type === 'isEditMode') {
|
|
44
|
+
props.iframeRef?.current?.contentWindow?.postMessage({
|
|
45
|
+
type: 'tina:editMode',
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
})
|
|
42
49
|
}
|
|
43
50
|
}, [props.iframeRef.current])
|
|
44
51
|
|
|
@@ -93,13 +100,6 @@ const QueryMachine = (props: {
|
|
|
93
100
|
|
|
94
101
|
React.useEffect(() => {
|
|
95
102
|
if (props.iframeRef.current) {
|
|
96
|
-
window.addEventListener('message', (event: MessageEvent<PostMessage>) => {
|
|
97
|
-
if (event?.data?.type === 'isEditMode') {
|
|
98
|
-
props.iframeRef?.current?.contentWindow?.postMessage({
|
|
99
|
-
type: 'tina:editMode',
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
})
|
|
103
103
|
send({ type: 'IFRAME_MOUNTED', value: props.iframeRef.current })
|
|
104
104
|
if (props.payload.type === 'open') {
|
|
105
105
|
send({ type: 'ADD_QUERY', value: props.payload })
|
package/dist/index.js
CHANGED
|
@@ -43,8 +43,12 @@ var import_path = __toModule(require("path"));
|
|
|
43
43
|
var viteTina = () => {
|
|
44
44
|
return {
|
|
45
45
|
name: "vite-plugin-tina",
|
|
46
|
-
config: () => {
|
|
46
|
+
config: (viteConfig) => {
|
|
47
47
|
const plugins = [];
|
|
48
|
+
const content = [
|
|
49
|
+
import_path.default.join(__dirname, "../appFiles/src/**/*.{vue,js,ts,jsx,tsx,svelte}"),
|
|
50
|
+
import_path.default.join(viteConfig.root, "../prebuild/config.js")
|
|
51
|
+
];
|
|
48
52
|
const tw = (0, import_tailwindcss.default)({
|
|
49
53
|
important: ".tina-tailwind",
|
|
50
54
|
theme: {
|
|
@@ -259,9 +263,7 @@ var viteTina = () => {
|
|
|
259
263
|
}
|
|
260
264
|
}
|
|
261
265
|
},
|
|
262
|
-
content
|
|
263
|
-
import_path.default.join(__dirname, "../appFiles/src/**/*.{vue,js,ts,jsx,tsx,svelte}")
|
|
264
|
-
],
|
|
266
|
+
content,
|
|
265
267
|
plugins: [
|
|
266
268
|
(0, import_typography.default)({ className: "tina-prose" }),
|
|
267
269
|
import_line_clamp.default,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@types/react": "17.0.2",
|
|
38
38
|
"@types/react-dom": "17.0.2",
|
|
39
39
|
"@tinacms/scripts": "1.0.0",
|
|
40
|
-
"tinacms": "1.
|
|
41
|
-
"@tinacms/mdx": "1.0.
|
|
40
|
+
"tinacms": "1.1.1",
|
|
41
|
+
"@tinacms/mdx": "1.0.3",
|
|
42
42
|
"jest": "^27.0.6"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|