@adcops/autocore-react 3.0.0
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.
- package/LICENSE +59 -0
- package/additional-docs/ButtonApiSpecs.md +48 -0
- package/additional-docs/GlobalEventEmitter.md +244 -0
- package/additional-docs/general_recommendations.md +22 -0
- package/dist/components/DPad.css +522 -0
- package/dist/components/DPad.d.ts +34 -0
- package/dist/components/DPad.js +1 -0
- package/dist/components/Indicator.d.ts +81 -0
- package/dist/components/Indicator.js +1 -0
- package/dist/components/IndicatorButton.d.ts +137 -0
- package/dist/components/IndicatorButton.js +1 -0
- package/dist/components/IndicatorColor.d.ts +26 -0
- package/dist/components/IndicatorColor.js +1 -0
- package/dist/components/Osk.d.ts +14 -0
- package/dist/components/Osk.js +1 -0
- package/dist/components/OskDialog.d.ts +33 -0
- package/dist/components/OskDialog.js +1 -0
- package/dist/components/ValueDisplay.d.ts +99 -0
- package/dist/components/ValueDisplay.js +1 -0
- package/dist/components/osk.css +123 -0
- package/dist/core/EventEmitterContext.d.ts +223 -0
- package/dist/core/EventEmitterContext.js +1 -0
- package/dist/core/MaskPatterns.d.ts +71 -0
- package/dist/core/MaskPatterns.js +1 -0
- package/dist/core/NumerableTypes.d.ts +58 -0
- package/dist/core/NumerableTypes.js +1 -0
- package/dist/core/PositionContext.d.ts +38 -0
- package/dist/core/PositionContext.js +1 -0
- package/dist/core/UniqueId.d.ts +16 -0
- package/dist/core/UniqueId.js +1 -0
- package/dist/core/ValueSimulator.d.ts +71 -0
- package/dist/core/ValueSimulator.js +1 -0
- package/dist/core/hoc.d.ts +31 -0
- package/dist/core/hoc.js +1 -0
- package/dist/hub/HubBase.d.ts +169 -0
- package/dist/hub/HubBase.js +1 -0
- package/dist/hub/HubSimulate.d.ts +20 -0
- package/dist/hub/HubSimulate.js +1 -0
- package/dist/hub/HubSocketIo.d.ts +101 -0
- package/dist/hub/HubSocketIo.js +1 -0
- package/dist/hub/HubTauri.d.ts +86 -0
- package/dist/hub/HubTauri.js +1 -0
- package/dist/hub/index.d.ts +13 -0
- package/dist/hub/index.js +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +106 -0
- package/docs/assets/icons.js +15 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +59 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1414 -0
- package/docs/classes/components_Indicator.Indicator.html +105 -0
- package/docs/classes/components_IndicatorButton.IndicatorButton.html +119 -0
- package/docs/classes/components_OskDialog.OskDialog.html +117 -0
- package/docs/classes/components_ValueDisplay.ValueDisplay.html +104 -0
- package/docs/classes/core_ValueSimulator.ValueSimulator.html +41 -0
- package/docs/classes/hub_HubBase.HubBase.html +67 -0
- package/docs/classes/hub_HubSimulate.HubSimulate.html +72 -0
- package/docs/classes/hub_HubSocketIo.HubSocketIo.html +80 -0
- package/docs/classes/hub_HubTauri.HubTauri.html +80 -0
- package/docs/enums/components_DPad.VcJoyPadAction.html +10 -0
- package/docs/enums/components_DPad.VcJoyPadButtonId.html +7 -0
- package/docs/enums/components_IndicatorButton.ActionMode.html +6 -0
- package/docs/enums/components_IndicatorColor.IndicatorColor.html +13 -0
- package/docs/functions/components_DPad.VcDPad.html +5 -0
- package/docs/functions/components_Osk.Osk.html +5 -0
- package/docs/functions/core_EventEmitterContext.EventEmitterProvider.html +8 -0
- package/docs/functions/core_UniqueId.UniqueId.html +4 -0
- package/docs/functions/core_hoc.hocAddSubscription.html +6 -0
- package/docs/functions/hub.createHub.html +3 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +69 -0
- package/docs/interfaces/components_IndicatorButton.IndicatorButtonProps.html +635 -0
- package/docs/interfaces/components_IndicatorButton.IndicatorButtonState.html +10 -0
- package/docs/interfaces/core_DimensionsContext.IDimensionsContext.html +4 -0
- package/docs/interfaces/core_EventEmitterContext.Action.html +5 -0
- package/docs/interfaces/core_EventEmitterContext.EventEmitterContextType.html +18 -0
- package/docs/interfaces/core_EventEmitterContext.State.html +8 -0
- package/docs/interfaces/core_EventEmitterContext.Subscription.html +6 -0
- package/docs/modules/components_DPad.html +5 -0
- package/docs/modules/components_Indicator.html +4 -0
- package/docs/modules/components_IndicatorButton.html +7 -0
- package/docs/modules/components_IndicatorColor.html +2 -0
- package/docs/modules/components_Osk.html +3 -0
- package/docs/modules/components_OskDialog.html +3 -0
- package/docs/modules/components_ValueDisplay.html +3 -0
- package/docs/modules/core_DimensionsContext.html +4 -0
- package/docs/modules/core_EventEmitterContext.html +11 -0
- package/docs/modules/core_InputPatterns.html +2 -0
- package/docs/modules/core_NumerableTypes.html +2 -0
- package/docs/modules/core_UniqueId.html +2 -0
- package/docs/modules/core_ValueSimulator.html +3 -0
- package/docs/modules/core_hoc.html +3 -0
- package/docs/modules/hub.html +6 -0
- package/docs/modules/hub_HubBase.html +3 -0
- package/docs/modules/hub_HubSimulate.html +3 -0
- package/docs/modules/hub_HubSocketIo.html +3 -0
- package/docs/modules/hub_HubTauri.html +2 -0
- package/docs/types/core_EventEmitterContext.EmitterDispatchFunction.html +1 -0
- package/docs/types/core_EventEmitterContext.EmitterSubscribeFunction.html +1 -0
- package/docs/types/core_EventEmitterContext.EmitterUnsubscribeFunction.html +1 -0
- package/docs/types/core_NumerableTypes.NumerableFormatOptions.html +1 -0
- package/docs/types/core_hoc.HocAddSubscriptionProps.html +4 -0
- package/docs/variables/core_DimensionsContext.DimensionsContext.html +1 -0
- package/docs/variables/core_EventEmitterContext.EventEmitterContext.html +5 -0
- package/docs/variables/core_InputPatterns.InputPatterns.html +2 -0
- package/package.json +79 -0
- package/readme.md +140 -0
- package/src/components/DPad.css +522 -0
- package/src/components/DPad.tsx +94 -0
- package/src/components/Indicator.tsx +243 -0
- package/src/components/IndicatorButton.tsx +306 -0
- package/src/components/IndicatorColor.ts +36 -0
- package/src/components/Osk.tsx +193 -0
- package/src/components/OskDialog.tsx +165 -0
- package/src/components/ValueDisplay.tsx +181 -0
- package/src/components/osk.css +123 -0
- package/src/core/EventEmitterContext.tsx +394 -0
- package/src/core/MaskPatterns.ts +82 -0
- package/src/core/NumerableTypes.ts +81 -0
- package/src/core/PositionContext.ts +60 -0
- package/src/core/UniqueId.ts +41 -0
- package/src/core/ValueSimulator.ts +167 -0
- package/src/core/hoc.tsx +65 -0
- package/src/hub/HubBase.ts +293 -0
- package/src/hub/HubSimulate.ts +47 -0
- package/src/hub/HubSocketIo.ts +166 -0
- package/src/hub/HubTauri.ts +145 -0
- package/src/hub/index.ts +41 -0
- package/terser.config.cjs +25 -0
- package/todo.md +18 -0
- package/tools/copy-distribution-files.cjs +73 -0
- package/tools/minify.cjs +56 -0
- package/tsconfig.json +34 -0
- package/typedoc.json +13 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>EventEmitterContext | autocore-react - v3.0.0</title><meta name="description" content="Documentation for autocore-react"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">autocore-react - v3.0.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">autocore-react</a></li><li><a href="../modules/core_EventEmitterContext.html">core/EventEmitterContext</a></li><li><a href="core_EventEmitterContext.EventEmitterContext.html">EventEmitterContext</a></li></ul><h1>Variable EventEmitterContext<code class="tsd-tag ts-flagConst">Const</code> </h1></div><div class="tsd-signature"><span class="tsd-kind-variable">Event<wbr/>Emitter<wbr/>Context</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Context</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/core_EventEmitterContext.EventEmitterContextType.html" class="tsd-signature-type tsd-kind-interface">EventEmitterContextType</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-comment tsd-typography"><p>A global context for managing event emission and subscription.</p>
|
|
2
|
+
<p>Provides a mechanism for decoupled data sharing between components
|
|
3
|
+
using a publish-subscribe pattern.
|
|
4
|
+
For more information, see <a href="../additional-docs/GlobalEventEmitter.md">Additional Documentation</a>.</p>
|
|
5
|
+
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in src/core/EventEmitterContext.tsx:106</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>autocore-react - v3.0.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>InputPatterns | autocore-react - v3.0.0</title><meta name="description" content="Documentation for autocore-react"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">autocore-react - v3.0.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">autocore-react</a></li><li><a href="../modules/core_InputPatterns.html">core/InputPatterns</a></li><li><a href="core_InputPatterns.InputPatterns.html">InputPatterns</a></li></ul><h1>Variable InputPatterns<code class="tsd-tag ts-flagConst">Const</code> </h1></div><div class="tsd-signature"><span class="tsd-kind-variable">Input<wbr/>Patterns</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">Integer</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">IntegerPositive</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">RealNumber</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">RealNumberPositive</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-comment tsd-typography"><p>Common input patterns for filtering input.</p>
|
|
2
|
+
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="tsd-kind-property">Integer</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="tsd-kind-property">Integer<wbr/>Positive</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="tsd-kind-property">Real<wbr/>Number</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span></h5></li><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagReadonly">Readonly</code> <span class="tsd-kind-property">Real<wbr/>Number<wbr/>Positive</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">RegExp</span></h5></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in src/core/InputPatterns.ts:10</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>autocore-react - v3.0.0</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><div class="tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div></body></html>
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adcops/autocore-react",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "A React component library for industrial user interfaces.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"clean": "rimraf ./dist",
|
|
9
|
+
"minify": "node ./tools/minify.cjs",
|
|
10
|
+
"tsc": "tsc",
|
|
11
|
+
"generate-docs": "typedoc",
|
|
12
|
+
"build": "npm run clean && tsc && node ./tools/copy-distribution-files.cjs && npm run minify",
|
|
13
|
+
"prestart": "tsc",
|
|
14
|
+
"publish-package": "npm run build && npm version patch && npm run generate-docs && npm publish",
|
|
15
|
+
"release:patch": "npm version patch && npm publish",
|
|
16
|
+
"release:minor": "npm version minor && npm publish",
|
|
17
|
+
"release:major": "npm version major && npm publish"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://adc360.visualstudio.com/AutoCore-React/_git/AutoCore-React"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"react",
|
|
25
|
+
"autocore",
|
|
26
|
+
"component",
|
|
27
|
+
"dispatcher"
|
|
28
|
+
],
|
|
29
|
+
"author": "Your Name",
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://automateddesign.com"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://automateddesign.com",
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@types/react": "^17.0.0 || ^18.0.0",
|
|
37
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
38
|
+
"react-dom": "^18.2.0"
|
|
39
|
+
},
|
|
40
|
+
"peerDependenciesMeta": {
|
|
41
|
+
"@types/react": {
|
|
42
|
+
"optional": true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@tauri-apps/api": "^1.5.3",
|
|
47
|
+
"@types/react-dom": "^18.2.18",
|
|
48
|
+
"@types/react-transition-group": "^4.4.1",
|
|
49
|
+
"clsx": "^2.1.0",
|
|
50
|
+
"numerable": "^0.3.15",
|
|
51
|
+
"primereact": "^10.3.1",
|
|
52
|
+
"react-simple-keyboard": "^3.7.65",
|
|
53
|
+
"react-transition-group": "^4.4.1",
|
|
54
|
+
"socket.io-client": "^4.7.2",
|
|
55
|
+
"use-fit-text": "^2.4.0"
|
|
56
|
+
},
|
|
57
|
+
"sideEffects": [
|
|
58
|
+
"**/*.css"
|
|
59
|
+
],
|
|
60
|
+
"engines": {
|
|
61
|
+
"node": ">=20.0.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"rimraf": "^5.0.5",
|
|
65
|
+
"terser": "^5.26.0",
|
|
66
|
+
"typedoc": "^0.25.11",
|
|
67
|
+
"typescript": "^5.0.2"
|
|
68
|
+
},
|
|
69
|
+
"exports": {
|
|
70
|
+
"./core/*": {
|
|
71
|
+
"import": "./dist/core/*",
|
|
72
|
+
"types": "./dist/core/*.d.js"
|
|
73
|
+
},
|
|
74
|
+
"./components/*": {
|
|
75
|
+
"import": "./dist/components/*",
|
|
76
|
+
"types": "./dist/components/*.d.js"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# autocore-react
|
|
2
|
+
|
|
3
|
+
React components for HTML5 user interfaces that are easy to integrate into any project. autocore-react
|
|
4
|
+
targets both the browser and Tauri. The primary focus is HMI applications for machine control, as well
|
|
5
|
+
as tasks common to general desktop applications.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
autocore is ADC's collection of Industry 4.0 (IIOT) libraries. autocore-react focuses on user interface
|
|
10
|
+
development.
|
|
11
|
+
|
|
12
|
+
autocore-react is the third version of this library, and is a simplification of previous versions. Instead
|
|
13
|
+
of relying on dozens of custom controls for integration into HMI applications, autocore-react now leans on
|
|
14
|
+
PrimeReact to supply almost all but the most obscure controls, and adds a wrapper to integrate
|
|
15
|
+
signals from the backend to the common controls. This allows autocore-react to focus on the additional
|
|
16
|
+
features needed for machine-control user interfaces, while PrimeReact excels at development of components.
|
|
17
|
+
|
|
18
|
+
## Hub
|
|
19
|
+
|
|
20
|
+
Whether running in a browser or within a Tauri application, the user interface of a web app needs to
|
|
21
|
+
communicate with a backed. The Hub abstracts this by defining a common base class, then automatically
|
|
22
|
+
selecting the proper pipeline based upon the environment. If the Tauri environment is detected, HubTauri
|
|
23
|
+
is loaded. For a browser instance, a socket.io connection is used. When running in a development environment,
|
|
24
|
+
a simulated backend that simply echoes responses is used.
|
|
25
|
+
|
|
26
|
+
When writing the main application or developing components, you only need to focus on the Hub class. Because the
|
|
27
|
+
backend is selected automatically, the web application does not need to be modified for each individual environment.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
Install from NPM.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
npm install --save @adcops/autocore-react
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Development
|
|
39
|
+
|
|
40
|
+
We typically have an external Tauri project designed to import and test the autocore-react library. We find that
|
|
41
|
+
some issues, particularly Singleton classes and certain resources, may not occur when components are tested
|
|
42
|
+
within the same project.
|
|
43
|
+
|
|
44
|
+
There are multiple ways to test a "pre-release" or "staging" version of the library before publishing the official version.
|
|
45
|
+
|
|
46
|
+
### Use npm tags to publish a "staging" version
|
|
47
|
+
|
|
48
|
+
Use this for a final "pre-flight check" or when testing a serious release candidate. For development with frequent changes, use 'npm link.'
|
|
49
|
+
|
|
50
|
+
When you publish a package to npm, it automatically assigns the latest tag to the published version. Most users will install the latest version when they omit a tag/version in the npm install command. To publish a "staging" or pre-release version without affecting users of the latest version, you can use a custom tag, such as next, beta, or staging.
|
|
51
|
+
|
|
52
|
+
To publish a "staging" version of your package, you can run:
|
|
53
|
+
```
|
|
54
|
+
npm publish --tag staging --access=public
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Note that we have to specify that the access is public because the tag makes this "scoped," which are private by default.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
In the test project, simply install the 'staging' tag version.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
npm install @adcops/autocore-react@staging
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### npm link
|
|
68
|
+
|
|
69
|
+
In the root of the autocore-react project, initiate npm link:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
npm link
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Now, the autocore-react project is being served locally to your machine.
|
|
76
|
+
|
|
77
|
+
To test it in an external project, navigate to the root directory of that project.
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
npm link @adcops/autocore-react
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Whatever current version of autocore-react will be removed and replaced with links to the
|
|
84
|
+
project directory on your machine. The nice thing is that, as you make machines in the
|
|
85
|
+
autocore-react project, those changes are reflected immediately in the external project.
|
|
86
|
+
The downside is that not every file can be served by npm link in this way. For example,
|
|
87
|
+
were there font files and icon resources served from autocore-react, the wouldn't load
|
|
88
|
+
into the external project because of CORS limitation. Depending on what you're testing,
|
|
89
|
+
this may not matter.
|
|
90
|
+
|
|
91
|
+
When done testing, in the external project we simply unlink.
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
npm unlink @adcops/autocore-react
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
A final consequence is that, were autocore-react installed before using npm link, it will
|
|
98
|
+
no longer be installed once unlink. You will once again need to install the latest
|
|
99
|
+
published version, if so desired.
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
npm install --save @adcops/autocore-react
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Documentation
|
|
106
|
+
|
|
107
|
+
To generate documentation:
|
|
108
|
+
```
|
|
109
|
+
npm run generate-docs
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Publishing the package will also regenerate the documentation.
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## Additional Documentation
|
|
117
|
+
|
|
118
|
+
Beyond doc-comments in the code, we provide additional documentation in the additional-docs folder.
|
|
119
|
+
|
|
120
|
+
- Button API Specs: [Button API Specs](../additional-docs/ButtonApiSpecs.md).
|
|
121
|
+
- Global Event Emitter: [Global Event Emitter](../additional-docs/GlobalEventEmitter.md).
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
## Acknowledgements
|
|
125
|
+
|
|
126
|
+
Beyond the obvious, inherent React libraries, autocore-react greatly appreciates the works of
|
|
127
|
+
these additional libraries.
|
|
128
|
+
|
|
129
|
+
- PrimeReact and PrimeIcons
|
|
130
|
+
- numerable
|
|
131
|
+
- Simple Keyboard (https://github.com/hodgef/simple-keyboard)
|
|
132
|
+
- - We customize Simple Keyboard for cleaner physical keyboard integration.
|
|
133
|
+
|
|
134
|
+
## Copyright
|
|
135
|
+
|
|
136
|
+
(C) Copyright 2021-2024 Automated Design Corp. All Rights Reserved.
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
Licensed for use on ADC equipment or within ADC software.
|