@gorilla-engine-sdk/ge-blob-manager 1.0.5

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.md ADDED
@@ -0,0 +1,64 @@
1
+ **IMPORTANT NOTICE: PLEASE READ CAREFULLY BEFORE DOWNLOADING, INSTALLING OR USING THE GORILLA ENGINE SDK:**
2
+
3
+ - BY SIGNING THIS AGREEMENT, OR CLICKING ON THE “ACCEPT” BUTTON BELOW (IF AVAILABLE), OR BY DOWNLOADING, INSTALLING, OR USING THE GORILLA ENGINE SDK, YOU AGREE TO THE TERMS OF THIS AGREEMENT, AND ALL INCORPORATED TERMS INCLUDING GORILLA ENGINE’S PRIVACY POLICY, AS APPLICABLE, WHICH WILL BIND YOU.
4
+
5
+ - IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, WE WILL NOT LICENSE THE GORILLA ENGINE SDK TO YOU AND YOU MUST DISCONTINUE THE INSTALLATION OR DOWNLOAD PROCESS OR CEASE USE OF THE UJAM GORILLA ENGINE SDK.
6
+
7
+ **GORILLA ENGINE FREE TIER LICENSE**
8
+
9
+ This Gorilla Engine Free Tier License ("Agreement") is entered between UJAM, Inc., a Delaware corporation (hereinafter "UJAM" or "we") and you (“Licensee” or “you”) and becomes effective once you download, install, or use the GORILLA ENGINE SDK.
10
+
11
+ 1. OBJECT OF AGREEMENT. This Agreement governs UJAM’s GORILLA ENGINE SDK (“SDK”) and all related software and documentation and any update, upgrades or bug fixes (collectively referred to as the "UJAM GORILLA ENGINE SDK SERVICE").
12
+
13
+ 2. GRANT OF LICENSE: Subject to your full compliance with all of the terms and conditions of this Agreement, we grant you a non-exclusive, revocable, nonsublicensable (except as specifically provided herein), non-transferable license to use the UJAM GORILLA ENGINE SDK SERVICE solely to: (i) download, install, and use the UJAM GORILLA ENGINE SDK SERVICE for the sole purpose of building audio plugins such as virtual instruments and effects ("Application") and using such Application for music productions and live performances. **HOWEVER, YOU MUST NOT SHARE OR OTHERWISE EXPLOIT YOUR GORILLA ENGINE BASED APPLICATION WITH ANY THIRD PARTY UNTIL YOU HAVE ACQUIRED ONE OF THE ADD-ON LICENSES AS FURTHER DESCRIBED IN SECTION 8 OF THIS AGREEMENT.** If you have any questions regarding this license and allowed uses of the SDK, please reach out to us via email at support@gorilla-engine.com.
14
+
15
+ 3. LICENSE RESTRICTIONS AND OBLIGATIONS: Except as expressly and unambiguously authorized under this Agreement, you must not
16
+ 1. copy, rent, lease, sell, transfer, assign, sublicense, disassemble, reverse engineer or decompile (except to the limited extent expressly authorized by applicable statutory law), modify, create derivative works from, or alter any part of the UJAM GORILLA ENGINE SDK SERVICE;
17
+ 2. sublicense your Application to end-users until you have acquired a license as further described in Section 8 of this Agreement.
18
+ 3. use any automated means, including, without limitation, agents, robots, scripts or spiders, to access the UJAM GORILLA ENGINE SDK SERVICE or bypass the UJAM GORILLA ENGINE SDK SERVICE or to interfere or attempt to interfere with the proper working of the UJAM GORILLA ENGINE SDK SERVICE;
19
+ 4. use the UJAM GORILLA ENGINE SDK SERVICE as a dynamic-link library (for clarity: the SDK shall solely be used as a statically linked library); (g) use the SDK or any part of the SDK in connection with building or distributing your own or a third-party SDK or framework; or (h) use the Licensed Software to train artificial intelligence, your own or a third-party algorithm, and/or any other kind of machine learning processes.
20
+ 5. use the UJAM GORILLA ENGINE SDK SERVICE for the benefit of a third party, other than end users of your Applications as expressly authorized by this Agreement;
21
+ 6. use the UJAM GORILLA ENGINE SDK SERVICE to implement or enhance a product or service that is competitive with the UJAM GORILLA ENGINE SDK SERVICE;
22
+ 7. modify and/or rename the UJAM binary libraries; or
23
+ 8. otherwise engage in activity that interrupts the proper working of the UJAM GORILLA ENGINE SDK SERVICE or is otherwise fraudulent or illegal.
24
+
25
+ Furthermore, you agree
26
+
27
+ 9. display attribution on all embodiments and uses of the Gorilla Engine SDK by displaying the language “powered by Gorilla Engine” ; and
28
+ 10. to contact UJAM once you intend to Distribute (as defined in Section 8\) your Application to obtain the appropriate license to do so – which you agree is required for such a scenario (as further described in Section 8 below).
29
+
30
+ We reserve the right to discontinue, modify, cease support of, and alter the pricing structure of this Agreement (the Gorilla Engine Free Tier License) of the UJAM GORILLA ENGINE SDK SERVICE.
31
+
32
+ 10. LICENSE TO UJAM: You hereby grant to us the non-exclusive, perpetual, worldwide, royalty-free right and license to any and all content ("Content") provided by you or your end users in connection with your use or your end users' use of the SDK, including but not limited to feedback or other contributions made towards the UJAM GORILLA ENGINE SDK SERVICE (including so-called re-usable components, made available by UJAM via its repositories), in order for us to provide and improve the UJAM GORILLA ENGINE SDK SERVICE. You represent and warrant that all Content provided by you shall not violate any third party rights and shall be free of any and all claims.
33
+
34
+ 11. REPRESENTATIONS AND WARRANTIES: You represent and warrant that you: (i) are fully authorized to enter into this agreement; (ii) shall use the UJAM GORILLA ENGINE SDK SERVICE in compliance with all applicable local, state, national and foreign laws, treaties and regulations, including those related to data privacy, international communications, export laws and the transmission of technical or personal data laws; (iii) shall not (and shall not permit any third party, including a permitted sublicensee to), directly or indirectly, take any action or upload, download, post, submit or otherwise distribute or facilitate distribution of Content or any material on or through the UJAM GORILLA ENGINE SDK SERVICE, that: (a) infringes any patent, trademark, trade secret, copyright, right of publicity/privacy or other right of any third party or induces infringement thereof; (b) breaches any third party contract or obligation; (c) is unlawful, threatening, abusive, harassing, defamatory, deceptive, fraudulent, invasive of another's privacy, tortious, obscene, offensive, or profane.
35
+
36
+ 12. OWNERSHIP AND PROPRIETARY RIGHTS: As between UJAM and Licensee (and any permitted sublicensees), the SDK and all intellectual property rights in and to the UJAM GORILLA ENGINE SDK SERVICE, are and shall at all times remain the sole and exclusive property of UJAM and are protected by applicable intellectual property laws and treaties. You shall not obscure, remove or otherwise alter our copyright or trademark notices or other proprietary rights' notices affixed to or within the SDK or elsewhere.
37
+
38
+ 13. SUPPORT AND UPGRADES: This Agreement does not entitle you to any support for the SDK, unless you enter into a separate agreement with us in writing, either signed by both parties or agreed upon via click-through agreement. Any such support provided by us shall be subject to the terms and disclaimers of this Agreement.
39
+
40
+ 14. ADD-ON LICENSES FOR A PERMITTED DISTRIBUTION OF GORILLA ENGINE BASED APPLICATION:
41
+ 1. **Add-On Licenses (Upgrade to Pro Tier):** You agree to contact UJAM to obtain one of our commercial license (including the so-called “Pro Tier” License, including available optional Add-On upgrades which can be ) (collectively referred to as “Add-On Licenses”), whichever deemed to be appropriate for your intended use of the SDK, to Distribute (as defined below in subsection ii.) your Gorilla Engine based Application to end-users. Such Add-On License shall supersede this Agreement, as agreed to by the parties.
42
+ 2. **Failure to comply with Section 8:** If you fail to comply with Section 8(i) by Distributing the SDK as part of an Application beyond the allowed use under this Agreement, you shall immediately contact UJAM and pay to UJAM a royalty per each Distribution (as defined below) in an amount as solely determined by UJAM. A Distribution refers to either an embedded, pre-bundled, pre-installed platform application or software application that is downloaded, delivered, or served to a user or device by any means of distribution including directly from you or through any platform, including cloud based platforms. In avoidance of doubt, any subscription or rental shall be considered a Distribution.
43
+ 3. **Audit Rights**: Should (i) you fail to obtain an Add-On License and distribute the SDK as part of an Application, or should (ii) UJAM believe that you distribute the Application without having obtained an Add-On License, then UJAM shall have the right, upon reasonable notice, to audit/inspect any premises, computer(s), and networks on or in which the SDK is installed or used to monitor compliance with the terms of this Agreement, including but not limited to confirming the number of Distributions of the Application. If an audit reveals any unauthorized use, in addition to all other remedies available to UJAM, you shall be responsible to UJAM for all reasonable expenses related to the audit.
44
+ 4. **Third Party Libraries:** You acknowledge that certain third-party libraries, including JUCE 6 ([https://juce.com/legal/juce-6-license/](https://juce.com/legal/juce-6-license/)), may be used in connection with the SDK, subject to their respective license agreements as further disclosed by UJAM. It is your sole responsibility to abide to such third-party terms, which may include your obligations, amongst others, to provide certain disclosures accompanying your Gorilla Engine based Software and/or acquiring a JUCE license (if applicable).
45
+
46
+ 15. DATA PROTECTION AND PRIVACY: We may collect and process information about you and your use of the Gorilla Engine SDK, some of which may amount to personal data, subject to Gorilla Engine’s Privacy Policy.
47
+
48
+ 16. TRADE SECRETS AND CONFIDENTIAL INFORMATION: You acknowledges that the SDK contains valuable trade secrets of UJAM and, should you access any such trade secrets in violation of this Agreement, you agree to maintain the confidentiality of the trade secrets of the SDK using at least the same degree of care that you use with your own confidential information.
49
+
50
+ 17. WARRANTY DISCLAIMER: THE UJAM GORILLA ENGINE SDK SERVICE, INCLUDING THE SDK, IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, WE DISCLAIM ALL WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, REGARDING THE UJAM GORILLA ENGINE SDK SERVICE, INCLUDING WITHOUT LIMITATION ANY AND ALL IMPLIED WARRANTIES OF MERCHANTABILITY, ACCURACY, RESULTS OF USE, RELIABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AVAILABILITY, PERFORMANCE, BANDWIDTH, AND NON-INFRINGEMENT OF THIRD-PARTY RIGHTS. FURTHER, WE DISCLAIM ANY WARRANTY THAT LICENSEE'S USE OF THE UJAM GORILLA ENGINE SDK SERVICE WILL BE AVAILABLE, UNINTERRUPTED OR ERROR FREE.
51
+
52
+ 18. LIABILITY LIMITATION: REGARDLESS OF WHETHER ANY REMEDY SET FORTH HEREIN FAILS OF ITS ESSENTIAL PURPOSE OR OTHERWISE, AND EXCEPT FOR BODILY INJURY, IN NO EVENT WILL WE OR OUR CONTRACTORS, EMPLOYEES OR AFFILIATES BE LIABLE TO YOU OR TO ANY THIRD PARTY UNDER ANY TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY LOST PROFITS, LOST OR CORRUPTED DATA, COMPUTER FAILURE OR MALFUNCTION, INFRINGEMENT, INTERRUPTION OF BUSINESS, OR OTHER SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING OUT OF THE USE OR INABILITY TO USE THE UJAM GORILLA ENGINE SDK SERVICE, EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES AND WHETHER OR NOT SUCH LOSS OR DAMAGES ARE FORESEEABLE. IN NO EVENT SHALL OUR TOTAL LIABILITY TO YOU OR ANY THIRD PARTY EXCEED TEN USD DOLLARS. ANY CLAIM ARISING OUT OF OR RELATING TO THIS AGREEMENT MUST BE BROUGHT WITHIN ONE (1) YEAR AFTER THE OCCURRENCE OF THE EVENT GIVING RISE TO SUCH CLAIM.
53
+
54
+ 19. INDEMNITY: You agree that we shall have no liability whatsoever for your or your end users of the UJAM GORILLA ENGINE SDK SERVICE. You shall indemnify, defend and hold us harmless from any and all claims, damages, liabilities, costs, and fees (including reasonable attorneys' fees) arising from your or your end users' use of the UJAM GORILLA ENGINE SDK SERVICE or for any breach of this Agreement, including any breach of the representations and warranties you made herein.
55
+
56
+ 20. TERM AND TERMINATION: This Agreement shall continue until terminated as set forth in this Section. Either party may terminate this Agreement at any time, for any reason, or for no reason including, but not limited to, if you violate any provision of this Agreement. We reserve the right to cancel, amend, or modify the SDK at any time. Any termination of this Agreement shall also terminate the license granted hereunder. Upon termination of this Agreement for any reason, you shall immediately destroy and remove from all computers, hard drives, networks, and other storage media all copies of the SDK, and shall so certify to us that such actions have occurred (including all cached ephemeral copies). Sections 5 (“REPRESENTATIONS AND WARRANTIES”), 6 (“OWNERSHIP AND PROPRIETARY RIGHTS”), 10 (“TRADE SECRETS AND CONFIDENTIAL INFORMATION”), 11 (“WARRANTY DISCLAIMER”), 12 (“LIABILITY LIMITATION”), 13 (“INDEMNITY”), 16 (“GOVERNING LAW”), 18 (“GENERAL PROVISIONS”) shall survive termination of this Agreement.
57
+
58
+ 21. EXPORT CONTROLS: You shall comply with all applicable export laws and restrictions and regulations and you shall not export, or allow the export or re-export of the SDK in violation of any such restrictions, laws, or regulations.
59
+
60
+ 22. GOVERNING LAW: This Agreement shall be governed by New York law, excluding conflict of law provisions. The parties agree to and submit to the exclusive jurisdiction of courts located in New York City, New York. The application of the United Nations Convention of Contracts for the International Sale of Goods is expressly excluded.
61
+
62
+ 23. PREVAILING PARTY. Notwithstanding Section 12 (“LIABILITY LIMITATION”), in the event of any court action relating to enforcement of this Agreement, including injunctive relief, the non-prevailing party shall reimburse the prevailing party for all reasonable attorneys’ fees and costs, including expert witness fees, resulting therefrom.
63
+
64
+ 24. GENERAL PROVISIONS. If any part of this Agreement is found void or unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. This Agreement may only be modified by written agreement between the Parties. Updates to the UJAM GORILLA ENGINE SDK SERVICE may be licensed to you by UJAM with additional or different terms. UJAM further reserves rights, in its discretion, not to license updates. This is the entire Agreement between UJAM and you relating to the UJAM GORILLA ENGINE SDK SERVICE and it supersedes any prior representations, discussions, undertakings, communications, or advertising relating to the UJAM GORILLA ENGINE SDK SERVICE. This Agreement is not assignable by you.
package/README.md ADDED
@@ -0,0 +1,234 @@
1
+ # @gorilla-engine-sdk/ge-blob-manager
2
+
3
+ A utility library for locating and loading Gorilla Engine blob files in Gorilla Engine React based audio plugins, featuring:
4
+
5
+ - Automatic blob file discovery across system locations
6
+ - Cross-platform path handling (macOS & Windows)
7
+ - User-guided file selection with native OS dialogs
8
+ - Persistent settings for user-selected blob locations
9
+ - React component and standalone function APIs
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @gorilla-engine-sdk/ge-blob-manager
15
+ ```
16
+
17
+ **Peer Dependencies:** Requires `@gorilla-engine-sdk/gorilla-engine-react` ^1.1.4
18
+
19
+ ## Quick Start
20
+
21
+ This library is designed for Gorilla Engine React, a custom React reconciler that renders directly to native C++ UI components. It does **not** use a browser; instead, you build UIs with Gorilla Engine's native components like `<GELabel>`, `<GEKnob>`, `<GESlider>`, and `<GEButton>`.
22
+
23
+ ```tsx
24
+ import { useState } from 'react';
25
+ import { BlobManager } from '@gorilla-engine-sdk/ge-blob-manager';
26
+ import {
27
+ GELabel,
28
+ GEKnob,
29
+ GESlider,
30
+ GEMidiKeyboard,
31
+ } from '@gorilla-engine-sdk/gorilla-engine-react';
32
+
33
+ function App() {
34
+ const [instrument, setInstrument] = useState<GorillaEngine.Instrument | null>(null);
35
+ const [error, setError] = useState<string | null>(null);
36
+
37
+ return (
38
+ <GELabel width={800} height={600}>
39
+ <BlobManager
40
+ pluginName="MyPlugin"
41
+ manufacturerName="MyCompany"
42
+ blobName="SuperCoolInstrumentOrEffect"
43
+ onInstrumentLoaded={(inst, name, blobDir) => {
44
+ console.log(`Loaded "${name}" from ${blobDir}`);
45
+ setInstrument(inst);
46
+ }}
47
+ onErrorLoadingInstrument={(err) => {
48
+ console.error(err);
49
+ setError(err);
50
+ }}
51
+ />
52
+ {error && <GELabel x={10} y={10} text={error} color="#ff0000" />}
53
+ {instrument && <PluginControls instrument={instrument} />}
54
+ </GELabel>
55
+ );
56
+ }
57
+
58
+ function PluginControls({ instrument }: { instrument: GorillaEngine.Instrument }) {
59
+ return (
60
+ <GELabel x={0} y={50} width={800} height={550}>
61
+ <GEKnob x={100} y={100} width={80} height={80} parameterPath="/macro/volume" />
62
+ <GESlider x={200} y={100} width={40} height={200} parameterPath="/macro/filter" />
63
+ <GEMidiKeyboard x={50} y={350} width={700} height={120} />
64
+ </GELabel>
65
+ );
66
+ }
67
+ ```
68
+
69
+ ## Blob File Structure
70
+
71
+ Gorilla Engine blobs consist of two files that must be located in the same directory:
72
+
73
+ | File | Contents |
74
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
75
+ | `<blobName>_part1.blob` | Initial instrument state and parameter values. Can optionally contain the preload portion of samples (useful when combining blob encryption with copy protection systems like PACE). |
76
+ | `<blobName>_part2.blob` | All audio sample data. If part1 contains preload samples, this file contains the remainder of each sample. |
77
+
78
+ For example, if your `blobName` is `"SuperCoolInstrumentOrEffect"`, the library expects:
79
+
80
+ - `SuperCoolInstrumentOrEffect_part1.blob`
81
+ - `SuperCoolInstrumentOrEffect_part2.blob`
82
+
83
+ ## Search Order
84
+
85
+ The library searches for blob files in the following order:
86
+
87
+ 1. **Default path** - `defaultBlobPath` prop or `GorillaEngine.getResourcePath()`
88
+ 2. **Path stored in "blobLocation" property in user-specific settings file** - `<UserAppSupport>/<ManufacturerName>/<PluginName>/<PluginName>.settings`
89
+ 3. **Path stored in "blobLocation" property in global settings file** - `<GlobalAppSupport>/<ManufacturerName>/<PluginName>/<PluginName>.settings`
90
+ 4. **Gorilla Engine resource path** - `GorillaEngine.getResourcePath()` (resolves to `<GlobalAppSupport>/<ManufacturerName>/<PluginName>`)
91
+ 5. **User file chooser** - Native OS file dialog (as a last resort)
92
+
93
+ ### Platform-Specific Paths
94
+
95
+ | Platform | User App Support | Global App Support |
96
+ | -------- | ----------------------------------------------- | ------------------------------ |
97
+ | macOS | `~/Library/Application Support` | `/Library/Application Support` |
98
+ | Windows | `%APPDATA%` (`C:\Users\<user>\AppData\Roaming`) | `C:\ProgramData` |
99
+
100
+ ## API Reference
101
+
102
+ ### BlobManager Component
103
+
104
+ ```tsx
105
+ <BlobManager {...props: BlobProps} />
106
+ ```
107
+
108
+ React component that automatically loads a blob file on mount. Renders nothing visually but triggers blob loading as a side effect.
109
+
110
+ ### BlobProps Interface
111
+
112
+ ```typescript
113
+ interface BlobProps {
114
+ pluginName: string;
115
+ manufacturerName: string;
116
+ blobName: string;
117
+ defaultBlobPath?: string;
118
+ onInstrumentLoaded: (
119
+ instrument: GorillaEngine.Instrument,
120
+ instrumentName: string,
121
+ resolvedBlobPath?: string,
122
+ ) => void;
123
+ onErrorLoadingInstrument: (error: string) => void;
124
+ }
125
+ ```
126
+
127
+ **Properties:**
128
+
129
+ - `pluginName` - Plugin name as configured in Gorilla Compiler (must match exactly)
130
+ - `manufacturerName` - Manufacturer/company name for path construction as configured in Gorilla Compiler (must match exactly)
131
+ - `blobName` - Base blob name without `_part1.blob`/`_part2.blob` suffix
132
+ - `defaultBlobPath` - Optional custom default search path (defaults to `GorillaEngine.getResourcePath()`)
133
+ - `onInstrumentLoaded` - Success callback with loaded instrument, name, and blob directory
134
+ - `onErrorLoadingInstrument` - Error callback with human-readable error message
135
+
136
+ ### loadBlob Function
137
+
138
+ ```typescript
139
+ async function loadBlob(props: BlobProps): Promise<void>;
140
+ ```
141
+
142
+ Loads a blob file and initializes the Gorilla Engine instrument. Use this for programmatic control over when loading occurs.
143
+
144
+ ```typescript
145
+ import { loadBlob } from '@gorilla-engine-sdk/ge-blob-manager';
146
+
147
+ // Load blob programmatically (e.g., on user action)
148
+ async function handleLoadClick() {
149
+ await loadBlob({
150
+ pluginName: 'MyPlugin',
151
+ manufacturerName: 'MyCompany',
152
+ blobName: 'SuperCoolInstrumentOrEffect',
153
+ onInstrumentLoaded: (instrument, name, blobDir) => {
154
+ console.log(`Loaded instrument "${name}" from ${blobDir}`);
155
+ },
156
+ onErrorLoadingInstrument: async (error) => {
157
+ // Use Gorilla Engine's native message box (not a browser dialog)
158
+ await GorillaEngine.showNativeMessageBox({
159
+ title: 'Loading Error',
160
+ message: error,
161
+ iconType: 'warning',
162
+ });
163
+ },
164
+ });
165
+ }
166
+ ```
167
+
168
+ ### locateBlob Function
169
+
170
+ ```typescript
171
+ async function locateBlob(props: BlobProps): Promise<string>;
172
+ ```
173
+
174
+ Locates a blob file without loading it. Returns the full path or empty string if not found. Useful when you need the path before loading.
175
+
176
+ ```typescript
177
+ import { locateBlob } from '@gorilla-engine-sdk/ge-blob-manager';
178
+
179
+ const blobPath = await locateBlob({
180
+ pluginName: 'MyPlugin',
181
+ manufacturerName: 'MyCompany',
182
+ blobName: 'SuperCoolInstrumentOrEffect',
183
+ onInstrumentLoaded: () => {},
184
+ onErrorLoadingInstrument: () => {},
185
+ });
186
+
187
+ if (blobPath) {
188
+ console.log(`Blob found at: ${blobPath}`);
189
+ } else {
190
+ console.log('Blob not found');
191
+ }
192
+ ```
193
+
194
+ ## Settings File Format
195
+
196
+ When users manually select a blob location, it's persisted to a JSON settings file:
197
+
198
+ ```json
199
+ {
200
+ "blobLocation": "/path/to/blob/directory"
201
+ }
202
+ ```
203
+
204
+ **File location:** `<UserAppSupport>/<manufacturerName>/<pluginName>/<pluginName>.settings`
205
+
206
+ ## Error Handling
207
+
208
+ The library handles errors gracefully:
209
+
210
+ - **Blob not found**: Prompts user with native file chooser dialog
211
+ - **Part2 missing**: Calls `onErrorLoadingInstrument` with descriptive message
212
+ - **User cancels dialog**: Returns empty path, allowing retry logic
213
+ - **Loading failure**: Creates empty instrument to prevent audio engine errors
214
+
215
+ ```tsx
216
+ <BlobManager
217
+ pluginName="MyPlugin"
218
+ manufacturerName="MyCompany"
219
+ blobName="SuperCoolInstrumentOrEffect"
220
+ onInstrumentLoaded={(inst) => setInstrument(inst)}
221
+ onErrorLoadingInstrument={async (error) => {
222
+ // Show native OS message box (not a browser dialog)
223
+ await GorillaEngine.showNativeMessageBox({
224
+ title: 'Content Not Found',
225
+ message: error,
226
+ iconType: 'warning',
227
+ });
228
+ }}
229
+ />
230
+ ```
231
+
232
+ ## License
233
+
234
+ [GORILLA ENGINE FREE TIER LICENSE](./LICENSE.md)
@@ -0,0 +1,195 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Configuration options for the BlobManager component and blob loading functions.
4
+ *
5
+ * @remarks
6
+ * The BlobManager uses these properties to locate and load blob files from various
7
+ * locations on the user's system, with fallback to user-guided file selection.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * const blobProps: BlobProps = {
12
+ * pluginName: "MyPlugin",
13
+ * manufacturerName: "MyCompany",
14
+ * blobName: "SuperCoolInstrumentOrEffect",
15
+ * onInstrumentLoaded: (instrument, name, path) => {
16
+ * console.log(`Loaded ${name} from ${path}`);
17
+ * },
18
+ * onErrorLoadingInstrument: (error) => {
19
+ * console.error(error);
20
+ * }
21
+ * };
22
+ * ```
23
+ */
24
+ export interface BlobProps {
25
+ /**
26
+ * The name of the plugin as configured in Gorilla Compiler.
27
+ *
28
+ * @remarks
29
+ * Used to locate the settings file and construct paths.
30
+ * Must match exactly with your Gorilla Compiler configuration.
31
+ */
32
+ pluginName: string;
33
+ /**
34
+ * The manufacturer/company name as configured in Gorilla Compiler.
35
+ *
36
+ * @remarks
37
+ * Used to construct the Application Support path structure.
38
+ * Must match exactly with your Gorilla Compiler configuration.
39
+ */
40
+ manufacturerName: string;
41
+ /**
42
+ * The base name of the blob file (without `_part1.blob` or `_part2.blob` suffix).
43
+ *
44
+ * @remarks
45
+ * The BlobManager will automatically append `_part1.blob` and `_part2.blob`
46
+ * when searching for blob files.
47
+ *
48
+ * @example
49
+ * If your blob files are `SuperCoolInstrumentOrEffect_part1.blob` and `SuperCoolInstrumentOrEffect_part2.blob`,
50
+ * set this to `"SuperCoolInstrumentOrEffect"`.
51
+ */
52
+ blobName: string;
53
+ /**
54
+ * Optional default path where to look for the blob file first.
55
+ *
56
+ * @remarks
57
+ * If not provided, defaults to `GorillaEngine.getResourcePath()`.
58
+ * Use this when your blob files are installed in a custom location.
59
+ */
60
+ defaultBlobPath?: string;
61
+ /**
62
+ * Callback invoked when the instrument is successfully loaded from the blob.
63
+ *
64
+ * @param instrument - The loaded Gorilla Engine instrument instance
65
+ * @param instrumentName - The name of the instrument as defined in the blob
66
+ * @param resolvedBlobPath - The directory path where the blob was found
67
+ */
68
+ onInstrumentLoaded: (instrument: GorillaEngine.Instrument, instrumentName: string, resolvedBlobPath?: string) => void;
69
+ /**
70
+ * Callback invoked when an error occurs during blob loading.
71
+ *
72
+ * @param error - Human-readable error message describing what went wrong
73
+ */
74
+ onErrorLoadingInstrument: (error: string) => void;
75
+ }
76
+ /**
77
+ * Locates a blob file by searching multiple locations and prompts user if not found.
78
+ *
79
+ * This function searches for blob files in the following order:
80
+ * 1. Path stored in "blobLocation" property in user-specific settings file (`<UserAppSupport>/<ManufacturerName>/<PluginName>/<PluginName>.settings`)
81
+ * 2. Path stored in "blobLocation" property in global settings file (`<GlobalAppSupport>/<ManufacturerName>/<PluginName>/<PluginName>.settings`)
82
+ * 3. Gorilla Engine resource path (`GorillaEngine.getResourcePath()`, resolves to `<GlobalAppSupport>/<ManufacturerName>/<PluginName>`)
83
+ * 4. User file chooser - Native OS file dialog (as a last resort)
84
+ *
85
+ * When the user selects a blob file manually, the location is persisted to
86
+ * the user settings file for future lookups.
87
+ *
88
+ * @param props - Configuration options containing plugin, manufacturer, and blob names
89
+ * @returns Promise resolving to the full path of the located blob file, or empty string if not found
90
+ *
91
+ * @remarks
92
+ * The function handles cross-platform paths automatically:
93
+ * - **macOS**: `~/Library/Application Support` (user) and `/Library/Application Support` (global)
94
+ * - **Windows**: `%APPDATA%` (user) and `C:\ProgramData` (global)
95
+ *
96
+ * @example
97
+ * ```typescript
98
+ * const blobPath = await locateBlob({
99
+ * pluginName: "MyPlugin",
100
+ * manufacturerName: "MyCompany",
101
+ * blobName: "SuperCoolInstrumentOrEffect",
102
+ * onInstrumentLoaded: () => {},
103
+ * onErrorLoadingInstrument: () => {}
104
+ * });
105
+ *
106
+ * if (blobPath) {
107
+ * console.log(`Found blob at: ${blobPath}`);
108
+ * }
109
+ * ```
110
+ */
111
+ export declare const locateBlob: (props: BlobProps) => Promise<string>;
112
+ /**
113
+ * Loads a blob file and initializes the Gorilla Engine instrument.
114
+ *
115
+ * This function handles the complete blob loading workflow:
116
+ * 1. Checks the default path (or `GorillaEngine.getResourcePath()`)
117
+ * 2. Falls back to {@link locateBlob} if not found at default location
118
+ * 3. Verifies both part1 and part2 blob files exist
119
+ * 4. Loads the blob and sets the active instrument
120
+ *
121
+ * @param props - Configuration options for blob loading
122
+ *
123
+ * @remarks
124
+ * Gorilla Engine blobs consist of two files:
125
+ * - `<blobName>_part1.blob` - Contains instrument definitions
126
+ * - `<blobName>_part2.blob` - Contains sample data
127
+ *
128
+ * Both files must be present in the same directory for successful loading.
129
+ * On success, the first instrument in the blob is automatically set as the
130
+ * active instrument via `GorillaEngine.setActiveInstrument()`.
131
+ *
132
+ * On failure, an empty instrument is created to prevent audio engine errors.
133
+ *
134
+ * @example
135
+ * ```typescript
136
+ * await loadBlob({
137
+ * pluginName: "MyPlugin",
138
+ * manufacturerName: "MyCompany",
139
+ * blobName: "SuperCoolInstrumentOrEffect",
140
+ * onInstrumentLoaded: (instrument, name, blobDir) => {
141
+ * console.log(`Loaded instrument "${name}" from ${blobDir}`);
142
+ * // Initialize your plugin UI
143
+ * },
144
+ * onErrorLoadingInstrument: (error) => {
145
+ * console.error(error);
146
+ * // Show error dialog to user
147
+ * }
148
+ * });
149
+ * ```
150
+ */
151
+ export declare const loadBlob: (props: BlobProps) => Promise<void>;
152
+ /**
153
+ * React component that automatically loads a blob file on mount.
154
+ *
155
+ * This component provides a declarative way to load Gorilla Engine blob files
156
+ * in your React-based audio plugin UI. It renders nothing visually (empty fragment)
157
+ * but triggers blob loading as a side effect when mounted.
158
+ *
159
+ * @param props - Configuration options for blob loading
160
+ *
161
+ * @remarks
162
+ * The component calls {@link loadBlob} once on mount. The loading result is
163
+ * communicated through the `onInstrumentLoaded` and `onErrorLoadingInstrument`
164
+ * callbacks provided in props.
165
+ *
166
+ * For more control over the loading process (e.g., loading at a specific time
167
+ * or showing loading progress), use the {@link loadBlob} function directly.
168
+ *
169
+ * @example
170
+ * ```tsx
171
+ * import { useState } from 'react';
172
+ * import { BlobManager } from "@gorilla-engine-sdk/ge-blob-manager";
173
+ * import { GELabel } from "@gorilla-engine-sdk/gorilla-engine-react";
174
+ *
175
+ * function App() {
176
+ * const [instrument, setInstrument] = useState<GorillaEngine.Instrument | null>(null);
177
+ * const [error, setError] = useState<string | null>(null);
178
+ *
179
+ * return (
180
+ * <GELabel width={800} height={600}>
181
+ * <BlobManager
182
+ * pluginName="MyPlugin"
183
+ * manufacturerName="MyCompany"
184
+ * blobName="SuperCoolInstrumentOrEffect"
185
+ * onInstrumentLoaded={(inst, name) => setInstrument(inst)}
186
+ * onErrorLoadingInstrument={(err) => setError(err)}
187
+ * />
188
+ * {error && <GELabel x={10} y={10} text={error} color="#ff0000" />}
189
+ * {instrument && <PluginControls instrument={instrument} />}
190
+ * </GELabel>
191
+ * );
192
+ * }
193
+ * ```
194
+ */
195
+ export declare function BlobManager(props: BlobProps): React.JSX.Element;
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.loadBlob = exports.locateBlob = void 0;
37
+ exports.BlobManager = BlobManager;
38
+ const React = __importStar(require("react"));
39
+ const react_1 = require("react");
40
+ const os = __importStar(require("node:os"));
41
+ const fs = __importStar(require("fs-extra"));
42
+ const path = __importStar(require("node:path"));
43
+ /**
44
+ * @internal
45
+ * Constructs the blob filename with part suffix.
46
+ *
47
+ * @param name - Base blob name
48
+ * @param part1 - If true, returns part1 filename; otherwise part2
49
+ * @returns The full blob filename
50
+ */
51
+ const getBlobName = ({ name, part1 = true }) => part1 ? `${name}_part1.blob` : `${name}_part2.blob`;
52
+ /**
53
+ * @internal
54
+ * Attempts to find a blob file at the specified location.
55
+ *
56
+ * @param location - Directory or file path to check
57
+ * @param blobName - The blob filename to look for
58
+ * @returns The full path to the blob file if found, undefined otherwise
59
+ */
60
+ const findBlobAtPath = (location, blobName) => {
61
+ if (fs.existsSync(location) && fs.lstatSync(location).isDirectory()) {
62
+ location = path.join(location, blobName);
63
+ }
64
+ return fs.existsSync(location) && fs.lstatSync(location).isFile() ? location : undefined;
65
+ };
66
+ /**
67
+ * Locates a blob file by searching multiple locations and prompts user if not found.
68
+ *
69
+ * This function searches for blob files in the following order:
70
+ * 1. Path stored in "blobLocation" property in user-specific settings file (`<UserAppSupport>/<ManufacturerName>/<PluginName>/<PluginName>.settings`)
71
+ * 2. Path stored in "blobLocation" property in global settings file (`<GlobalAppSupport>/<ManufacturerName>/<PluginName>/<PluginName>.settings`)
72
+ * 3. Gorilla Engine resource path (`GorillaEngine.getResourcePath()`, resolves to `<GlobalAppSupport>/<ManufacturerName>/<PluginName>`)
73
+ * 4. User file chooser - Native OS file dialog (as a last resort)
74
+ *
75
+ * When the user selects a blob file manually, the location is persisted to
76
+ * the user settings file for future lookups.
77
+ *
78
+ * @param props - Configuration options containing plugin, manufacturer, and blob names
79
+ * @returns Promise resolving to the full path of the located blob file, or empty string if not found
80
+ *
81
+ * @remarks
82
+ * The function handles cross-platform paths automatically:
83
+ * - **macOS**: `~/Library/Application Support` (user) and `/Library/Application Support` (global)
84
+ * - **Windows**: `%APPDATA%` (user) and `C:\ProgramData` (global)
85
+ *
86
+ * @example
87
+ * ```typescript
88
+ * const blobPath = await locateBlob({
89
+ * pluginName: "MyPlugin",
90
+ * manufacturerName: "MyCompany",
91
+ * blobName: "SuperCoolInstrumentOrEffect",
92
+ * onInstrumentLoaded: () => {},
93
+ * onErrorLoadingInstrument: () => {}
94
+ * });
95
+ *
96
+ * if (blobPath) {
97
+ * console.log(`Found blob at: ${blobPath}`);
98
+ * }
99
+ * ```
100
+ */
101
+ const locateBlob = async (props) => {
102
+ const { pluginName, manufacturerName, blobName } = props;
103
+ const blobFileName = getBlobName({ name: blobName });
104
+ const userAppSupportDir = os.platform() === 'darwin'
105
+ ? path.join(os.homedir(), 'Library/Application Support')
106
+ : path.join(os.homedir(), 'AppData\\Roaming');
107
+ const globalAppSupportDir = os.platform() === 'darwin' ? '/Library/Application Support' : 'C:\\ProgramData';
108
+ const userSettingsFilePath = path.join(userAppSupportDir, manufacturerName, pluginName, `${pluginName}.settings`);
109
+ const globalSettingsFilePath = path.join(globalAppSupportDir, manufacturerName, pluginName, `${pluginName}.settings`);
110
+ const geShellDefaultBlobFilePath = findBlobAtPath(GorillaEngine.getResourcePath(), blobFileName);
111
+ const readSettingsFile = (filePath) => {
112
+ if (fs.existsSync(filePath)) {
113
+ try {
114
+ return JSON.parse(fs.readFileSync(filePath, 'utf8'));
115
+ }
116
+ catch (e) {
117
+ console.log(`Error reading settings file at ${filePath}:`, e);
118
+ }
119
+ }
120
+ return null;
121
+ };
122
+ const userSettings = readSettingsFile(userSettingsFilePath);
123
+ if (userSettings?.blobLocation) {
124
+ const blobLocation = findBlobAtPath(userSettings.blobLocation, blobFileName);
125
+ if (blobLocation)
126
+ return blobLocation;
127
+ }
128
+ const globalSettings = readSettingsFile(globalSettingsFilePath);
129
+ if (globalSettings?.blobLocation) {
130
+ const blobLocation = findBlobAtPath(globalSettings.blobLocation, blobFileName);
131
+ if (blobLocation)
132
+ return blobLocation;
133
+ }
134
+ if (geShellDefaultBlobFilePath)
135
+ return geShellDefaultBlobFilePath;
136
+ await GorillaEngine.showNativeMessageBox({
137
+ title: 'Plugin Content Not Found',
138
+ message: `A dialog will come up.\nPlease navigate to ${blobFileName}`,
139
+ iconType: 'info',
140
+ });
141
+ const files = await GorillaEngine.openFileChooser({
142
+ hint: `Please navigate to ${blobFileName}`,
143
+ allowedExtensions: '*.blob',
144
+ allowMultiple: false,
145
+ });
146
+ if (files.length !== 1 || path.basename(files[0]) !== blobFileName) {
147
+ await GorillaEngine.showNativeMessageBox({
148
+ title: 'Plugin Content Not Found',
149
+ message: `${blobFileName} couldn't be found.\nPlease consider reinstalling ${pluginName}`,
150
+ iconType: 'warning',
151
+ });
152
+ return '';
153
+ }
154
+ const result = files[0];
155
+ fs.ensureFileSync(userSettingsFilePath);
156
+ fs.writeFileSync(userSettingsFilePath, JSON.stringify({ blobLocation: path.dirname(result) }));
157
+ return result;
158
+ };
159
+ exports.locateBlob = locateBlob;
160
+ /**
161
+ * Loads a blob file and initializes the Gorilla Engine instrument.
162
+ *
163
+ * This function handles the complete blob loading workflow:
164
+ * 1. Checks the default path (or `GorillaEngine.getResourcePath()`)
165
+ * 2. Falls back to {@link locateBlob} if not found at default location
166
+ * 3. Verifies both part1 and part2 blob files exist
167
+ * 4. Loads the blob and sets the active instrument
168
+ *
169
+ * @param props - Configuration options for blob loading
170
+ *
171
+ * @remarks
172
+ * Gorilla Engine blobs consist of two files:
173
+ * - `<blobName>_part1.blob` - Contains instrument definitions
174
+ * - `<blobName>_part2.blob` - Contains sample data
175
+ *
176
+ * Both files must be present in the same directory for successful loading.
177
+ * On success, the first instrument in the blob is automatically set as the
178
+ * active instrument via `GorillaEngine.setActiveInstrument()`.
179
+ *
180
+ * On failure, an empty instrument is created to prevent audio engine errors.
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * await loadBlob({
185
+ * pluginName: "MyPlugin",
186
+ * manufacturerName: "MyCompany",
187
+ * blobName: "SuperCoolInstrumentOrEffect",
188
+ * onInstrumentLoaded: (instrument, name, blobDir) => {
189
+ * console.log(`Loaded instrument "${name}" from ${blobDir}`);
190
+ * // Initialize your plugin UI
191
+ * },
192
+ * onErrorLoadingInstrument: (error) => {
193
+ * console.error(error);
194
+ * // Show error dialog to user
195
+ * }
196
+ * });
197
+ * ```
198
+ */
199
+ const loadBlob = async (props) => {
200
+ const { blobName, onInstrumentLoaded, onErrorLoadingInstrument } = props;
201
+ const defaultPath = props.defaultBlobPath
202
+ ? props.defaultBlobPath
203
+ : GorillaEngine.getResourcePath();
204
+ let resolvedBlobPath = path.join(defaultPath, getBlobName({ name: blobName })); //check default blob location
205
+ if (!fs.existsSync(resolvedBlobPath)) {
206
+ resolvedBlobPath = await (0, exports.locateBlob)(props);
207
+ }
208
+ //check if blob part2 exists in the same folder
209
+ const part2Exists = fs.existsSync(path.join(path.dirname(resolvedBlobPath), getBlobName({ name: blobName, part1: false })));
210
+ if (fs.existsSync(resolvedBlobPath) && part2Exists) {
211
+ const blob = GorillaEngine.loadBlob(resolvedBlobPath);
212
+ const instrumentName = blob.getInstrumentNames()[0];
213
+ const instrument = blob.loadInstrument(instrumentName);
214
+ GorillaEngine.setActiveInstrument(instrument);
215
+ onInstrumentLoaded(instrument, instrumentName, path.dirname(resolvedBlobPath));
216
+ }
217
+ else {
218
+ const instrument = GorillaEngine.createEmptyInstrument();
219
+ GorillaEngine.setActiveInstrument(instrument);
220
+ onErrorLoadingInstrument(`An error occurred while loading blob: ${resolvedBlobPath}. Please also make sure that part2 of the blob is located in the same folder.`);
221
+ }
222
+ };
223
+ exports.loadBlob = loadBlob;
224
+ /**
225
+ * React component that automatically loads a blob file on mount.
226
+ *
227
+ * This component provides a declarative way to load Gorilla Engine blob files
228
+ * in your React-based audio plugin UI. It renders nothing visually (empty fragment)
229
+ * but triggers blob loading as a side effect when mounted.
230
+ *
231
+ * @param props - Configuration options for blob loading
232
+ *
233
+ * @remarks
234
+ * The component calls {@link loadBlob} once on mount. The loading result is
235
+ * communicated through the `onInstrumentLoaded` and `onErrorLoadingInstrument`
236
+ * callbacks provided in props.
237
+ *
238
+ * For more control over the loading process (e.g., loading at a specific time
239
+ * or showing loading progress), use the {@link loadBlob} function directly.
240
+ *
241
+ * @example
242
+ * ```tsx
243
+ * import { useState } from 'react';
244
+ * import { BlobManager } from "@gorilla-engine-sdk/ge-blob-manager";
245
+ * import { GELabel } from "@gorilla-engine-sdk/gorilla-engine-react";
246
+ *
247
+ * function App() {
248
+ * const [instrument, setInstrument] = useState<GorillaEngine.Instrument | null>(null);
249
+ * const [error, setError] = useState<string | null>(null);
250
+ *
251
+ * return (
252
+ * <GELabel width={800} height={600}>
253
+ * <BlobManager
254
+ * pluginName="MyPlugin"
255
+ * manufacturerName="MyCompany"
256
+ * blobName="SuperCoolInstrumentOrEffect"
257
+ * onInstrumentLoaded={(inst, name) => setInstrument(inst)}
258
+ * onErrorLoadingInstrument={(err) => setError(err)}
259
+ * />
260
+ * {error && <GELabel x={10} y={10} text={error} color="#ff0000" />}
261
+ * {instrument && <PluginControls instrument={instrument} />}
262
+ * </GELabel>
263
+ * );
264
+ * }
265
+ * ```
266
+ */
267
+ function BlobManager(props) {
268
+ (0, react_1.useEffect)(() => {
269
+ (0, exports.loadBlob)(props);
270
+ }, []);
271
+ return React.createElement(React.Fragment, null);
272
+ }
273
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQmxvYk1hbmFnZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvQmxvYk1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQW9WQSxrQ0FNQztBQTFWRCw2Q0FBK0I7QUFDL0IsaUNBQWtDO0FBQ2xDLDRDQUE4QjtBQUM5Qiw2Q0FBK0I7QUFDL0IsZ0RBQWtDO0FBc0ZsQzs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxXQUFXLEdBQUcsQ0FBQyxFQUFFLElBQUksRUFBRSxLQUFLLEdBQUcsSUFBSSxFQUFxQyxFQUFFLEVBQUUsQ0FDaEYsS0FBSyxDQUFDLENBQUMsQ0FBQyxHQUFHLElBQUksYUFBYSxDQUFDLENBQUMsQ0FBQyxHQUFHLElBQUksYUFBYSxDQU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QU0sVUFBVSxHQUFHLGFBQWEsQ0FBQyxxQkFBcUIsRUFBRSxDQUFDO1FBQ3pELGFBQWEsQ0FBQyxtQkFBbUIsQ0FBQyxVQUFVLENBQUMsQ0FBQztRQUM5Qyx3QkFBd0IsQ0FDdEIseUNBQXlDLGdCQUFnQiwrRUFBK0UsQ0FDekksQ0FBQztJQUNKLENBQUM7QUFDSCxDQUFDLENBQUM7QUE1QlcsUUFBQSxRQUFRLFlBNEJuQjtBQUVGOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0EwQ0c7QUFDSCxTQUFnQixXQUFXLENBQUMsS0FBZ0I7SUFDMUMsSUFBQSxpQkFBUyxFQUFDLEdBQUcsRUFBRTtRQUNiLElBQUEsZ0JBQVEsRUFBQyxLQUFLLENBQUMsQ0FBQztJQUNsQixDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFFUCxPQUFPLHlDQUFLLENBQUM7QUFDZixDQUFDIn0=
@@ -0,0 +1,4 @@
1
+ /// <reference types="gorilla-engine" preserve="true" />
2
+ import { BlobManager, loadBlob, locateBlob, BlobProps } from './BlobManager';
3
+ export { BlobManager, loadBlob, locateBlob };
4
+ export type { BlobProps };
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /// <reference types="gorilla-engine" preserve="true" />
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.locateBlob = exports.loadBlob = exports.BlobManager = void 0;
5
+ const BlobManager_1 = require("./BlobManager");
6
+ Object.defineProperty(exports, "BlobManager", { enumerable: true, get: function () { return BlobManager_1.BlobManager; } });
7
+ Object.defineProperty(exports, "loadBlob", { enumerable: true, get: function () { return BlobManager_1.loadBlob; } });
8
+ Object.defineProperty(exports, "locateBlob", { enumerable: true, get: function () { return BlobManager_1.locateBlob; } });
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLHdEQUF3RDs7O0FBaUJ4RCwrQ0FBNkU7QUFFcEUsNEZBRkEseUJBQVcsT0FFQTtBQUFFLHlGQUZBLHNCQUFRLE9BRUE7QUFBRSwyRkFGQSx3QkFBVSxPQUVBIn0=
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@gorilla-engine-sdk/ge-blob-manager",
3
+ "version": "1.0.5",
4
+ "description": "This components helps to locate and load a blob file",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "README.md",
10
+ "LICENSE.md"
11
+ ],
12
+ "scripts": {
13
+ "test": "echo \"No tests specified for ge-blob-manager\"",
14
+ "prepack": "npx tsc --declaration",
15
+ "ci:publish": "node ../../scripts/ci-publish.js"
16
+ },
17
+ "author": "UJAM Inc.",
18
+ "license": "SEE LICENSE IN LICENSE.md",
19
+ "peerDependencies": {
20
+ "@gorilla-engine-sdk/gorilla-engine-react": "^1.6.1",
21
+ "react": "^19.0.0"
22
+ },
23
+ "devDependencies": {
24
+ "@gorilla-engine-sdk/gorilla-engine-react": "^1.6.1",
25
+ "@types/node": "^18.19.130",
26
+ "@types/react": "^19.2.16",
27
+ "@types/react-reconciler": "^0.33.0",
28
+ "react": "^19.0.0",
29
+ "typescript": "^6.0.3"
30
+ },
31
+ "dependencies": {
32
+ "@types/gorilla-engine": "^1.1.31",
33
+ "fs-extra": "^11.3.3"
34
+ },
35
+ "homepage": "https://www.gorilla-engine.com/",
36
+ "keywords": [
37
+ "gorilla-engine",
38
+ "UJAM"
39
+ ],
40
+ "publishConfig": {
41
+ "access": "public",
42
+ "registry": "https://registry.npmjs.org/"
43
+ }
44
+ }