@gorilla-engine-sdk/gorilla-engine-react 1.6.1
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 +64 -0
- package/README.md +345 -0
- package/dist/ComponentFactory.d.ts +180 -0
- package/dist/ComponentFactory.js +118 -0
- package/dist/GEReact.d.ts +53 -0
- package/dist/GEReact.js +237 -0
- package/dist/Root.d.ts +15 -0
- package/dist/Root.js +52 -0
- package/dist/hooks/useInstrument.d.ts +27 -0
- package/dist/hooks/useInstrument.js +109 -0
- package/dist/hooks/useInstrumentProperty.d.ts +47 -0
- package/dist/hooks/useInstrumentProperty.js +113 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +67 -0
- package/dist/instance.d.ts +18 -0
- package/dist/instance.js +16 -0
- package/dist/nativeWrappers/GEAmpEnv.d.ts +9 -0
- package/dist/nativeWrappers/GEAmpEnv.js +12 -0
- package/dist/nativeWrappers/GEBarStepEditor.d.ts +12 -0
- package/dist/nativeWrappers/GEBarStepEditor.js +16 -0
- package/dist/nativeWrappers/GEButton.d.ts +17 -0
- package/dist/nativeWrappers/GEButton.js +21 -0
- package/dist/nativeWrappers/GEComboBox.d.ts +18 -0
- package/dist/nativeWrappers/GEComboBox.js +16 -0
- package/dist/nativeWrappers/GECurve.d.ts +9 -0
- package/dist/nativeWrappers/GECurve.js +12 -0
- package/dist/nativeWrappers/GEDragContainer.d.ts +24 -0
- package/dist/nativeWrappers/GEDragContainer.js +22 -0
- package/dist/nativeWrappers/GEDragTarget.d.ts +20 -0
- package/dist/nativeWrappers/GEDragTarget.js +20 -0
- package/dist/nativeWrappers/GEDropZone.d.ts +22 -0
- package/dist/nativeWrappers/GEDropZone.js +20 -0
- package/dist/nativeWrappers/GEKnob.d.ts +18 -0
- package/dist/nativeWrappers/GEKnob.js +19 -0
- package/dist/nativeWrappers/GELabel.d.ts +16 -0
- package/dist/nativeWrappers/GELabel.js +20 -0
- package/dist/nativeWrappers/GELevelMeter.d.ts +8 -0
- package/dist/nativeWrappers/GELevelMeter.js +12 -0
- package/dist/nativeWrappers/GEListBox.d.ts +17 -0
- package/dist/nativeWrappers/GEListBox.js +15 -0
- package/dist/nativeWrappers/GELottieAnimation.d.ts +16 -0
- package/dist/nativeWrappers/GELottieAnimation.js +17 -0
- package/dist/nativeWrappers/GEMappingEditor.d.ts +24 -0
- package/dist/nativeWrappers/GEMappingEditor.js +22 -0
- package/dist/nativeWrappers/GEMidiKeyboard.d.ts +8 -0
- package/dist/nativeWrappers/GEMidiKeyboard.js +12 -0
- package/dist/nativeWrappers/GEPad.d.ts +15 -0
- package/dist/nativeWrappers/GEPad.js +16 -0
- package/dist/nativeWrappers/GERubberband.d.ts +16 -0
- package/dist/nativeWrappers/GERubberband.js +17 -0
- package/dist/nativeWrappers/GEScrollView.d.ts +26 -0
- package/dist/nativeWrappers/GEScrollView.js +21 -0
- package/dist/nativeWrappers/GESliceEditor.d.ts +30 -0
- package/dist/nativeWrappers/GESliceEditor.js +23 -0
- package/dist/nativeWrappers/GESlider.d.ts +20 -0
- package/dist/nativeWrappers/GESlider.js +20 -0
- package/dist/nativeWrappers/GEStepEditor.d.ts +12 -0
- package/dist/nativeWrappers/GEStepEditor.js +16 -0
- package/dist/nativeWrappers/GETagBrowser.d.ts +15 -0
- package/dist/nativeWrappers/GETagBrowser.js +16 -0
- package/dist/nativeWrappers/GETagEditor.d.ts +15 -0
- package/dist/nativeWrappers/GETagEditor.js +16 -0
- package/dist/nativeWrappers/GETextBox.d.ts +22 -0
- package/dist/nativeWrappers/GETextBox.js +20 -0
- package/dist/nativeWrappers/GEToggle.d.ts +18 -0
- package/dist/nativeWrappers/GEToggle.js +16 -0
- package/dist/nativeWrappers/GEWaveform.d.ts +17 -0
- package/dist/nativeWrappers/GEWaveform.js +17 -0
- package/dist/nativeWrappers/GEXYPad.d.ts +16 -0
- package/dist/nativeWrappers/GEXYPad.js +17 -0
- package/dist/nativeWrappers/common/GEComponent.d.ts +104 -0
- package/dist/nativeWrappers/common/GEComponent.js +226 -0
- package/dist/nativeWrappers/common/ReactElementProps.d.ts +20 -0
- package/dist/nativeWrappers/common/ReactElementProps.js +3 -0
- package/dist/nativeWrappers/common/clickableHandlerMappings.d.ts +40 -0
- package/dist/nativeWrappers/common/clickableHandlerMappings.js +21 -0
- package/dist/nativeWrappers/common/keyableHandlerMappings.d.ts +16 -0
- package/dist/nativeWrappers/common/keyableHandlerMappings.js +13 -0
- package/package.json +59 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
/**
|
|
3
|
+
* Singleton-per-instrument EventEmitter that listens to all property changes on
|
|
4
|
+
* a {@link GorillaEngine.Instrument} and re-emits them by property name.
|
|
5
|
+
*
|
|
6
|
+
* Use {@link InstrumentPropertyChangeEmitter.forInstrument} to obtain the
|
|
7
|
+
* shared instance for a given instrument.
|
|
8
|
+
*/
|
|
9
|
+
export declare class InstrumentPropertyChangeEmitter extends EventEmitter {
|
|
10
|
+
instrument: GorillaEngine.Instrument;
|
|
11
|
+
/** Shared emitter instances keyed by instrument, ensuring one emitter per instrument. */
|
|
12
|
+
static emitters: Map<GorillaEngine.Instrument, InstrumentPropertyChangeEmitter>;
|
|
13
|
+
constructor(instrument: GorillaEngine.Instrument);
|
|
14
|
+
/** Returns the shared emitter for the given instrument, creating one if it does not exist. */
|
|
15
|
+
static forInstrument(instrument: GorillaEngine.Instrument): InstrumentPropertyChangeEmitter;
|
|
16
|
+
/** Registers change listeners on every instrument property that has a `value`. */
|
|
17
|
+
setupListeners(): void;
|
|
18
|
+
/** Emits the current `value`, `normValue`, and `text` for the changed property. */
|
|
19
|
+
handlePropertyChange(prop: string): void;
|
|
20
|
+
/** Removes and discards the cached emitter for the given instrument. */
|
|
21
|
+
static removeInstrument(instrument: GorillaEngine.Instrument): void;
|
|
22
|
+
/** Removes all cached emitter instances. */
|
|
23
|
+
static clear(): void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Return type for {@link useInstrumentProperty}.
|
|
27
|
+
*
|
|
28
|
+
* Tuple of `[property, setValue, setNormValue]`.
|
|
29
|
+
*/
|
|
30
|
+
type UseInstrumentPropertyReturnValue = [
|
|
31
|
+
GorillaEngine.InstrumentProperty,
|
|
32
|
+
(value: number) => void,
|
|
33
|
+
(value: number) => void
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* Subscribes to a single property on a Gorilla Engine instrument and provides
|
|
37
|
+
* reactive state plus setters for its value.
|
|
38
|
+
*
|
|
39
|
+
* Re-subscribes automatically when the instrument or property name changes.
|
|
40
|
+
*
|
|
41
|
+
* @param instrument - The loaded instrument instance.
|
|
42
|
+
* @param propName - The name of the instrument property to bind to.
|
|
43
|
+
* @returns A tuple of `[property, setValue, setNormValue]` where `setValue` sets
|
|
44
|
+
* the denormalized value and `setNormValue` sets the normalized (0-1) value.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useInstrumentProperty(instrument: GorillaEngine.Instrument, propName: string): UseInstrumentPropertyReturnValue;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstrumentPropertyChangeEmitter = void 0;
|
|
4
|
+
exports.useInstrumentProperty = useInstrumentProperty;
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const events_1 = require("events");
|
|
7
|
+
/**
|
|
8
|
+
* Singleton-per-instrument EventEmitter that listens to all property changes on
|
|
9
|
+
* a {@link GorillaEngine.Instrument} and re-emits them by property name.
|
|
10
|
+
*
|
|
11
|
+
* Use {@link InstrumentPropertyChangeEmitter.forInstrument} to obtain the
|
|
12
|
+
* shared instance for a given instrument.
|
|
13
|
+
*/
|
|
14
|
+
class InstrumentPropertyChangeEmitter extends events_1.EventEmitter {
|
|
15
|
+
instrument;
|
|
16
|
+
/** Shared emitter instances keyed by instrument, ensuring one emitter per instrument. */
|
|
17
|
+
static emitters = new Map();
|
|
18
|
+
constructor(instrument) {
|
|
19
|
+
super();
|
|
20
|
+
this.instrument = instrument;
|
|
21
|
+
this.setupListeners();
|
|
22
|
+
}
|
|
23
|
+
/** Returns the shared emitter for the given instrument, creating one if it does not exist. */
|
|
24
|
+
static forInstrument(instrument) {
|
|
25
|
+
if (InstrumentPropertyChangeEmitter.emitters.has(instrument)) {
|
|
26
|
+
return InstrumentPropertyChangeEmitter.emitters.get(instrument);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const wrap = new InstrumentPropertyChangeEmitter(instrument);
|
|
30
|
+
InstrumentPropertyChangeEmitter.emitters.set(instrument, wrap);
|
|
31
|
+
return wrap;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/** Registers change listeners on every instrument property that has a `value`. */
|
|
35
|
+
setupListeners() {
|
|
36
|
+
for (const prop in this.instrument) {
|
|
37
|
+
if ('value' in this.instrument[prop]) {
|
|
38
|
+
this.instrument.on(prop, this.handlePropertyChange.bind(this, prop));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** Emits the current `value`, `normValue`, and `text` for the changed property. */
|
|
43
|
+
handlePropertyChange(prop) {
|
|
44
|
+
this.emit(prop, this.instrument[prop].value, this.instrument[prop].normValue, this.instrument[prop].text);
|
|
45
|
+
}
|
|
46
|
+
/** Removes and discards the cached emitter for the given instrument. */
|
|
47
|
+
static removeInstrument(instrument) {
|
|
48
|
+
InstrumentPropertyChangeEmitter.emitters.delete(instrument);
|
|
49
|
+
}
|
|
50
|
+
/** Removes all cached emitter instances. */
|
|
51
|
+
static clear() {
|
|
52
|
+
InstrumentPropertyChangeEmitter.emitters.clear();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.InstrumentPropertyChangeEmitter = InstrumentPropertyChangeEmitter;
|
|
56
|
+
/**
|
|
57
|
+
* Subscribes to a single property on a Gorilla Engine instrument and provides
|
|
58
|
+
* reactive state plus setters for its value.
|
|
59
|
+
*
|
|
60
|
+
* Re-subscribes automatically when the instrument or property name changes.
|
|
61
|
+
*
|
|
62
|
+
* @param instrument - The loaded instrument instance.
|
|
63
|
+
* @param propName - The name of the instrument property to bind to.
|
|
64
|
+
* @returns A tuple of `[property, setValue, setNormValue]` where `setValue` sets
|
|
65
|
+
* the denormalized value and `setNormValue` sets the normalized (0-1) value.
|
|
66
|
+
*/
|
|
67
|
+
function useInstrumentProperty(instrument, propName) {
|
|
68
|
+
const getPropObject = (0, react_1.useCallback)(() => ({
|
|
69
|
+
normValue: instrument[propName].normValue,
|
|
70
|
+
value: instrument[propName].value,
|
|
71
|
+
normValueAsync: instrument[propName].normValueAsync,
|
|
72
|
+
valueAsync: instrument[propName].valueAsync,
|
|
73
|
+
defaultValue: instrument[propName].defaultValue,
|
|
74
|
+
minValue: instrument[propName].minValue,
|
|
75
|
+
maxValue: instrument[propName].maxValue,
|
|
76
|
+
resolution: instrument[propName].resolution,
|
|
77
|
+
numSteps: instrument[propName].numSteps,
|
|
78
|
+
key: instrument[propName].key,
|
|
79
|
+
name: instrument[propName].name,
|
|
80
|
+
category: instrument[propName].category,
|
|
81
|
+
label: instrument[propName].label,
|
|
82
|
+
text: instrument[propName].text,
|
|
83
|
+
unit: instrument[propName].unit,
|
|
84
|
+
steps: instrument[propName].steps,
|
|
85
|
+
persistence: instrument[propName].persistence,
|
|
86
|
+
controlType: instrument[propName].controlType,
|
|
87
|
+
}), [propName, instrument]);
|
|
88
|
+
const [prop, setProp] = (0, react_1.useState)(() => getPropObject());
|
|
89
|
+
const [instrumentPropertyChangeEmitter, setInstrumentPropertyChangeEmitter] = (0, react_1.useState)(() => InstrumentPropertyChangeEmitter.forInstrument(instrument));
|
|
90
|
+
(0, react_1.useEffect)(() => {
|
|
91
|
+
setInstrumentPropertyChangeEmitter(InstrumentPropertyChangeEmitter.forInstrument(instrument));
|
|
92
|
+
setProp(getPropObject());
|
|
93
|
+
}, [instrument, getPropObject]);
|
|
94
|
+
(0, react_1.useEffect)(() => {
|
|
95
|
+
const changeHandler = () => {
|
|
96
|
+
setProp(getPropObject());
|
|
97
|
+
};
|
|
98
|
+
instrumentPropertyChangeEmitter.on(propName, changeHandler);
|
|
99
|
+
return () => {
|
|
100
|
+
instrumentPropertyChangeEmitter.removeListener(propName, changeHandler);
|
|
101
|
+
};
|
|
102
|
+
}, [propName, instrumentPropertyChangeEmitter, getPropObject]);
|
|
103
|
+
const setValue = (0, react_1.useCallback)((value) => {
|
|
104
|
+
instrument[propName].value = value;
|
|
105
|
+
setProp(getPropObject());
|
|
106
|
+
}, [propName, instrument, getPropObject]);
|
|
107
|
+
const setNormValue = (0, react_1.useCallback)((normValue) => {
|
|
108
|
+
instrument[propName].normValue = normValue;
|
|
109
|
+
setProp(getPropObject());
|
|
110
|
+
}, [propName, instrument, getPropObject]);
|
|
111
|
+
return [prop, setValue, setNormValue];
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlSW5zdHJ1bWVudFByb3BlcnR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2hvb2tzL3VzZUluc3RydW1lbnRQcm9wZXJ0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUF1RkEsc0RBZ0VDO0FBdkpELGlDQUF5RDtBQUV6RCxtQ0FBc0M7QUFFdEM7Ozs7OztHQU1HO0FBQ0gsTUFBYSwrQkFBZ0MsU0FBUSxxQkFBWTtJQUMvRCxVQUFVLENBQTJCO0lBQ3JDLHlGQUF5RjtJQUN6RixNQUFNLENBQUMsUUFBUSxHQUFtRSxJQUFJLEdBQUcsRUFHdEYsQ0FBQztJQUNKLFlBQVksVUFBb0M7UUFDOUMsS0FBSyxFQUFFLENBQUM7UUFDUixJQUFJLENBQUMsVUFBVSxHQUFHLFVBQVUsQ0FBQztRQUM3QixJQUFJLENBQUMsY0FBYy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ixDQUFDLEVBQ0QsQ0FBQyxRQUFRLEVBQUUsVUFBVSxFQUFFLGFBQWEsQ0FBQyxDQUN0QyxDQUFDO0lBRUYsT0FBTyxDQUFDLElBQUksRUFBRSxRQUFRLEVBQUUsWUFBWSxDQUFDLENBQUM7QUFDeEMsQ0FBQyJ9
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="gorilla-engine" preserve="true" />
|
|
2
|
+
/**
|
|
3
|
+
* @module gorilla-engine-react
|
|
4
|
+
*
|
|
5
|
+
* Custom React reconciler for building Gorilla Engine audio plugin UIs.
|
|
6
|
+
*
|
|
7
|
+
* Exports:
|
|
8
|
+
* - **Rendering** – {@link render}, {@link loadUI}, {@link createUI} to mount React trees into native GE containers.
|
|
9
|
+
* - **Native wrapper components** – `GEButton`, `GEKnob`, `GESlider`, `GELabel`, `GEToggle`, `GEComboBox`, etc.
|
|
10
|
+
* - **Composed components** – higher-level components like `LabelledKnob`, `LabelledSlider`, `PadKeyboard`, `RadioGroup`.
|
|
11
|
+
* - **Hooks** – {@link useInstrument}, {@link useInstrumentProperty} for accessing Gorilla Engine instrument state.
|
|
12
|
+
* - **Utilities** – {@link ComponentFactory} for programmatic component creation, {@link instance} for runtime config.
|
|
13
|
+
*/
|
|
14
|
+
import { render, loadUI, createUI } from './GEReact';
|
|
15
|
+
import { useInstrument } from './hooks/useInstrument';
|
|
16
|
+
import { useInstrumentProperty } from './hooks/useInstrumentProperty';
|
|
17
|
+
import { GEButton, GEButtonProps } from './nativeWrappers/GEButton';
|
|
18
|
+
import { GEComboBox } from './nativeWrappers/GEComboBox';
|
|
19
|
+
import { GEKnob, GEKnobProps } from './nativeWrappers/GEKnob';
|
|
20
|
+
import { GESlider } from './nativeWrappers/GESlider';
|
|
21
|
+
import { GELabel, GELabelProps } from './nativeWrappers/GELabel';
|
|
22
|
+
import { GEMidiKeyboard } from './nativeWrappers/GEMidiKeyboard';
|
|
23
|
+
import { GESliceEditor } from './nativeWrappers/GESliceEditor';
|
|
24
|
+
import { GEPad, GEPadProps } from './nativeWrappers/GEPad';
|
|
25
|
+
import { GEScrollView } from './nativeWrappers/GEScrollView';
|
|
26
|
+
import { GETextBox } from './nativeWrappers/GETextBox';
|
|
27
|
+
import { GEToggle } from './nativeWrappers/GEToggle';
|
|
28
|
+
import { GELevelMeter } from './nativeWrappers/GELevelMeter';
|
|
29
|
+
import { GEWaveform } from './nativeWrappers/GEWaveform';
|
|
30
|
+
import { GELottieAnimation } from './nativeWrappers/GELottieAnimation';
|
|
31
|
+
import { GEXYPad } from './nativeWrappers/GEXYPad';
|
|
32
|
+
import { GERubberband } from './nativeWrappers/GERubberband';
|
|
33
|
+
import { GEMappingEditor } from './nativeWrappers/GEMappingEditor';
|
|
34
|
+
import ComponentFactory from './ComponentFactory';
|
|
35
|
+
import type { GEIntrinsicElements } from './ComponentFactory';
|
|
36
|
+
import { instance } from './instance';
|
|
37
|
+
declare global {
|
|
38
|
+
namespace React {
|
|
39
|
+
namespace JSX {
|
|
40
|
+
interface IntrinsicElements extends GEIntrinsicElements {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
namespace JSX {
|
|
45
|
+
interface IntrinsicElements {
|
|
46
|
+
[tagName: `ge${string}`]: any;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export { GEButtonProps, GELabelProps, GEIntrinsicElements, ComponentFactory, useInstrument, useInstrumentProperty, render, loadUI, createUI, GEButton, GEComboBox, GEKnob, GEKnobProps, GESlider, GELabel, GEMidiKeyboard, GEPad, GEPadProps, GEScrollView, GESliceEditor, GETextBox, GEToggle, GELevelMeter, GEWaveform, GELottieAnimation, GEXYPad, GERubberband, GEMappingEditor, instance, };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/// <reference types="gorilla-engine" preserve="true" />
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.instance = exports.GEMappingEditor = exports.GERubberband = exports.GEXYPad = exports.GELottieAnimation = exports.GEWaveform = exports.GELevelMeter = exports.GEToggle = exports.GETextBox = exports.GESliceEditor = exports.GEScrollView = exports.GEPad = exports.GEMidiKeyboard = exports.GELabel = exports.GESlider = exports.GEKnob = exports.GEComboBox = exports.GEButton = exports.createUI = exports.loadUI = exports.render = exports.useInstrumentProperty = exports.useInstrument = exports.ComponentFactory = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* @module gorilla-engine-react
|
|
10
|
+
*
|
|
11
|
+
* Custom React reconciler for building Gorilla Engine audio plugin UIs.
|
|
12
|
+
*
|
|
13
|
+
* Exports:
|
|
14
|
+
* - **Rendering** – {@link render}, {@link loadUI}, {@link createUI} to mount React trees into native GE containers.
|
|
15
|
+
* - **Native wrapper components** – `GEButton`, `GEKnob`, `GESlider`, `GELabel`, `GEToggle`, `GEComboBox`, etc.
|
|
16
|
+
* - **Composed components** – higher-level components like `LabelledKnob`, `LabelledSlider`, `PadKeyboard`, `RadioGroup`.
|
|
17
|
+
* - **Hooks** – {@link useInstrument}, {@link useInstrumentProperty} for accessing Gorilla Engine instrument state.
|
|
18
|
+
* - **Utilities** – {@link ComponentFactory} for programmatic component creation, {@link instance} for runtime config.
|
|
19
|
+
*/
|
|
20
|
+
const GEReact_1 = require("./GEReact");
|
|
21
|
+
Object.defineProperty(exports, "render", { enumerable: true, get: function () { return GEReact_1.render; } });
|
|
22
|
+
Object.defineProperty(exports, "loadUI", { enumerable: true, get: function () { return GEReact_1.loadUI; } });
|
|
23
|
+
Object.defineProperty(exports, "createUI", { enumerable: true, get: function () { return GEReact_1.createUI; } });
|
|
24
|
+
const useInstrument_1 = require("./hooks/useInstrument");
|
|
25
|
+
Object.defineProperty(exports, "useInstrument", { enumerable: true, get: function () { return useInstrument_1.useInstrument; } });
|
|
26
|
+
const useInstrumentProperty_1 = require("./hooks/useInstrumentProperty");
|
|
27
|
+
Object.defineProperty(exports, "useInstrumentProperty", { enumerable: true, get: function () { return useInstrumentProperty_1.useInstrumentProperty; } });
|
|
28
|
+
// basic wrappers
|
|
29
|
+
const GEButton_1 = require("./nativeWrappers/GEButton");
|
|
30
|
+
Object.defineProperty(exports, "GEButton", { enumerable: true, get: function () { return GEButton_1.GEButton; } });
|
|
31
|
+
const GEComboBox_1 = require("./nativeWrappers/GEComboBox");
|
|
32
|
+
Object.defineProperty(exports, "GEComboBox", { enumerable: true, get: function () { return GEComboBox_1.GEComboBox; } });
|
|
33
|
+
const GEKnob_1 = require("./nativeWrappers/GEKnob");
|
|
34
|
+
Object.defineProperty(exports, "GEKnob", { enumerable: true, get: function () { return GEKnob_1.GEKnob; } });
|
|
35
|
+
const GESlider_1 = require("./nativeWrappers/GESlider");
|
|
36
|
+
Object.defineProperty(exports, "GESlider", { enumerable: true, get: function () { return GESlider_1.GESlider; } });
|
|
37
|
+
const GELabel_1 = require("./nativeWrappers/GELabel");
|
|
38
|
+
Object.defineProperty(exports, "GELabel", { enumerable: true, get: function () { return GELabel_1.GELabel; } });
|
|
39
|
+
const GEMidiKeyboard_1 = require("./nativeWrappers/GEMidiKeyboard");
|
|
40
|
+
Object.defineProperty(exports, "GEMidiKeyboard", { enumerable: true, get: function () { return GEMidiKeyboard_1.GEMidiKeyboard; } });
|
|
41
|
+
const GESliceEditor_1 = require("./nativeWrappers/GESliceEditor");
|
|
42
|
+
Object.defineProperty(exports, "GESliceEditor", { enumerable: true, get: function () { return GESliceEditor_1.GESliceEditor; } });
|
|
43
|
+
const GEPad_1 = require("./nativeWrappers/GEPad");
|
|
44
|
+
Object.defineProperty(exports, "GEPad", { enumerable: true, get: function () { return GEPad_1.GEPad; } });
|
|
45
|
+
const GEScrollView_1 = require("./nativeWrappers/GEScrollView");
|
|
46
|
+
Object.defineProperty(exports, "GEScrollView", { enumerable: true, get: function () { return GEScrollView_1.GEScrollView; } });
|
|
47
|
+
const GETextBox_1 = require("./nativeWrappers/GETextBox");
|
|
48
|
+
Object.defineProperty(exports, "GETextBox", { enumerable: true, get: function () { return GETextBox_1.GETextBox; } });
|
|
49
|
+
const GEToggle_1 = require("./nativeWrappers/GEToggle");
|
|
50
|
+
Object.defineProperty(exports, "GEToggle", { enumerable: true, get: function () { return GEToggle_1.GEToggle; } });
|
|
51
|
+
const GELevelMeter_1 = require("./nativeWrappers/GELevelMeter");
|
|
52
|
+
Object.defineProperty(exports, "GELevelMeter", { enumerable: true, get: function () { return GELevelMeter_1.GELevelMeter; } });
|
|
53
|
+
const GEWaveform_1 = require("./nativeWrappers/GEWaveform");
|
|
54
|
+
Object.defineProperty(exports, "GEWaveform", { enumerable: true, get: function () { return GEWaveform_1.GEWaveform; } });
|
|
55
|
+
const GELottieAnimation_1 = require("./nativeWrappers/GELottieAnimation");
|
|
56
|
+
Object.defineProperty(exports, "GELottieAnimation", { enumerable: true, get: function () { return GELottieAnimation_1.GELottieAnimation; } });
|
|
57
|
+
const GEXYPad_1 = require("./nativeWrappers/GEXYPad");
|
|
58
|
+
Object.defineProperty(exports, "GEXYPad", { enumerable: true, get: function () { return GEXYPad_1.GEXYPad; } });
|
|
59
|
+
const GERubberband_1 = require("./nativeWrappers/GERubberband");
|
|
60
|
+
Object.defineProperty(exports, "GERubberband", { enumerable: true, get: function () { return GERubberband_1.GERubberband; } });
|
|
61
|
+
const GEMappingEditor_1 = require("./nativeWrappers/GEMappingEditor");
|
|
62
|
+
Object.defineProperty(exports, "GEMappingEditor", { enumerable: true, get: function () { return GEMappingEditor_1.GEMappingEditor; } });
|
|
63
|
+
const ComponentFactory_1 = __importDefault(require("./ComponentFactory"));
|
|
64
|
+
exports.ComponentFactory = ComponentFactory_1.default;
|
|
65
|
+
const instance_1 = require("./instance");
|
|
66
|
+
Object.defineProperty(exports, "instance", { enumerable: true, get: function () { return instance_1.instance;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FQUE2RDtBQWdEM0QsNkZBaERPLDJCQUFZLE9BZ0RQO0FBL0NkLDREQUF5RDtBQWdEdkQsMkZBaERPLHVCQUFVLE9BZ0RQO0FBL0NaLDBFQUF1RTtBQWdEckUsa0dBaERPLHFDQUFpQixPQWdEUDtBQS9DbkIsc0RBQW1EO0FBZ0RqRCx3RkFoRE8saUJBQU8sT0FnRFA7QUEvQ1QsZ0VBQTZEO0FBZ0QzRCw2RkFoRE8sMkJBQVksT0FnRFA7QUEvQ2Qsc0VBQW1FO0FBZ0RqRSxnR0FoRE8saUNBQWUsT0FnRFA7QUE5Q2pCLDBFQUFrRDtBQXNCaEQsMkJBdEJLLDBCQUFnQixDQXNCTDtBQXBCbEIseUNBQXNDO0FBNkNwQyx5RkE3Q08sbUJBQVEsT0E2Q1AifQ==
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger interface used throughout the reconciler for diagnostic output.
|
|
3
|
+
* Can be replaced via {@link instance} to redirect log output.
|
|
4
|
+
*/
|
|
5
|
+
export interface Logger {
|
|
6
|
+
error?: any;
|
|
7
|
+
info?: any;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Shared singleton holding runtime state for the Gorilla Engine React reconciler.
|
|
11
|
+
*
|
|
12
|
+
* - `rootNodeId` – ID of the native root container node, set during {@link loadUI} or {@link createUI}.
|
|
13
|
+
* - `log` – replaceable {@link Logger} for info/error output (defaults to `console`).
|
|
14
|
+
*/
|
|
15
|
+
export declare const instance: {
|
|
16
|
+
rootNodeId?: string;
|
|
17
|
+
log: Logger;
|
|
18
|
+
};
|
package/dist/instance.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instance = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Shared singleton holding runtime state for the Gorilla Engine React reconciler.
|
|
6
|
+
*
|
|
7
|
+
* - `rootNodeId` – ID of the native root container node, set during {@link loadUI} or {@link createUI}.
|
|
8
|
+
* - `log` – replaceable {@link Logger} for info/error output (defaults to `console`).
|
|
9
|
+
*/
|
|
10
|
+
exports.instance = {
|
|
11
|
+
log: {
|
|
12
|
+
info: (...args) => console.log(...args),
|
|
13
|
+
error: (...args) => console.error(...args)
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFuY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5zdGFuY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBU0E7Ozs7O0dBS0c7QUFDVSxRQUFBLFFBQVEsR0FHakI7SUFDRixHQUFHLEVBQUU7UUFDSCxJQUFJLEVBQUUsQ0FBQyxHQUFHLElBQUksRUFBRSxFQUFFLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLElBQUksQ0FBQztRQUN2QyxLQUFLLEVBQUUsQ0FBQyxHQUFHLElBQUksRUFBRSxFQUFFLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxHQUFHLElBQUksQ0FBQztLQUMzQztDQUNGLENBQUEifQ==
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
2
|
+
import { GEComponent } from './common/GEComponent';
|
|
3
|
+
/** Props for {@link GEAmpEnv}, combining native AmpEnvProps with React element props. */
|
|
4
|
+
export interface GEAmpEnvProps extends GorillaEngine.UI.AmpEnvProps, ReactElementProps {
|
|
5
|
+
}
|
|
6
|
+
/** React wrapper for the native {@link GorillaEngine.UI.AmpEnv} amplitude envelope component. */
|
|
7
|
+
export declare class GEAmpEnv extends GEComponent<GorillaEngine.UI.AmpEnv> {
|
|
8
|
+
constructor(props: Partial<GEAmpEnvProps>);
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEAmpEnv = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
/** React wrapper for the native {@link GorillaEngine.UI.AmpEnv} amplitude envelope component. */
|
|
6
|
+
class GEAmpEnv extends GEComponent_1.GEComponent {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(GorillaEngine.UI.AmpEnv, props);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.GEAmpEnv = GEAmpEnv;
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VBbXBFbnYuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbmF0aXZlV3JhcHBlcnMvR0VBbXBFbnYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsc0RBQW1EO0FBS25ELGlHQUFpRztBQUNqRyxNQUFhLFFBQVMsU0FBUSx5QkFBb0M7SUFDaEUsWUFBWSxLQUE2QjtRQUN2QyxLQUFLLENBQUMsYUFBYSxDQUFDLEVBQUUsQ0FBQyxNQUFNLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFDeEMsQ0FBQztDQUNGO0FBSkQsNEJBSUMifQ==
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
2
|
+
import { GEComponent } from './common/GEComponent';
|
|
3
|
+
import { ClickableHandlers } from './common/clickableHandlerMappings';
|
|
4
|
+
/** Props for {@link GEBarStepEditor}, combining native BarStepEditorProps with React element props and clickable event handlers. */
|
|
5
|
+
export type GEBarStepEditorProps = GorillaEngine.UI.BarStepEditorProps & ReactElementProps & ClickableHandlers;
|
|
6
|
+
/**
|
|
7
|
+
* React wrapper for the native {@link GorillaEngine.UI.BarStepEditor} component.
|
|
8
|
+
* Uses {@link clickableHandlerMappings} to map React mouse event handlers to native events.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GEBarStepEditor extends GEComponent<GorillaEngine.UI.BarStepEditor> {
|
|
11
|
+
constructor(props: Partial<GEBarStepEditorProps>);
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEBarStepEditor = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
const clickableHandlerMappings_1 = require("./common/clickableHandlerMappings");
|
|
6
|
+
/**
|
|
7
|
+
* React wrapper for the native {@link GorillaEngine.UI.BarStepEditor} component.
|
|
8
|
+
* Uses {@link clickableHandlerMappings} to map React mouse event handlers to native events.
|
|
9
|
+
*/
|
|
10
|
+
class GEBarStepEditor extends GEComponent_1.GEComponent {
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(GorillaEngine.UI.BarStepEditor, props, clickableHandlerMappings_1.clickableHandlerMappings);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.GEBarStepEditor = GEBarStepEditor;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VCYXJTdGVwRWRpdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25hdGl2ZVdyYXBwZXJzL0dFQmFyU3RlcEVkaXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxzREFBbUQ7QUFDbkQsZ0ZBQWdHO0FBS2hHOzs7R0FHRztBQUNILE1BQWEsZUFBZ0IsU0FBUSx5QkFBMkM7SUFFOUUsWUFBWSxLQUFvQztRQUM5QyxLQUFLLENBQUMsYUFBYSxDQUFDLEVBQUUsQ0FBQyxhQUFhLEVBQUUsS0FBSyxFQUFFLG1EQUF3QixDQUFDLENBQUM7SUFDekUsQ0FBQztDQUNGO0FBTEQsMENBS0MifQ==
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GEComponent } from './common/GEComponent';
|
|
2
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
3
|
+
import { ClickableHandlers } from './common/clickableHandlerMappings';
|
|
4
|
+
import { KeyableHandlers } from './common/keyableHandlerMappings';
|
|
5
|
+
/**
|
|
6
|
+
* Props for {@link GEButton}.
|
|
7
|
+
* Combines native TriggerProps with React element props, click handlers, and key handlers.
|
|
8
|
+
*/
|
|
9
|
+
export type GEButtonProps = GorillaEngine.UI.TriggerProps & ReactElementProps & ClickableHandlers & KeyableHandlers;
|
|
10
|
+
/**
|
|
11
|
+
* Wraps the native `GorillaEngine.UI.Trigger` component.
|
|
12
|
+
* Used to trigger an action -- does *not* work as a toggle.
|
|
13
|
+
* Supports clickable and keyable handler mappings.
|
|
14
|
+
*/
|
|
15
|
+
export declare class GEButton extends GEComponent<GorillaEngine.UI.Trigger> {
|
|
16
|
+
constructor(props: Partial<GEButtonProps>);
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEButton = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
const clickableHandlerMappings_1 = require("./common/clickableHandlerMappings");
|
|
6
|
+
const keyableHandlerMappings_1 = require("./common/keyableHandlerMappings");
|
|
7
|
+
/**
|
|
8
|
+
* Wraps the native `GorillaEngine.UI.Trigger` component.
|
|
9
|
+
* Used to trigger an action -- does *not* work as a toggle.
|
|
10
|
+
* Supports clickable and keyable handler mappings.
|
|
11
|
+
*/
|
|
12
|
+
class GEButton extends GEComponent_1.GEComponent {
|
|
13
|
+
constructor(props) {
|
|
14
|
+
super(GorillaEngine.UI.Trigger, props, {
|
|
15
|
+
...clickableHandlerMappings_1.clickableHandlerMappings,
|
|
16
|
+
...keyableHandlerMappings_1.keyableHandlerMappings,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.GEButton = GEButton;
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VCdXR0b24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbmF0aXZlV3JhcHBlcnMvR0VCdXR0b24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsc0RBQW1EO0FBRW5ELGdGQUFnRztBQUNoRyw0RUFBMEY7QUFXMUY7Ozs7R0FJRztBQUNILE1BQWEsUUFBUyxTQUFRLHlCQUFxQztJQUNqRSxZQUFZLEtBQTZCO1FBQ3ZDLEtBQUssQ0FBQyxhQUFhLENBQUMsRUFBRSxDQUFDLE9BQU8sRUFBRSxLQUFLLEVBQUU7WUFDckMsR0FBRyxtREFBd0I7WUFDM0IsR0FBRywrQ0FBc0I7U0FDMUIsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztDQUNGO0FBUEQsNEJBT0MifQ==
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
2
|
+
import { GEComponent } from './common/GEComponent';
|
|
3
|
+
import { ClickableHandlers } from './common/clickableHandlerMappings';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link GEComboBox}.
|
|
6
|
+
* Combines native ComboBoxProps with React element props, click handlers, and a value change callback.
|
|
7
|
+
* @property onChange - Fires when the selected index changes (maps to native `value` event).
|
|
8
|
+
*/
|
|
9
|
+
export declare type GEComboBoxProps = GorillaEngine.UI.ComboBoxProps & ReactElementProps & ClickableHandlers & {
|
|
10
|
+
onChange?: (value: number) => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Wraps the native `GorillaEngine.UI.ComboBox` component.
|
|
14
|
+
* Maps `onChange` to the native `value` event. Supports clickable handler mappings.
|
|
15
|
+
*/
|
|
16
|
+
export declare class GEComboBox extends GEComponent<GorillaEngine.UI.ComboBox> {
|
|
17
|
+
constructor(props: Partial<GEComboBoxProps>);
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEComboBox = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
const clickableHandlerMappings_1 = require("./common/clickableHandlerMappings");
|
|
6
|
+
/**
|
|
7
|
+
* Wraps the native `GorillaEngine.UI.ComboBox` component.
|
|
8
|
+
* Maps `onChange` to the native `value` event. Supports clickable handler mappings.
|
|
9
|
+
*/
|
|
10
|
+
class GEComboBox extends GEComponent_1.GEComponent {
|
|
11
|
+
constructor(props) {
|
|
12
|
+
super(GorillaEngine.UI.ComboBox, props, { ...clickableHandlerMappings_1.clickableHandlerMappings, onChange: 'value' });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.GEComboBox = GEComboBox;
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VDb21ib0JveC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9uYXRpdmVXcmFwcGVycy9HRUNvbWJvQm94LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUdBLHNEQUFtRDtBQUNuRCxnRkFBZ0c7QUFhaEc7OztHQUdHO0FBQ0gsTUFBYSxVQUFXLFNBQVEseUJBQXNDO0lBQ3BFLFlBQVksS0FBK0I7UUFDekMsS0FBSyxDQUFDLGFBQWEsQ0FBQyxFQUFFLENBQUMsUUFBUSxFQUFFLEtBQUssRUFBRSxFQUFFLEdBQUcsbURBQXdCLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBQyxDQUFDLENBQUM7SUFDN0YsQ0FBQztDQUVGO0FBTEQsZ0NBS0MifQ==
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
2
|
+
import { GEComponent } from './common/GEComponent';
|
|
3
|
+
/** Props for {@link GECurve}, combining native CurveProps with React element props. */
|
|
4
|
+
export interface GECurveProps extends GorillaEngine.UI.CurveProps, ReactElementProps {
|
|
5
|
+
}
|
|
6
|
+
/** React wrapper for the native {@link GorillaEngine.UI.Curve} component. */
|
|
7
|
+
export declare class GECurve extends GEComponent<GorillaEngine.UI.Curve> {
|
|
8
|
+
constructor(props: Partial<GECurveProps>);
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GECurve = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
/** React wrapper for the native {@link GorillaEngine.UI.Curve} component. */
|
|
6
|
+
class GECurve extends GEComponent_1.GEComponent {
|
|
7
|
+
constructor(props) {
|
|
8
|
+
super(GorillaEngine.UI.Curve, props);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.GECurve = GECurve;
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VDdXJ2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9uYXRpdmVXcmFwcGVycy9HRUN1cnZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHNEQUFtRDtBQUtuRCw2RUFBNkU7QUFDN0UsTUFBYSxPQUFRLFNBQVEseUJBQW1DO0lBQzlELFlBQVksS0FBNEI7UUFDdEMsS0FBSyxDQUFDLGFBQWEsQ0FBQyxFQUFFLENBQUMsS0FBSyxFQUFFLEtBQUssQ0FBQyxDQUFDO0lBQ3ZDLENBQUM7Q0FDRjtBQUpELDBCQUlDIn0=
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
2
|
+
import { GEComponent } from './common/GEComponent';
|
|
3
|
+
import { ClickableHandlers } from './common/clickableHandlerMappings';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the {@link GEDragContainer} component.
|
|
6
|
+
* Combines native DragContainer props with React element props, clickable handlers,
|
|
7
|
+
* and drag event callbacks.
|
|
8
|
+
*/
|
|
9
|
+
export type GEDragContainerProps = GorillaEngine.UI.DragContainerProps & ReactElementProps & ClickableHandlers & {
|
|
10
|
+
/** Called continuously while dragging with the current drag position. */
|
|
11
|
+
onDragging: (args: any) => void;
|
|
12
|
+
/** Called when a drag operation begins. */
|
|
13
|
+
onDragStart: (args: any) => void;
|
|
14
|
+
/** Called when a drag operation ends. */
|
|
15
|
+
onDragEnd: (args: any) => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* React wrapper for the Gorilla Engine DragContainer component.
|
|
19
|
+
* Provides a draggable container that emits drag lifecycle events.
|
|
20
|
+
*/
|
|
21
|
+
export declare class GEDragContainer extends GEComponent<GorillaEngine.UI.DragContainer> {
|
|
22
|
+
/** @param props - Partial drag container configuration and event handlers. */
|
|
23
|
+
constructor(props: Partial<GEDragContainerProps>);
|
|
24
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEDragContainer = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
const clickableHandlerMappings_1 = require("./common/clickableHandlerMappings");
|
|
6
|
+
/**
|
|
7
|
+
* React wrapper for the Gorilla Engine DragContainer component.
|
|
8
|
+
* Provides a draggable container that emits drag lifecycle events.
|
|
9
|
+
*/
|
|
10
|
+
class GEDragContainer extends GEComponent_1.GEComponent {
|
|
11
|
+
/** @param props - Partial drag container configuration and event handlers. */
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(GorillaEngine.UI.DragContainer, props, {
|
|
14
|
+
...clickableHandlerMappings_1.clickableHandlerMappings,
|
|
15
|
+
onDragging: 'dragPosition',
|
|
16
|
+
onDragStart: 'dragStarted',
|
|
17
|
+
onDragEnd: 'dragEnded',
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.GEDragContainer = GEDragContainer;
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VEcmFnQ29udGFpbmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25hdGl2ZVdyYXBwZXJzL0dFRHJhZ0NvbnRhaW5lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFDQSxzREFBbUQ7QUFDbkQsZ0ZBQWdHO0FBa0JoRzs7O0dBR0c7QUFDSCxNQUFhLGVBQWdCLFNBQVEseUJBQTJDO0lBQzlFLDhFQUE4RTtJQUM5RSxZQUFZLEtBQW9DO1FBQzlDLEtBQUssQ0FBQyxhQUFhLENBQUMsRUFBRSxDQUFDLGFBQWEsRUFBRSxLQUFLLEVBQUU7WUFDM0MsR0FBRyxtREFBd0I7WUFDM0IsVUFBVSxFQUFFLGNBQWM7WUFDMUIsV0FBVyxFQUFFLGFBQWE7WUFDMUIsU0FBUyxFQUFFLFdBQVc7U0FDdkIsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztDQUNGO0FBVkQsMENBVUMifQ==
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
2
|
+
import { GEComponent } from './common/GEComponent';
|
|
3
|
+
import { ClickableHandlers } from './common/clickableHandlerMappings';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the {@link GEDragTarget} component.
|
|
6
|
+
* Combines native DragTarget props with React element props, clickable handlers,
|
|
7
|
+
* and a drop event callback.
|
|
8
|
+
*/
|
|
9
|
+
export type GEDragTargetProps = GorillaEngine.UI.DragTargetProps & ReactElementProps & ClickableHandlers & {
|
|
10
|
+
/** Called when an item is dropped onto this target. */
|
|
11
|
+
onItemDropped: (args: any) => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* React wrapper for the Gorilla Engine DragTarget component.
|
|
15
|
+
* Represents a target area that accepts dropped items from a {@link GEDragContainer}.
|
|
16
|
+
*/
|
|
17
|
+
export declare class GEDragTarget extends GEComponent<GorillaEngine.UI.DragTarget> {
|
|
18
|
+
/** @param props - Partial drag target configuration and event handlers. */
|
|
19
|
+
constructor(props: Partial<GEDragTargetProps>);
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEDragTarget = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
const clickableHandlerMappings_1 = require("./common/clickableHandlerMappings");
|
|
6
|
+
/**
|
|
7
|
+
* React wrapper for the Gorilla Engine DragTarget component.
|
|
8
|
+
* Represents a target area that accepts dropped items from a {@link GEDragContainer}.
|
|
9
|
+
*/
|
|
10
|
+
class GEDragTarget extends GEComponent_1.GEComponent {
|
|
11
|
+
/** @param props - Partial drag target configuration and event handlers. */
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(GorillaEngine.UI.DragTarget, props, {
|
|
14
|
+
...clickableHandlerMappings_1.clickableHandlerMappings,
|
|
15
|
+
onItemDropped: 'drop'
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GEDragTarget = GEDragTarget;
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VEcmFnVGFyZ2V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL25hdGl2ZVdyYXBwZXJzL0dFRHJhZ1RhcmdldC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSxzREFBbUQ7QUFDbkQsZ0ZBQWdHO0FBWWhHOzs7R0FHRztBQUNILE1BQWEsWUFBYSxTQUFRLHlCQUF3QztJQUN4RSwyRUFBMkU7SUFDM0UsWUFBWSxLQUFpQztRQUMzQyxLQUFLLENBQUMsYUFBYSxDQUFDLEVBQUUsQ0FBQyxVQUFVLEVBQUUsS0FBSyxFQUFFO1lBQ3hDLEdBQUcsbURBQXdCO1lBQzNCLGFBQWEsRUFBRSxNQUFNO1NBQ3RCLENBQUMsQ0FBQztJQUNMLENBQUM7Q0FDRjtBQVJELG9DQVFDIn0=
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactElementProps } from './common/ReactElementProps';
|
|
2
|
+
import { GEComponent } from './common/GEComponent';
|
|
3
|
+
import { ClickableHandlers } from './common/clickableHandlerMappings';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the {@link GEDropZone} component.
|
|
6
|
+
* Combines native DropZone props with React element props, clickable handlers,
|
|
7
|
+
* and file drag/drop callbacks.
|
|
8
|
+
*/
|
|
9
|
+
export type GEDropZoneProps = GorillaEngine.UI.DropZoneProps & ReactElementProps & ClickableHandlers & {
|
|
10
|
+
/** Called when files are dragged over the drop zone. */
|
|
11
|
+
onDraggedFiles: any;
|
|
12
|
+
/** Called when files are dropped onto the drop zone. */
|
|
13
|
+
onDroppedFiles: any;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* React wrapper for the Gorilla Engine DropZone component.
|
|
17
|
+
* Accepts external file drag-and-drop interactions.
|
|
18
|
+
*/
|
|
19
|
+
export declare class GEDropZone extends GEComponent<GorillaEngine.UI.DropZone> {
|
|
20
|
+
/** @param props - Partial drop zone configuration and event handlers. */
|
|
21
|
+
constructor(props: Partial<GEDropZoneProps>);
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GEDropZone = void 0;
|
|
4
|
+
const GEComponent_1 = require("./common/GEComponent");
|
|
5
|
+
const clickableHandlerMappings_1 = require("./common/clickableHandlerMappings");
|
|
6
|
+
/**
|
|
7
|
+
* React wrapper for the Gorilla Engine DropZone component.
|
|
8
|
+
* Accepts external file drag-and-drop interactions.
|
|
9
|
+
*/
|
|
10
|
+
class GEDropZone extends GEComponent_1.GEComponent {
|
|
11
|
+
/** @param props - Partial drop zone configuration and event handlers. */
|
|
12
|
+
constructor(props) {
|
|
13
|
+
super(GorillaEngine.UI.DropZone, props, { ...clickableHandlerMappings_1.clickableHandlerMappings,
|
|
14
|
+
onDraggedFiles: 'draggedFiles',
|
|
15
|
+
onDroppedFiles: 'droppedFiles'
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GEDropZone = GEDropZone;
|
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR0VEcm9wWm9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9uYXRpdmVXcmFwcGVycy9HRURyb3Bab25lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLHNEQUFtRDtBQUNuRCxnRkFBZ0c7QUFnQmhHOzs7R0FHRztBQUNILE1BQWEsVUFBVyxTQUFRLHlCQUFzQztJQUNwRSx5RUFBeUU7SUFDekUsWUFBWSxLQUErQjtRQUN6QyxLQUFLLENBQUMsYUFBYSxDQUFDLEVBQUUsQ0FBQyxRQUFRLEVBQUUsS0FBSyxFQUFFLEVBQUMsR0FBRyxtREFBd0I7WUFDbEUsY0FBYyxFQUFFLGNBQWM7WUFDOUIsY0FBYyxFQUFFLGNBQWM7U0FDL0IsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztDQUNGO0FBUkQsZ0NBUUMifQ==
|