emr-bridge 1.7.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/LICENCE +1 -1
  2. package/README.md +173 -366
  3. package/cjs/entries/index.d.ts +1 -0
  4. package/cjs/entries/index.js +6 -0
  5. package/cjs/entries/main.d.ts +2 -0
  6. package/cjs/entries/main.js +27 -0
  7. package/cjs/entries/preload.d.ts +3 -0
  8. package/cjs/entries/preload.js +29 -0
  9. package/cjs/entries/renderer.d.ts +2 -0
  10. package/cjs/entries/renderer.js +27 -0
  11. package/cjs/enums.d.ts +5 -14
  12. package/cjs/enums.js +12 -23
  13. package/cjs/errors.d.ts +42 -10
  14. package/cjs/errors.js +77 -23
  15. package/cjs/index.d.ts +4 -4
  16. package/cjs/index.js +11 -13
  17. package/cjs/main.d.ts +2 -4
  18. package/cjs/main.js +4 -13
  19. package/cjs/preload.d.ts +2 -2
  20. package/cjs/preload.js +3 -3
  21. package/cjs/renderer.d.ts +1 -1
  22. package/cjs/scripts/base-bridge.d.ts +95 -0
  23. package/cjs/scripts/base-bridge.js +128 -0
  24. package/cjs/scripts/bridge.d.ts +3 -3
  25. package/cjs/scripts/bridge.js +48 -36
  26. package/cjs/scripts/helpers/env.d.ts +19 -0
  27. package/cjs/scripts/helpers/env.js +28 -0
  28. package/cjs/scripts/helpers/error-thrower.d.ts +3 -0
  29. package/cjs/scripts/helpers/error-thrower.js +8 -0
  30. package/cjs/scripts/helpers/errors.d.ts +12 -0
  31. package/cjs/scripts/helpers/errors.js +17 -0
  32. package/cjs/scripts/helpers/id.d.ts +9 -0
  33. package/cjs/scripts/helpers/id.js +14 -0
  34. package/cjs/scripts/helpers/index.d.ts +8 -0
  35. package/cjs/scripts/helpers/index.js +22 -0
  36. package/cjs/scripts/helpers/ipc-channel.d.ts +75 -0
  37. package/cjs/scripts/helpers/ipc-channel.js +78 -0
  38. package/cjs/scripts/helpers/ipc-event-in-main.d.ts +24 -0
  39. package/cjs/scripts/helpers/ipc-event-in-main.js +30 -0
  40. package/cjs/scripts/helpers/ipc-result.d.ts +26 -0
  41. package/cjs/scripts/helpers/ipc-result.js +48 -0
  42. package/cjs/scripts/helpers/main-event.d.ts +8 -0
  43. package/cjs/scripts/helpers/main-event.js +15 -0
  44. package/cjs/scripts/helpers/transfer.d.ts +33 -0
  45. package/cjs/scripts/helpers/transfer.js +57 -0
  46. package/cjs/scripts/helpers/web-contents-container.d.ts +12 -0
  47. package/cjs/scripts/helpers/web-contents-container.js +34 -0
  48. package/cjs/scripts/helpers/web-contents-events-container.d.ts +56 -0
  49. package/cjs/scripts/helpers/web-contents-events-container.js +81 -0
  50. package/cjs/scripts/main/publish.d.ts +36 -0
  51. package/cjs/scripts/main/publish.js +186 -0
  52. package/cjs/scripts/preload/bridge.d.ts +27 -0
  53. package/cjs/scripts/preload/bridge.js +85 -0
  54. package/cjs/scripts/preload/provider.d.ts +7 -0
  55. package/cjs/scripts/preload/provider.js +89 -0
  56. package/cjs/scripts/preload-bridge.d.ts +20 -0
  57. package/cjs/scripts/preload-bridge.js +76 -0
  58. package/cjs/scripts/preload-provider.js +34 -50
  59. package/cjs/scripts/provider.d.ts +17 -15
  60. package/cjs/scripts/provider.js +69 -90
  61. package/cjs/scripts/publish.d.ts +19 -18
  62. package/cjs/scripts/publish.js +96 -174
  63. package/cjs/scripts/renderer/bridge.d.ts +6 -0
  64. package/cjs/scripts/renderer/bridge.js +74 -0
  65. package/cjs/scripts/renderer/tunnels.d.ts +171 -0
  66. package/cjs/scripts/renderer/tunnels.js +205 -0
  67. package/cjs/scripts/renderer-tunnels.d.ts +19 -21
  68. package/cjs/scripts/renderer-tunnels.js +52 -57
  69. package/cjs/types.d.ts +189 -64
  70. package/esm/entries/index.d.ts +1 -0
  71. package/esm/entries/index.js +5 -0
  72. package/esm/entries/main.d.ts +2 -0
  73. package/esm/entries/main.js +5 -0
  74. package/esm/entries/preload.d.ts +3 -0
  75. package/esm/entries/preload.js +7 -0
  76. package/esm/entries/renderer.d.ts +2 -0
  77. package/esm/entries/renderer.js +6 -0
  78. package/esm/enums.d.ts +5 -14
  79. package/esm/enums.js +11 -22
  80. package/esm/errors.d.ts +42 -10
  81. package/esm/errors.js +69 -16
  82. package/esm/helpers.d.ts +41 -0
  83. package/esm/helpers.js +96 -0
  84. package/esm/index.d.ts +4 -4
  85. package/esm/index.js +3 -3
  86. package/esm/main.d.ts +2 -4
  87. package/esm/main.js +1 -3
  88. package/esm/preload.d.ts +2 -2
  89. package/esm/preload.js +1 -1
  90. package/esm/renderer.d.ts +1 -1
  91. package/esm/scripts/base-bridge.d.ts +95 -0
  92. package/esm/scripts/base-bridge.js +125 -0
  93. package/esm/scripts/bridge.d.ts +3 -3
  94. package/esm/scripts/bridge.js +49 -37
  95. package/esm/scripts/helpers/electron-importer.d.ts +4 -0
  96. package/esm/scripts/helpers/electron-importer.js +16 -0
  97. package/esm/scripts/helpers/env.d.ts +19 -0
  98. package/esm/scripts/helpers/env.js +25 -0
  99. package/esm/scripts/helpers/error-thrower.d.ts +3 -0
  100. package/esm/scripts/helpers/error-thrower.js +5 -0
  101. package/esm/scripts/helpers/errors.d.ts +12 -0
  102. package/esm/scripts/helpers/errors.js +14 -0
  103. package/esm/scripts/helpers/id.d.ts +9 -0
  104. package/esm/scripts/helpers/id.js +11 -0
  105. package/esm/scripts/helpers/index.d.ts +8 -0
  106. package/esm/scripts/helpers/index.js +8 -0
  107. package/esm/scripts/helpers/ipc-channel.d.ts +75 -0
  108. package/esm/scripts/helpers/ipc-channel.js +76 -0
  109. package/esm/scripts/helpers/ipc-event-in-main.d.ts +24 -0
  110. package/esm/scripts/helpers/ipc-event-in-main.js +27 -0
  111. package/esm/scripts/helpers/ipc-result.d.ts +26 -0
  112. package/esm/scripts/helpers/ipc-result.js +42 -0
  113. package/esm/scripts/helpers/main-event.d.ts +8 -0
  114. package/esm/scripts/helpers/main-event.js +12 -0
  115. package/esm/scripts/helpers/transfer.d.ts +33 -0
  116. package/esm/scripts/helpers/transfer.js +54 -0
  117. package/esm/scripts/helpers/web-contents-container.d.ts +12 -0
  118. package/esm/scripts/helpers/web-contents-container.js +31 -0
  119. package/esm/scripts/helpers/web-contents-events-container.d.ts +56 -0
  120. package/esm/scripts/helpers/web-contents-events-container.js +78 -0
  121. package/esm/scripts/main/publish.d.ts +36 -0
  122. package/esm/scripts/main/publish.js +179 -0
  123. package/esm/scripts/main.d.ts +3 -3
  124. package/esm/scripts/main.js +41 -39
  125. package/esm/scripts/preload/bridge.d.ts +27 -0
  126. package/esm/scripts/preload/bridge.js +77 -0
  127. package/esm/scripts/preload/provider.d.ts +7 -0
  128. package/esm/scripts/preload/provider.js +84 -0
  129. package/esm/scripts/preload-bridge.d.ts +20 -0
  130. package/esm/scripts/preload-bridge.js +68 -0
  131. package/esm/scripts/preload-provider.js +34 -50
  132. package/esm/scripts/provider.d.ts +17 -15
  133. package/esm/scripts/provider.js +70 -91
  134. package/esm/scripts/publish.d.ts +19 -18
  135. package/esm/scripts/publish.js +89 -162
  136. package/esm/scripts/renderer/bridge.d.ts +6 -0
  137. package/esm/scripts/renderer/bridge.js +69 -0
  138. package/esm/scripts/renderer/tunnels.d.ts +171 -0
  139. package/esm/scripts/renderer/tunnels.js +203 -0
  140. package/esm/scripts/renderer-tunnels.d.ts +19 -21
  141. package/esm/scripts/renderer-tunnels.js +53 -55
  142. package/esm/types.d.ts +189 -64
  143. package/package.json +23 -41
  144. package/cjs/exp.d.ts +0 -4
  145. package/cjs/exp.js +0 -19
  146. package/cjs/scripts/main.d.ts +0 -8
  147. package/cjs/scripts/main.js +0 -72
  148. package/cjs/scripts/new-decorators.d.ts +0 -150
  149. package/cjs/scripts/new-decorators.js +0 -141
  150. package/cjs/scripts/old-decorators.d.ts +0 -185
  151. package/cjs/scripts/old-decorators.js +0 -132
  152. package/esm/exp.d.ts +0 -4
  153. package/esm/exp.js +0 -3
  154. package/esm/scripts/new-decorators.d.ts +0 -150
  155. package/esm/scripts/new-decorators.js +0 -132
  156. package/esm/scripts/old-decorators.d.ts +0 -185
  157. package/esm/scripts/old-decorators.js +0 -122
