@tinacms/app 1.0.0 → 1.0.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.
Files changed (45) hide show
  1. package/appFiles/node_modules/.package-lock.json +23 -23
  2. package/appFiles/node_modules/@babel/generator/lib/generators/methods.js +3 -1
  3. package/appFiles/node_modules/@babel/generator/lib/generators/methods.js.map +1 -1
  4. package/appFiles/node_modules/@babel/generator/lib/index.js +11 -0
  5. package/appFiles/node_modules/@babel/generator/lib/index.js.map +1 -1
  6. package/appFiles/node_modules/@babel/generator/lib/printer.js +38 -21
  7. package/appFiles/node_modules/@babel/generator/lib/printer.js.map +1 -1
  8. package/appFiles/node_modules/@babel/generator/package.json +3 -3
  9. package/appFiles/node_modules/@babel/parser/lib/index.js +164 -98
  10. package/appFiles/node_modules/@babel/parser/lib/index.js.map +1 -1
  11. package/appFiles/node_modules/@babel/parser/package.json +2 -2
  12. package/appFiles/node_modules/@babel/parser/typings/babel-parser.d.ts +1 -1
  13. package/appFiles/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
  14. package/appFiles/node_modules/@babel/runtime/helpers/createClass.js +2 -1
  15. package/appFiles/node_modules/@babel/runtime/helpers/defineProperty.js +2 -0
  16. package/appFiles/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +5 -0
  17. package/appFiles/node_modules/@babel/runtime/helpers/esm/createClass.js +2 -1
  18. package/appFiles/node_modules/@babel/runtime/helpers/esm/defineProperty.js +2 -0
  19. package/appFiles/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +23 -18
  20. package/appFiles/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +8 -7
  21. package/appFiles/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +3 -8
  22. package/appFiles/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +23 -18
  23. package/appFiles/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +8 -7
  24. package/appFiles/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +3 -8
  25. package/appFiles/node_modules/@babel/runtime/package.json +29 -20
  26. package/appFiles/node_modules/@babel/traverse/lib/path/context.js +3 -2
  27. package/appFiles/node_modules/@babel/traverse/lib/path/context.js.map +1 -1
  28. package/appFiles/node_modules/@babel/traverse/lib/path/conversion.js +8 -4
  29. package/appFiles/node_modules/@babel/traverse/lib/path/conversion.js.map +1 -1
  30. package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js +1 -0
  31. package/appFiles/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js.map +1 -1
  32. package/appFiles/node_modules/@babel/traverse/lib/scope/index.js +1 -1
  33. package/appFiles/node_modules/@babel/traverse/lib/scope/index.js.map +1 -1
  34. package/appFiles/node_modules/@babel/traverse/package.json +4 -4
  35. package/appFiles/node_modules/@babel/types/lib/index.d.ts +64 -64
  36. package/appFiles/node_modules/@babel/types/package.json +3 -3
  37. package/appFiles/node_modules/regenerator-runtime/package.json +2 -2
  38. package/appFiles/node_modules/regenerator-runtime/runtime.js +18 -17
  39. package/appFiles/src/App.tsx +0 -12
  40. package/appFiles/src/fields/rich-text/monaco/mdx.js +0 -46
  41. package/appFiles/src/lib/machines/query-machine.ts +137 -2
  42. package/appFiles/src/preview.tsx +9 -15
  43. package/dist/index.js +7 -5
  44. package/package.json +3 -3
  45. package/appFiles/node_modules/@babel/parser/typings/babel-parser.source.d.ts +0 -151
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,
@@ -378,7 +380,7 @@ var viteBuild = async ({
378
380
  mode: local ? "development" : "production",
379
381
  plugins: [(0, import_vite.splitVendorChunkPlugin)(), (0, import_plugin_react.default)(), viteTina()],
380
382
  define: {
381
- "process.env": "new Object()",
383
+ "process.env": `new Object(${JSON.stringify(process.env)})`,
382
384
  __API_URL__: `"${apiUrl}"`
383
385
  },
384
386
  esbuild: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/app",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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.0.0",
41
- "@tinacms/mdx": "1.0.0",
40
+ "tinacms": "1.1.0",
41
+ "@tinacms/mdx": "1.0.2",
42
42
  "jest": "^27.0.6"
43
43
  },
44
44
  "dependencies": {
@@ -1,151 +0,0 @@
1
- // Type definitions for @babel/parser
2
- // Project: https://github.com/babel/babel/tree/main/packages/babel-parser
3
- // Definitions by: Troy Gerwien <https://github.com/yortus>
4
- // Marvin Hagemeister <https://github.com/marvinhagemeister>
5
- // Avi Vahl <https://github.com/AviVahl>
6
- // TypeScript Version: 2.9
7
-
8
- /**
9
- * Parse the provided code as an entire ECMAScript program.
10
- */
11
- export function parse(
12
- input: string,
13
- options?: ParserOptions
14
- ): ParseResult<import("@babel/types").File>;
15
-
16
- /**
17
- * Parse the provided code as a single expression.
18
- */
19
- export function parseExpression(
20
- input: string,
21
- options?: ParserOptions
22
- ): ParseResult<import("@babel/types").Expression>;
23
-
24
- export interface ParserOptions {
25
- /**
26
- * By default, import and export declarations can only appear at a program's top level.
27
- * Setting this option to true allows them anywhere where a statement is allowed.
28
- */
29
- allowImportExportEverywhere?: boolean;
30
-
31
- /**
32
- * By default, await use is not allowed outside of an async function.
33
- * Set this to true to accept such code.
34
- */
35
- allowAwaitOutsideFunction?: boolean;
36
-
37
- /**
38
- * By default, a return statement at the top level raises an error.
39
- * Set this to true to accept such code.
40
- */
41
- allowReturnOutsideFunction?: boolean;
42
-
43
- allowSuperOutsideMethod?: boolean;
44
-
45
- /**
46
- * By default, exported identifiers must refer to a declared variable.
47
- * Set this to true to allow export statements to reference undeclared variables.
48
- */
49
- allowUndeclaredExports?: boolean;
50
-
51
- /**
52
- * By default, Babel attaches comments to adjacent AST nodes.
53
- * When this option is set to false, comments are not attached.
54
- * It can provide up to 30% performance improvement when the input code has many comments.
55
- * @babel/eslint-parser will set it for you.
56
- * It is not recommended to use attachComment: false with Babel transform,
57
- * as doing so removes all the comments in output code, and renders annotations such as
58
- * /* istanbul ignore next *\/ nonfunctional.
59
- */
60
- attachComment?: boolean;
61
-
62
- /**
63
- * By default, Babel always throws an error when it finds some invalid code.
64
- * When this option is set to true, it will store the parsing error and
65
- * try to continue parsing the invalid input file.
66
- */
67
- errorRecovery?: boolean;
68
-
69
- /**
70
- * Indicate the mode the code should be parsed in.
71
- * Can be one of "script", "module", or "unambiguous". Defaults to "script".
72
- * "unambiguous" will make @babel/parser attempt to guess, based on the presence
73
- * of ES6 import or export statements.
74
- * Files with ES6 imports and exports are considered "module" and are otherwise "script".
75
- */
76
- sourceType?: "script" | "module" | "unambiguous";
77
-
78
- /**
79
- * Correlate output AST nodes with their source filename.
80
- * Useful when generating code and source maps from the ASTs of multiple input files.
81
- */
82
- sourceFilename?: string;
83
-
84
- /**
85
- * By default, the first line of code parsed is treated as line 1.
86
- * You can provide a line number to alternatively start with.
87
- * Useful for integration with other source tools.
88
- */
89
- startLine?: number;
90
-
91
- /**
92
- * By default, the parsed code is treated as if it starts from line 1, column 0.
93
- * You can provide a column number to alternatively start with.
94
- * Useful for integration with other source tools.
95
- */
96
- startColumn?: number;
97
-
98
- /**
99
- * Array containing the plugins that you want to enable.
100
- */
101
- plugins?: ParserPlugin[];
102
-
103
- /**
104
- * Should the parser work in strict mode.
105
- * Defaults to true if sourceType === 'module'. Otherwise, false.
106
- */
107
- strictMode?: boolean;
108
-
109
- /**
110
- * Adds a ranges property to each node: [node.start, node.end]
111
- */
112
- ranges?: boolean;
113
-
114
- /**
115
- * Adds all parsed tokens to a tokens property on the File node.
116
- */
117
- tokens?: boolean;
118
-
119
- /**
120
- * By default, the parser adds information about parentheses by setting
121
- * `extra.parenthesized` to `true` as needed.
122
- * When this option is `true` the parser creates `ParenthesizedExpression`
123
- * AST nodes instead of using the `extra` property.
124
- */
125
- createParenthesizedExpressions?: boolean;
126
- }
127
-
128
- export type ParserPlugin = import("../src/typings").PluginConfig;
129
-
130
- export type {
131
- ParserPluginWithOptions,
132
- DecoratorsPluginOptions,
133
- PipelineOperatorPluginOptions,
134
- RecordAndTuplePluginOptions,
135
- FlowPluginOptions,
136
- TypeScriptPluginOptions,
137
- } from "../src/typings";
138
-
139
- export const tokTypes: {
140
- // todo(flow->ts) real token type
141
- [name: string]: any;
142
- };
143
-
144
- export interface ParseError {
145
- code: string;
146
- reasonCode: string;
147
- }
148
-
149
- type ParseResult<Result> = Result & {
150
- errors: ParseError[];
151
- };