@mulanjs/mulanjs 1.0.1-dev.20260218170441 → 1.0.1-dev.20260218172223

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.
@@ -84,15 +84,15 @@ function compileSetupScript(script, isTs, descriptor) {
84
84
  }
85
85
  });
86
86
  // Reconstruct
87
- // We import defineComponent from mulanjs if not present?
87
+ // We import defineComponent from @mulanjs/mulanjs if not present?
88
88
  // Ideally user imports what they need, but for 'setup' wrapping we need defineComponent.
89
89
  // Let's assume user might not have imported it, so we import it as _defineComponent to avoid collision.
90
90
  // Check if defineComponent is imported
91
91
  const hasDefineComponent = imports.some(i => i.includes('defineComponent'));
92
- const bootImports = hasDefineComponent ? '' : `import { defineComponent as _defineComponent } from 'mulanjs';`;
92
+ const bootImports = hasDefineComponent ? '' : `import { defineComponent as _defineComponent } from '@mulanjs/mulanjs';`;
93
93
  // ADDED: Check if we introduced 'muState' but it wasn't imported (because user used $)
94
94
  const usesMuState = transformedContent.includes('muState');
95
- const hasMuStateImport = imports.some(i => i.includes('muState') || i.includes('mulanjs'));
95
+ const hasMuStateImport = imports.some(i => i.includes('muState') || i.includes('@mulanjs/mulanjs'));
96
96
  let autoImports = (usesMuState && !hasMuStateImport) ? [`muState`] : [];
97
97
  // Auto-import common hooks
98
98
  COMMON_HOOKS.forEach(hook => {
@@ -104,7 +104,7 @@ function compileSetupScript(script, isTs, descriptor) {
104
104
  }
105
105
  });
106
106
  const autoImportStmt = autoImports.length > 0
107
- ? `import { ${autoImports.join(', ')} } from 'mulanjs';`
107
+ ? `import { ${autoImports.join(', ')} } from '@mulanjs/mulanjs';`
108
108
  : '';
109
109
  const filename = descriptor.filename;
110
110
  const componentName = filename ? ((_a = filename.split(/[/\\]/).pop()) === null || _a === void 0 ? void 0 : _a.split('.')[0].replace(/\W/g, '')) || 'App' : 'App';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mulanjs/mulanjs",
3
- "version": "1.0.1-dev.20260218170441",
3
+ "version": "1.0.1-dev.20260218172223",
4
4
  "description": "A powerful, secure, and enterprise-grade JavaScript framework.",
5
5
  "main": "dist/mulan.js",
6
6
  "module": "dist/mulan.esm.js",
@@ -66,17 +66,17 @@ function compileSetupScript(script: SFCBlock, isTs: boolean, descriptor: SFCDesc
66
66
  });
67
67
 
68
68
  // Reconstruct
69
- // We import defineComponent from mulanjs if not present?
69
+ // We import defineComponent from @mulanjs/mulanjs if not present?
70
70
  // Ideally user imports what they need, but for 'setup' wrapping we need defineComponent.
71
71
  // Let's assume user might not have imported it, so we import it as _defineComponent to avoid collision.
72
72
 
73
73
  // Check if defineComponent is imported
74
74
  const hasDefineComponent = imports.some(i => i.includes('defineComponent'));
75
- const bootImports = hasDefineComponent ? '' : `import { defineComponent as _defineComponent } from 'mulanjs';`;
75
+ const bootImports = hasDefineComponent ? '' : `import { defineComponent as _defineComponent } from '@mulanjs/mulanjs';`;
76
76
 
77
77
  // ADDED: Check if we introduced 'muState' but it wasn't imported (because user used $)
78
78
  const usesMuState = transformedContent.includes('muState');
79
- const hasMuStateImport = imports.some(i => i.includes('muState') || i.includes('mulanjs'));
79
+ const hasMuStateImport = imports.some(i => i.includes('muState') || i.includes('@mulanjs/mulanjs'));
80
80
  let autoImports = (usesMuState && !hasMuStateImport) ? [`muState`] : [];
81
81
 
82
82
  // Auto-import common hooks
@@ -90,7 +90,7 @@ function compileSetupScript(script: SFCBlock, isTs: boolean, descriptor: SFCDesc
90
90
  });
91
91
 
92
92
  const autoImportStmt = autoImports.length > 0
93
- ? `import { ${autoImports.join(', ')} } from 'mulanjs';`
93
+ ? `import { ${autoImports.join(', ')} } from '@mulanjs/mulanjs';`
94
94
  : '';
95
95
 
96
96
  const filename = descriptor.filename;