@skyvexsoftware/stratos-sdk 0.1.16 → 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.
@@ -31,20 +31,12 @@ export function cssInject() {
31
31
  if (!jsEntry || jsEntry.type !== "chunk")
32
32
  return;
33
33
  // Export the CSS as __STRATOS_PLUGIN_CSS__ so the shell's PluginHost
34
- // can inject/remove it based on plugin lifecycle (mount/unmount).
35
- //
36
- // Also self-inject via IIFE for backwards compatibility with older shells
37
- // that don't manage plugin CSS lifecycle. The IIFE tags its <style> with
38
- // data-plugin-css-fallback so the new shell can remove it when it takes over.
34
+ // can inject it into <head> wrapped in @layer plugin on mount.
39
35
  const escaped = cssContent
40
36
  .replace(/\\/g, "\\\\")
41
37
  .replace(/`/g, "\\`")
42
38
  .replace(/\$/g, "\\$");
43
- const injection = [
44
- `export const __STRATOS_PLUGIN_CSS__ = \`${escaped}\`;`,
45
- `(function(){try{var s=document.createElement("style");s.textContent=\`${escaped}\`;s.setAttribute("data-plugin-css-fallback","");document.head.appendChild(s)}catch(e){}})();`,
46
- "",
47
- ].join("\n");
39
+ const injection = `export const __STRATOS_PLUGIN_CSS__ = \`${escaped}\`;\n`;
48
40
  jsEntry.code = injection + jsEntry.code;
49
41
  // Remove the separate CSS files
50
42
  for (const name of cssAssets) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvexsoftware/stratos-sdk",
3
- "version": "0.1.16",
3
+ "version": "0.2.1",
4
4
  "description": "Plugin SDK for Stratos — types, hooks, and UI components",
5
5
  "author": {
6
6
  "name": "Skyvex Software",
@@ -45,6 +45,25 @@
45
45
  "import": "./dist/vite/plugin-config.js"
46
46
  }
47
47
  },
48
+ "typesVersions": {
49
+ "*": {
50
+ "types": [
51
+ "dist/types/index.d.ts"
52
+ ],
53
+ "ui": [
54
+ "dist/ui/index.d.ts"
55
+ ],
56
+ "hooks": [
57
+ "dist/hooks/index.d.ts"
58
+ ],
59
+ "helpers": [
60
+ "dist/helpers/index.d.ts"
61
+ ],
62
+ "vite": [
63
+ "dist/vite/plugin-config.d.ts"
64
+ ]
65
+ }
66
+ },
48
67
  "bin": {
49
68
  "stratos-deploy": "./dist/bin/deploy.js"
50
69
  },