@jinntec/jinntap 1.7.0 → 1.7.1
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 +208 -0
- package/dist/jinn-tap.es.js +9 -1
- package/dist/jinn-tap.umd.js +1 -1
- package/dist/jinntap-logo-128.png +0 -0
- package/dist/jinntap-logo.png +0 -0
- package/package.json +6 -2
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
tei-div, tei-p, tei-item {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
tei-head {
|
|
6
|
+
font-size: 2rem;
|
|
7
|
+
font-weight: bold;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
tei-div > tei-div > tei-head {
|
|
11
|
+
font-size: 1.75rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
tei-div > tei-div > tei-div > tei-head {
|
|
15
|
+
font-size: 1.5rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
tei-div > tei-div > tei-div > tei-div > tei-head {
|
|
19
|
+
font-size: 1.25rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
tei-title[level="m"] {
|
|
23
|
+
font-style: italic;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.debug tei-div {
|
|
27
|
+
border-right: 2px solid var(--tei-div-color-0);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.debug tei-div > tei-div {
|
|
31
|
+
border-right: 2px solid var(--tei-div-color-1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.debug tei-div > tei-div > tei-div {
|
|
35
|
+
border-right: 2px solid var(--tei-div-color-2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.debug tei-div > tei-div {
|
|
39
|
+
border-right: 2px solid var(--tei-div-color-3);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.debug tei-div > tei-div > tei-div {
|
|
43
|
+
border-right: 2px solid var(--tei-div-color-4);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.debug tei-div > tei-div > tei-div > tei-div {
|
|
47
|
+
border-right: 2px solid var(--tei-div-color-5);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
tei-p {
|
|
51
|
+
display: block;
|
|
52
|
+
margin: 0.5em 0;
|
|
53
|
+
position: relative;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.debug tei-p {
|
|
57
|
+
border-right: 2px solid var(--tei-p-color);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
tei-p[rend="center"] {
|
|
61
|
+
text-align: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
tei-p[rend="right"] {
|
|
65
|
+
text-align: right;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
tei-p[rend="justify"] {
|
|
69
|
+
text-align: justify;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
tei-hi[rend="b"] {
|
|
73
|
+
font-weight: bold;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
tei-hi[rend="i"] {
|
|
77
|
+
font-style: italic;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
tei-hi[rend="u"] {
|
|
81
|
+
text-decoration: underline;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
tei-hi[rend="code"] {
|
|
85
|
+
font-family: monospace;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
tei-persname {
|
|
89
|
+
color: #A83410;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
tei-placeName {
|
|
93
|
+
color: #E48500;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
tei-orgName {
|
|
97
|
+
color: #F45D2C;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
tei-term {
|
|
101
|
+
color: #9236A4;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
tei-list, tei-noteGrp {
|
|
105
|
+
display: block;
|
|
106
|
+
list-style-type: disc;
|
|
107
|
+
margin: 1em 0;
|
|
108
|
+
padding-left: 2em;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
tei-list[rend="ordered"] {
|
|
112
|
+
list-style-type: decimal;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
tei-list > tei-head {
|
|
116
|
+
font-size: 1.25rem;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
tei-item, tei-note {
|
|
120
|
+
display: list-item;
|
|
121
|
+
list-style-position: outside;
|
|
122
|
+
margin: 0.5em 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.debug tei-item {
|
|
126
|
+
border-right: 1px solid var(--tei-item-color);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
tei-noteGrp {
|
|
130
|
+
list-style-type: none;
|
|
131
|
+
padding-left: 0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
tei-noteGrp::before {
|
|
135
|
+
padding: 1rem 0 0;
|
|
136
|
+
margin-top: 2rem;
|
|
137
|
+
border-top: 1px solid #ccc;
|
|
138
|
+
content: "";
|
|
139
|
+
display: block;
|
|
140
|
+
width: 220px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
tei-note {
|
|
144
|
+
padding-left: 2rem;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
tei-note::before {
|
|
148
|
+
content: attr(_reference) ".";
|
|
149
|
+
margin-right: 0.5em;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
tei-anchor {
|
|
153
|
+
font-size: 0.8em;
|
|
154
|
+
vertical-align: super;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
tei-pb, tei-lb {
|
|
159
|
+
display: inline-block;
|
|
160
|
+
background-color: #ffa500;
|
|
161
|
+
font-size: 1rem;
|
|
162
|
+
font-weight: normal;
|
|
163
|
+
border-radius: 4px;
|
|
164
|
+
padding: 2px 6px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
tei-lb {
|
|
168
|
+
display: inline;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
tei-lb::after {
|
|
172
|
+
content: "\A";
|
|
173
|
+
white-space: pre;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
tei-p.is-empty::before {
|
|
177
|
+
color: #adb5bd;
|
|
178
|
+
content: attr(data-placeholder);
|
|
179
|
+
position: absolute;
|
|
180
|
+
height: 0;
|
|
181
|
+
pointer-events: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
tei-ref {
|
|
185
|
+
color: var(--pico-primary);
|
|
186
|
+
text-decoration: underline;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.debug tei-div, .debug tei-p, .debug tei-item {
|
|
191
|
+
margin-right: 2px;
|
|
192
|
+
padding-right: 2px;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.debug *::after {
|
|
196
|
+
display: inline-block;
|
|
197
|
+
max-width: 7ch;
|
|
198
|
+
text-overflow: ellipsis;
|
|
199
|
+
white-space: nowrap;
|
|
200
|
+
overflow: hidden;
|
|
201
|
+
border-radius: 4px;
|
|
202
|
+
margin-left: 2px;
|
|
203
|
+
padding: 2px 6px;
|
|
204
|
+
font-size: .65rem;
|
|
205
|
+
font-weight: normal;
|
|
206
|
+
color: white;
|
|
207
|
+
vertical-align: middle;
|
|
208
|
+
}
|
package/dist/jinn-tap.es.js
CHANGED
|
@@ -14009,7 +14009,15 @@ class fh extends HTMLElement {
|
|
|
14009
14009
|
const t = await fetch(e);
|
|
14010
14010
|
if (!t.ok)
|
|
14011
14011
|
throw new Error(`HTTP error! status: ${t.status}`);
|
|
14012
|
-
const n =
|
|
14012
|
+
const n = t.headers.get("content-type");
|
|
14013
|
+
let i;
|
|
14014
|
+
if (n != null && n.includes("application/xml") || n != null && n.includes("text/xml")) {
|
|
14015
|
+
const s = await t.text();
|
|
14016
|
+
i = ih(s);
|
|
14017
|
+
} else if (n != null && n.includes("text/html"))
|
|
14018
|
+
i = await t.text();
|
|
14019
|
+
else
|
|
14020
|
+
throw new Error(`Unsupported content type: ${n}`);
|
|
14013
14021
|
this.editor ? this.content = i : this._pendingContent = i;
|
|
14014
14022
|
} catch (t) {
|
|
14015
14023
|
console.error("Error loading content from URL:", t), this.dispatchEvent(new CustomEvent("error", {
|
package/dist/jinn-tap.umd.js
CHANGED
|
@@ -194,7 +194,7 @@ img.ProseMirror-separator {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
${eh(No)}
|
|
197
|
-
`,document.querySelector("#jinn-tap-styles")||(wr.id="jinn-tap-styles",document.head.appendChild(wr));class Ao extends HTMLElement{static get observedAttributes(){return["debug","url","schema"]}constructor(){super(),this.editor=null,this.toolbar=null,this.attributePanel=null,this._schema=No}attributeChangedCallback(e,t,n){e==="debug"?n!==null?this.classList.add("debug"):this.classList.remove("debug"):e==="url"&&n?this.loadFromUrl(n):e==="schema"&&n&&this.loadSchema(n)}async loadSchema(e){try{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);this._schema=await t.json(),this.editor&&this.setupEditor()}catch(t){console.error("Error loading schema from URL:",t),this.dispatchEvent(new CustomEvent("error",{detail:{error:t.message}}))}}async loadFromUrl(e){try{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const n=await t.text()
|
|
197
|
+
`,document.querySelector("#jinn-tap-styles")||(wr.id="jinn-tap-styles",document.head.appendChild(wr));class Ao extends HTMLElement{static get observedAttributes(){return["debug","url","schema"]}constructor(){super(),this.editor=null,this.toolbar=null,this.attributePanel=null,this._schema=No}attributeChangedCallback(e,t,n){e==="debug"?n!==null?this.classList.add("debug"):this.classList.remove("debug"):e==="url"&&n?this.loadFromUrl(n):e==="schema"&&n&&this.loadSchema(n)}async loadSchema(e){try{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);this._schema=await t.json(),this.editor&&this.setupEditor()}catch(t){console.error("Error loading schema from URL:",t),this.dispatchEvent(new CustomEvent("error",{detail:{error:t.message}}))}}async loadFromUrl(e){try{const t=await fetch(e);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);const n=t.headers.get("content-type");let i;if(n!=null&&n.includes("application/xml")||n!=null&&n.includes("text/xml")){const s=await t.text();i=Gd(s)}else if(n!=null&&n.includes("text/html"))i=await t.text();else throw new Error(`Unsupported content type: ${n}`);this.editor?this.content=i:this._pendingContent=i}catch(t){console.error("Error loading content from URL:",t),this.dispatchEvent(new CustomEvent("error",{detail:{error:t.message}}))}}connectedCallback(){this.setupEditor()}setupEditor(){const e=document.createElement("div");e.innerHTML=this.innerHTML,this.innerHTML=`
|
|
198
198
|
<nav>
|
|
199
199
|
<ul class="toolbar">
|
|
200
200
|
<slot name="toolbar"></slot>
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jinntec/jinntap",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/jinn-tap.umd.js",
|
|
6
6
|
"module": "./dist/jinn-tap.es.js",
|
|
@@ -15,11 +15,15 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"dist/jinn-tap.es.js",
|
|
17
17
|
"dist/jinn-tap.umd.js",
|
|
18
|
-
"dist/jinn-tap.d.ts"
|
|
18
|
+
"dist/jinn-tap.d.ts",
|
|
19
|
+
"dist/editor-styles.css",
|
|
20
|
+
"dist/jinntap-logo.png",
|
|
21
|
+
"dist/jinntap-logo-128.png"
|
|
19
22
|
],
|
|
20
23
|
"scripts": {
|
|
21
24
|
"dev": "vite",
|
|
22
25
|
"build": "vite build",
|
|
26
|
+
"postbuild": "node scripts/copy-assets.js",
|
|
23
27
|
"build:demo": "vite build --config vite.demo.config.js",
|
|
24
28
|
"preview": "vite preview",
|
|
25
29
|
"cypress:open": "cypress open",
|