@@ -1,132 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.providePublic = exports.publicProperty = exports.publicStaticProperty = exports.publicClassRendererEvent = exports.publicClassMainEvent = exports.publicMethod = exports.publicStaticMethod = void 0;
4
- const publish_js_1 = require("./publish.js");
5
- function publicStaticMethod(arg) {
6
- return (target, key) => {
7
- let name = String(key);
8
- if (arg) {
9
- if (typeof arg === 'string') {
10
- name = arg;
11
- }
12
- else {
13
- name = arg.name ?? String(key);
14
- if (arg.scope)
15
- (0, publish_js_1.addScope)(name, arg.scope);
16
- }
17
- }
18
- (0, publish_js_1.publicFunction)(name, (...args) => target[key](...args));
19
- };
20
- }
21
- exports.publicStaticMethod = publicStaticMethod;
22
- function publicMethod(arg) {
23
- return (tgt, key, _) => {
24
- const target = tgt;
25
- const prevRegister = target.__register__ ?? (() => { });
26
- target.__register__ = instance => {
27
- prevRegister(instance);
28
- publicStaticMethod(arg)(instance, key, _);
29
- };
30
- };
31
- }
32
- exports.publicMethod = publicMethod;
33
- function publicClassMainEvent(arg) {
34
- return (tgt, key, _) => {
35
- const target = tgt;
36
- const prevRegister = target.__register__ ?? (() => { });
37
- target.__register__ = instance => {
38
- prevRegister(instance);
39
- let name = String(key);
40
- if (arg) {
41
- if (typeof arg === 'string') {
42
- name = arg;
43
- }
44
- else {
45
- name = arg.name ?? String(key);
46
- if (arg.scope)
47
- (0, publish_js_1.addScope)(name, arg.scope);
48
- }
49
- }
50
- instance[key] = (0, publish_js_1.publicMainEvent)(name, instance[key].bind(instance));
51
- };
52
- };
53
- }
54
- exports.publicClassMainEvent = publicClassMainEvent;
55
- function publicClassRendererEvent(arg) {
56
- return (tgt, key) => {
57
- const target = tgt;
58
- const prevRegister = target.__register__ ?? (() => { });
59
- target.__register__ = instance => {
60
- prevRegister(instance);
61
- let name = String(key);
62
- let receiver = (v) => v;
63
- if (arg) {
64
- if (typeof arg === 'string') {
65
- name = arg;
66
- }
67
- else if (typeof arg === 'object') {
68
- name = arg.name ?? String(key);
69
- receiver = arg.procFn ?? receiver;
70
- if (arg.scope)
71
- (0, publish_js_1.addScope)(name, arg.scope);
72
- }
73
- else {
74
- receiver = arg;
75
- }
76
- }
77
- instance[key] = (0, publish_js_1.publicRendererEvent)(name, receiver);
78
- };
79
- };
80
- }
81
- exports.publicClassRendererEvent = publicClassRendererEvent;
82
- function publicStaticProperty(arg) {
83
- return (target, key) => {
84
- let name = String(key);
85
- if (arg) {
86
- if (typeof arg === 'string') {
87
- name = arg;
88
- }
89
- else {
90
- name = arg.name ?? String(key);
91
- if (arg.scope)
92
- (0, publish_js_1.addScope)(name, arg.scope);
93
- if (arg.access)
94
- (0, publish_js_1.addAccess)(name, arg.access);
95
- }
96
- }
97
- (0, publish_js_1.publicVariable)(name, {
98
- get() {
99
- return target[key];
100
- },
101
- set(value) {
102
- target[key] = value;
103
- }
104
- });
105
- };
106
- }
107
- exports.publicStaticProperty = publicStaticProperty;
108
- function publicProperty(arg) {
109
- return (tgt, key) => {
110
- const target = tgt;
111
- const prevRegister = target.__register__ ?? (() => { });
112
- target.__register__ = instance => {
113
- prevRegister(instance);
114
- publicStaticProperty(arg)(instance, key);
115
- };
116
- };
117
- }
118
- exports.publicProperty = publicProperty;
119
- /**
120
- * Binds all public entities of a class to a specific instance.
121
- *
122
- * _only for class instance_
123
- */
124
- function providePublic(instance) {
125
- const target = instance;
126
- if (!target.__register__)
127
- throw new Error('Public methods not defined');
128
- target.__register__(instance);
129
- target.__register__ = undefined;
130
- return instance;
131
- }
132
- exports.providePublic = providePublic;
package/esm/exp.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export { Access, Scope } from './enums.js';
2
- export { providePublic, publicClassMainEvent, publicClassRendererEvent, publicMethod, publicProperty, publicStaticMethod, publicStaticProperty } from './scripts/old-decorators.js';
3
- export { publicFunction, publicMainEvent, publicRendererEvent, publicVariable } from './scripts/publish.js';
4
- export type { EventEmitter, EventHandler, EventReceiver, EventUnsubscriber, MainEvent, PublicFunction, PublicProperty, PublishMainEventArgs, PublishMethodArgs, PublishPropertyArgs, PublishRendererEventArgs, RendererEvent } from './types.js';
package/esm/exp.js DELETED
@@ -1,3 +0,0 @@
1
- export { Access, Scope } from './enums.js';
2
- export { providePublic, publicClassMainEvent, publicClassRendererEvent, publicMethod, publicProperty, publicStaticMethod, publicStaticProperty } from './scripts/old-decorators.js';
3
- export { publicFunction, publicMainEvent, publicRendererEvent, publicVariable } from './scripts/publish.js';
@@ -1,150 +0,0 @@
1
- import type { ClassGetterDecorator, ClassMethodDecorator, ClassPropertyDecorator, ClassSetterDecorator, EventReceiver, PublishGetterArgs, PublishMainEventArgs, PublishMethodArgs, PublishPropertyArgs, PublishRendererEventArgs, PublishSetterArgs } from '../types.js';
2
- /**
3
- * Makes the method available for **renderer** and **preload** processes.
4
- *
5
- * _only new decorators_
6
- */
7
- export declare function publicMethod(): ClassMethodDecorator;
8
- /**
9
- * Makes the method available for **renderer** and **preload** processes.
10
- *
11
- * _only new decorators_
12
- *
13
- * @param name - name by which the method will be accessed
14
- */
15
- export declare function publicMethod(name: string): ClassMethodDecorator;
16
- /**
17
- * Makes the method available for **renderer** and **preload** processes.
18
- *
19
- * _only new decorators_
20
- *
21
- * @param args - publish args
22
- */
23
- export declare function publicMethod(args: PublishMethodArgs): ClassMethodDecorator;
24
- /**
25
- * Makes the event available for **renderer** and **preload** processes.
26
- *
27
- * _only new decorators_
28
- */
29
- export declare function publicClassMainEvent(): ClassMethodDecorator;
30
- /**
31
- * Makes the event available for **renderer** and **preload** processes.
32
- *
33
- * _only new decorators_
34
- *
35
- * @param name - name by which the event will be accessed
36
- */
37
- export declare function publicClassMainEvent(name: string): ClassMethodDecorator;
38
- /**
39
- * Makes the event available for **renderer** and **preload** processes.
40
- *
41
- * _only new decorators_
42
- *
43
- * @param args - publish args
44
- */
45
- export declare function publicClassMainEvent(args: PublishMainEventArgs): ClassMethodDecorator;
46
- /**
47
- * Makes the event from **renderer** and **preload** available for **main** process.
48
- *
49
- * _only new decorators_
50
- */
51
- export declare function publicClassRendererEvent(): ClassPropertyDecorator;
52
- /**
53
- * Makes the event from **renderer** and **preload** available for **main** process.
54
- *
55
- * _only new decorators_
56
- *
57
- * @param name - name by which the event will be accessed
58
- */
59
- export declare function publicClassRendererEvent(name: string): ClassPropertyDecorator;
60
- /**
61
- * Makes the event from **renderer** and **preload** available for **main** process.
62
- *
63
- * _only new decorators_
64
- *
65
- * @param receiver - linked receiver
66
- */
67
- export declare function publicClassRendererEvent(receiver: EventReceiver): ClassPropertyDecorator;
68
- /**
69
- * Makes the event from **renderer** and **preload** available for **main** process.
70
- *
71
- * * _only new decorators_
72
- *
73
- * @param name - name by which the event will be accessed
74
- * @param receiver - linked receiver
75
- */
76
- export declare function publicClassRendererEvent(name: string, receiver: EventReceiver): ClassPropertyDecorator;
77
- /**
78
- * Makes the event from **renderer** and **preload** available for **main** process.
79
- *
80
- * _only new decorators_
81
- *
82
- * @param args - publish args
83
- */
84
- export declare function publicClassRendererEvent(args: PublishRendererEventArgs): ClassPropertyDecorator;
85
- /**
86
- * Makes the property available for **renderer** and **preload** processes.
87
- *
88
- * _only new decorators_
89
- */
90
- export declare function publicProperty(): ClassPropertyDecorator;
91
- /**
92
- * Makes the property available for **renderer** and **preload** processes.
93
- *
94
- * _only new decorators_
95
- *
96
- * @param name - name by which the property will be accessed
97
- */
98
- export declare function publicProperty(name: string): ClassPropertyDecorator;
99
- /**
100
- * Makes the property available for **renderer** and **preload** processes.
101
- *
102
- * _only new decorators_
103
- *
104
- * @param args - publish args
105
- */
106
- export declare function publicProperty(args: PublishPropertyArgs): ClassPropertyDecorator;
107
- /**
108
- * Makes the property getter available for **renderer** and **preload** processes.
109
- *
110
- * _only new decorators_
111
- */
112
- export declare function publicGetter(): ClassGetterDecorator;
113
- /**
114
- * Makes the property getter available for **renderer** and **preload** processes.
115
- *
116
- * _only new decorators_
117
- *
118
- * @param name - name by which the property will be accessed
119
- */
120
- export declare function publicGetter(name: string): ClassGetterDecorator;
121
- /**
122
- * Makes the property getter available for **renderer** and **preload** processes.
123
- *
124
- * _only new decorators_
125
- *
126
- * @param args - publish args
127
- */
128
- export declare function publicGetter(args: PublishGetterArgs): ClassGetterDecorator;
129
- /**
130
- * Makes the property setter available for **renderer** and **preload** processes.
131
- *
132
- * _only new decorators_
133
- */
134
- export declare function publicSetter(): ClassSetterDecorator;
135
- /**
136
- * Makes the property setter available for **renderer** and **preload** processes.
137
- *
138
- * _only new decorators_
139
- *
140
- * @param name - name by which the property will be accessed
141
- */
142
- export declare function publicSetter(name: string): ClassSetterDecorator;
143
- /**
144
- * Makes the property setter available for **renderer** and **preload** processes.
145
- *
146
- * _only new decorators_
147
- *
148
- * @param args - publish args
149
- */
150
- export declare function publicSetter(args: PublishSetterArgs): ClassSetterDecorator;
@@ -1,132 +0,0 @@
1
- import { addAccess, addScope, publicFunction, publicMainEvent, publicRendererEvent, publicVariable } from './publish.js';
2
- export function publicMethod(arg) {
3
- return (method, context) => {
4
- let name = String(context.name);
5
- if (arg) {
6
- if (typeof arg === 'string') {
7
- name = arg;
8
- }
9
- else {
10
- name = arg.name ?? name;
11
- if (arg.scope)
12
- addScope(name, arg.scope);
13
- }
14
- }
15
- context.addInitializer(function () {
16
- publicFunction(name, method.bind(this));
17
- });
18
- };
19
- }
20
- export function publicClassMainEvent(arg) {
21
- return (method, context) => {
22
- let name = String(context.name);
23
- if (arg) {
24
- if (typeof arg === 'string') {
25
- name = arg;
26
- }
27
- else {
28
- name = arg.name ?? name;
29
- if (arg.scope)
30
- addScope(name, arg.scope);
31
- }
32
- }
33
- context.addInitializer(function () {
34
- // @ts-ignore
35
- this[context.name] = publicMainEvent(name, method.bind(this));
36
- });
37
- };
38
- }
39
- export function publicClassRendererEvent(arg) {
40
- return (_, context) => {
41
- let name = String(context.name);
42
- let receiver = (v) => v;
43
- if (arg) {
44
- if (typeof arg === 'string') {
45
- name = arg;
46
- }
47
- else if (typeof arg === 'object') {
48
- name = arg.name ?? String(context.name);
49
- receiver = arg.procFn ?? receiver;
50
- if (arg.scope)
51
- addScope(name, arg.scope);
52
- }
53
- else {
54
- receiver = arg;
55
- }
56
- }
57
- context.addInitializer(function () {
58
- // @ts-ignore
59
- this[context.name] = publicRendererEvent(name, receiver);
60
- });
61
- };
62
- }
63
- export function publicProperty(arg) {
64
- return (_, context) => {
65
- const key = String(context.name);
66
- let name = key;
67
- if (arg) {
68
- if (typeof arg === 'string') {
69
- name = arg;
70
- }
71
- else {
72
- name = arg.name ?? name;
73
- if (arg.scope)
74
- addScope(name, arg.scope);
75
- if (arg.access)
76
- addAccess(name, arg.access);
77
- }
78
- }
79
- context.addInitializer(function () {
80
- publicVariable(name, {
81
- get: () => {
82
- // @ts-expect-error
83
- return this[key];
84
- },
85
- set: (value) => {
86
- // @ts-expect-error
87
- this[key] = value;
88
- }
89
- });
90
- });
91
- };
92
- }
93
- export function publicGetter(arg) {
94
- return (getter, context) => {
95
- let name = String(context.name);
96
- if (arg) {
97
- if (typeof arg === 'string') {
98
- name = arg;
99
- }
100
- else {
101
- name = arg.name ?? name;
102
- if (arg.scope)
103
- addScope(name, arg.scope);
104
- }
105
- }
106
- context.addInitializer(function () {
107
- publicVariable(name, {
108
- get: getter.bind(this)
109
- });
110
- });
111
- };
112
- }
113
- export function publicSetter(arg) {
114
- return (setter, context) => {
115
- let name = String(context.name);
116
- if (arg) {
117
- if (typeof arg === 'string') {
118
- name = arg;
119
- }
120
- else {
121
- name = arg.name ?? name;
122
- if (arg.scope)
123
- addScope(name, arg.scope);
124
- }
125
- }
126
- context.addInitializer(function () {
127
- publicVariable(name, {
128
- set: setter.bind(this)
129
- });
130
- });
131
- };
132
- }
@@ -1,185 +0,0 @@
1
- import type { EventReceiver, PublishMainEventArgs, PublishMethodArgs, PublishPropertyArgs, PublishRendererEventArgs } from '../types.js';
2
- /**
3
- * Makes the method available for **renderer** and **preload** processes.
4
- *
5
- * _only for static_
6
- * _experimental decorators_
7
- */
8
- export declare function publicStaticMethod(): MethodDecorator;
9
- /**
10
- * Makes the method available for **renderer** and **preload** processes.
11
- *
12
- * _only for static_
13
- * _experimental decorators_
14
- *
15
- * @param name - name by which the method will be accessed
16
- */
17
- export declare function publicStaticMethod(name: string): MethodDecorator;
18
- /**
19
- * Makes the method available for **renderer** and **preload** processes.
20
- *
21
- * _only for static_
22
- * _experimental decorators_
23
- *
24
- * @param args - publish args
25
- */
26
- export declare function publicStaticMethod(args: PublishMethodArgs): MethodDecorator;
27
- /**
28
- * Makes the method available for **renderer** and **preload** processes.
29
- *
30
- * _only for non-static_
31
- * _experimental decorators_
32
- * _required `providePublic(classInstance)`_
33
- */
34
- export declare function publicMethod(): MethodDecorator;
35
- /**
36
- * Makes the method available for **renderer** and **preload** processes.
37
- *
38
- * _only for non-static_
39
- * _experimental decorators_
40
- * _required `providePublic(classInstance)`_
41
- *
42
- * @param name - name by which the method will be accessed
43
- */
44
- export declare function publicMethod(name: string): MethodDecorator;
45
- /**
46
- * Makes the method available for **renderer** and **preload** processes.
47
- *
48
- * _only for non-static_
49
- * _experimental decorators_
50
- * _required `providePublic(classInstance)`_
51
- *
52
- * @param args - publish args
53
- */
54
- export declare function publicMethod(args: PublishMethodArgs): MethodDecorator;
55
- /**
56
- * Makes the event available for **renderer** and **preload** processes.
57
- *
58
- * _only for non-static_
59
- * _experimental decorators_
60
- * _required `providePublic(classInstance)`_
61
- */
62
- export declare function publicClassMainEvent(): MethodDecorator;
63
- /**
64
- * Makes the event available for **renderer** and **preload** processes.
65
- *
66
- * _only for non-static_
67
- * _experimental decorators_
68
- * _required `providePublic(classInstance)`_
69
- *
70
- * @param name - name by which the event will be accessed
71
- */
72
- export declare function publicClassMainEvent(name: string): MethodDecorator;
73
- /**
74
- * Makes the event available for **renderer** and **preload** processes.
75
- *
76
- * _only for non-static_
77
- * _experimental decorators_
78
- * _required `providePublic(classInstance)`_
79
- *
80
- * @param args - publish args
81
- */
82
- export declare function publicClassMainEvent(args: PublishMainEventArgs): MethodDecorator;
83
- /**
84
- * Makes the event from **renderer** and **preload** available for **main** process.
85
- *
86
- * _only for non-static_
87
- * _experimental decorators_
88
- */
89
- export declare function publicClassRendererEvent(): PropertyDecorator;
90
- /**
91
- * Makes the event from **renderer** and **preload** available for **main** process.
92
- *
93
- * _only for non-static_
94
- * _experimental decorators_
95
- *
96
- * @param name - name by which the event will be accessed
97
- */
98
- export declare function publicClassRendererEvent(name: string): PropertyDecorator;
99
- /**
100
- * Makes the event from **renderer** and **preload** available for **main** process.
101
- *
102
- * _only for non-static_
103
- * _experimental decorators_
104
- *
105
- * @param receiver - linked receiver
106
- */
107
- export declare function publicClassRendererEvent(receiver: EventReceiver): PropertyDecorator;
108
- /**
109
- * Makes the event from **renderer** and **preload** available for **main** process.
110
- *
111
- * _only for non-static_
112
- * _experimental decorators_
113
- *
114
- * @param name - name by which the event will be accessed
115
- * @param receiver - linked receiver
116
- */
117
- export declare function publicClassRendererEvent(name: string, receiver: EventReceiver): PropertyDecorator;
118
- /**
119
- * Makes the event from **renderer** and **preload** available for **main** process.
120
- *
121
- * _only for non-static_
122
- * _experimental decorators_
123
- *
124
- * @param args - publish args
125
- */
126
- export declare function publicClassRendererEvent(args: PublishRendererEventArgs): PropertyDecorator;
127
- /**
128
- * Makes the property available for **renderer** and **preload** processes.
129
- *
130
- * _only for static_
131
- * _experimental decorators_
132
- */
133
- export declare function publicStaticProperty(): PropertyDecorator;
134
- /**
135
- * Makes the property available for **renderer** and **preload** processes.
136
- *
137
- * _only for static_
138
- * _experimental decorators_
139
- *
140
- * @param name - name by which the property will be accessed
141
- */
142
- export declare function publicStaticProperty(name: string): PropertyDecorator;
143
- /**
144
- * Makes the property available for **renderer** and **preload** processes.
145
- *
146
- * _only for static_
147
- * _experimental decorators_
148
- *
149
- * @param args - publish args
150
- */
151
- export declare function publicStaticProperty(args: PublishPropertyArgs): PropertyDecorator;
152
- /**
153
- * Makes the property available for **renderer** and **preload** processes.
154
- *
155
- * _only for non-static_
156
- * _experimental decorators_
157
- * _required `providePublic(classInstance)`_
158
- */
159
- export declare function publicProperty(): PropertyDecorator;
160
- /**
161
- * Makes the property available for **renderer** and **preload** processes.
162
- *
163
- * _only for non-static_
164
- * _experimental decorators_
165
- * _required `providePublic(classInstance)`_
166
- *
167
- * @param name - name by which the property will be accessed
168
- */
169
- export declare function publicProperty(name: string): PropertyDecorator;
170
- /**
171
- * Makes the property available for **renderer** and **preload** processes.
172
- *
173
- * _only for non-static_
174
- * _experimental decorators_
175
- * _required `providePublic(classInstance)`_
176
- *
177
- * @param args - publish args
178
- */
179
- export declare function publicProperty(args: PublishPropertyArgs): PropertyDecorator;
180
- /**
181
- * Binds all public entities of a class to a specific instance.
182
- *
183
- * _only for class instance_
184
- */
185
- export declare function providePublic<InstanceType>(instance: InstanceType): InstanceType;