@ktjs/babel-plugin-ktjsx 0.1.0 → 0.2.1

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { NodePath } from '@babel/core';
2
+ import * as t from '@babel/types';
3
+ export declare function transformConditionalChains(path: NodePath<t.JSXElement>): void;
4
+ //# sourceMappingURL=if-else.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"if-else.d.ts","sourceRoot":"","sources":["../../../../transformer/src/if-else.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAiFlC,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QA8DtE"}
@@ -0,0 +1,4 @@
1
+ export { default, transformerKTjsx } from './plugin.js';
2
+ export type { KTjsxTransformOptions } from './transform.js';
3
+ export { transformWithKTjsx } from './transform.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../transformer/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type NodePath } from '@babel/core';
2
+ import * as t from '@babel/types';
3
+ export declare function validateDirectiveCombinations(path: NodePath<t.JSXElement>): void;
4
+ export declare function transformKFor(path: NodePath<t.JSXElement>): boolean;
5
+ //# sourceMappingURL=k-for.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"k-for.d.ts","sourceRoot":"","sources":["../../../../transformer/src/k-for.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAWlC,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAkBzE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,OAAO,CAqCnE"}
@@ -0,0 +1,4 @@
1
+ import type { PluginObj } from '@babel/core';
2
+ export declare function transformerKTjsx(): PluginObj;
3
+ export default transformerKTjsx;
4
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../transformer/src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAK7C,wBAAgB,gBAAgB,IAAI,SAAS,CAgB5C;AAED,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { NodePath } from '@babel/core';
2
+ import * as t from '@babel/types';
3
+ export declare function addFlagToSvgMathMLElement(path: NodePath<t.JSXElement>): void;
4
+ //# sourceMappingURL=svg-mathml-flag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svg-mathml-flag.d.ts","sourceRoot":"","sources":["../../../../transformer/src/svg-mathml-flag.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAUlC,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAiFrE"}
@@ -0,0 +1,8 @@
1
+ import { type TransformOptions } from '@babel/core';
2
+ type ReservedTransformOptions = 'ast' | 'babelrc' | 'configFile' | 'parserOpts' | 'plugins' | 'sourceMaps';
3
+ export type KTjsxTransformOptions = Omit<TransformOptions, ReservedTransformOptions> & {
4
+ parserPlugins?: NonNullable<TransformOptions['parserOpts']>['plugins'];
5
+ };
6
+ export declare function transformWithKTjsx(code: string, options?: KTjsxTransformOptions): Promise<import("@babel/core").BabelFileResult>;
7
+ export {};
8
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../transformer/src/transform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKpE,KAAK,wBAAwB,GACzB,KAAK,GACL,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,YAAY,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,gBAAgB,EAAE,wBAAwB,CAAC,GAAG;IACrF,aAAa,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACxE,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,kDAezF"}
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@ktjs/babel-plugin-ktjsx",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
5
+ "main": "dist/index.mjs",
6
+ "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js",
12
- "default": "./dist/index.js"
11
+ "import": "./dist/index.mjs",
12
+ "default": "./dist/index.mjs"
13
13
  }
14
14
  },
15
15
  "files": [
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "license": "MIT",
27
27
  "description": "Babel plugin to make JSX-generated SVG use proper namespaces.",
28
- "scripts": {
29
- "build": "node build.js",
30
- "test": "node tests/run.js"
28
+ "description_zh": "用于让 JSX 生成的 SVG 使用正确命名空间的 Babel 插件。",
29
+ "dependencies": {
30
+ "@ktjs/transformer": "^*"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/core": "^7.0.0",
@@ -40,4 +40,4 @@
40
40
  "peerDependencies": {
41
41
  "@babel/core": "^7.0.0"
42
42
  }
43
- }
43
+ }