@funnest/charts-ui 0.11.60 → 0.11.61

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.
Files changed (2) hide show
  1. package/dist/index.js +37 -29
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2990,8 +2990,10 @@ var CSS = (
2990
2990
  .fnc-ss-body .fnc-menu-item { min-height: 44px; font-size: 15px; }
2991
2991
  .fnc-ss-body .fnc-levels-list { max-height: none; }
2992
2992
  /* \u{1F58C}'s colors: one row of swatches over the bar. */
2993
- .fnc-menu.fnc-brush-pop { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; }
2994
- .fnc-brush-pop .fnc-swatch { width: 32px; height: 32px; }
2993
+ .fnc-menu.fnc-brush-pop { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; }
2994
+ .fnc-brush-pop .fnc-swatch { width: 24px; height: 24px; }
2995
+ .fnc-selbar-pop.fnc-note-menu { width: auto; }
2996
+ .fnc-note-menu .fnc-ss-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--fnc-text-2); }
2995
2997
  .fnc-tool-row .fnc-menu-item { flex: 1; padding-right: 36px; }
2996
2998
  .fnc-tool-fav { position: absolute; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--fnc-text-2); opacity: 0; cursor: pointer; }
2997
2999
  .fnc-tool-row:hover .fnc-tool-fav, .fnc-tool-fav:focus-visible, .fnc-tool-fav[aria-pressed='true'] { opacity: 1; }
@@ -4949,6 +4951,39 @@ function SelectionBar({ ctx }) {
4949
4951
  )
4950
4952
  ] })
4951
4953
  ] }),
4954
+ phone && def && (def.text || !def.plain) && /* @__PURE__ */ a3("div", { class: "fnc-selbar-menu", children: [
4955
+ /* @__PURE__ */ a3(
4956
+ "button",
4957
+ {
4958
+ class: style.text ? "fnc-btn fnc-btn-on" : "fnc-btn",
4959
+ "aria-label": def.text ? t3.drawingText : t3.note,
4960
+ "aria-expanded": menu === "note",
4961
+ onClick: () => setMenu(menu === "note" ? null : "note"),
4962
+ children: /* @__PURE__ */ a3(TextIcon, {})
4963
+ }
4964
+ ),
4965
+ menu === "note" && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-selbar-pop fnc-note-menu", role: "menu", onKeyDown: (e3) => e3.key !== "Escape" && e3.stopPropagation(), children: def.text ? /* @__PURE__ */ a3($, { children: [
4966
+ /* @__PURE__ */ a3(
4967
+ "input",
4968
+ {
4969
+ class: "fnc-input fnc-ss-text",
4970
+ value: style.text ?? "",
4971
+ placeholder: t3.textPlaceholder,
4972
+ "aria-label": t3.drawingText,
4973
+ maxLength: 200,
4974
+ onInput: (e3) => setStyle({ text: e3.target.value })
4975
+ }
4976
+ ),
4977
+ /* @__PURE__ */ a3("div", { class: "fnc-ss-row", children: [
4978
+ /* @__PURE__ */ a3("span", { children: t3.fontSize }),
4979
+ /* @__PURE__ */ a3("div", { class: "fnc-ss-step", children: [
4980
+ /* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} \u2212`, disabled: fontIndex === 0, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex - 1] }), children: "\u2212" }),
4981
+ /* @__PURE__ */ a3("b", { children: style.fontSize ?? 14 }),
4982
+ /* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} +`, disabled: fontIndex >= FONT_SIZES.length - 1, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex + 1] }), children: "+" })
4983
+ ] })
4984
+ ] })
4985
+ ] }) : noteBody() })
4986
+ ] }),
4952
4987
  phone && /* @__PURE__ */ a3(
4953
4988
  "button",
4954
4989
  {
@@ -5176,29 +5211,6 @@ function SelectionBar({ ctx }) {
5176
5211
  ] })
5177
5212
  ] })
5178
5213
  ] }),
5179
- def?.text && /* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
5180
- /* @__PURE__ */ a3("h3", { children: t3.drawingText }),
5181
- /* @__PURE__ */ a3(
5182
- "input",
5183
- {
5184
- class: "fnc-input fnc-ss-text",
5185
- value: style.text ?? "",
5186
- placeholder: t3.textPlaceholder,
5187
- "aria-label": t3.drawingText,
5188
- maxLength: 200,
5189
- onInput: (e3) => setStyle({ text: e3.target.value }),
5190
- onKeyDown: (e3) => e3.stopPropagation()
5191
- }
5192
- ),
5193
- /* @__PURE__ */ a3("div", { class: "fnc-ss-row", children: [
5194
- /* @__PURE__ */ a3("span", { children: t3.fontSize }),
5195
- /* @__PURE__ */ a3("div", { class: "fnc-ss-step", children: [
5196
- /* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} \u2212`, disabled: fontIndex === 0, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex - 1] }), children: "\u2212" }),
5197
- /* @__PURE__ */ a3("b", { children: style.fontSize ?? 14 }),
5198
- /* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} +`, disabled: fontIndex >= FONT_SIZES.length - 1, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex + 1] }), children: "+" })
5199
- ] })
5200
- ] })
5201
- ] }),
5202
5214
  slots.length > 0 && /* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
5203
5215
  /* @__PURE__ */ a3("h3", { children: t3.partColors }),
5204
5216
  colorsBody()
@@ -5211,10 +5223,6 @@ function SelectionBar({ ctx }) {
5211
5223
  /* @__PURE__ */ a3("h3", { children: t3.levels }),
5212
5224
  levelsBody()
5213
5225
  ] }),
5214
- def && !def.text && /* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
5215
- /* @__PURE__ */ a3("h3", { children: t3.note }),
5216
- noteBody()
5217
- ] }),
5218
5226
  /* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
5219
5227
  /* @__PURE__ */ a3("h3", { children: t3.coordinates }),
5220
5228
  coordsBody()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-ui",
3
- "version": "0.11.60",
3
+ "version": "0.11.61",
4
4
  "description": "Pro trading UI (toolbar, drawing tools, sheets) for Funnest Charts. Framework-agnostic.",
5
5
  "keywords": [
6
6
  "chart",
@@ -42,7 +42,7 @@
42
42
  "NOTICE"
43
43
  ],
44
44
  "dependencies": {
45
- "@funnest/charts": "0.11.60"
45
+ "@funnest/charts": "0.11.61"
46
46
  },
47
47
  "devDependencies": {
48
48
  "preact": "^11.2.0"