@dooboostore/simple-web-component 1.0.56 → 1.0.57
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/README.md +7 -0
- package/dist/cjs/decorators/subscribeSwcAppMessage.js +8 -4
- package/dist/cjs/decorators/subscribeSwcAppMessage.js.map +2 -2
- package/dist/esm/decorators/subscribeSwcAppMessage.js +8 -4
- package/dist/esm/decorators/subscribeSwcAppMessage.js.map +2 -2
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +8 -4
- package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +2 -2
- package/dist/types/decorators/subscribeSwcAppMessage.d.ts +9 -0
- package/dist/types/decorators/subscribeSwcAppMessage.d.ts.map +1 -1
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +8 -4
- package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +2 -2
- package/lsp/package.json +29 -3
- package/package.json +1 -1
- package/src/decorators/subscribeSwcAppMessage.ts +17 -4
package/lsp/package.json
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "simple-web-component-lsp",
|
|
3
3
|
"displayName": "Simple Web Component",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"description": "SWC language server (shipped inside @dooboostore/simple-web-component as `swc-lsp`) + VS Code client",
|
|
6
6
|
"private": true,
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"publisher": "dooboostore",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/dooboostore-develop/packages.git",
|
|
12
|
+
"directory": "@dooboostore/simple-web-component/lsp"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://dooboostore-develop.github.io/start",
|
|
15
|
+
"categories": [
|
|
16
|
+
"Programming Languages"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"simple-web-component",
|
|
20
|
+
"swc",
|
|
21
|
+
"web components",
|
|
22
|
+
"lsp"
|
|
23
|
+
],
|
|
9
24
|
"main": "./out/client/extension.js",
|
|
10
25
|
"engines": {
|
|
11
26
|
"node": ">=18",
|
|
@@ -34,13 +49,24 @@
|
|
|
34
49
|
"meta.embedded.swc": "javascript"
|
|
35
50
|
}
|
|
36
51
|
}
|
|
37
|
-
]
|
|
52
|
+
],
|
|
53
|
+
"configuration": {
|
|
54
|
+
"title": "Simple Web Component",
|
|
55
|
+
"properties": {
|
|
56
|
+
"swc.serverPath": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"default": "",
|
|
59
|
+
"description": "Path to the SWC language server (server.js). Empty: the one inside node_modules/@dooboostore/simple-web-component/lsp."
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
38
63
|
},
|
|
39
64
|
"scripts": {
|
|
40
65
|
"build": "node build.mjs",
|
|
41
66
|
"watch": "node build.mjs --watch",
|
|
42
67
|
"typecheck": "tsc --noEmit -p .",
|
|
43
|
-
"test": "node build.mjs && node --test test/*.test.mjs"
|
|
68
|
+
"test": "node build.mjs && node --test test/*.test.mjs",
|
|
69
|
+
"package:vsix": "node build.mjs && npx --yes @vscode/vsce@3 package --no-dependencies"
|
|
44
70
|
},
|
|
45
71
|
"dependencies": {
|
|
46
72
|
"typescript": "^5.9.2"
|
package/package.json
CHANGED
|
@@ -86,10 +86,10 @@ export const receiveMessage = subscribeSwcAppMessage;
|
|
|
86
86
|
// ── subject 를 이름에 박은 별칭: @subscribeSwcAppMessageBehavior('auth') = @subscribeSwcAppMessage('auth', { subject: 'behavior' }) ──
|
|
87
87
|
type SubjectlessOptions<Data, BeforeReturn, Result> = Omit<SwcAppMessageOptions<Data, BeforeReturn, Result>, 'subject'>;
|
|
88
88
|
|
|
89
|
-
const withSubject = (subject: SwcAppMessageSubject, a?: any, b?: any, descriptor?: PropertyDescriptor): any => {
|
|
90
|
-
if (descriptor) return createSubscribeSwcAppMessage({ subject })(a, b, descriptor); // 괄호 없이
|
|
91
|
-
if (typeof a === 'string') return createSubscribeSwcAppMessage({ ...(b ?? {}), subject }, a);
|
|
92
|
-
return createSubscribeSwcAppMessage({ ...(a ?? {}), subject });
|
|
89
|
+
const withSubject = (subject: SwcAppMessageSubject, a?: any, b?: any, descriptor?: PropertyDescriptor, fixed: Partial<SwcAppMessageOptions> = {}): any => {
|
|
90
|
+
if (descriptor) return createSubscribeSwcAppMessage({ subject, ...fixed })(a, b, descriptor); // 괄호 없이
|
|
91
|
+
if (typeof a === 'string') return createSubscribeSwcAppMessage({ ...(b ?? {}), subject, ...fixed }, a);
|
|
92
|
+
return createSubscribeSwcAppMessage({ ...(a ?? {}), subject, ...fixed });
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
/** 늦게 붙어도 마지막 메시지 1개를 받는다 (subject: 'behavior') */
|
|
@@ -101,6 +101,19 @@ export function subscribeSwcAppMessageBehavior(a?: any, b?: any, descriptor?: Pr
|
|
|
101
101
|
return withSubject('behavior', a, b, descriptor);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* subscribeSwcAppMessageBehavior + trigger 'connectedDone' — 마지막 메시지를 **자기 렌더가 끝난 뒤** 받는다.
|
|
106
|
+
* 핸들러가 자기 DOM 에 쓰는 경우(@innerHtml('.x'), @updateClass 등)에 쓴다: 기본 trigger('connected')는
|
|
107
|
+
* 렌더 전에 재생해서 대상이 아직 없어 조용히 버려진다. (@subscribeSwcAppRouteChangeConnectedDone 과 같은 규칙)
|
|
108
|
+
*/
|
|
109
|
+
export function subscribeSwcAppMessageBehaviorConnectedDone(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
110
|
+
export function subscribeSwcAppMessageBehaviorConnectedDone(messageType: string): MethodDecorator;
|
|
111
|
+
export function subscribeSwcAppMessageBehaviorConnectedDone<Data = any, BeforeReturn = any, Result = any>(options: Omit<SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>, 'trigger'>): MethodDecorator;
|
|
112
|
+
export function subscribeSwcAppMessageBehaviorConnectedDone<Data = any, BeforeReturn = any, Result = any>(messageType: string, options: Omit<SubjectlessOptions<NoInfer<Data>, NoInfer<BeforeReturn>, NoInfer<Result>>, 'trigger'>): MethodDecorator;
|
|
113
|
+
export function subscribeSwcAppMessageBehaviorConnectedDone(a?: any, b?: any, descriptor?: PropertyDescriptor): any {
|
|
114
|
+
return withSubject('behavior', a, b, descriptor, { trigger: 'connectedDone' });
|
|
115
|
+
}
|
|
116
|
+
|
|
104
117
|
/** 늦게 붙어도 지나간 메시지를 전부 시간순으로 받는다 (subject: 'replay') */
|
|
105
118
|
export function subscribeSwcAppMessageReplay(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;
|
|
106
119
|
export function subscribeSwcAppMessageReplay(messageType: string): MethodDecorator;
|