@builder.io/mitosis 0.0.135 → 0.0.136

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 (65) hide show
  1. package/dist/src/constants/media-sizes.d.ts +1 -1
  2. package/dist/src/generators/builder.d.ts +1 -1
  3. package/dist/src/generators/context/qwik.d.ts +1 -1
  4. package/dist/src/generators/context/react.d.ts +1 -1
  5. package/dist/src/generators/context/rsc.d.ts +1 -1
  6. package/dist/src/generators/context/solid.d.ts +1 -1
  7. package/dist/src/generators/qwik/component.d.ts +1 -1
  8. package/dist/src/generators/qwik/helpers/state.d.ts +5 -5
  9. package/dist/src/generators/qwik/helpers/styles.d.ts +1 -1
  10. package/dist/src/generators/qwik/src-generator.d.ts +1 -1
  11. package/dist/src/generators/react/generator.js +1 -1
  12. package/dist/src/generators/react-native/sanitize-react-native-block-styles.d.ts +1 -1
  13. package/dist/src/generators/rsc.d.ts +1 -1
  14. package/dist/src/generators/solid/state/state.d.ts +1 -1
  15. package/dist/src/generators/solid/types.d.ts +1 -1
  16. package/dist/src/generators/svelte/blocks.d.ts +1 -1
  17. package/dist/src/generators/svelte/types.d.ts +1 -1
  18. package/dist/src/generators/swift-ui.d.ts +1 -1
  19. package/dist/src/generators/taro.d.ts +1 -1
  20. package/dist/src/generators/vue/blocks.d.ts +1 -1
  21. package/dist/src/generators/vue/helpers.d.ts +1 -1
  22. package/dist/src/generators/vue/types.d.ts +3 -3
  23. package/dist/src/helpers/babel-transform.d.ts +1 -1
  24. package/dist/src/helpers/component-file-extensions.d.ts +1 -1
  25. package/dist/src/helpers/create-mitosis-component.d.ts +1 -1
  26. package/dist/src/helpers/get-state-object-string.d.ts +1 -1
  27. package/dist/src/helpers/json.d.ts +1 -1
  28. package/dist/src/helpers/map-refs.d.ts +1 -1
  29. package/dist/src/helpers/nullable.d.ts +1 -1
  30. package/dist/src/helpers/plugins/process-code/index.d.ts +1 -1
  31. package/dist/src/helpers/plugins/process-code/types.d.ts +2 -2
  32. package/dist/src/helpers/plugins/process-signals.js +2 -0
  33. package/dist/src/helpers/render-imports.d.ts +1 -1
  34. package/dist/src/helpers/replace-identifiers.d.ts +2 -2
  35. package/dist/src/helpers/slots.d.ts +1 -1
  36. package/dist/src/helpers/strip-state-and-props-refs.d.ts +2 -2
  37. package/dist/src/helpers/styles/collect-css.d.ts +1 -1
  38. package/dist/src/helpers/styles/helpers.d.ts +2 -2
  39. package/dist/src/helpers/transform-state-setters.d.ts +1 -1
  40. package/dist/src/helpers/typescript.d.ts +4 -4
  41. package/dist/src/index.d.ts +2 -2
  42. package/dist/src/parsers/builder/builder.d.ts +2 -2
  43. package/dist/src/parsers/context.d.ts +1 -1
  44. package/dist/src/parsers/jsx/index.d.ts +1 -0
  45. package/dist/src/parsers/jsx/types.d.ts +2 -2
  46. package/dist/src/parsers/svelte/helpers/post-process.d.ts +1 -1
  47. package/dist/src/parsers/svelte/index.js +1 -1
  48. package/dist/src/parsers/svelte/types/index.d.ts +1 -1
  49. package/dist/src/plugins/compile-away-builder-components.d.ts +2 -2
  50. package/dist/src/plugins/compile-away-builder-components.js +1 -2
  51. package/dist/src/plugins/compile-away-components.d.ts +1 -1
  52. package/dist/src/plugins/map-styles.d.ts +1 -1
  53. package/dist/src/symbols/symbol-processor.d.ts +1 -1
  54. package/dist/src/targets.d.ts +21 -21
  55. package/dist/src/types/config.d.ts +6 -6
  56. package/dist/src/types/json.d.ts +6 -6
  57. package/dist/src/types/metadata.d.ts +3 -3
  58. package/dist/src/types/mitosis-component.d.ts +14 -14
  59. package/dist/src/types/mitosis-context.d.ts +1 -1
  60. package/dist/src/types/mitosis-node.d.ts +7 -7
  61. package/dist/src/types/mitosis-styles.d.ts +1 -1
  62. package/dist/src/types/plugins.d.ts +1 -1
  63. package/dist/src/types/transpiler.d.ts +2 -2
  64. package/dist/tsconfig.build.tsbuildinfo +1 -1
  65. package/package.json +3 -3
@@ -1,19 +1,19 @@
1
1
  import type { ParseMitosisOptions } from '../parsers/jsx/types';
2
2
  import type { MitosisComponent } from './mitosis-component';
