@schukai/monster 3.93.0 → 3.94.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
 
4
4
 
5
+ ## [3.94.0] - 2024-12-22
6
+
7
+ ### Add Features
8
+
9
+ - **log:** auto update timestamp [#270](https://gitlab.schukai.com/oss/libraries/javascript/monster/issues/270)
10
+
11
+
12
+
5
13
  ## [3.93.0] - 2024-12-22
6
14
 
7
15
  ### Add Features
package/package.json CHANGED
@@ -1 +1 @@
1
- {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.12","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.93.0"}
1
+ {"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.12","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.94.0"}
@@ -12,19 +12,20 @@
12
12
  * SPDX-License-Identifier: AGPL-3.0
13
13
  */
14
14
 
15
- import { instanceSymbol } from "../../constants.mjs";
15
+ import {instanceSymbol} from "../../constants.mjs";
16
16
  import {
17
- assembleMethodSymbol,
18
- CustomElement,
19
- getSlottedElements,
20
- registerCustomElement,
17
+ assembleMethodSymbol,
18
+ CustomElement,
19
+ getSlottedElements,
20
+ registerCustomElement,
21
21
  } from "../../dom/customelement.mjs";
22
- import { LogStyleSheet } from "./stylesheet/log.mjs";
23
- import { Entry } from "./log/entry.mjs";
22
+ import {LogStyleSheet} from "./stylesheet/log.mjs";
23
+ import {Entry} from "./log/entry.mjs";
24
24
  import {validateInstance, validateString} from "../../types/validate.mjs";
25
25
  import "./state.mjs";
26
+ import {getWindow} from "../../dom/util.mjs";
26
27
 
27
- export { Log };
28
+ export {Log};
28
29
 
29
30
  /**
30
31
  * @private
@@ -45,133 +46,148 @@ const emptyStateElementSymbol = Symbol("emptyStateElement");
45
46
  *
46
47
  * @example /examples/components/state/log-simple
47
48
  *
49
+ * @issue https://localhost.alvine.dev:8444/development/issues/closed/270.html
50
+ *
48
51
  * @since 3.74.0
49
52
  * @copyright schukai GmbH
50
53
  * @summary The log entry is a single entry in the log.
51
54
  **/
52
55
  class Log extends CustomElement {
53
- /**
54
- * @return {void}
55
- */
56
- [assembleMethodSymbol]() {
57
- super[assembleMethodSymbol]();
58
-
59
- initControlReferences.call(this);
60
- initEventHandler.call(this);
61
- }
62
-
63
- /**
64
- * This method is called by the `instanceof` operator.
65
- * @return {symbol}
66
- */
67
- static get [instanceSymbol]() {
68
- return Symbol.for("@schukai/monster/components/state/log@@instance");
69
- }
70
-
71
- /**
72
- * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
73
- * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
74
- *
75
- * The individual configuration values can be found in the table.
76
- *
77
- * @property {Object} templates Template definitions
78
- * @property {string} templates.main Main template
79
- * @property {Object} labels Labels
80
- * @property {string} labels.nothingToReport Label for empty state
81
- */
82
- get defaults() {
83
- return Object.assign({}, super.defaults, {
84
- templates: {
85
- main: getTemplate(),
86
- },
87
-
88
- labels: {
89
- nothingToReport: "There is nothing to report yet.",
90
- },
91
-
92
- entries: [],
93
- });
94
- }
95
-
96
- /**
97
- * @return {void}
98
- */
99
- connectedCallback() {
100
- super.connectedCallback();
101
-
102
- const slottedElements = getSlottedElements.call(this);
103
- if (slottedElements.size > 0) {
104
- this[emptyStateElementSymbol].style.display = "none";
105
- }
106
- }
107
-
108
- /**
109
- * Clear the log
110
- *
111
- * @return {Log}
112
- */
113
- clear() {
114
- this[logElementSymbol].innerHTML = "";
115
- this[emptyStateElementSymbol].style.display = "block";
116
- return this;
117
- }
118
-
119
- /**
120
- * Add an entry to the log
121
- * @param {Entry} entry
122
- * @return {Log}
123
- */
124
- addEntry(entry) {
125
- validateInstance(entry, Entry);
126
-
127
- const entries = this.getOption("entries");
128
- entries.push(entry);
129
-
130
- /** this field is not used, but triggers a change event */
131
- this.setOption("length", entries.length - 1);
132
-
133
- return this;
134
- }
135
-
136
- /**
137
- * Add a log message
138
- *
139
- * @param {string} message
140
- * @param {Date} date
141
- * @return {Log}
142
- * @throws {TypeError} message is not a string
143
- */
144
- addMessage(message, date) {
145
- if (!date) {
146
- date = new Date();
147
- }
148
-
149
- validateString(message);
150
-
151
- this.addEntry(
152
- new Entry({
153
- message: message,
154
- date: date,
155
- }),
156
- );
157
-
158
- return this;
159
- }
160
-
161
- /**
162
- *
163
- * @return {string}
164
- */
165
- static getTag() {
166
- return "monster-log";
167
- }
168
-
169
- /**
170
- * @return {CSSStyleSheet[]}
171
- */
172
- static getCSSStyleSheet() {
173
- return [LogStyleSheet];
174
- }
56
+ /**
57
+ * @return {void}
58
+ */
59
+ [assembleMethodSymbol]() {
60
+ super[assembleMethodSymbol]();
61
+
62
+ initControlReferences.call(this);
63
+ initEventHandler.call(this);
64
+ }
65
+
66
+ /**
67
+ * This method is called by the `instanceof` operator.
68
+ * @return {symbol}
69
+ */
70
+ static get [instanceSymbol]() {
71
+ return Symbol.for("@schukai/monster/components/state/log@@instance");
72
+ }
73
+
74
+ /**
75
+ * To set the options via the HTML tag, the attribute `data-monster-options` must be used.
76
+ * @see {@link https://monsterjs.org/en/doc/#configurate-a-monster-control}
77
+ *
78
+ * The individual configuration values can be found in the table.
79
+ *
80
+ * @property {Object} templates Template definitions
81
+ * @property {string} templates.main Main template
82
+ * @property {Object} labels Labels
83
+ * @property {string} labels.nothingToReport Label for empty state
84
+ * @property {number} updateFrequency Update frequency in milliseconds for the timestamp
85
+ */
86
+ get defaults() {
87
+ return Object.assign({}, super.defaults, {
88
+ templates: {
89
+ main: getTemplate(),
90
+ },
91
+
92
+ labels: {
93
+ nothingToReport: "There is nothing to report yet.",
94
+ },
95
+
96
+ classes: {
97
+ direction: "vertical",
98
+ },
99
+
100
+ updateFrequency: 10000,
101
+
102
+ entries: [],
103
+
104
+ timestamp: 0,
105
+ });
106
+ }
107
+
108
+ /**
109
+ * @return {void}
110
+ */
111
+ connectedCallback() {
112
+ super.connectedCallback();
113
+
114
+ const slottedElements = getSlottedElements.call(this);
115
+ if (slottedElements.size > 0) {
116
+ this[emptyStateElementSymbol].style.display = "none";
117
+ }
118
+ }
119
+
120
+ /**
121
+ * Clear the log
122
+ *
123
+ * @return {Log}
124
+ */
125
+ clear() {
126
+ this[logElementSymbol].innerHTML = "";
127
+ this[emptyStateElementSymbol].style.display = "block";
128
+ return this;
129
+ }
130
+
131
+ /**
132
+ * Add an entry to the log
133
+ * @param {Entry} entry
134
+ * @return {Log}
135
+ */
136
+ addEntry(entry) {
137
+ validateInstance(entry, Entry);
138
+
139
+ if (entry.date === undefined || entry.date === null) {
140
+ entry.date = new Date();
141
+ }
142
+
143
+ const entries = this.getOption("entries");
144
+ entries.push(entry);
145
+
146
+ /** this field is not used, but triggers a change event */
147
+ this.setOption("length", entries.length - 1);
148
+
149
+ return this;
150
+ }
151
+
152
+ /**
153
+ * Add a log message
154
+ *
155
+ * @param {string} message
156
+ * @param {Date} date
157
+ * @return {Log}
158
+ * @throws {TypeError} message is not a string
159
+ */
160
+ addMessage(message, date) {
161
+ if (!date) {
162
+ date = new Date();
163
+ }
164
+
165
+ validateString(message);
166
+
167
+ this.addEntry(
168
+ new Entry({
169
+ message: message,
170
+ date: date,
171
+ }),
172
+ );
173
+
174
+ return this;
175
+ }
176
+
177
+ /**
178
+ *
179
+ * @return {string}
180
+ */
181
+ static getTag() {
182
+ return "monster-log";
183
+ }
184
+
185
+ /**
186
+ * @return {CSSStyleSheet[]}
187
+ */
188
+ static getCSSStyleSheet() {
189
+ return [LogStyleSheet];
190
+ }
175
191
  }
176
192
 
177
193
  /**
@@ -180,37 +196,44 @@ class Log extends CustomElement {
180
196
  * @throws {Error} no shadow-root is defined
181
197
  */
182
198
  function initControlReferences() {
183
- if (!this.shadowRoot) {
184
- throw new Error("no shadow-root is defined");
185
- }
186
-
187
- this[logElementSymbol] = this.shadowRoot.querySelector(
188
- "[data-monster-role=control]",
189
- );
190
- this[emptyStateElementSymbol] = this.shadowRoot.querySelector(
191
- "[data-monster-role=empty-state]",
192
- );
199
+ if (!this.shadowRoot) {
200
+ throw new Error("no shadow-root is defined");
201
+ }
202
+
203
+ this[logElementSymbol] = this.shadowRoot.querySelector(
204
+ "[data-monster-role=control]",
205
+ );
206
+ this[emptyStateElementSymbol] = this.shadowRoot.querySelector(
207
+ "[data-monster-role=empty-state]",
208
+ );
193
209
  }
194
210
 
195
211
  /**
196
212
  * @private
197
213
  */
198
214
  function initEventHandler() {
199
- if (!this.shadowRoot) {
200
- throw new Error("no shadow-root is defined");
201
- }
202
-
203
- this.shadowRoot.addEventListener("slotchange", (event) => {
204
- const slottedElements = getSlottedElements.call(this);
205
-
206
- if (slottedElements.size > 0) {
207
- this[emptyStateElementSymbol].style.display = "none";
208
- } else {
209
- this[emptyStateElementSymbol].style.display = "block";
210
- }
211
- });
212
-
213
- return this;
215
+ if (!this.shadowRoot) {
216
+ throw new Error("no shadow-root is defined");
217
+ }
218
+
219
+ this.shadowRoot.addEventListener("slotchange", (event) => {
220
+ const slottedElements = getSlottedElements.call(this);
221
+
222
+ if (slottedElements.size > 0) {
223
+ this[emptyStateElementSymbol].style.display = "none";
224
+ } else {
225
+ this[emptyStateElementSymbol].style.display = "block";
226
+ }
227
+ });
228
+
229
+ setInterval(() => {
230
+ getWindow().requestAnimationFrame(() => {
231
+ const timestamp = (new Date()).toTimeString();
232
+ this.setOption("timestamp", timestamp);
233
+ });
234
+ }, this.getOption("updateFrequency"));
235
+
236
+ return this;
214
237
  }
215
238
 
216
239
  /**
@@ -218,41 +241,43 @@ function initEventHandler() {
218
241
  * @return {string}
219
242
  */
220
243
  function getTemplate() {
221
- // language=HTML
222
- return `<template id="entry">
223
- <li data-monster-role="entry">
244
+ // language=HTML
245
+ return `
246
+ <template id="entry">
247
+ <li data-monster-role="entry">
224
248
  <span data-monster-replace="path:entry.user"
225
249
  data-monster-attributes="class path:entry.user | ?:user:hidden"></span>
226
- <span data-monster-replace="path:entry.title"
227
- data-monster-attributes="class path:entry.title | ?:title:hidden"></span>
228
- <span data-monster-replace="path:entry.message"
229
- data-monster-attributes="class path:entry.message | ?:message:hidden"></span>
230
- <span data-monster-replace="path:entry.date | time-ago" data-monster-attributes="title path:entry.date | datetime"></span>
231
-
232
- </li>
233
- </template>
234
-
235
- <div part="control" data-monster-role="control">
236
- <div data-monster-role="empty-state" data-monster-attributes="class path:entries | has-entries | ?:hidden:">
237
- <monster-state>
238
- <div part="visual">
239
- <svg width="4rem" height="4rem" viewBox="0 -12 512.00032 512"
240
- xmlns="http://www.w3.org/2000/svg">
241
- <path d="m455.074219 172.613281 53.996093-53.996093c2.226563-2.222657 3.273438-5.367188 2.828126-8.480469-.441407-3.113281-2.328126-5.839844-5.085938-7.355469l-64.914062-35.644531c-4.839844-2.65625-10.917969-.886719-13.578126 3.953125-2.65625 4.84375-.890624 10.921875 3.953126 13.578125l53.234374 29.230469-46.339843 46.335937-166.667969-91.519531 46.335938-46.335938 46.839843 25.722656c4.839844 2.65625 10.921875.890626 13.578125-3.953124 2.660156-4.839844.890625-10.921876-3.953125-13.578126l-53.417969-29.335937c-3.898437-2.140625-8.742187-1.449219-11.882812 1.695313l-54 54-54-54c-3.144531-3.144532-7.988281-3.832032-11.882812-1.695313l-184.929688 101.546875c-2.757812 1.515625-4.644531 4.238281-5.085938 7.355469-.445312 3.113281.601563 6.257812 2.828126 8.480469l53.996093 53.996093-53.996093 53.992188c-2.226563 2.226562-3.273438 5.367187-2.828126 8.484375.441407 3.113281 2.328126 5.839844 5.085938 7.351562l55.882812 30.6875v102.570313c0 3.652343 1.988282 7.011719 5.1875 8.769531l184.929688 101.542969c1.5.824219 3.15625 1.234375 4.8125 1.234375s3.3125-.410156 4.8125-1.234375l184.929688-101.542969c3.199218-1.757812 5.1875-5.117188 5.1875-8.769531v-102.570313l55.882812-30.683594c2.757812-1.515624 4.644531-4.242187 5.085938-7.355468.445312-3.113282-.601563-6.257813-2.828126-8.480469zm-199.074219 90.132813-164.152344-90.136719 164.152344-90.140625 164.152344 90.140625zm-62.832031-240.367188 46.332031 46.335938-166.667969 91.519531-46.335937-46.335937zm-120.328125 162.609375 166.667968 91.519531-46.339843 46.339844-166.671875-91.519531zm358.089844 184.796875-164.929688 90.5625v-102.222656c0-5.523438-4.476562-10-10-10s-10 4.476562-10 10v102.222656l-164.929688-90.5625v-85.671875l109.046876 59.878907c1.511718.828124 3.167968 1.234374 4.808593 1.234374 2.589844 0 5.152344-1.007812 7.074219-2.929687l54-54 54 54c1.921875 1.925781 4.484375 2.929687 7.074219 2.929687 1.640625 0 3.296875-.40625 4.808593-1.234374l109.046876-59.878907zm-112.09375-46.9375-46.339844-46.34375 166.667968-91.515625 46.34375 46.335938zm0 0"/>
242
- <path d="m404.800781 68.175781c2.628907 0 5.199219-1.070312 7.070313-2.933593 1.859375-1.859376 2.929687-4.4375 2.929687-7.066407 0-2.632812-1.070312-5.210937-2.929687-7.070312-1.859375-1.863281-4.441406-2.929688-7.070313-2.929688-2.640625 0-5.210937 1.066407-7.070312 2.929688-1.871094 1.859375-2.929688 4.4375-2.929688 7.070312 0 2.628907 1.058594 5.207031 2.929688 7.066407 1.859375 1.863281 4.441406 2.933593 7.070312 2.933593zm0 0"/>
243
- <path d="m256 314.925781c-2.628906 0-5.210938 1.066407-7.070312 2.929688-1.859376 1.867187-2.929688 4.4375-2.929688 7.070312 0 2.636719 1.070312 5.207031 2.929688 7.078125 1.859374 1.859375 4.441406 2.921875 7.070312 2.921875s5.210938-1.0625 7.070312-2.921875c1.859376-1.871094 2.929688-4.441406 2.929688-7.078125 0-2.632812-1.070312-5.203125-2.929688-7.070312-1.859374-1.863281-4.441406-2.929688-7.070312-2.929688zm0 0"/>
244
- </svg>
250
+ <span data-monster-replace="path:entry.title"
251
+ data-monster-attributes="class path:entry.title | ?:title:hidden"></span>
252
+ <span data-monster-replace="path:entry.message"
253
+ data-monster-attributes="class path:entry.message | ?:message:hidden"></span>
254
+ <span data-monster-replace="path:entry.date | time-ago"
255
+ data-monster-attributes="title path:entry.date | datetime"></span>
256
+
257
+ </li>
258
+ </template>
259
+
260
+ <div part="control" data-monster-role="control">
261
+ <div data-monster-role="empty-state" data-monster-attributes="class path:entries | has-entries | ?:hidden:">
262
+ <monster-state>
263
+ <div part="visual">
264
+ <svg width="4rem" height="4rem" viewBox="0 -12 512.00032 512"
265
+ xmlns="http://www.w3.org/2000/svg">
266
+ <path d="m455.074219 172.613281 53.996093-53.996093c2.226563-2.222657 3.273438-5.367188 2.828126-8.480469-.441407-3.113281-2.328126-5.839844-5.085938-7.355469l-64.914062-35.644531c-4.839844-2.65625-10.917969-.886719-13.578126 3.953125-2.65625 4.84375-.890624 10.921875 3.953126 13.578125l53.234374 29.230469-46.339843 46.335937-166.667969-91.519531 46.335938-46.335938 46.839843 25.722656c4.839844 2.65625 10.921875.890626 13.578125-3.953124 2.660156-4.839844.890625-10.921876-3.953125-13.578126l-53.417969-29.335937c-3.898437-2.140625-8.742187-1.449219-11.882812 1.695313l-54 54-54-54c-3.144531-3.144532-7.988281-3.832032-11.882812-1.695313l-184.929688 101.546875c-2.757812 1.515625-4.644531 4.238281-5.085938 7.355469-.445312 3.113281.601563 6.257812 2.828126 8.480469l53.996093 53.996093-53.996093 53.992188c-2.226563 2.226562-3.273438 5.367187-2.828126 8.484375.441407 3.113281 2.328126 5.839844 5.085938 7.351562l55.882812 30.6875v102.570313c0 3.652343 1.988282 7.011719 5.1875 8.769531l184.929688 101.542969c1.5.824219 3.15625 1.234375 4.8125 1.234375s3.3125-.410156 4.8125-1.234375l184.929688-101.542969c3.199218-1.757812 5.1875-5.117188 5.1875-8.769531v-102.570313l55.882812-30.683594c2.757812-1.515624 4.644531-4.242187 5.085938-7.355468.445312-3.113282-.601563-6.257813-2.828126-8.480469zm-199.074219 90.132813-164.152344-90.136719 164.152344-90.140625 164.152344 90.140625zm-62.832031-240.367188 46.332031 46.335938-166.667969 91.519531-46.335937-46.335937zm-120.328125 162.609375 166.667968 91.519531-46.339843 46.339844-166.671875-91.519531zm358.089844 184.796875-164.929688 90.5625v-102.222656c0-5.523438-4.476562-10-10-10s-10 4.476562-10 10v102.222656l-164.929688-90.5625v-85.671875l109.046876 59.878907c1.511718.828124 3.167968 1.234374 4.808593 1.234374 2.589844 0 5.152344-1.007812 7.074219-2.929687l54-54 54 54c1.921875 1.925781 4.484375 2.929687 7.074219 2.929687 1.640625 0 3.296875-.40625 4.808593-1.234374l109.046876-59.878907zm-112.09375-46.9375-46.339844-46.34375 166.667968-91.515625 46.34375 46.335938zm0 0"/>
267
+ <path d="m404.800781 68.175781c2.628907 0 5.199219-1.070312 7.070313-2.933593 1.859375-1.859376 2.929687-4.4375 2.929687-7.066407 0-2.632812-1.070312-5.210937-2.929687-7.070312-1.859375-1.863281-4.441406-2.929688-7.070313-2.929688-2.640625 0-5.210937 1.066407-7.070312 2.929688-1.871094 1.859375-2.929688 4.4375-2.929688 7.070312 0 2.628907 1.058594 5.207031 2.929688 7.066407 1.859375 1.863281 4.441406 2.933593 7.070312 2.933593zm0 0"/>
268
+ <path d="m256 314.925781c-2.628906 0-5.210938 1.066407-7.070312 2.929688-1.859376 1.867187-2.929688 4.4375-2.929688 7.070312 0 2.636719 1.070312 5.207031 2.929688 7.078125 1.859374 1.859375 4.441406 2.921875 7.070312 2.921875s5.210938-1.0625 7.070312-2.921875c1.859376-1.871094 2.929688-4.441406 2.929688-7.078125 0-2.632812-1.070312-5.203125-2.929688-7.070312-1.859374-1.863281-4.441406-2.929688-7.070312-2.929688zm0 0"/>
269
+ </svg>
270
+ </div>
271
+ <div part="content" data-monster-replace="path:labels.nothingToReport">
272
+ There is nothing to report yet.
273
+ </div>
274
+ </monster-state>
245
275
  </div>
246
- <div part="content" data-monster-replace="path:labels.nothingToReport">
247
- There is nothing to report yet.
276
+ <div data-monster-role="entries">
277
+ <ul data-monster-insert="entry path:entries">
278
+ </ul>
248
279
  </div>
249
- </monster-state>
250
- </div>
251
- <div data-monster-role="entries">
252
- <ul data-monster-insert="entry path:entries">
253
- </ul>
254
- </div>
255
- </div>
280
+ </div>
256
281
  `;
257
282
  }
258
283
 
@@ -8,55 +8,56 @@
8
8
  @import "../../style/mixin/hover.pcss";
9
9
 
10
10
  [data-monster-role=entries] {
11
-
11
+ display: flex;
12
+ flex-direction: column;
13
+ align-items: flex-start;
14
+ border: 0;
15
+ padding: 0;
16
+ margin: 0;
17
+ box-sizing: border-box;
18
+ position: relative;
12
19
 
13
20
  & ul {
14
21
  list-style-type: none;
15
22
  margin: 0;
16
- padding: 0 0 0 1.8rem;
17
- position: relative;
18
- top: 0
23
+ padding: 0 0 0 1.8rem; /* Abstand links behalten */
24
+ width: 100%; /* Flex-Container-Anpassung */
19
25
  }
20
26
 
21
27
  & ul:before {
22
28
  content: "";
23
29
  display: block;
24
- width: 0;
30
+ width: 2px;
25
31
  height: 100%;
26
- border: 1px dashed var(--monster-color-primary-2);
32
+
33
+ border-left-color: var(--monster-bg-color-primary-3);
34
+ border-left-style: dotted;
35
+ border-left-width: 1px;
27
36
  position: absolute;
28
- top: 0;
29
37
  left: 1rem;
30
- }
31
-
32
- .title {
33
- font-weight: bold;
38
+ bottom: 0;
39
+ top: 0;
34
40
  }
35
41
 
36
42
  & ul li {
37
43
  margin: 0;
38
- position: relative;
39
44
  padding: 0.1rem 0.3rem;
40
45
  color: var(--monster-color-primary-1);
41
46
  background-color: var(--monster-bg-color-primary-1);
42
47
  border-radius: 5px;
48
+ position: relative;
43
49
  }
44
50
 
45
-
46
51
  & ul li:before {
47
52
  content: "";
48
- display: block;
49
- width: 5px;
50
- height: 5px;
53
+ width: 6px;
54
+ height: 6px;
55
+ box-sizing: border-box;
51
56
  border-radius: 50%;
52
57
  background: var(--monster-bg-color-primary-3);
53
58
  border: 1px solid var(--monster-color-primary-2);
54
59
  position: absolute;
55
- left: -0.9rem;
60
+ left: calc(-1rem + (5px / 4));
56
61
  top: 0.6rem;
57
62
  }
58
-
59
-
60
-
61
-
62
- }
63
+ }
@@ -24,7 +24,7 @@ const LogStyleSheet = new CSSStyleSheet();
24
24
  try {
25
25
  LogStyleSheet.insertRule(`
26
26
  @layer log {
27
- [data-monster-role=control]{box-sizing:border-box;outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}:host{box-sizing:border-box;display:block}.block{display:block}.inline{display:inline}.inline-block{display:inline-block}.grid{display:grid}.inline-grid{display:inline-grid}.flex{display:flex}.inline-flex{display:inline-flex}.hidden,.hide,.none{display:none}.visible{visibility:visible}.invisible{visibility:hidden}.monster-border-primary-1,.monster-border-primary-2,.monster-border-primary-3,.monster-border-primary-4{border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width)}.monster-border-0{border-radius:0;border-style:none;border-width:0}.monster-border-primary-1{border-color:var(--monster-bg-color-primary-1)}.monster-border-primary-2{border-color:var(--monster-bg-color-primary-2)}.monster-border-primary-3{border-color:var(--monster-bg-color-primary-3)}.monster-border-primary-4{border-color:var(--monster-bg-color-primary-4)}.monster-border-secondary-1,.monster-border-secondary-2,.monster-border-secondary-3,.monster-border-secondary-4{border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width)}.monster-border-secondary-1{border-color:var(--monster-bg-color-secondary-1)}.monster-border-secondary-2{border-color:var(--monster-bg-color-secondary-2)}.monster-border-secondary-3{border-color:var(--monster-bg-color-secondary-3)}.monster-border-secondary-4{border-color:var(--monster-bg-color-secondary-4)}.monster-border-tertiary-1,.monster-border-tertiary-2,.monster-border-tertiary-3,.monster-border-tertiary-4{border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width)}.monster-border-tertiary-1{border-color:var(--monster-bg-color-tertiary-1)}.monster-border-tertiary-2{border-color:var(--monster-bg-color-tertiary-2)}.monster-border-tertiary-3{border-color:var(--monster-bg-color-tertiary-3)}.monster-border-tertiary-4{border-color:var(--monster-bg-color-tertiary-4)}[data-monster-role=entries] ul{list-style-type:none;margin:0;padding:0 0 0 1.8rem;position:relative;top:0}[data-monster-role=entries] ul:before{border:1px dashed var(--monster-color-primary-2);content:\"\";display:block;height:100%;left:1rem;position:absolute;top:0;width:0}[data-monster-role=entries] .title{font-weight:700}[data-monster-role=entries] ul li{background-color:var(--monster-bg-color-primary-1);border-radius:5px;color:var(--monster-color-primary-1);margin:0;padding:.1rem .3rem;position:relative}[data-monster-role=entries] ul li:before{background:var(--monster-bg-color-primary-3);border:1px solid var(--monster-color-primary-2);border-radius:50%;content:\"\";display:block;height:5px;left:-.9rem;position:absolute;top:.6rem;width:5px}
27
+ [data-monster-role=control]{box-sizing:border-box;outline:none;width:100%}[data-monster-role=control].flex{align-items:center;display:flex;flex-direction:row}:host{box-sizing:border-box;display:block}.block{display:block}.inline{display:inline}.inline-block{display:inline-block}.grid{display:grid}.inline-grid{display:inline-grid}.flex{display:flex}.inline-flex{display:inline-flex}.hidden,.hide,.none{display:none}.visible{visibility:visible}.invisible{visibility:hidden}.monster-border-primary-1,.monster-border-primary-2,.monster-border-primary-3,.monster-border-primary-4{border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width)}.monster-border-0{border-radius:0;border-style:none;border-width:0}.monster-border-primary-1{border-color:var(--monster-bg-color-primary-1)}.monster-border-primary-2{border-color:var(--monster-bg-color-primary-2)}.monster-border-primary-3{border-color:var(--monster-bg-color-primary-3)}.monster-border-primary-4{border-color:var(--monster-bg-color-primary-4)}.monster-border-secondary-1,.monster-border-secondary-2,.monster-border-secondary-3,.monster-border-secondary-4{border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width)}.monster-border-secondary-1{border-color:var(--monster-bg-color-secondary-1)}.monster-border-secondary-2{border-color:var(--monster-bg-color-secondary-2)}.monster-border-secondary-3{border-color:var(--monster-bg-color-secondary-3)}.monster-border-secondary-4{border-color:var(--monster-bg-color-secondary-4)}.monster-border-tertiary-1,.monster-border-tertiary-2,.monster-border-tertiary-3,.monster-border-tertiary-4{border-radius:var(--monster-border-radius);border-style:var(--monster-border-style);border-width:var(--monster-border-width)}.monster-border-tertiary-1{border-color:var(--monster-bg-color-tertiary-1)}.monster-border-tertiary-2{border-color:var(--monster-bg-color-tertiary-2)}.monster-border-tertiary-3{border-color:var(--monster-bg-color-tertiary-3)}.monster-border-tertiary-4{border-color:var(--monster-bg-color-tertiary-4)}[data-monster-role=entries]{align-items:flex-start;border:0;box-sizing:border-box;display:flex;flex-direction:column;margin:0;padding:0;position:relative}[data-monster-role=entries] ul{list-style-type:none;margin:0;padding:0 0 0 1.8rem;width:100%}[data-monster-role=entries] ul:before{border-left:1px dotted var(--monster-bg-color-primary-3);bottom:0;content:\"\";display:block;height:100%;left:1rem;position:absolute;top:0;width:2px}[data-monster-role=entries] ul li{background-color:var(--monster-bg-color-primary-1);border-radius:5px;color:var(--monster-color-primary-1);margin:0;padding:.1rem .3rem;position:relative}[data-monster-role=entries] ul li:before{background:var(--monster-bg-color-primary-3);border:1px solid var(--monster-color-primary-2);border-radius:50%;box-sizing:border-box;content:\"\";height:6px;left:calc(-1rem + 1.25px);position:absolute;top:.6rem;width:6px}
28
28
  }`, 0);
29
29
  } catch (e) {
30
30
  addAttributeToken(document.getRootNode().querySelector('html'), ATTRIBUTE_ERRORMESSAGE, e + "");
@@ -185,6 +185,7 @@ function validateObject(value) {
185
185
  * ```
186
186
  *
187
187
  * @param {*} value
188
+ * @param {object} instance
188
189
  * @return {*}
189
190
  * @license AGPLv3
190
191
  * @since 1.5.0