@moonbase.sh/gorilla-engine 0.0.0-stage → 0.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.
Files changed (2) hide show
  1. package/README.md +68 -2
  2. package/package.json +5 -4
package/README.md CHANGED
@@ -1,3 +1,69 @@
1
- # Temporary Holding Version
1
+ # @moonbase.sh/gorilla-engine
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Moonbase licensing for a [Gorilla Engine](https://www.gorilla-engine.com) plugin, on top of
4
+ [`@moonbase.sh/licensing`](https://www.npmjs.com/package/@moonbase.sh/licensing). It is a React component for
5
+ Gorilla Engine React: the activation screens in a panel over the plugin's interface, the counterpart of
6
+ moonbase-cpp's JUCE module. It runs in the plugin's own JavaScript and draws with Gorilla Engine's native
7
+ controls.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @moonbase.sh/gorilla-engine
13
+ ```
14
+
15
+ ## Set up
16
+
17
+ ```tsx
18
+ import { createMoonbase, MoonbaseActivation } from '@moonbase.sh/gorilla-engine'
19
+
20
+ const moonbase = createMoonbase({
21
+ endpoint: 'https://your-store.moonbase.sh',
22
+ productId: 'your-product',
23
+ publicKey: MOONBASE_PUBLIC_KEY,
24
+ appVersion: '1.2.0',
25
+ ui: {
26
+ manufacturerName: 'Helio Audio',
27
+ logo: 'images/logo.png',
28
+ fonts: { regular: 'fonts/Inter-Regular.otf', medium: 'fonts/Inter-Medium.otf', semibold: 'fonts/Inter-SemiBold.otf' },
29
+ },
30
+ })
31
+ moonbase.start()
32
+
33
+ function App() {
34
+ return (
35
+ <geLabel width={920} height={590}>
36
+ <PluginUI />
37
+ <MoonbaseActivation moonbase={moonbase} width={920} height={590} />
38
+ </geLabel>
39
+ )
40
+ }
41
+ ```
42
+
43
+ Render `MoonbaseActivation` last, so it lies over the rest. While the plugin has no license it comes up by itself,
44
+ covers the interface, takes every click, and cannot be closed; once licensed it gets a close button, and
45
+ `moonbase.present()` brings it back (on a screen: `license`, `update`, `offline` or `addons`). It takes the same `ui`
46
+ options as [`@moonbase.sh/electron`](https://www.npmjs.com/package/@moonbase.sh/electron#the-activation-ui), except that `logo` is an image among the plugin's assets and `fonts` are the
47
+ plugin's `.otf` assets, since Gorilla Engine draws with the system's font otherwise. Set `appVersion` to the
48
+ plugin's version, as Gorilla Engine has no version of its own to read.
49
+
50
+ ## MIDI and audio
51
+
52
+ The module turns the plugin's MIDI and audio on while it is licensed (a license or a trial) and off while it is not,
53
+ through `GorillaEngine.getPluginMM` and `getPluginAE`. Pair it with Gorilla Compiler's copy protection setting that
54
+ keeps them off at startup, so nothing plays before the license is checked. Pass `lockAudioAndMidi: false` to handle
55
+ that yourself. To gate parts of the interface, read the state with `useMoonbaseState(moonbase)`, or check
56
+ `moonbase.isLicensed()` and `moonbase.hasSubProduct(id)`.
57
+
58
+ ## Instances
59
+
60
+ Every instance of the plugin, in any number of hosts, shares the license, kept by default in the manufacturer's
61
+ folder: `~/Library/Application Support/<manufacturer>/<plugin>/license.mb` on macOS and
62
+ `%APPDATA%\<manufacturer>\<plugin>\license.mb` on Windows. Activating in one unlocks the others within a few seconds,
63
+ and deactivating locks them. The browser opens through `GorillaEngine.openURLinBrowser`, and the machine and license
64
+ files for offline activation go through Gorilla Engine's file dialogs.
65
+
66
+ Every method of [`ActivationController`](https://www.npmjs.com/package/@moonbase.sh/licensing#a-ui-of-your-own) is
67
+ on `moonbase` too.
68
+
69
+ License: MIT
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/gorilla-engine",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.0",
4
+ "description": "Placeholder for Moonbase licensing for Gorilla Engine plugins. The first release is 0.1.0.",
5
+ "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
6
+ "license": "MIT"
7
+ }