stayge-ws-client-sdk 0.1.21 → 0.1.23

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 CHANGED
@@ -10,15 +10,22 @@ npm install stayge-ws-client-sdk
10
10
  ```typescript
11
11
  import { getWebSocketClient, wsError } from "stayge-ws-client-sdk/react";
12
12
 
13
+ type Message = {
14
+ title: string;
15
+ body: string;
16
+ };
17
+
13
18
  const ws = getWebSocketClient();
19
+
14
20
  await ws.connect({ url: "wss://dev.linc.fan/ws/linc" });
15
21
 
16
22
  // 이벤트 핸들러는 connect 이전에 등록 가능, 여러번 호출해서 멀티 핸들러 등록 가능
17
- ws.onMessage({
23
+ ws.onMessage<Message>({
18
24
  topic: "openchat/12345",
19
25
  callback: (topic, payload) => {
20
26
  // 서버에서 메시지가 수신되면 호출됨
21
- console.log(`Received: topic=${topic}, payload=${payload}`);
27
+ // payload는 Message 타입으로 넘어오고 sdk에서 JSON.parse() 후에 핸들러에 넘겨줌
28
+ console.log(`Received: topic=${topic}, payload=${JSON.stringify(payload)}`);
22
29
  },
23
30
  });
24
31
 
@@ -44,15 +51,22 @@ ws.onError({
44
51
  ```typescript
45
52
  import { getWebSocketClient, wsError } from "stayge-ws-client-sdk/react-native";
46
53
 
54
+ type Message = {
55
+ title: string;
56
+ body: string;
57
+ };
58
+
47
59
  const ws = getWebSocketClient();
60
+
48
61
  await ws.connect({ url: "wss://dev.linc.fan/ws/linc" });
49
62
 
50
63
  // 이벤트 핸들러는 connect 이전에 등록 가능, 여러번 호출해서 멀티 핸들러 등록 가능
51
- ws.onMessage({
64
+ ws.onMessage<Message>({
52
65
  topic: "openchat/12345",
53
66
  callback: (topic, payload) => {
54
67
  // 서버에서 메시지가 수신되면 호출됨
55
- console.log(`Received: topic=${topic}, payload=${payload}`);
68
+ // payload는 Message 타입으로 넘어오고 sdk에서 JSON.parse() 후에 핸들러에 넘겨줌
69
+ console.log(`Received: topic=${topic}, payload=${JSON.stringify(payload)}`);
56
70
  },
57
71
  });
58
72
 
package/dist/index.d.mts CHANGED
@@ -59,7 +59,7 @@ interface WebSocketClient {
59
59
  */
60
60
  connect(args: {
61
61
  url: string;
62
- }): Promise<void>;
62
+ }): void;
63
63
  /**
64
64
  * Closes the WebSocket connection.
65
65
  */
package/dist/index.d.ts CHANGED
@@ -59,7 +59,7 @@ interface WebSocketClient {
59
59
  */
60
60
  connect(args: {
61
61
  url: string;
62
- }): Promise<void>;
62
+ }): void;
63
63
  /**
64
64
  * Closes the WebSocket connection.
65
65
  */
@@ -42,12 +42,13 @@ var WebSocketClientImpl = class {
42
42
  this.onMessageCallbacks = {};
43
43
  this.onErrorCallbacks = /* @__PURE__ */ new Set();
44
44
  }