3
3
  import { BaseTranspilerOptions } from './transpiler';
4
- export declare type Format = 'esm' | 'cjs';
5
- export declare type Language = 'js' | 'ts';
4
+ export type Format = 'esm' | 'cjs';
5
+ export type Language = 'js' | 'ts';
6
6
  interface TranspilerOptions {
7
7
  format?: Format;
8
8
  }
9
- declare type Targets = typeof import('../targets').targets;
10
- export declare type Target = keyof Targets;
11
- export declare type GeneratorOptions = {
9
+ type Targets = typeof import('../targets').targets;
10
+ export type Target = keyof Targets;
11
+ export type GeneratorOptions = {
12
12
  [K in Target]: NonNullable<Parameters<Targets[K]>[0]> & {
13
13
  transpiler?: TranspilerOptions;
14
14
  };
15
15
  };
16
- export declare type MitosisConfig = {
16
+ export type MitosisConfig = {
17
17
  commonOptions?: Omit<BaseTranspilerOptions, 'experimental'>;
18
18
  /**
19
19
  * List of targets to compile to.
@@ -1,13 +1,13 @@
1
- export declare type JSONPrimitive = string | null | number | boolean | undefined;
2
- export declare type JSONObject = {
1
+ export type JSONPrimitive = string | null | number | boolean | undefined;
2
+ export type JSONObject = {
3
3
  [key: string]: _JSON | undefined;
4
4
  };
5
5
  /**
6
6
  * We use an underscore to avoid collisions with the global `JSON` primitive type.
7
7
  */
8
- export declare type _JSON = JSONPrimitive | JSONObject | _JSON[];
9
- export declare type JSONPrimitiveOrNode = JSONPrimitive | babel.Node;
10
- export declare type JSONOrNodeObject = {
8
+ export type _JSON = JSONPrimitive | JSONObject | _JSON[];
9
+ export type JSONPrimitiveOrNode = JSONPrimitive | babel.Node;
10
+ export type JSONOrNodeObject = {
11
11
  [key: string]: JSONOrNode;
12
12
  };
13
- export declare type JSONOrNode = JSONPrimitiveOrNode | JSONOrNodeObject | JSONOrNode[];
13
+ export type JSONOrNode = JSONPrimitiveOrNode | JSONOrNodeObject | JSONOrNode[];
@@ -1,11 +1,11 @@
1
1
  import { Target } from '..';
2
2
  import { SolidState } from '../generators/solid/types';
3
3
  import { Dictionary } from '../helpers/typescript';
4
- declare type Targets = typeof import('../targets').targets;
5
- declare type TargetOptions = {
4
+ type Targets = typeof import('../targets').targets;
5
+ type TargetOptions = {
6
6
  [K in Target]?: Partial<NonNullable<Parameters<Targets[K]>[0]>>;
7
7
  };
8
- export declare type ComponentMetadata = {
8
+ export type ComponentMetadata = {
9
9
  [index: string]: any;
10
10
  httpRequests?: Record<string, string>;
11
11
  options?: TargetOptions;
@@ -31,8 +31,8 @@ export interface MitosisImport {
31
31
  };
32
32
  importKind?: 'type' | 'typeof' | 'value' | null;
33
33
  }
34
- export declare type ReactivityType = 'normal' | 'reactive';
35
- export declare type ContextOptions = {
34
+ export type ReactivityType = 'normal' | 'reactive';
35
+ export type ContextOptions = {
36
36
  type?: ReactivityType;
37
37
  };
38
38
  export interface ContextGetInfo extends ContextOptions {
@@ -44,15 +44,15 @@ export interface ContextSetInfo extends ContextOptions {
44
44
  value?: MitosisState;
45
45
  ref?: string;
46
46
  }
47
- export declare type BaseHook = {
47
+ export type BaseHook = {
48
48
  code: string;
49
49
  deps?: string;
50
50
  };
51
- export declare type MitosisComponentInput = {
51
+ export type MitosisComponentInput = {
52
52
  name: string;
53
53
  defaultValue: any;
54
54
  };
55
- export declare type MitosisExports = {
55
+ export type MitosisExports = {
56
56
  [name: string]: MitosisExport;
57
57
  };
58
58
  export interface MitosisExport {
@@ -60,26 +60,26 @@ export interface MitosisExport {
60
60
  usedInLocal?: boolean;
61
61
  isFunction?: boolean;
62
62
  }
63
- export declare type StateValueType = 'function' | 'getter' | 'method' | 'property';
64
- export declare type StateValue = {
63
+ export type StateValueType = 'function' | 'getter' | 'method' | 'property';
64
+ export type StateValue = {
65
65
  code: string;
66
66
  typeParameter?: string;
67
67
  type: StateValueType;
68
68
  propertyType?: ReactivityType;
69
69
  };
70
- export declare type MitosisState = Dictionary<StateValue | undefined>;
71
- export declare type TargetBlock<Return, Targets extends Target = Target> = Partial<{
70
+ export type MitosisState = Dictionary<StateValue | undefined>;
71
+ export type TargetBlock<Return, Targets extends Target = Target> = Partial<{
72
72
  [T in Targets | 'default']?: Return;
73
73
  }>;
74
- export declare type TargetBlockCode = TargetBlock<{
74
+ export type TargetBlockCode = TargetBlock<{
75
75
  code: string;
76
76
  }>;
77
- export declare type TargetBlockDefinition = TargetBlockCode & {
77
+ export type TargetBlockDefinition = TargetBlockCode & {
78
78
  settings: {
79
79
  requiresDefault: boolean;
80
80
  };
81
81
  };
82
- export declare type OnEventHook = BaseHook & {
82
+ export type OnEventHook = BaseHook & {
83
83
  refName: string;
84
84
  eventName: string;
85
85
  isRoot: boolean;
@@ -87,10 +87,10 @@ export declare type OnEventHook = BaseHook & {
87
87
  eventArgName: string;
88
88
  elementArgName?: string;
89
89
  };
90
- export declare type OnMountHook = BaseHook & {
90
+ export type OnMountHook = BaseHook & {
91
91
  onSSR?: boolean;
92
92
  };
93
- export declare type MitosisComponent = {
93
+ export type MitosisComponent = {
94
94
  '@type': '@builder.io/mitosis/component';
95
95
  name: string;
96
96
  imports: MitosisImport[];
@@ -1,5 +1,5 @@
1
1
  import { ContextOptions, MitosisState } from './mitosis-component';
2
- export declare type MitosisContext = ContextOptions & {
2
+ export type MitosisContext = ContextOptions & {
3
3
  '@type': '@builder.io/mitosis/context';
4
4
  name: string;
5
5
  value: MitosisState;
@@ -1,16 +1,16 @@
1
1
  import { JSONObject } from './json';
2
- export declare type SpreadType = 'normal' | 'event-handlers';
3
- declare type BindingProperties = {
2
+ export type SpreadType = 'normal' | 'event-handlers';
3
+ type BindingProperties = {
4
4
  type: 'spread';
5
5
  spreadType: SpreadType;
6
6
  } | {
7
7
  type: 'single';
8
8
  };
9
- export declare type Binding = {
9
+ export type Binding = {
10
10
  code: string;
11
11
  arguments?: string[];
12
12
  } & BindingProperties;
13
- export declare type BaseNode = {
13
+ export type BaseNode = {
14
14
  '@type': '@builder.io/mitosis/node';
15
15
  meta: JSONObject;
16
16
  name: string;
@@ -44,8 +44,8 @@ export declare type BaseNode = {
44
44
  };
45
45
  children: MitosisNode[];
46
46
  };
47
- export declare type SpecialNodesNames = 'For' | 'Fragment' | 'Show' | 'Slot';
48
- export declare type ForNode = BaseNode & {
47
+ export type SpecialNodesNames = 'For' | 'Fragment' | 'Show' | 'Slot';
48
+ export type ForNode = BaseNode & {
49
49
  name: 'For';
50
50
  scope: {
51
51
  forName: string | undefined;
@@ -53,6 +53,6 @@ export declare type ForNode = BaseNode & {
53
53
  collectionName: string | undefined;
54
54
  };
55
55
  };
56
- export declare type MitosisNode = BaseNode | ForNode;
56
+ export type MitosisNode = BaseNode | ForNode;
57
57
  export declare const checkIsForNode: (node: MitosisNode) => node is ForNode;
58
58
  export {};
@@ -1 +1 @@
1
- export declare type MitosisStyles = Omit<Partial<CSSStyleDeclaration>, 'length' | 'getPropertyPriority' | 'getPropertyValue' | 'item' | 'removeProperty' | 'setProperty'>;
1
+ export type MitosisStyles = Omit<Partial<CSSStyleDeclaration>, 'length' | 'getPropertyPriority' | 'getPropertyValue' | 'item' | 'removeProperty' | 'setProperty'>;
@@ -1,5 +1,5 @@
1
1
  import { MitosisComponent } from './mitosis-component';
2
- export declare type Plugin = (options?: any) => {
2
+ export type Plugin = (options?: any) => {
3
3
  json?: {
4
4
  pre?: (json: MitosisComponent) => MitosisComponent | void;
5
5
  post?: (json: MitosisComponent) => MitosisComponent | void;
@@ -4,11 +4,11 @@ export interface TranspilerArgs {
4
4
  path?: string;
5
5
  component: MitosisComponent;
6
6
  }
7
- export declare type Transpiler<R = string> = (args: TranspilerArgs) => R;
7
+ export type Transpiler<R = string> = (args: TranspilerArgs) => R;
8
8
  /**
9
9
  * This type guarantees that all code generators receive the same base options
10
10
  */
11
- export declare type TranspilerGenerator<X extends BaseTranspilerOptions, Y = string> = (args?: X) => Transpiler<Y>;
11
+ export type TranspilerGenerator<X extends BaseTranspilerOptions, Y = string> = (args?: X) => Transpiler<Y>;
12
12
  export interface BaseTranspilerOptions {
13
13
  experimental?: {
14
14
  [key: string]: any;