mitway-tagger 1.3.0 → 1.4.0
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.cjs +13 -0
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +12 -0
- package/package.json +9 -1
package/dist/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
createVisualEditorPlugin: () => createVisualEditorPlugin,
|
|
38
38
|
createmITwayServerConfig: () => createmITwayServerConfig,
|
|
39
39
|
default: () => index_default,
|
|
40
|
+
mitwayProductionPlugins: () => mitwayProductionPlugins,
|
|
40
41
|
mitwayServerConfig: () => mitwayServerConfig,
|
|
41
42
|
mitwayTagger: () => mitwayTagger
|
|
42
43
|
});
|
|
@@ -858,6 +859,17 @@ function mitwayTagger(options = {}) {
|
|
|
858
859
|
}
|
|
859
860
|
return plugins;
|
|
860
861
|
}
|
|
862
|
+
function mitwayProductionPlugins(options = {}) {
|
|
863
|
+
const opts = { themeBridge: true, iframeNavigation: true, ...options };
|
|
864
|
+
const plugins = [];
|
|
865
|
+
if (opts.iframeNavigation) {
|
|
866
|
+
plugins.push(createIframeNavigationPlugin());
|
|
867
|
+
}
|
|
868
|
+
if (opts.themeBridge) {
|
|
869
|
+
plugins.push(createThemeBridgePlugin());
|
|
870
|
+
}
|
|
871
|
+
return plugins;
|
|
872
|
+
}
|
|
861
873
|
var index_default = mitwayTagger;
|
|
862
874
|
var mitwayServerConfig = {
|
|
863
875
|
host: "0.0.0.0",
|
|
@@ -904,6 +916,7 @@ function createmITwayServerConfig(options = {}) {
|
|
|
904
916
|
createVirtualOverridesPlugin,
|
|
905
917
|
createVisualEditorPlugin,
|
|
906
918
|
createmITwayServerConfig,
|
|
919
|
+
mitwayProductionPlugins,
|
|
907
920
|
mitwayServerConfig,
|
|
908
921
|
mitwayTagger
|
|
909
922
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -153,6 +153,22 @@ interface mITwayTaggerOptions {
|
|
|
153
153
|
* mitwayTagger({ jsxSource: false, virtualOverrides: false })
|
|
154
154
|
*/
|
|
155
155
|
declare function mitwayTagger(options?: mITwayTaggerOptions): Plugin[];
|
|
156
|
+
/**
|
|
157
|
+
* Returns only the production-safe plugins (themeBridge + iframeNavigation).
|
|
158
|
+
* These plugins only inject scripts into HTML via transformIndexHtml —
|
|
159
|
+
* they don't interfere with JSX, React runtime, or HMR.
|
|
160
|
+
*
|
|
161
|
+
* Use this in production builds where the full tagger causes issues
|
|
162
|
+
* (e.g. "jsxDEV is not a function" from jsxSource plugin).
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* // vite.config.ts
|
|
166
|
+
* const isDev = process.env.NODE_ENV !== "production";
|
|
167
|
+
* export default defineConfig({
|
|
168
|
+
* plugins: [react(), ...(isDev ? mitwayTagger() : mitwayProductionPlugins())],
|
|
169
|
+
* });
|
|
170
|
+
*/
|
|
171
|
+
declare function mitwayProductionPlugins(options?: Pick<mITwayTaggerOptions, 'themeBridge' | 'iframeNavigation'>): Plugin[];
|
|
156
172
|
|
|
157
173
|
/**
|
|
158
174
|
* Server configuration interface for mITway iframe integration
|
|
@@ -201,4 +217,4 @@ declare function createmITwayServerConfig(options?: {
|
|
|
201
217
|
port?: number;
|
|
202
218
|
}): mITwayServerConfig;
|
|
203
219
|
|
|
204
|
-
export { createIframeNavigationPlugin, createJsxSourcePlugin, createThemeBridgePlugin, createVirtualOverridesPlugin, createVisualEditorPlugin, createmITwayServerConfig, mitwayTagger as default, type mITwayServerConfig, type mITwayTaggerOptions, mitwayServerConfig, mitwayTagger };
|
|
220
|
+
export { createIframeNavigationPlugin, createJsxSourcePlugin, createThemeBridgePlugin, createVirtualOverridesPlugin, createVisualEditorPlugin, createmITwayServerConfig, mitwayTagger as default, type mITwayServerConfig, type mITwayTaggerOptions, mitwayProductionPlugins, mitwayServerConfig, mitwayTagger };
|
package/dist/index.d.ts
CHANGED
|
@@ -153,6 +153,22 @@ interface mITwayTaggerOptions {
|
|
|
153
153
|
* mitwayTagger({ jsxSource: false, virtualOverrides: false })
|
|
154
154
|
*/
|
|
155
155
|
declare function mitwayTagger(options?: mITwayTaggerOptions): Plugin[];
|
|
156
|
+
/**
|
|
157
|
+
* Returns only the production-safe plugins (themeBridge + iframeNavigation).
|
|
158
|
+
* These plugins only inject scripts into HTML via transformIndexHtml —
|
|
159
|
+
* they don't interfere with JSX, React runtime, or HMR.
|
|
160
|
+
*
|
|
161
|
+
* Use this in production builds where the full tagger causes issues
|
|
162
|
+
* (e.g. "jsxDEV is not a function" from jsxSource plugin).
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* // vite.config.ts
|
|
166
|
+
* const isDev = process.env.NODE_ENV !== "production";
|
|
167
|
+
* export default defineConfig({
|
|
168
|
+
* plugins: [react(), ...(isDev ? mitwayTagger() : mitwayProductionPlugins())],
|
|
169
|
+
* });
|
|
170
|
+
*/
|
|
171
|
+
declare function mitwayProductionPlugins(options?: Pick<mITwayTaggerOptions, 'themeBridge' | 'iframeNavigation'>): Plugin[];
|
|
156
172
|
|
|
157
173
|
/**
|
|
158
174
|
* Server configuration interface for mITway iframe integration
|
|
@@ -201,4 +217,4 @@ declare function createmITwayServerConfig(options?: {
|
|
|
201
217
|
port?: number;
|
|
202
218
|
}): mITwayServerConfig;
|
|
203
219
|
|
|
204
|
-
export { createIframeNavigationPlugin, createJsxSourcePlugin, createThemeBridgePlugin, createVirtualOverridesPlugin, createVisualEditorPlugin, createmITwayServerConfig, mitwayTagger as default, type mITwayServerConfig, type mITwayTaggerOptions, mitwayServerConfig, mitwayTagger };
|
|
220
|
+
export { createIframeNavigationPlugin, createJsxSourcePlugin, createThemeBridgePlugin, createVirtualOverridesPlugin, createVisualEditorPlugin, createmITwayServerConfig, mitwayTagger as default, type mITwayServerConfig, type mITwayTaggerOptions, mitwayProductionPlugins, mitwayServerConfig, mitwayTagger };
|
package/dist/index.js
CHANGED
|
@@ -814,6 +814,17 @@ function mitwayTagger(options = {}) {
|
|
|
814
814
|
}
|
|
815
815
|
return plugins;
|
|
816
816
|
}
|
|
817
|
+
function mitwayProductionPlugins(options = {}) {
|
|
818
|
+
const opts = { themeBridge: true, iframeNavigation: true, ...options };
|
|
819
|
+
const plugins = [];
|
|
820
|
+
if (opts.iframeNavigation) {
|
|
821
|
+
plugins.push(createIframeNavigationPlugin());
|
|
822
|
+
}
|
|
823
|
+
if (opts.themeBridge) {
|
|
824
|
+
plugins.push(createThemeBridgePlugin());
|
|
825
|
+
}
|
|
826
|
+
return plugins;
|
|
827
|
+
}
|
|
817
828
|
var index_default = mitwayTagger;
|
|
818
829
|
var mitwayServerConfig = {
|
|
819
830
|
host: "0.0.0.0",
|
|
@@ -860,6 +871,7 @@ export {
|
|
|
860
871
|
createVisualEditorPlugin,
|
|
861
872
|
createmITwayServerConfig,
|
|
862
873
|
index_default as default,
|
|
874
|
+
mitwayProductionPlugins,
|
|
863
875
|
mitwayServerConfig,
|
|
864
876
|
mitwayTagger
|
|
865
877
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mitway-tagger",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Vite plugin suite for Mesh IT Midway integration: source tracking, visual editing, theme preview, iframe navigation, and server configuration",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -34,6 +34,14 @@
|
|
|
34
34
|
],
|
|
35
35
|
"author": "Mesh IT Midway Team",
|
|
36
36
|
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/INC-DataInnovation/MITWAY-Tagger.git"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/INC-DataInnovation/MITWAY-Tagger/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/INC-DataInnovation/MITWAY-Tagger#readme",
|
|
37
45
|
"peerDependencies": {
|
|
38
46
|
"vite": ">=5.0.0"
|
|
39
47
|
},
|