{"_id":"@alexandreamormino/plugin-entity-manager-react","_rev":"5-8dcbad1249bdc64a913d2e87288a89e4","name":"@alexandreamormino/plugin-entity-manager-react","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@alexandreamormino/plugin-entity-manager-react","version":"1.0.0","keywords":["backstage","backstage-plugin","entity-manager","react","components"],"author":{"name":"Alexandre Amormino"},"license":"Apache-2.0","_id":"@alexandreamormino/plugin-entity-manager-react@1.0.0","maintainers":[{"name":"alexandreamormino","email":"xandeamormino@gmail.com"}],"homepage":"https://github.com/alexandreamormino/backstage-entity-manager#readme","bugs":{"url":"https://github.com/alexandreamormino/backstage-entity-manager/issues"},"dist":{"shasum":"8e8f7ca2ac9b118edba7d31a6b835e7287a60376","tarball":"https://registry.npmjs.org/@alexandreamormino/plugin-entity-manager-react/-/plugin-entity-manager-react-1.0.0.tgz","fileCount":9,"integrity":"sha512-6rrrSixl0HnetxEmo1lSbnl27gpbOvcNtftmd+RQl6gP3m34IlIuZqlyXyLGNAdLn/+Kb53EYMJjP8V45TpLMQ==","signatures":[{"sig":"MEYCIQDAsIaVZaWzemRyo/wL9dUH+/42B6tewI/pJ4otykjOrAIhAMMb8wXAGoa7p1179lRuLKxWKsf0q/ez3s7Ttx5SjjC5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90363},"main":"src/index.ts","types":"src/index.ts","scripts":{"lint":"backstage-cli package lint","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"alexandreamormino","email":"xandeamormino@gmail.com"},"backstage":{"role":"web-library"},"repository":{"url":"https://github.com/alexandreamormino/backstage-entity-manager.git","type":"git","directory":"plugins/entity-manager-react"},"description":"Reusable React components and hooks for Entity Manager plugins","directories":{},"sideEffects":false,"dependencies":{"ajv":"^8.12.0","yaml":"^2.8.0","react-use":"^17.2.4","ajv-formats":"^2.1.1","monaco-editor":"^0.52.2","@material-ui/core":"^4.9.13","@material-ui/icons":"^4.9.1","@monaco-editor/react":"^4.7.0","@backstage/catalog-model":"^1.7.5","@backstage/core-plugin-api":"^1.10.9","@backstage/plugin-permission-react":"^0.4.37","@alexandreamormino/plugin-entity-manager-common":"workspace:^"},"publishConfig":{"main":"dist/index.esm.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","@backstage/cli":"^0.33.1","@backstage/test-utils":"^1.7.10","@testing-library/react":"^14.0.0","@testing-library/jest-dom":"^6.0.0"},"peerDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","react-dom":"^16.13.1 || ^17.0.0 || ^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-entity-manager-react_1.0.0_1777134822130_0.5660759178490833","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alexandreamormino/plugin-entity-manager-react","version":"1.0.1","keywords":["backstage","backstage-plugin","entity-manager","react","components"],"author":{"name":"Alexandre Amormino"},"license":"Apache-2.0","_id":"@alexandreamormino/plugin-entity-manager-react@1.0.1","maintainers":[{"name":"alexandreamormino","email":"xandeamormino@gmail.com"}],"homepage":"https://github.com/alexandreamormino/backstage-entity-manager#readme","bugs":{"url":"https://github.com/alexandreamormino/backstage-entity-manager/issues"},"dist":{"shasum":"e9af7123d1565408b82743ab874545ede544461d","tarball":"https://registry.npmjs.org/@alexandreamormino/plugin-entity-manager-react/-/plugin-entity-manager-react-1.0.1.tgz","fileCount":9,"integrity":"sha512-SH+8CVnPz3siuP+Gr2VDln727u0axlrVhQMhf5k0FKCe1TRxjKlrM8/sBJXsFy3flTvUA0iYJBoiMNMxVtyZnQ==","signatures":[{"sig":"MEQCIEkGSXuVyKHqY7OHG4+lDUOdzkXGESaHkGP5dOf9HVomAiBGWgefCLXgAJ0aM2+w6BIqVapjbWl7GB9WMBOvwc7LfQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90358},"main":"src/index.ts","types":"src/index.ts","scripts":{"lint":"backstage-cli package lint","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"alexandreamormino","email":"xandeamormino@gmail.com"},"backstage":{"role":"web-library"},"repository":{"url":"https://github.com/alexandreamormino/backstage-entity-manager.git","type":"git","directory":"plugins/entity-manager-react"},"description":"Reusable React components and hooks for Entity Manager plugins","directories":{},"sideEffects":false,"dependencies":{"ajv":"^8.12.0","yaml":"^2.8.0","react-use":"^17.2.4","ajv-formats":"^2.1.1","monaco-editor":"^0.52.2","@material-ui/core":"^4.9.13","@material-ui/icons":"^4.9.1","@monaco-editor/react":"^4.7.0","@backstage/catalog-model":"^1.7.5","@backstage/core-plugin-api":"^1.10.9","@backstage/plugin-permission-react":"^0.4.37","@alexandreamormino/plugin-entity-manager-common":"^1.0.1"},"publishConfig":{"main":"dist/index.esm.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","@backstage/cli":"^0.33.1","@backstage/test-utils":"^1.7.10","@testing-library/react":"^14.0.0","@testing-library/jest-dom":"^6.0.0"},"peerDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","react-dom":"^16.13.1 || ^17.0.0 || ^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/plugin-entity-manager-react_1.0.1_1777136115563_0.22867786637054333","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@alexandreamormino/plugin-entity-manager-react","version":"1.0.2","keywords":["backstage","backstage-plugin","entity-manager","react","components"],"author":{"name":"Alexandre Amormino"},"license":"Apache-2.0","_id":"@alexandreamormino/plugin-entity-manager-react@1.0.2","maintainers":[{"name":"alexandreamormino","email":"xandeamormino@gmail.com"}],"homepage":"https://github.com/alexandreamormino/backstage-entity-manager#readme","bugs":{"url":"https://github.com/alexandreamormino/backstage-entity-manager/issues"},"dist":{"shasum":"50791bee44817191d24a5c499e67792b2b8d4a6b","tarball":"https://registry.npmjs.org/@alexandreamormino/plugin-entity-manager-react/-/plugin-entity-manager-react-1.0.2.tgz","fileCount":5,"integrity":"sha512-AZGzmSAPDcnUSw6ND3Gxc8n47XoVl+NOnAI5E7/NRyMP4AlomoyDaNY25Ej8iQC573pkxpFg3fhSp+gPIImwjQ==","signatures":[{"sig":"MEQCIDfGuTz8gAttrTsVs+UtUHRkG8I0vvWACTyYvVSMI9gKAiAUXkfM4PZsrLEjqBIYIiFk7bYV3YVe34Ln7lRwWZRteQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90078},"main":"src/index.ts","types":"src/index.ts","gitHead":"427368bedc12b7b7592c1dafb68eda4db966cd71","scripts":{"lint":"backstage-cli package lint","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"alexandreamormino","email":"xandeamormino@gmail.com"},"backstage":{"role":"web-library"},"repository":{"url":"git+https://github.com/alexandreamormino/backstage-entity-manager.git","type":"git","directory":"plugins/entity-manager-react"},"_npmVersion":"10.8.2","description":"Reusable React components and hooks for Entity Manager plugins","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"ajv":"^8.12.0","yaml":"^2.8.0","react-use":"^17.2.4","ajv-formats":"^2.1.1","monaco-editor":"^0.52.2","@material-ui/core":"^4.9.13","@material-ui/icons":"^4.9.1","@monaco-editor/react":"^4.7.0","@alexandreamormino/plugin-entity-manager-common":"workspace:^"},"publishConfig":{"main":"dist/index.esm.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","@backstage/cli":"^0.33.1","@backstage/test-utils":"^1.7.10","@testing-library/react":"^14.0.0","@testing-library/jest-dom":"^6.0.0"},"peerDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","react-dom":"^16.13.1 || ^17.0.0 || ^18.0.0","@backstage/catalog-model":"^1.7.5","@backstage/core-plugin-api":"^1.10.9","@backstage/plugin-permission-react":"^0.4.37"},"_npmOperationalInternal":{"tmp":"tmp/plugin-entity-manager-react_1.0.2_1782613760582_0.8131250592213097","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@alexandreamormino/plugin-entity-manager-react","version":"1.0.3","keywords":["backstage","backstage-plugin","entity-manager","react","components"],"author":{"name":"Alexandre Amormino"},"license":"Apache-2.0","_id":"@alexandreamormino/plugin-entity-manager-react@1.0.3","maintainers":[{"name":"alexandreamormino","email":"xandeamormino@gmail.com"}],"homepage":"https://github.com/alexandreamormino/backstage-entity-manager#readme","bugs":{"url":"https://github.com/alexandreamormino/backstage-entity-manager/issues"},"dist":{"shasum":"64a128188b785ee883bafd604c86860dc825b02a","tarball":"https://registry.npmjs.org/@alexandreamormino/plugin-entity-manager-react/-/plugin-entity-manager-react-1.0.3.tgz","fileCount":5,"integrity":"sha512-GplfL3lLLBMHvWMBm9tsg8IwCZvGTNk/q//sil1R8NROWGHNHCZdS4eHUcaJ7d2oCmRn7J6E4gBtXZ3RfQsdDQ==","signatures":[{"sig":"MEUCIG1LBOcaYIXLsx2rmSasp/3G803TNU3FGzUVMkF5T898AiEAvecymFj12OKKFMiTxoynuDGy9bq40lj8lht9s5uENpI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":90073},"main":"src/index.ts","types":"src/index.ts","gitHead":"427368bedc12b7b7592c1dafb68eda4db966cd71","scripts":{"lint":"backstage-cli package lint","test":"backstage-cli package test","build":"backstage-cli package build","clean":"backstage-cli package clean","start":"backstage-cli package start","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"_npmUser":{"name":"alexandreamormino","email":"xandeamormino@gmail.com"},"backstage":{"role":"web-library"},"repository":{"url":"git+https://github.com/alexandreamormino/backstage-entity-manager.git","type":"git","directory":"plugins/entity-manager-react"},"_npmVersion":"10.8.2","description":"Reusable React components and hooks for Entity Manager plugins","directories":{},"sideEffects":false,"_nodeVersion":"20.19.5","dependencies":{"ajv":"^8.12.0","yaml":"^2.8.0","react-use":"^17.2.4","ajv-formats":"^2.1.1","monaco-editor":"^0.52.2","@material-ui/core":"^4.9.13","@material-ui/icons":"^4.9.1","@monaco-editor/react":"^4.7.0","@alexandreamormino/plugin-entity-manager-common":"^1.0.0"},"publishConfig":{"main":"dist/index.esm.js","types":"dist/index.d.ts","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","@backstage/cli":"^0.33.1","@backstage/test-utils":"^1.7.10","@testing-library/react":"^14.0.0","@testing-library/jest-dom":"^6.0.0"},"peerDependencies":{"react":"^16.13.1 || ^17.0.0 || ^18.0.0","react-dom":"^16.13.1 || ^17.0.0 || ^18.0.0","@backstage/catalog-model":"^1.7.5","@backstage/core-plugin-api":"^1.10.9","@backstage/plugin-permission-react":"^0.4.37"},"_npmOperationalInternal":{"tmp":"tmp/plugin-entity-manager-react_1.0.3_1782664392847_0.3027495774133018","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@alexandreamormino/plugin-entity-manager-react","version":"1.0.4","description":"Reusable React components and hooks for Entity Manager plugins","license":"Apache-2.0","author":{"name":"Alexandre Amormino"},"homepage":"https://github.com/alexandreamormino/backstage-entity-manager#readme","repository":{"type":"git","url":"git+https://github.com/alexandreamormino/backstage-entity-manager.git","directory":"plugins/entity-manager-react"},"bugs":{"url":"https://github.com/alexandreamormino/backstage-entity-manager/issues"},"keywords":["backstage","backstage-plugin","entity-manager","react","components"],"main":"src/index.ts","types":"src/index.ts","publishConfig":{"access":"public","main":"dist/index.esm.js","types":"dist/index.d.ts"},"backstage":{"role":"web-library"},"sideEffects":false,"scripts":{"start":"backstage-cli package start","build":"backstage-cli package build","lint":"backstage-cli package lint","test":"backstage-cli package test","clean":"backstage-cli package clean","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"dependencies":{"@alexandreamormino/plugin-entity-manager-common":"^1.0.0","@material-ui/core":"^4.9.13","@material-ui/icons":"^4.9.1","@monaco-editor/react":"^4.7.0","ajv":"^8.12.0","ajv-formats":"^2.1.1","monaco-editor":"^0.52.2","react-use":"^17.2.4","yaml":"^2.8.0"},"peerDependencies":{"@backstage/catalog-model":"^1.7.5","@backstage/core-plugin-api":"^1.10.9","@backstage/plugin-permission-react":"^0.4.37","react":"^16.13.1 || ^17.0.0 || ^18.0.0","react-dom":"^16.13.1 || ^17.0.0 || ^18.0.0"},"devDependencies":{"@backstage/cli":"^0.33.1","@backstage/test-utils":"^1.7.10","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^14.0.0","react":"^16.13.1 || ^17.0.0 || ^18.0.0"},"_id":"@alexandreamormino/plugin-entity-manager-react@1.0.4","gitHead":"427368bedc12b7b7592c1dafb68eda4db966cd71","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-3VO/UNWl8ZNRyKJvDuwy2jY+Gx0DiszzoQ8vi/jA6NQA0e3hLtXSPS//xkFtQg/abyGAuO4aL1qz9XVX1rA91w==","shasum":"b08d776cd1304fb8037172c008d316700dd4ac57","tarball":"https://registry.npmjs.org/@alexandreamormino/plugin-entity-manager-react/-/plugin-entity-manager-react-1.0.4.tgz","fileCount":5,"unpackedSize":90073,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICF/ISKEYWe76QfKH8NtewhcrlWKAmG5tcTEEWAHBf7RAiAVehG1msWbnGDsNkwklPueZrAP0IH4q0O7VrvqwX0sQA=="}]},"_npmUser":{"name":"alexandreamormino","email":"xandeamormino@gmail.com"},"directories":{},"maintainers":[{"name":"alexandreamormino","email":"xandeamormino@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-entity-manager-react_1.0.4_1782671270368_0.07204019355858016"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-25T16:33:42.022Z","modified":"2026-06-28T18:27:50.595Z","1.0.0":"2026-04-25T16:33:42.263Z","1.0.1":"2026-04-25T16:55:15.717Z","1.0.2":"2026-06-28T02:29:20.725Z","1.0.3":"2026-06-28T16:33:12.979Z","1.0.4":"2026-06-28T18:27:50.485Z"},"bugs":{"url":"https://github.com/alexandreamormino/backstage-entity-manager/issues"},"author":{"name":"Alexandre Amormino"},"license":"Apache-2.0","homepage":"https://github.com/alexandreamormino/backstage-entity-manager#readme","keywords":["backstage","backstage-plugin","entity-manager","react","components"],"repository":{"type":"git","url":"git+https://github.com/alexandreamormino/backstage-entity-manager.git","directory":"plugins/entity-manager-react"},"description":"Reusable React components and hooks for Entity Manager plugins","maintainers":[{"name":"alexandreamormino","email":"xandeamormino@gmail.com"}],"readme":"# Entity Manager React Library\n\nReusable React components and hooks for building entity management UIs. Used internally by `@alexandreamormino/plugin-entity-manager` and available for custom integrations.\n\n## Installation\n\n```bash\nyarn add @alexandreamormino/plugin-entity-manager-react\n```\n\n## Components\n\n### `<EditEntityButton />`\n\nOpens a YAML editor dialog to edit an entity.\n\n```typescript\nimport { EditEntityButton } from '@alexandreamormino/plugin-entity-manager-react';\n\n<EditEntityButton\n  entityKind=\"Component\"\n  entityName=\"my-service\"\n  onLoadEntity={async () => {\n    const { entity } = await api.getEntity('Component', 'my-service');\n    return entity;\n  }}\n  onSave={async (entity) => {\n    await api.updateEntity('Component', 'my-service', entity);\n  }}\n  label=\"Edit YAML\"\n  disabled={!canEdit}\n  asIconButton  // renders as a circular IconButton to match Backstage card headers\n/>\n```\n\n### `<DeleteEntityButton />`\n\nShows a confirmation dialog before calling the delete callback.\n\n```typescript\nimport { DeleteEntityButton } from '@alexandreamormino/plugin-entity-manager-react';\n\n<DeleteEntityButton\n  entityKind=\"Component\"\n  entityName=\"my-service\"\n  onDelete={async () => {\n    await api.deleteEntity('Component', 'my-service');\n  }}\n  disabled={!canDelete}\n  asIconButton\n/>\n```\n\n### `<EntityYamlEditor />`\n\nMonaco editor configured for YAML with live schema validation and autocomplete. Fetches schemas from the backend automatically.\n\n```typescript\nimport { EntityYamlEditor } from '@alexandreamormino/plugin-entity-manager-react';\n\n<EntityYamlEditor\n  value={yaml}\n  onChange={(newYaml, isValid) => setYaml(newYaml)}\n  height={500}\n/>\n```\n\n### `<EntityEditorToolbar />`\n\nSave/Cancel toolbar, typically placed below `<EntityYamlEditor />`.\n\n```typescript\nimport { EntityEditorToolbar } from '@alexandreamormino/plugin-entity-manager-react';\n\n<EntityEditorToolbar\n  onSave={editor.save}\n  onCancel={handleCancel}\n  canSave={editor.canSave}\n  isLoading={editor.isLoading}\n/>\n```\n\n## Hooks\n\n### `useEntityEditor()`\n\nState machine for the full editor lifecycle: `idle → editing → saving → success | error`.\n\n```typescript\nimport { useEntityEditor } from '@alexandreamormino/plugin-entity-manager-react';\n\nconst editor = useEntityEditor({\n  onSave: async (entity) => {\n    await api.createEntity(entity);\n  },\n});\n```\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `editor.yamlContent` | `string` | Current YAML string |\n| `editor.isValid` | `boolean` | Whether the YAML is currently valid |\n| `editor.error` | `string \\| null` | Last error message |\n| `editor.canSave` | `boolean` | `true` when valid, dirty, and not already saving |\n| `editor.isLoading` | `boolean` | `true` while loading or saving |\n| `editor.handleYamlChange(yaml, isValid)` | `fn` | Call from `<EntityYamlEditor onChange>` |\n| `editor.loadEntity(entity)` | `fn` | Load an `Entity` object into the editor |\n| `editor.save()` | `fn` | Parse YAML and call `onSave` |\n| `editor.reset()` | `fn` | Reset to initial state |\n\n## Development\n\n```bash\nyarn workspace @alexandreamormino/plugin-entity-manager-react test\nyarn workspace @alexandreamormino/plugin-entity-manager-react lint\n```\n","readmeFilename":"README.md"}