@jinntec/jinntap 1.16.0 → 1.16.2
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/dist/editor-styles.css +11 -0
- package/dist/jinn-tap.es.js +2 -2
- package/dist/jinn-toast.es.js +29 -29
- package/package.json +1 -1
package/dist/editor-styles.css
CHANGED
|
@@ -35,6 +35,17 @@ tei-div > tei-div > tei-div > tei-div > tei-head {
|
|
|
35
35
|
margin-top: 1.874rem;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
tei-div > tei-div > tei-div > tei-div > tei-div > tei-head {
|
|
39
|
+
font-size: 1.125rem;
|
|
40
|
+
line-height: 1.25;
|
|
41
|
+
margin-top: 1.5rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
tei-figure > tei-head {
|
|
45
|
+
font-size: 1rem;
|
|
46
|
+
line-height: 1.25;
|
|
47
|
+
}
|
|
48
|
+
|
|
38
49
|
tei-title[level="m"] {
|
|
39
50
|
font-style: italic;
|
|
40
51
|
}
|
package/dist/jinn-tap.es.js
CHANGED
|
@@ -38626,7 +38626,7 @@ const Wx = /* @__PURE__ */ Fx(Hx), Jx = {
|
|
|
38626
38626
|
figure: {
|
|
38627
38627
|
type: "block",
|
|
38628
38628
|
selectable: !0,
|
|
38629
|
-
content: "(graphic|figDesc)*"
|
|
38629
|
+
content: "(graphic|figDesc|head)*"
|
|
38630
38630
|
},
|
|
38631
38631
|
figDesc: {
|
|
38632
38632
|
type: "block",
|
|
@@ -38933,7 +38933,7 @@ const Wx = /* @__PURE__ */ Fx(Hx), Jx = {
|
|
|
38933
38933
|
type: "list",
|
|
38934
38934
|
group: "",
|
|
38935
38935
|
defining: !0,
|
|
38936
|
-
content: "note
|
|
38936
|
+
content: "note*",
|
|
38937
38937
|
keyboard: {
|
|
38938
38938
|
"Mod-Shift-u": {
|
|
38939
38939
|
attributes: {}
|
package/dist/jinn-toast.es.js
CHANGED
|
@@ -5,8 +5,8 @@ class r extends HTMLElement {
|
|
|
5
5
|
static get observedAttributes() {
|
|
6
6
|
return ["duration"];
|
|
7
7
|
}
|
|
8
|
-
attributeChangedCallback(t, s,
|
|
9
|
-
t === "duration" && (this.duration = parseInt(
|
|
8
|
+
attributeChangedCallback(t, s, i) {
|
|
9
|
+
t === "duration" && (this.duration = parseInt(i) || 3e3);
|
|
10
10
|
}
|
|
11
11
|
connectedCallback() {
|
|
12
12
|
this.render(), this.setupEventListeners();
|
|
@@ -14,7 +14,7 @@ class r extends HTMLElement {
|
|
|
14
14
|
render() {
|
|
15
15
|
this.innerHTML = `
|
|
16
16
|
<style>
|
|
17
|
-
jinn-toast .container {
|
|
17
|
+
jinn-toast .jinn-toast-container {
|
|
18
18
|
position: fixed;
|
|
19
19
|
bottom: 20px;
|
|
20
20
|
right: 20px;
|
|
@@ -24,7 +24,7 @@ class r extends HTMLElement {
|
|
|
24
24
|
z-index: var(--jinn-toast-z-index, 1000);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
jinn-toast .toast {
|
|
27
|
+
jinn-toast .jinn-toast {
|
|
28
28
|
padding: 12px 24px;
|
|
29
29
|
margin: 8px 0;
|
|
30
30
|
border-radius: 4px;
|
|
@@ -38,15 +38,15 @@ class r extends HTMLElement {
|
|
|
38
38
|
position: relative;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
jinn-toast .toast p {
|
|
41
|
+
jinn-toast .jinn-toast p {
|
|
42
42
|
color: var(--jinn-toast-color, #F0F0F0);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
jinn-toast .toast input {
|
|
45
|
+
jinn-toast .jinn-toast input {
|
|
46
46
|
width: min-content;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
jinn-toast .toast.sticky {
|
|
49
|
+
jinn-toast .jinn-toast.sticky {
|
|
50
50
|
pointer-events: auto;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -69,25 +69,25 @@ class r extends HTMLElement {
|
|
|
69
69
|
opacity: 1;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
jinn-toast .toast.show {
|
|
72
|
+
jinn-toast .jinn-toast.show {
|
|
73
73
|
opacity: 1;
|
|
74
74
|
transform: translateY(0);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
jinn-toast .toast.error {
|
|
77
|
+
jinn-toast .jinn-toast.error {
|
|
78
78
|
background-color: var(--jinn-toast-error-color, #EE402E);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
jinn-toast .toast.warn {
|
|
81
|
+
jinn-toast .jinn-toast.warn {
|
|
82
82
|
background-color: var(--jinn-toast-warn-color, #FF9500);
|
|
83
83
|
color: #000;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
jinn-toast .toast.info {
|
|
86
|
+
jinn-toast .jinn-toast.info {
|
|
87
87
|
background-color: var(--jinn-toast-info-color, #33790F);
|
|
88
88
|
}
|
|
89
89
|
</style>
|
|
90
|
-
<div class="container"></div>
|
|
90
|
+
<div class="jinn-toast-container"></div>
|
|
91
91
|
`;
|
|
92
92
|
}
|
|
93
93
|
setupEventListeners() {
|
|
@@ -95,22 +95,22 @@ class r extends HTMLElement {
|
|
|
95
95
|
this.showToast(t.detail.message, t.detail.type || "info", t.detail.sticky || !1);
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
showToast(t, s,
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
a.removeChild(
|
|
98
|
+
showToast(t, s, i = !1) {
|
|
99
|
+
const n = document.createElement("div");
|
|
100
|
+
n.className = `jinn-toast ${s} ${i ? "sticky" : ""}`;
|
|
101
|
+
const e = () => {
|
|
102
|
+
n.classList.remove("show"), setTimeout(() => {
|
|
103
|
+
a.removeChild(n);
|
|
104
104
|
}, 300);
|
|
105
105
|
};
|
|
106
106
|
if (typeof t == "string")
|
|
107
|
-
|
|
107
|
+
n.innerHTML = t;
|
|
108
108
|
else if (t instanceof Node)
|
|
109
|
-
|
|
109
|
+
n.appendChild(t);
|
|
110
110
|
else if (typeof t == "function") {
|
|
111
|
-
const
|
|
112
|
-
if (
|
|
113
|
-
|
|
111
|
+
const o = t(e);
|
|
112
|
+
if (o instanceof Node)
|
|
113
|
+
n.appendChild(o);
|
|
114
114
|
else {
|
|
115
115
|
console.warn("Function message did not return a valid Node.");
|
|
116
116
|
return;
|
|
@@ -119,16 +119,16 @@ class r extends HTMLElement {
|
|
|
119
119
|
console.warn("Invalid message type for toast. Expected string, Node, or function.");
|
|
120
120
|
return;
|
|
121
121
|
}
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
124
|
-
|
|
122
|
+
if (i) {
|
|
123
|
+
const o = document.createElement("button");
|
|
124
|
+
o.className = "close-button", o.innerHTML = `
|
|
125
125
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x" viewBox="0 0 16 16">
|
|
126
126
|
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/>
|
|
127
127
|
</svg>
|
|
128
|
-
`,
|
|
128
|
+
`, o.addEventListener("click", e), n.appendChild(o);
|
|
129
129
|
}
|
|
130
|
-
const a = this.querySelector(".container");
|
|
131
|
-
a.appendChild(
|
|
130
|
+
const a = this.querySelector(".jinn-toast-container");
|
|
131
|
+
a.appendChild(n), n.offsetHeight, n.classList.add("show"), i || setTimeout(e, this.duration);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
customElements.define("jinn-toast", r);
|