Skip to content

Commit

Permalink
Merge pull request #10 from forman/0.1.0-alpha.3
Browse files Browse the repository at this point in the history
0.1.0-alpha.3
  • Loading branch information
forman authored Nov 13, 2023
2 parents c3dad12 + bb3c245 commit c849cea
Show file tree
Hide file tree
Showing 164 changed files with 547 additions and 534 deletions.
51 changes: 30 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ import JavaScript modules - _extensions_ - that add new features and
capabilities to the application.

ExtendIt.js has been designed to efficiently work with
[React](https://react.dev/), for this purpose it provides a number of
reactive [hooks](). However, the library can be used without
[React](https://react.dev/), for this purpose it provides a number of reactive
[React hooks](https://react.dev/reference/react/hooks).
However, the library can be used without
React too. It's only a peer dependency.

# Installation
Expand Down Expand Up @@ -104,16 +105,24 @@ export function activate(ctx: ExtensionContext) {
```

The host application registers extensions using the
[`readExtensionManifest`](https://forman.github.io/extendit/functions/core.readExtensionManifest.html)
and
[`registerExtension`](https://forman.github.io/extendit/functions/core.registerExtension.html)
function:
functions:

```ts
import { registerExtension } from "@forman2/extendit";
import { readExtensionManifest, registerExtension } from "@forman2/extendit";

export function initApp() {
const extensionsUrls = getAppExtensionUrls();
extensionUrls.forEach((extensionUrl) => {
void registerExtension(extensionUrl);
readExtensionManifest(extensionUrl)
.then((manifest) =>
registerExtension(manifest)
)
.catch((error) => {
// ...
});
});
}

Expand Down Expand Up @@ -277,7 +286,7 @@ async function getCommand(commandId: string): Promise<Command> {
```

There is also a corresponding React hook
[`useLoadCodeContribution`](https://forman.github.io/extendit/functions/react.useCodeContributions.html)
[`useLoadCodeContribution`](https://forman.github.io/extendit/functions/react.useLoadCodeContribution.html)
that is used for implementing React components:

```tsx
Expand Down Expand Up @@ -306,21 +315,6 @@ export default function CommandButton({ command }: CommandButtonProps) {
We currently only have this file and the
[API docs](https://forman.github.io/extendit/), sorry.

# Acknowledgements

ExtendIt.js currently uses the awesome libraries

* [Ajv](https://ajv.js.org/) for JSON validation (may be turned into peer dependency later)
* [memoize-one](https://github.com/alexreardon/memoize-one) for implementing state selector functions
* [zustand](https://github.com/pmndrs/zustand) for state management

# License

Copyright © 2023 Norman Fomferra

Permissions are hereby granted under the terms of the MIT License:
https://opensource.org/licenses/MIT.

# Development

## Source Code
Expand Down Expand Up @@ -377,3 +371,18 @@ stick to the following order:
If we also have resource dependencies (`*.css`, `*.json`, `*.svg`, ...),
we first import TypeScript source dependencies, then separated by a
newline, insert resource dependencies in the same order as source dependencies.

# Acknowledgements

ExtendIt.js currently uses the awesome libraries

* [Ajv](https://ajv.js.org/) for JSON validation (may be turned into peer dependency later)
* [memoize-one](https://github.com/alexreardon/memoize-one) for implementing state selector functions
* [zustand](https://github.com/pmndrs/zustand) for state management

# License

Copyright © 2023 Norman Fomferra

Permissions are hereby granted under the terms of the MIT License:
https://opensource.org/licenses/MIT.
4 changes: 2 additions & 2 deletions docs/classes/util.AssertionError.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">AssertionError</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/assert.ts#L10">src/framework/util/assert.ts:10</a></li></ul></aside>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/assert.ts#L10">src/framework/util/assert.ts:10</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -156,7 +156,7 @@ <h5><span class="tsd-kind-parameter">message</span>: <span class="tsd-signature-
<h4 class="tsd-returns-title">Returns <a href="util.AssertionError.html" class="tsd-signature-type tsd-kind-class">AssertionError</a></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/assert.ts#L15">src/framework/util/assert.ts:15</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/assert.ts#L15">src/framework/util/assert.ts:15</a></li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
10 changes: 5 additions & 5 deletions docs/classes/util.Disposable.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h4>Implements</h4>
<ul class="tsd-hierarchy">
<li><a href="../interfaces/util.DisposableLike.html" class="tsd-signature-type tsd-kind-interface">DisposableLike</a></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/disposable.ts#L21">src/framework/util/disposable.ts:21</a></li></ul></aside>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/disposable.ts#L21">src/framework/util/disposable.ts:21</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -81,7 +81,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</spa
<h4 class="tsd-returns-title">Returns <a href="util.Disposable.html" class="tsd-signature-type tsd-kind-class">Disposable</a></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/disposable.ts#L50">src/framework/util/disposable.ts:50</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/disposable.ts#L50">src/framework/util/disposable.ts:50</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-is-private"><a id="_onDispose" class="tsd-anchor"></a>
Expand All @@ -96,7 +96,7 @@ <h4>Type declaration</h4>
<li class="tsd-description">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/disposable.ts#L40">src/framework/util/disposable.ts:40</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/disposable.ts#L40">src/framework/util/disposable.ts:40</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member"><a id="dispose" class="tsd-anchor"></a>
Expand All @@ -110,7 +110,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</spa
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/util.DisposableLike.html">DisposableLike</a>.<a href="../interfaces/util.DisposableLike.html#dispose">dispose</a></p>
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/disposable.ts#L57">src/framework/util/disposable.ts:57</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/disposable.ts#L57">src/framework/util/disposable.ts:57</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="from" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from</span><a href="#from" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand All @@ -135,7 +135,7 @@ <h4 class="tsd-returns-title">Returns <a href="util.Disposable.html" class="tsd-

<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/disposable.ts#L32">src/framework/util/disposable.ts:32</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/disposable.ts#L32">src/framework/util/disposable.ts:32</a></li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
6 changes: 3 additions & 3 deletions docs/classes/util.JsonValidationError.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">JsonValidationError</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/json/validate-json.ts#L15">src/framework/util/json/validate-json.ts:15</a></li></ul></aside>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/json/validate-json.ts#L15">src/framework/util/json/validate-json.ts:15</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -67,14 +67,14 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-
<h4 class="tsd-returns-title">Returns <a href="util.JsonValidationError.html" class="tsd-signature-type tsd-kind-class">JsonValidationError</a></h4><aside class="tsd-sources">
<p>Overrides Error.constructor</p>
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/json/validate-json.ts#L16">src/framework/util/json/validate-json.ts:16</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/json/validate-json.ts#L16">src/framework/util/json/validate-json.ts:16</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member"><a id="errors" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>errors</span><a href="#errors" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">errors</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/json/validate-json.ts#L18">src/framework/util/json/validate-json.ts:18</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/json/validate-json.ts#L18">src/framework/util/json/validate-json.ts:18</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="message" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>message</span><a href="#message" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
Expand Down
12 changes: 6 additions & 6 deletions docs/classes/util.expr.Assign.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Assign</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L208">src/framework/util/expr/node.ts:208</a></li></ul></aside>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L208">src/framework/util/expr/node.ts:208</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -67,19 +67,19 @@ <h5><span class="tsd-kind-parameter">value</span>: <a href="util.expr.Node.html"
<h4 class="tsd-returns-title">Returns <a href="util.expr.Assign.html" class="tsd-signature-type tsd-kind-class">Assign</a></h4><aside class="tsd-sources">
<p>Overrides <a href="util.expr.Node.html">Node</a>.<a href="util.expr.Node.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L209">src/framework/util/expr/node.ts:209</a></li></ul></aside></li></ul></section></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L209">src/framework/util/expr/node.ts:209</a></li></ul></aside></li></ul></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member"><a id="target" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>target</span><a href="#target" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">target</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">NameRef</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">PropertyRef</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">IndexRef</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L210">src/framework/util/expr/node.ts:210</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L210">src/framework/util/expr/node.ts:210</a></li></ul></aside></section>
<section class="tsd-panel tsd-member"><a id="value" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>value</span><a href="#value" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <a href="util.expr.Node.html" class="tsd-signature-type tsd-kind-class">Node</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L211">src/framework/util/expr/node.ts:211</a></li></ul></aside></section></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L211">src/framework/util/expr/node.ts:211</a></li></ul></aside></section></section>
<section class="tsd-panel-group tsd-member-group">
<h2>Methods</h2>
<section class="tsd-panel tsd-member"><a id="eval" class="tsd-anchor"></a>
Expand All @@ -100,7 +100,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">unknown</
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Overrides <a href="util.expr.Node.html">Node</a>.<a href="util.expr.Node.html#eval">eval</a></p>
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L216">src/framework/util/expr/node.ts:216</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L216">src/framework/util/expr/node.ts:216</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="toString" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand All @@ -113,7 +113,7 @@ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</s
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<p>Overrides <a href="util.expr.Node.html">Node</a>.<a href="util.expr.Node.html#toString">toString</a></p>
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L243">src/framework/util/expr/node.ts:243</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L243">src/framework/util/expr/node.ts:243</a></li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
6 changes: 3 additions & 3 deletions docs/classes/util.expr.Node.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><a href="util.expr.Assign.html" class="tsd-signature-type tsd-kind-class">Assign</a></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L23">src/framework/util/expr/node.ts:23</a></li></ul></aside>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L23">src/framework/util/expr/node.ts:23</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -83,7 +83,7 @@ <h5><span class="tsd-kind-parameter">ctx</span>: <a href="../types/util.expr.Eva
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L28">src/framework/util/expr/node.ts:28</a></li></ul></aside></li></ul></section>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L28">src/framework/util/expr/node.ts:28</a></li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member"><a id="toString" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code> <span>to<wbr/>String</span><a href="#toString" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
Expand All @@ -95,7 +95,7 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagAbstract">Abstract</code
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/2236f0c/src/framework/util/expr/node.ts#L34">src/framework/util/expr/node.ts:34</a></li></ul></aside></li></ul></section></section></div>
<li>Defined in <a href="https://github.com/forman/extend-me/blob/12bc4d5/src/framework/util/expr/node.ts#L34">src/framework/util/expr/node.ts:34</a></li></ul></aside></li></ul></section></section></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
Expand Down
Loading

0 comments on commit c849cea

Please sign in to comment.