@ktjs/babel-plugin-ktjsx 0.0.1 → 0.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.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { PluginObj } from '@babel/core';
2
- type KTJSXPluginOptions = {};
3
- export default function babelPluginKtjsx(_: any, options: KTJSXPluginOptions): PluginObj;
4
- export { babelPluginKtjsx };
2
+ /**
3
+ * Transform `<svg ...>` and `<math ...>` JSX elements to include a special attribute flag
4
+ */
5
+ export default function babelKTjsx(): PluginObj;
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,KAAK,kBAAkB,GAAG,EAAE,CAAC;AAa7B,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,kBAAkB,GAAG,SAAS,CAwFvF;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiBxC;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,IAAI,SAAS,CAwF9C"}
package/dist/index.js CHANGED
@@ -7,7 +7,11 @@ function isSvgTag(tag) {
7
7
  function isMathTag(tag) {
8
8
  return tag === 'math' || (typeof tag === 'string' && tag.startsWith('math:'));
9
9
  }
10
- export default function babelPluginKtjsx(_, options) {
10
+ //_: any, options: KTJSXPluginOptions
11
+ /**
12
+ * Transform `<svg ...>` and `<math ...>` JSX elements to include a special attribute flag
13
+ */
14
+ export default function babelKTjsx() {
11
15
  return {
12
16
  name: 'babel-plugin-ktjsx',
13
17
  visitor: {
@@ -90,4 +94,3 @@ export default function babelPluginKtjsx(_, options) {
90
94
  },
91
95
  };
92
96
  }
93
- export { babelPluginKtjsx };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/babel-plugin-ktjsx",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.mjs",