🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

@stagewise-plugins/angular

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stagewise-plugins/angular - npm Package Compare versions

Comparing version
0.6.3
to
0.7.0
+3
-1
dist/index.js

@@ -99,3 +99,5 @@ import { jsxs as c, jsx as a } from "react/jsx-runtime";

onPromptSend: (n) => {
const e = y(n.metadata.selectedElements);
const e = y(
n.metadata.browserData?.selectedElements
);
return e ? {

@@ -102,0 +104,0 @@ contextSnippets: [

{
"name": "@stagewise-plugins/angular",
"version": "0.6.3",
"version": "0.7.0",
"type": "module",

@@ -41,14 +41,7 @@ "keywords": [

"license": "AGPL-3.0-only",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"dev": "tsc -b && tsx build.config.ts development",
"build": "tsc -b && tsx build.config.ts production"
},
"peerDependencies": {
"@stagewise/toolbar": "workspace:*"
"@stagewise/plugin-sdk": "0.6.2"
},
"dependencies": {},
"devDependencies": {
"@stagewise/toolbar": "workspace:*",
"@stagewise/plugin-builder": "workspace:*",
"typescript": "~5.8.3",

@@ -58,5 +51,11 @@ "react": "^19.1.0",

"@types/react": "^19.1.8",
"tsx": "^4.20.3"
"vite": "7.0.6",
"@vitejs/plugin-react-swc": "3.7.0",
"@stagewise/plugin-sdk": "0.6.2"
},
"packageManager": "pnpm@10.10.0"
}
"scripts": {
"clean": "rm -rf .turbo node_modules",
"dev": "NODE_ENV=development tsc -b && vite build --mode development",
"build": "NODE_ENV=production tsc -b && vite build"
}
}
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const plugin = {
mainPlugin: "import { jsxs as s, jsx as i } from \"react/jsx-runtime\";\nfunction d() {\n return /* @__PURE__ */ s(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 960 960\",\n fill: \"currentColor\",\n stroke: \"currentColor\",\n children: [\n /* @__PURE__ */ i(\"title\", { children: \"Angular Logo\" }),\n /* @__PURE__ */ s(\"g\", { children: [\n /* @__PURE__ */ i(\"polygon\", { points: \"562.6,109.8 804.1,629.5 829.2,233.1 \t\" }),\n /* @__PURE__ */ i(\"polygon\", { points: \"624.9,655.9 334.3,655.9 297.2,745.8 479.6,849.8 662,745.8 \t\" }),\n /* @__PURE__ */ i(\"polygon\", { points: \"384.1,539.3 575.2,539.3 479.6,307 \t\" }),\n /* @__PURE__ */ i(\"polygon\", { points: \"396.6,109.8 130,233.1 155.1,629.5 \t\" })\n ] })\n ]\n }\n );\n}\nlet c = !1;\nfunction u() {\n !window.parent.ng && !c && (console.warn(\n \"Angular plugin: No Angular instance (window.ng) detected or Angular is not in development mode. Component detection features will not be available.\"\n ), c = !0);\n}\nfunction f(n) {\n const e = {};\n for (const t of Object.getOwnPropertyNames(n))\n e[t] = n[t];\n return e;\n}\nfunction h(n) {\n const e = f(n);\n return p(e, n);\n}\nfunction w(n) {\n return p(n.ownProperties, null);\n}\nfunction p(n, e) {\n if (!window.parent.ng || !window.parent.ng.getComponent)\n return [];\n const t = [];\n let o = e;\n const l = 3;\n if (o)\n for (; o && t.length < l; ) {\n try {\n const a = window.parent.ng.getComponent(\n o\n );\n if (a) {\n let r = a.constructor.name;\n r.startsWith(\"_\") && (r = r.substring(1)), r && r !== \"Object\" && (t.some((g) => g.name === r) || t.push({ name: r }));\n }\n } catch {\n }\n if (o.parentElement && o.parentElement !== document.body)\n o = o.parentElement;\n else\n break;\n }\n return t;\n}\nfunction m(n) {\n if (u(), !n)\n return { annotation: null };\n const e = h(n);\n return e.length > 0 && e[0] ? {\n annotation: `${e[0].name}`\n } : { annotation: null };\n}\nfunction A(n) {\n if (u(), !n || n.length === 0)\n return null;\n const e = n.map(\n (t) => w(t)\n );\n return e.some((t) => t.length > 0) ? `This is additional information on the elements that the user selected. Use this information to find the correct element in the codebase.\n\n ${e.map((o, l) => {\n const a = o.length === 0 ? \"No Angular component detected for this element\" : `Angular component tree (from closest to farthest, ${o.length} closest element${o.length > 1 ? \"s\" : \"\"}): ${o.map((r) => `{name: ${r.name}}`).join(\" child of \")}`;\n return `\n<element index=\"${l + 1}\">\n ${a}\n</element>\n `;\n }).join(\"\")}\n ` : null;\n}\nconst C = {\n displayName: \"Angular\",\n description: \"This plugin adds additional information and metadata for apps using Angular as a UI framework\",\n iconSvg: /* @__PURE__ */ i(d, {}),\n pluginName: \"angular\",\n onContextElementHover: m,\n onContextElementSelect: m,\n onPromptSend: (n) => {\n const e = A(n.metadata.selectedElements);\n return e ? {\n contextSnippets: [\n {\n promptContextName: \"elements-angular-component-info\",\n content: e\n }\n ]\n } : { contextSnippets: [] };\n }\n};\nexport {\n C as default\n};\n",
loader: true
}
exports.default = plugin;
import type { ToolbarPluginLoader } from '@stagewise/toolbar'
declare const plugin: ToolbarPluginLoader;
export default plugin;
'use client'
const plugin = {
mainPlugin: "import { jsxs as s, jsx as i } from \"react/jsx-runtime\";\nfunction d() {\n return /* @__PURE__ */ s(\n \"svg\",\n {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 960 960\",\n fill: \"currentColor\",\n stroke: \"currentColor\",\n children: [\n /* @__PURE__ */ i(\"title\", { children: \"Angular Logo\" }),\n /* @__PURE__ */ s(\"g\", { children: [\n /* @__PURE__ */ i(\"polygon\", { points: \"562.6,109.8 804.1,629.5 829.2,233.1 \t\" }),\n /* @__PURE__ */ i(\"polygon\", { points: \"624.9,655.9 334.3,655.9 297.2,745.8 479.6,849.8 662,745.8 \t\" }),\n /* @__PURE__ */ i(\"polygon\", { points: \"384.1,539.3 575.2,539.3 479.6,307 \t\" }),\n /* @__PURE__ */ i(\"polygon\", { points: \"396.6,109.8 130,233.1 155.1,629.5 \t\" })\n ] })\n ]\n }\n );\n}\nlet c = !1;\nfunction u() {\n !window.parent.ng && !c && (console.warn(\n \"Angular plugin: No Angular instance (window.ng) detected or Angular is not in development mode. Component detection features will not be available.\"\n ), c = !0);\n}\nfunction f(n) {\n const e = {};\n for (const t of Object.getOwnPropertyNames(n))\n e[t] = n[t];\n return e;\n}\nfunction h(n) {\n const e = f(n);\n return p(e, n);\n}\nfunction w(n) {\n return p(n.ownProperties, null);\n}\nfunction p(n, e) {\n if (!window.parent.ng || !window.parent.ng.getComponent)\n return [];\n const t = [];\n let o = e;\n const l = 3;\n if (o)\n for (; o && t.length < l; ) {\n try {\n const a = window.parent.ng.getComponent(\n o\n );\n if (a) {\n let r = a.constructor.name;\n r.startsWith(\"_\") && (r = r.substring(1)), r && r !== \"Object\" && (t.some((g) => g.name === r) || t.push({ name: r }));\n }\n } catch {\n }\n if (o.parentElement && o.parentElement !== document.body)\n o = o.parentElement;\n else\n break;\n }\n return t;\n}\nfunction m(n) {\n if (u(), !n)\n return { annotation: null };\n const e = h(n);\n return e.length > 0 && e[0] ? {\n annotation: `${e[0].name}`\n } : { annotation: null };\n}\nfunction A(n) {\n if (u(), !n || n.length === 0)\n return null;\n const e = n.map(\n (t) => w(t)\n );\n return e.some((t) => t.length > 0) ? `This is additional information on the elements that the user selected. Use this information to find the correct element in the codebase.\n\n ${e.map((o, l) => {\n const a = o.length === 0 ? \"No Angular component detected for this element\" : `Angular component tree (from closest to farthest, ${o.length} closest element${o.length > 1 ? \"s\" : \"\"}): ${o.map((r) => `{name: ${r.name}}`).join(\" child of \")}`;\n return `\n<element index=\"${l + 1}\">\n ${a}\n</element>\n `;\n }).join(\"\")}\n ` : null;\n}\nconst C = {\n displayName: \"Angular\",\n description: \"This plugin adds additional information and metadata for apps using Angular as a UI framework\",\n iconSvg: /* @__PURE__ */ i(d, {}),\n pluginName: \"angular\",\n onContextElementHover: m,\n onContextElementSelect: m,\n onPromptSend: (n) => {\n const e = A(n.metadata.selectedElements);\n return e ? {\n contextSnippets: [\n {\n promptContextName: \"elements-angular-component-info\",\n content: e\n }\n ]\n } : { contextSnippets: [] };\n }\n};\nexport {\n C as default\n};\n",
loader: true
}
export default plugin;
> [!CAUTION]
> This package is deprecated.
>
> There thus will be no further support or assistance with this version.
>
> Follow the guide in [the stagewise documentation](https://stagewise.io) to upgrade.