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: 46b2b641773a8bea80c00c24e8aa0988627ad530f5122898bb660d6a9a43d7a7
4
- data.tar.gz: 131766e1ec91c4ba8b68f1d9bfeaf71b9103522b12203161f9d1c349e76fa3c6
3
+ metadata.gz: 51aad06c5f082f1f4cdb803d22dce92a2506daccf9493bbf35f2101450da3a00
4
+ data.tar.gz: 1574bff02b7b42821b2acaaf7cd21bc0820f16ab2f5f864467efee3f3b048703
5
5
  SHA512:
6
- metadata.gz: 73717af04235a460190ba466c6ba16dd54242bbd6f0dd85969c96c53cc23553732d9065ede759d07e2800a0824a36834e673fcaa1957a16aa60c6ae51055c437
7
- data.tar.gz: 857820205087bde1fb46878e20d1e25d03a988257de588c21ab0e8ef4d004ada1dfb8c8681c0bfae07e9d411bc7bb708f7932081f2edcc0026e1fdadf1a2c38a
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, onchange: (event) => set(event.target.value) },
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, onchange: (event) => update(items.map((it, i) => (i === index ? { ...it, [part.name]: event.target.value } : it))) },
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 px-1.5 text-xs text-gray-800 dark:text-gray-200",
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} w-auto px-1.5 font-mono text-xs`,
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
  }, "{ }")
@@ -1,3 +1,3 @@
1
1
  module TessEdit
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tess_edit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt