tess_edit 0.2.1 → 0.2.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 51aad06c5f082f1f4cdb803d22dce92a2506daccf9493bbf35f2101450da3a00
|
|
4
|
+
data.tar.gz: 1574bff02b7b42821b2acaaf7cd21bc0820f16ab2f5f864467efee3f3b048703
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac54f650dfa41c67582dde71bafc9c35717f6e6297085cf95da7593a2c1ac0c7625544ff35dfceca2464dd3789fc1cfe18a03a9f68c17db468c18980eb0b30db
|
|
7
|
+
data.tar.gz: 393c20c454222715c23abb5048c8639cb9df53f1db0c708b2673f0f1bc995c9f9068f61a2381352789f85a4311d9b1dba74cff804722e19f280268aa423c9462
|
|
@@ -109,7 +109,7 @@ export class Inspector {
|
|
|
109
109
|
: null
|
|
110
110
|
const adapter = editable && field.liquid && this.adapters.get(field.key)
|
|
111
111
|
const variables = adapter
|
|
112
|
-
? h("button", { type: "button", title: "Insert a variable", class: "absolute right-0 top-0 rounded px-1 font-mono text-[11px] font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/40", onclick: (event) => this.editor.variableMenu.browse(adapter, event.currentTarget) }, "{ }")
|
|
112
|
+
? h("button", { type: "button", title: "Insert a variable", class: "absolute right-0 top-0 whitespace-nowrap rounded px-1 font-mono text-[11px] font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/40", onclick: (event) => this.editor.variableMenu.browse(adapter, event.currentTarget) }, "{ }")
|
|
113
113
|
: null
|
|
114
114
|
// A div, not a label: a label would forward clicks to the first button or color picker inside it.
|
|
115
115
|
return h(
|
|
@@ -146,7 +146,7 @@ export class Inspector {
|
|
|
146
146
|
case "select":
|
|
147
147
|
return h(
|
|
148
148
|
"select",
|
|
149
|
-
{ class: INPUT
|
|
149
|
+
{ class: `${INPUT} pr-7`, onchange: (event) => set(event.target.value) },
|
|
150
150
|
field.options.map((option) => {
|
|
151
151
|
const optionValue = typeof option === "string" ? option : option.value
|
|
152
152
|
const optionLabel = typeof option === "string" ? option || "Default" : option.label
|
|
@@ -244,7 +244,7 @@ export class Inspector {
|
|
|
244
244
|
const select = h(
|
|
245
245
|
"select",
|
|
246
246
|
{
|
|
247
|
-
class: `${INPUT} min-w-0 flex-1`,
|
|
247
|
+
class: `${INPUT} min-w-0 flex-1 pr-7`,
|
|
248
248
|
onchange: (event) => {
|
|
249
249
|
const image = images.find((option) => option.id === event.target.value)
|
|
250
250
|
if (image) this.editor.chooseImage(node.id, image, field)
|
|
@@ -361,7 +361,7 @@ export class Inspector {
|
|
|
361
361
|
part.type === "select"
|
|
362
362
|
? h(
|
|
363
363
|
"select",
|
|
364
|
-
{ class: INPUT
|
|
364
|
+
{ class: `${INPUT} pr-7`, onchange: (event) => update(items.map((it, i) => (i === index ? { ...it, [part.name]: event.target.value } : it))) },
|
|
365
365
|
part.options.map((option) => h("option", { value: option, selected: option === item[part.name] }, option))
|
|
366
366
|
)
|
|
367
367
|
: this.variables(h("input", {
|
|
@@ -85,7 +85,7 @@ export class TextEditing {
|
|
|
85
85
|
const style = h(
|
|
86
86
|
"select",
|
|
87
87
|
{
|
|
88
|
-
class: "h-7 rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700
|
|
88
|
+
class: "h-7 rounded-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 py-0 pl-1.5 pr-7 text-xs text-gray-800 dark:text-gray-200",
|
|
89
89
|
title: "Paragraph style",
|
|
90
90
|
onchange: (event) => {
|
|
91
91
|
const value = Number(event.target.value)
|
|
@@ -134,7 +134,7 @@ export class TextEditing {
|
|
|
134
134
|
? h("button", {
|
|
135
135
|
type: "button",
|
|
136
136
|
title: "Insert a variable",
|
|
137
|
-
class: `${BUTTON
|
|
137
|
+
class: `${BUTTON.replace("w-7", "px-1.5")} whitespace-nowrap font-mono text-xs`,
|
|
138
138
|
onmousedown: (event) => event.preventDefault(),
|
|
139
139
|
onclick: (event) => this.menu.browse(this.adapter, event.currentTarget)
|
|
140
140
|
}, "{ }")
|
data/lib/tess_edit/version.rb
CHANGED