{"id":25895540,"url":"https://github.com/diamondlightsource/cs-web-lib","last_synced_at":"2025-06-23T09:34:12.962Z","repository":{"id":37818506,"uuid":"449701699","full_name":"DiamondLightSource/cs-web-lib","owner":"DiamondLightSource","description":"Library form of control system web UI prototype","archived":false,"fork":false,"pushed_at":"2025-05-30T10:58:02.000Z","size":1884,"stargazers_count":2,"open_issues_count":10,"forks_count":1,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-13T13:03:04.888Z","etag":null,"topics":["from-dls-controls"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiamondLightSource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-19T13:25:18.000Z","updated_at":"2025-05-13T13:09:12.000Z","dependencies_parsed_at":"2023-11-10T12:51:17.036Z","dependency_job_id":"d52c7fe8-df4e-4467-b7e0-1ba1dab5c024","html_url":"https://github.com/DiamondLightSource/cs-web-lib","commit_stats":{"total_commits":77,"total_committers":5,"mean_commits":15.4,"dds":"0.49350649350649356","last_synced_commit":"f678a429eedbb314594c0515378424aac6886e83"},"previous_names":["diamondlightsource/cs-web-lib","dls-controls/cs-web-lib"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/DiamondLightSource/cs-web-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fcs-web-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fcs-web-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fcs-web-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fcs-web-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiamondLightSource","download_url":"https://codeload.github.com/DiamondLightSource/cs-web-lib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamondLightSource%2Fcs-web-lib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261453167,"owners_count":23160457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["from-dls-controls"],"created_at":"2025-03-02T22:31:52.421Z","updated_at":"2025-06-23T09:34:07.933Z","avatar_url":"https://github.com/DiamondLightSource.png","language":"TypeScript","readme":"# cs-web-lib\nAn npm library for Control Systems web applications\n\n## Installation\n\n:warning: cs-web-lib is **NOT** compatible with projects using create-react-app. Vite should be used instead.\n\nInstall via npm:\n    `npm install @diamondlightsource/cs-web-lib`\n\nWe use React 18. cs-web-lib requires several environment variables to be set in order to connect to PVWS and fetch PV value updates.\n\n  - `VITE_PVWS_SOCKET` - point to the server hosting the PVWS application.\n  - `VITE_PVWS_SSL` - set this to false if running a local PVWS instance e.g. localhost:8080 without SSL, otherwise true\n\nThese should be provided in a .env file at the root of your project.\n\nInside your application, create a screen by passing a .opi, .bob or .json file to the EmbeddedDisplay widget. \n\n## Legacy Installation\n\nPVWS was introduced in version 0.4.0. Versions prior to this used [Coniql](https://github.com/DiamondLightSource/coniql), and the .env variables used were `VITE_CONIQL_SOCKET` and `VITE_CONIQL_SSL`.\n\nReact 17 was supported until version  \u003c 0.5.0.\n\n## Features \n\ncs-web-lib does not contain the full suite of features and widgets provided by Phoebus. The tables below describes which features are currently included, are planned to be added, and which will not be added.\n\n#### Widgets\n\n| Category          | Widget            | Included | Reason              |\n| :---------------- | :---------------: | :------: | :-----------------: |\n| Graphics          | Arc               | \u0026#9989;  |                     |\n|                   | Ellipse           | \u0026#9989;  |                     |\n|                   | Label             | \u0026#9989;  |                     |\n|                   | Picture           | \u0026#9989;  |                     |\n|                   | Polygon           | \u0026#9989;  |                     |\n|                   | Polyline          | \u0026#9989;  |                     |\n|                   | Rectangle         | \u0026#9989;  |                     |\n| Monitors          | Byte Monitor      | \u0026#9989;  |                     |\n|                   | LED               | \u0026#9989;  |                     |\n|                   | Multi State LED   | \u0026#10060; | Add later           |\n|                   | Meter             | \u0026#10060; | Add later (date unknown, low priority) |\n|                   | Progress Bar      | \u0026#9989;  |                     |\n|                   | Symbol            | \u0026#9989;  |                     |\n|                   | Table             | \u0026#9989;  |                     |\n|                   | Tank              | \u0026#10060; | Add later (date unknown, low priority) |\n|                   | Text Symbol       | \u0026#10060; | Add later           |\n|                   | Text Update       | \u0026#9989;  |                     | \n|                   | Thermometer       | \u0026#10060; | Add later (date unknown, low priority) |\n| Controls          | Action Button     | \u0026#9989;  |                     |\n|                   | Boolean Button    | \u0026#9989;  |                     |\n|                   | Check Box         | \u0026#9989;  |                     |\n|                   | Choice Button     | \u0026#9989;  |                     |\n|                   | Combo Box         | \u0026#9989;  |                     |\n|                   | File Selector     | \u0026#10060; | Add later           |\n|                   | Radio Button      | \u0026#9989;  |                     |\n|                   | Scaled Slider     | \u0026#9989;  |                     |\n|                   | Scrollbar         | \u0026#10060; | Add later           |\n|                   | Slide Button      | \u0026#10060; | Add later (date unknown, low priority) |\n|                   | Spinner           | \u0026#10060; | Add later (date unknown, low priority) |\n|                   | Text Entry        | \u0026#9989;  |                     |\n|                   | Thumbwheel        | \u0026#10060; | Add later (date unknown, low priority) |\n| Plots             | Data Browser      | \u0026#10060; | Add later (date unknown, low priority) |\n|                   | Image             | \u0026#10060; | Unknown             |\n|                   | Stripchart        | \u0026#10060; | Unknown             |\n|                   | XY Plot           | \u0026#9989;  |                     |\n| Structure         | Array             | \u0026#10060; | Add later           |\n|                   | Embedded Display  | \u0026#9989;  |                     |\n|                   | Group             | \u0026#9989;  |                     |\n|                   | Navigation Tabs   | \u0026#9989;  |                     |\n|                   | Tabs              | \u0026#9989;  |                     |\n|                   | Template/Instance | \u0026#10060; | Unknown             |\n\n#### Features\n\n| Widget      | Included | Reason                  |\n| :---------: | :------: | :---------------------: |\n| Actions     | \u0026#9989;  | Some actions may not be supported. Please open an issue for any issues noticed. |\n| Formulas    | \u0026#10060; | `sim://` PVs are supported, but not `eq://`. This will be added in future. |\n| Rules       | \u0026#9989;  | Partial support. x, y and Font rules are currently not supported. This will be added in future. Please open an issue for any issues noticed.|\n| Scripts     | \u0026#10060; | The use of scripting is recommended against in general by CS Studio Developers. Formulae should be able to handle most use cases.  |\n\n## Development\nTo develop on the library code first clone this repo, install the npm package dependencies and then make changes:\n\n    cd cs-web-lib/\n    npm install\n\n### Pushing changes\nBefore pushing any changes check that the update code conforms to the formatter checks and that the unit tests all pass:\n\n    npm run all-checks\n    npm run tests\n    \nIf making changes to the build process, check that the package is built correctly with:\n\n    npm run rollup\n    npm pack\n\nYou can then install the generated tar.gz file into another project and check that all functionality expected is there.\n\n### Publishing to NPM (PREFERRED METHOD)\nA GitHub workflow has been setup to automatically publish a new package version to the NPM registry on the push of a new tag. This should be used as the preferred method of release a new package.\n1. Update/increase the package version in package.json (see https://docs.npmjs.com/cli/v8/commands/npm-version for further details on this npm command):\n\n        npm version \u003cmajor|minor|patch\u003e -no-git-tag-version\n2. Commit and push this to GitHub:\n\n        git add package.json\n        git commit -m \"...\" package.json\n        git push \u003cremote\u003e \u003cbranch\u003e\n3. Create a new tag and push to GitHub\n\n        git tag -a vX.XX.xx -m \"...\"\n        git push \u003cremote\u003e vX.XX.xx \nThis will trigger a job on GitHub to publish a new version of the cs-web-lib to NPM. Check that this job passes.\n\n### Publishing to NPM locally\nTo publish a new version of the @diamondlightsource/cs-web-lib package you must first have an npm account and be a member of the DiamondLightSource organisation. Then:\n1. Update the package version in package.json (follow the major.minor.patch versioning terminology).\n2. Run the rollup command to package the library: `npm run rollup`.\n3. Login to your npm account: `npm adduser`\n4. Publish as a public-scoped packages: `npm publish --access public --registry=https://registry.npmjs.org`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiamondlightsource%2Fcs-web-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiamondlightsource%2Fcs-web-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiamondlightsource%2Fcs-web-lib/lists"}