45
- async connect(args) {
45
+ connect(args) {
46
46
  console.log(`[${Date.now()}] WebSocketClient:connect ${args.url}`);
47
47
  if (this.ws) {
48
48
  this.disconnect();
49
49
  }
50
- this.ws = await this.createWebSocket(args.url);
50
+ this.clearEventHandlers();
51
+ this.ws = this.createWebSocket(args.url);
51
52
  }
52
53
  disconnect() {
53
54
  console.log(`[${Date.now()}] WebSocketClient:disconnect`);
@@ -73,26 +74,19 @@ var WebSocketClientImpl = class {
73
74
  this.ws?.send(JSON.stringify(message));
74
75
  }
75
76
  onConnect(args) {
76
- console.log(`[${Date.now()}] WebSocketClient:onConnect`);
77
77
  this.onConnectCallbacks.add(args.callback);
78
78
  }
79
79
  onDisconnect(args) {
80
- console.log(`[${Date.now()}] WebSocketClient:onDisconnect`);
81
80
  this.onDisconnectCallbacks.add(args.callback);
82
81
  }
83
82
  onMessage(args) {
84
- console.log(`[${Date.now()}] WebSocketClient:onMessage`);
85
83
  this.onMessageCallbacks[args.topic] = this.onMessageCallbacks[args.topic] || /* @__PURE__ */ new Set();
86
84
  this.onMessageCallbacks[args.topic].add(args.callback);
87
85
  }
88
86
  onError(args) {
89
- console.log(`[${Date.now()}] WebSocketClient:onError`);
90
87
  this.onErrorCallbacks.add(args.callback);
91
88
  }
92
89
  addEventListener(args) {
93
- console.log(
94
- `[${Date.now()}] WebSocketClient:addEventListener eventType: ${args.eventType}`
95
- );
96
90
  if (args.eventType === "connect") {
97
91
  this.onConnectCallbacks.add(args.callback);
98
92
  } else if (args.eventType === "disconnect") {
@@ -105,9 +99,6 @@ var WebSocketClientImpl = class {
105
99
  }
106
100
  }
107
101
  removeEventListener(args) {
108
- console.log(
109
- `[${Date.now()}] WebSocketClient:removeEventListener eventType: ${args.eventType}`
110
- );
111
102
  if (args.eventType === "connect") {
112
103
  this.onConnectCallbacks.delete(args.callback);
113
104
  } else if (args.eventType === "disconnect") {
@@ -119,34 +110,25 @@ var WebSocketClientImpl = class {
119
110
  }
120
111
  }
121
112
  createWebSocket(url) {
122
- let connected = false;
123
- return new Promise((resolve, reject) => {
124
- const ws = new WebSocket(url);
125
- ws.onopen = () => {
126
- connected = true;
127
- this.wsOnOpen(ws);
128
- resolve(ws);
129
- };
130
- ws.onerror = (error) => {
131
- if (!connected) {
132
- reject(error);
133
- return;
134
- }
135
- this.wsOnError(ws, error);
136
- };
137
- ws.onmessage = (event) => {
138
- this.wsOnMessage(ws, event);
139
- };
140
- ws.onclose = () => {
141
- if (!connected) {
142
- reject(new Error("Connection closed"));
143
- return;
144
- }
145
- this.wsOnClose(ws);
146
- };
147
- });
113
+ const ws = new WebSocket(url);
114
+ ws.onopen = () => {
115
+ this.wsOnOpen(ws);
116
+ };
117
+ ws.onerror = (error) => {
118
+ this.wsOnError(ws, error);
119
+ };
120
+ ws.onmessage = (event) => {
121
+ this.wsOnMessage(ws, event);
122
+ };
123
+ ws.onclose = () => {
124
+ this.wsOnClose(ws);
125
+ };
126
+ return ws;
148
127
  }
149
128
  wsOnOpen(ws) {
129
+ if (ws !== this.ws) {
130
+ return;
131
+ }
150
132
  console.log(`[${Date.now()}] WebSocketClient:wsOnOpen`);
151
133
  this.onConnectCallbacks.forEach((callback) => callback());
152
134
  }
@@ -155,6 +137,9 @@ var WebSocketClientImpl = class {
155
137
  ws.close();
156
138
  }
157
139
  wsOnMessage(ws, event) {
140
+ if (ws !== this.ws) {
141
+ return;
142
+ }
158
143
  console.log(
159
144
  `[${Date.now()}] WebSocketClient:wsOnMessage event: `,
160
145
  event.data
@@ -176,10 +161,13 @@ var WebSocketClientImpl = class {
176
161
  });
177
162
  }
178
163
  } catch (error) {
179
- console.error("WebSocketClient:onmessage", error);
164
+ console.error("WebSocketClient:wsOnMessage", error);
180
165
  }
181
166
  }
182
167
  wsOnClose(ws) {
168
+ if (ws !== this.ws) {
169
+ return;
170
+ }
183
171
  console.log(`[${Date.now()}] WebSocketClient:wsOnClose`);
184
172
  const disconnectCallbacks = this.onDisconnectCallbacks;
185
173
  this.clearEventHandlers();
@@ -16,12 +16,13 @@ var WebSocketClientImpl = class {
16
16
  this.onMessageCallbacks = {};
17
17
  this.onErrorCallbacks = /* @__PURE__ */ new Set();
18
18
  }
19
- async connect(args) {
19
+ connect(args) {
20
20
  console.log(`[${Date.now()}] WebSocketClient:connect ${args.url}`);
21
21
  if (this.ws) {
22
22
  this.disconnect();
23
23
  }
24
- this.ws = await this.createWebSocket(args.url);
24
+ this.clearEventHandlers();
25
+ this.ws = this.createWebSocket(args.url);
25
26
  }
26
27
  disconnect() {
27
28
  console.log(`[${Date.now()}] WebSocketClient:disconnect`);
@@ -47,26 +48,19 @@ var WebSocketClientImpl = class {
47
48
  this.ws?.send(JSON.stringify(message));
48
49
  }
49
50
  onConnect(args) {
50
- console.log(`[${Date.now()}] WebSocketClient:onConnect`);
51
51
  this.onConnectCallbacks.add(args.callback);
52
52
  }
53
53
  onDisconnect(args) {
54
- console.log(`[${Date.now()}] WebSocketClient:onDisconnect`);
55
54
  this.onDisconnectCallbacks.add(args.callback);
56
55
  }
57
56
  onMessage(args) {
58
- console.log(`[${Date.now()}] WebSocketClient:onMessage`);
59
57
  this.onMessageCallbacks[args.topic] = this.onMessageCallbacks[args.topic] || /* @__PURE__ */ new Set();
60
58
  this.onMessageCallbacks[args.topic].add(args.callback);
61
59
  }
62
60
  onError(args) {
63
- console.log(`[${Date.now()}] WebSocketClient:onError`);
64
61
  this.onErrorCallbacks.add(args.callback);
65
62
  }
66
63
  addEventListener(args) {
67
- console.log(
68
- `[${Date.now()}] WebSocketClient:addEventListener eventType: ${args.eventType}`
69
- );
70
64
  if (args.eventType === "connect") {
71
65
  this.onConnectCallbacks.add(args.callback);
72
66
  } else if (args.eventType === "disconnect") {
@@ -79,9 +73,6 @@ var WebSocketClientImpl = class {
79
73
  }
80
74
  }
81
75
  removeEventListener(args) {
82
- console.log(
83
- `[${Date.now()}] WebSocketClient:removeEventListener eventType: ${args.eventType}`
84
- );
85
76
  if (args.eventType === "connect") {
86
77
  this.onConnectCallbacks.delete(args.callback);
87
78
  } else if (args.eventType === "disconnect") {
@@ -93,34 +84,25 @@ var WebSocketClientImpl = class {
93
84
  }
94
85
  }
95
86
  createWebSocket(url) {
96
- let connected = false;
97
- return new Promise((resolve, reject) => {
98
- const ws = new WebSocket(url);
99
- ws.onopen = () => {
100
- connected = true;
101
- this.wsOnOpen(ws);
102
- resolve(ws);
103
- };
104
- ws.onerror = (error) => {
105
- if (!connected) {
106
- reject(error);
107
- return;
108
- }
109
- this.wsOnError(ws, error);
110
- };
111
- ws.onmessage = (event) => {
112
- this.wsOnMessage(ws, event);
113
- };
114
- ws.onclose = () => {
115
- if (!connected) {
116
- reject(new Error("Connection closed"));
117
- return;
118
- }
119
- this.wsOnClose(ws);
120
- };
121
- });
87
+ const ws = new WebSocket(url);
88
+ ws.onopen = () => {
89
+ this.wsOnOpen(ws);
90
+ };
91
+ ws.onerror = (error) => {
92
+ this.wsOnError(ws, error);
93
+ };
94
+ ws.onmessage = (event) => {
95
+ this.wsOnMessage(ws, event);
96
+ };
97
+ ws.onclose = () => {
98
+ this.wsOnClose(ws);
99
+ };
100
+ return ws;
122
101
  }
123
102
  wsOnOpen(ws) {
103
+ if (ws !== this.ws) {
104
+ return;
105
+ }
124
106
  console.log(`[${Date.now()}] WebSocketClient:wsOnOpen`);
125
107
  this.onConnectCallbacks.forEach((callback) => callback());
126
108
  }
@@ -129,6 +111,9 @@ var WebSocketClientImpl = class {
129
111
  ws.close();
130
112
  }
131
113
  wsOnMessage(ws, event) {
114
+ if (ws !== this.ws) {
115
+ return;
116
+ }
132
117
  console.log(
133
118
  `[${Date.now()}] WebSocketClient:wsOnMessage event: `,
134
119
  event.data
@@ -150,10 +135,13 @@ var WebSocketClientImpl = class {
150
135
  });
151
136
  }
152
137
  } catch (error) {
153
- console.error("WebSocketClient:onmessage", error);
138
+ console.error("WebSocketClient:wsOnMessage", error);
154
139
  }
155
140
  }
156
141
  wsOnClose(ws) {
142
+ if (ws !== this.ws) {
143
+ return;
144
+ }
157
145
  console.log(`[${Date.now()}] WebSocketClient:wsOnClose`);
158
146
  const disconnectCallbacks = this.onDisconnectCallbacks;
159
147
  this.clearEventHandlers();
@@ -42,12 +42,13 @@ var WebSocketClientImpl = class {
42
42
  this.onMessageCallbacks = {};
43
43
  this.onErrorCallbacks = /* @__PURE__ */ new Set();
44
44
  }
45
- async connect(args) {
45
+ connect(args) {
46
46
  console.log(`[${Date.now()}] WebSocketClient:connect ${args.url}`);
47
47
  if (this.ws) {
48
48
  this.disconnect();
49
49
  }
50
- this.ws = await this.createWebSocket(args.url);
50
+ this.clearEventHandlers();
51
+ this.ws = this.createWebSocket(args.url);
51
52
  }
52
53
  disconnect() {
53
54
  console.log(`[${Date.now()}] WebSocketClient:disconnect`);
@@ -73,26 +74,19 @@ var WebSocketClientImpl = class {
73
74
  this.ws?.send(JSON.stringify(message));
74
75
  }
75
76
  onConnect(args) {
76
- console.log(`[${Date.now()}] WebSocketClient:onConnect`);
77
77
  this.onConnectCallbacks.add(args.callback);
78
78
  }
79
79
  onDisconnect(args) {
80
- console.log(`[${Date.now()}] WebSocketClient:onDisconnect`);
81
80
  this.onDisconnectCallbacks.add(args.callback);
82
81
  }
83
82
  onMessage(args) {
84
- console.log(`[${Date.now()}] WebSocketClient:onMessage`);
85
83
  this.onMessageCallbacks[args.topic] = this.onMessageCallbacks[args.topic] || /* @__PURE__ */ new Set();
86
84
  this.onMessageCallbacks[args.topic].add(args.callback);
87
85
  }
88
86
  onError(args) {
89
- console.log(`[${Date.now()}] WebSocketClient:onError`);
90
87
  this.onErrorCallbacks.add(args.callback);
91
88
  }
92
89
  addEventListener(args) {
93
- console.log(
94
- `[${Date.now()}] WebSocketClient:addEventListener eventType: ${args.eventType}`
95
- );
96
90
  if (args.eventType === "connect") {
97
91
  this.onConnectCallbacks.add(args.callback);
98
92
  } else if (args.eventType === "disconnect") {
@@ -105,9 +99,6 @@ var WebSocketClientImpl = class {
105
99
  }
106
100
  }
107
101
  removeEventListener(args) {
108
- console.log(
109
- `[${Date.now()}] WebSocketClient:removeEventListener eventType: ${args.eventType}`
110
- );
111
102
  if (args.eventType === "connect") {
112
103
  this.onConnectCallbacks.delete(args.callback);
113
104
  } else if (args.eventType === "disconnect") {
@@ -119,34 +110,25 @@ var WebSocketClientImpl = class {
119
110
  }
120
111
  }
121
112
  createWebSocket(url) {
122
- let connected = false;
123
- return new Promise((resolve, reject) => {
124
- const ws = new WebSocket(url);
125
- ws.onopen = () => {
126
- connected = true;
127
- this.wsOnOpen(ws);
128
- resolve(ws);
129
- };
130
- ws.onerror = (error) => {
131
- if (!connected) {
132
- reject(error);
133
- return;
134
- }
135
- this.wsOnError(ws, error);
136
- };
137
- ws.onmessage = (event) => {
138
- this.wsOnMessage(ws, event);
139
- };
140
- ws.onclose = () => {
141
- if (!connected) {
142
- reject(new Error("Connection closed"));
143
- return;
144
- }
145
- this.wsOnClose(ws);
146
- };
147
- });
113
+ const ws = new WebSocket(url);
114
+ ws.onopen = () => {
115
+ this.wsOnOpen(ws);
116
+ };
117
+ ws.onerror = (error) => {
118
+ this.wsOnError(ws, error);
119
+ };
120
+ ws.onmessage = (event) => {
121
+ this.wsOnMessage(ws, event);
122
+ };
123
+ ws.onclose = () => {
124
+ this.wsOnClose(ws);
125
+ };
126
+ return ws;
148
127
  }
149
128
  wsOnOpen(ws) {
129
+ if (ws !== this.ws) {
130
+ return;
131
+ }
150
132
  console.log(`[${Date.now()}] WebSocketClient:wsOnOpen`);
151
133
  this.onConnectCallbacks.forEach((callback) => callback());
152
134
  }
@@ -155,6 +137,9 @@ var WebSocketClientImpl = class {
155
137
  ws.close();
156
138
  }
157
139
  wsOnMessage(ws, event) {
140
+ if (ws !== this.ws) {
141
+ return;
142
+ }
158
143
  console.log(
159
144
  `[${Date.now()}] WebSocketClient:wsOnMessage event: `,
160
145
  event.data
@@ -176,10 +161,13 @@ var WebSocketClientImpl = class {
176
161
  });
177
162
  }
178
163
  } catch (error) {
179
- console.error("WebSocketClient:onmessage", error);
164
+ console.error("WebSocketClient:wsOnMessage", error);
180
165
  }
181
166
  }
182
167
  wsOnClose(ws) {
168
+ if (ws !== this.ws) {
169
+ return;
170
+ }
183
171
  console.log(`[${Date.now()}] WebSocketClient:wsOnClose`);
184
172
  const disconnectCallbacks = this.onDisconnectCallbacks;
185
173
  this.clearEventHandlers();
@@ -16,12 +16,13 @@ var WebSocketClientImpl = class {
16
16
  this.onMessageCallbacks = {};
17
17
  this.onErrorCallbacks = /* @__PURE__ */ new Set();
18
18
  }
19
- async connect(args) {
19
+ connect(args) {
20
20
  console.log(`[${Date.now()}] WebSocketClient:connect ${args.url}`);
21
21
  if (this.ws) {
22
22
  this.disconnect();
23
23
  }
24
- this.ws = await this.createWebSocket(args.url);
24
+ this.clearEventHandlers();
25
+ this.ws = this.createWebSocket(args.url);
25
26
  }
26
27
  disconnect() {
27
28
  console.log(`[${Date.now()}] WebSocketClient:disconnect`);
@@ -47,26 +48,19 @@ var WebSocketClientImpl = class {
47
48
  this.ws?.send(JSON.stringify(message));
48
49
  }
49
50
  onConnect(args) {
50
- console.log(`[${Date.now()}] WebSocketClient:onConnect`);
51
51
  this.onConnectCallbacks.add(args.callback);
52
52
  }
53
53
  onDisconnect(args) {
54
- console.log(`[${Date.now()}] WebSocketClient:onDisconnect`);
55
54
  this.onDisconnectCallbacks.add(args.callback);
56
55
  }
57
56
  onMessage(args) {
58
- console.log(`[${Date.now()}] WebSocketClient:onMessage`);
59
57
  this.onMessageCallbacks[args.topic] = this.onMessageCallbacks[args.topic] || /* @__PURE__ */ new Set();
60
58
  this.onMessageCallbacks[args.topic].add(args.callback);
61
59
  }
62
60
  onError(args) {
63
- console.log(`[${Date.now()}] WebSocketClient:onError`);
64
61
  this.onErrorCallbacks.add(args.callback);
65
62
  }
66
63
  addEventListener(args) {
67
- console.log(
68
- `[${Date.now()}] WebSocketClient:addEventListener eventType: ${args.eventType}`
69
- );
70
64
  if (args.eventType === "connect") {
71
65
  this.onConnectCallbacks.add(args.callback);
72
66
  } else if (args.eventType === "disconnect") {
@@ -79,9 +73,6 @@ var WebSocketClientImpl = class {
79
73
  }
80
74
  }
81
75
  removeEventListener(args) {
82
- console.log(
83
- `[${Date.now()}] WebSocketClient:removeEventListener eventType: ${args.eventType}`
84
- );
85
76
  if (args.eventType === "connect") {
86
77
  this.onConnectCallbacks.delete(args.callback);
87
78
  } else if (args.eventType === "disconnect") {
@@ -93,34 +84,25 @@ var WebSocketClientImpl = class {
93
84
  }
94
85
  }
95
86
  createWebSocket(url) {
96
- let connected = false;
97
- return new Promise((resolve, reject) => {
98
- const ws = new WebSocket(url);
99
- ws.onopen = () => {
100
- connected = true;
101
- this.wsOnOpen(ws);
102
- resolve(ws);
103
- };
104
- ws.onerror = (error) => {
105
- if (!connected) {
106
- reject(error);
107
- return;
108
- }
109
- this.wsOnError(ws, error);
110
- };
111
- ws.onmessage = (event) => {
112
- this.wsOnMessage(ws, event);
113
- };
114
- ws.onclose = () => {
115
- if (!connected) {
116
- reject(new Error("Connection closed"));
117
- return;
118
- }
119
- this.wsOnClose(ws);
120
- };
121
- });
87
+ const ws = new WebSocket(url);
88
+ ws.onopen = () => {
89
+ this.wsOnOpen(ws);
90
+ };
91
+ ws.onerror = (error) => {
92
+ this.wsOnError(ws, error);
93
+ };
94
+ ws.onmessage = (event) => {
95
+ this.wsOnMessage(ws, event);
96
+ };
97
+ ws.onclose = () => {
98
+ this.wsOnClose(ws);
99
+ };
100
+ return ws;
122
101
  }
123
102
  wsOnOpen(ws) {
103
+ if (ws !== this.ws) {
104
+ return;
105
+ }
124
106
  console.log(`[${Date.now()}] WebSocketClient:wsOnOpen`);
125
107
  this.onConnectCallbacks.forEach((callback) => callback());
126
108
  }
@@ -129,6 +111,9 @@ var WebSocketClientImpl = class {
129
111
  ws.close();
130
112
  }
131
113
  wsOnMessage(ws, event) {
114
+ if (ws !== this.ws) {
115
+ return;
116
+ }
132
117
  console.log(
133
118
  `[${Date.now()}] WebSocketClient:wsOnMessage event: `,
134
119
  event.data
@@ -150,10 +135,13 @@ var WebSocketClientImpl = class {
150
135
  });
151
136
  }
152
137
  } catch (error) {
153
- console.error("WebSocketClient:onmessage", error);
138
+ console.error("WebSocketClient:wsOnMessage", error);
154
139
  }
155
140
  }
156
141
  wsOnClose(ws) {
142
+ if (ws !== this.ws) {
143
+ return;
144
+ }
157
145
  console.log(`[${Date.now()}] WebSocketClient:wsOnClose`);
158
146
  const disconnectCallbacks = this.onDisconnectCallbacks;
159
147
  this.clearEventHandlers();
@@ -9,14 +9,16 @@
9
9
  --dark-hl-3: #CE9178;
10
10
  --light-hl-4: #0000FF;
11
11
  --dark-hl-4: #569CD6;
12
- --light-hl-5: #0070C1;
13
- --dark-hl-5: #4FC1FF;
14
- --light-hl-6: #795E26;
15
- --dark-hl-6: #DCDCAA;
16
- --light-hl-7: #008000;
17
- --dark-hl-7: #6A9955;
18
- --light-hl-8: #267F99;
19
- --dark-hl-8: #4EC9B0;
12
+ --light-hl-5: #267F99;
13
+ --dark-hl-5: #4EC9B0;
14
+ --light-hl-6: #0070C1;
15
+ --dark-hl-6: #4FC1FF;
16
+ --light-hl-7: #795E26;
17
+ --dark-hl-7: #DCDCAA;
18
+ --light-hl-8: #008000;
19
+ --dark-hl-8: #6A9955;
20
+ --light-hl-9: #000000FF;
21
+ --dark-hl-9: #D4D4D4;
20
22
  --light-code-background: #FFFFFF;
21
23
  --dark-code-background: #1E1E1E;
22
24
  }
@@ -31,6 +33,7 @@
31
33
  --hl-6: var(--light-hl-6);
32
34
  --hl-7: var(--light-hl-7);
33
35
  --hl-8: var(--light-hl-8);
36
+ --hl-9: var(--light-hl-9);
34
37
  --code-background: var(--light-code-background);
35
38
  } }
36
39
 
@@ -44,6 +47,7 @@
44
47
  --hl-6: var(--dark-hl-6);
45
48
  --hl-7: var(--dark-hl-7);
46
49
  --hl-8: var(--dark-hl-8);
50
+ --hl-9: var(--dark-hl-9);
47
51
  --code-background: var(--dark-code-background);
48
52
  } }
49
53
 
@@ -57,6 +61,7 @@
57
61
  --hl-6: var(--light-hl-6);
58
62
  --hl-7: var(--light-hl-7);
59
63
  --hl-8: var(--light-hl-8);
64
+ --hl-9: var(--light-hl-9);
60
65
  --code-background: var(--light-code-background);
61
66
  }
62
67
 
@@ -70,6 +75,7 @@
70
75
  --hl-6: var(--dark-hl-6);
71
76
  --hl-7: var(--dark-hl-7);
72
77
  --hl-8: var(--dark-hl-8);
78
+ --hl-9: var(--dark-hl-9);
73
79
  --code-background: var(--dark-code-background);
74
80
  }
75
81
 
@@ -82,4 +88,5 @@
82
88
  .hl-6 { color: var(--hl-6); }
83
89
  .hl-7 { color: var(--hl-7); }
84
90
  .hl-8 { color: var(--hl-8); }
91
+ .hl-9 { color: var(--hl-9); }
85
92
  pre, code { background: var(--code-background); }