@tooltify/integration-rspack 0.1.7 → 0.1.9

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,8 +1,5 @@
1
1
  import { RspackPluginInstance } from '@rspack/core';
2
-
3
- interface StartOptions {
4
- publicUrl?: string;
5
- }
2
+ import { StartOptions } from '@tooltify/integration-shared';
6
3
 
7
4
  declare function rspackTooltify({ publicUrl }?: StartOptions): RspackPluginInstance;
8
5
 
package/dist/index.js CHANGED
@@ -1,10 +1,7 @@
1
1
  // index.ts
2
2
  import fs from "fs";
3
- import path from "path";
4
- import { fileURLToPath } from "url";
5
3
  import { startServer, CLIENT_BUNDLE } from "@tooltify/core";
6
- var __dirname = path.dirname(fileURLToPath(import.meta.url));
7
- var CUSTOM_JSX_RUNTIME = path.resolve(__dirname, "./helpers/react-transform-source");
4
+ var CUSTOM_JSX_RUNTIME = "@tooltify/integration-shared/source-transformers/react";
8
5
  function rspackTooltify({ publicUrl } = {}) {
9
6
  return {
10
7
  apply(compiler) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tooltify/integration-rspack",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -17,12 +17,12 @@
17
17
  "build": "npm run build:lib",
18
18
  "prepublishOnly": "npm run build"
19
19
  },
20
- "peerDependencies": {
21
- "@rspack/core": "^1.7.8",
22
- "@tooltify/core": "*"
20
+ "dependencies": {
21
+ "@tooltify/core": "*",
22
+ "@tooltify/integration-shared": "*"
23
23
  },
24
- "devDependencies": {
25
- "@tooltify/core": "*"
24
+ "peerDependencies": {
25
+ "@rspack/core": "^1.7.8"
26
26
  },
27
27
  "files": [
28
28
  "dist"
@@ -1,10 +0,0 @@
1
- import * as react from 'react';
2
- export { Fragment } from 'react/jsx-runtime';
3
-
4
- declare function jsxDEV(type: any, props: any, key: any, isStaticChildren: boolean, source?: {
5
- fileName?: string;
6
- lineNumber?: number;
7
- columnNumber?: number;
8
- }): react.ReactElement<unknown, string | react.JSXElementConstructor<any>>;
9
-
10
- export { jsxDEV };
@@ -1,19 +0,0 @@
1
- // ../helpers/react-transform-source.ts
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
3
- function jsxDEV(type, props, key, isStaticChildren, source) {
4
- if (typeof type === "string" && source?.fileName) {
5
- const filePath = source.fileName;
6
- const line = source.lineNumber || 0;
7
- const idx = filePath.indexOf(__TOOLTIFY_PACKAGES_DIR__);
8
- if (idx >= 0) {
9
- const relative = filePath.slice(idx + __TOOLTIFY_PACKAGES_DIR__.length);
10
- props = { ...props, "data-source": `${relative}:${line}` };
11
- }
12
- }
13
- const fn = isStaticChildren ? _jsxs : _jsx;
14
- return fn(type, props, key);
15
- }
16
- export {
17
- Fragment,
18
- jsxDEV
19
- };