@bagelink/vue 0.0.865 → 0.0.871

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 (27) hide show
  1. package/dist/components/Carousel.vue.d.ts.map +1 -1
  2. package/dist/components/MapEmbed.vue.d.ts +4 -3
  3. package/dist/components/MapEmbed.vue.d.ts.map +1 -1
  4. package/dist/components/form/inputs/RichText2/Toolbar.vue.d.ts.map +1 -1
  5. package/dist/components/form/inputs/RichText2/formatting.d.ts +6 -0
  6. package/dist/components/form/inputs/RichText2/formatting.d.ts.map +1 -1
  7. package/dist/components/form/inputs/RichText2/index.vue.d.ts.map +1 -1
  8. package/dist/components/form/inputs/RichText2/richtext-types.d.ts +1 -1
  9. package/dist/components/form/inputs/RichText2/richtext-types.d.ts.map +1 -1
  10. package/dist/components/form/inputs/SelectInput.vue.d.ts.map +1 -1
  11. package/dist/components/form/inputs/index.d.ts +2 -2
  12. package/dist/components/form/inputs/index.d.ts.map +1 -1
  13. package/dist/components/layout/BottomMenu.vue.d.ts +1 -0
  14. package/dist/components/layout/BottomMenu.vue.d.ts.map +1 -1
  15. package/dist/index.cjs +159 -86
  16. package/dist/index.mjs +159 -86
  17. package/dist/style.css +32 -28
  18. package/package.json +1 -1
  19. package/src/components/Carousel.vue +5 -3
  20. package/src/components/MapEmbed.vue +41 -14
  21. package/src/components/form/inputs/RichText.zip +0 -0
  22. package/src/components/form/inputs/RichText2/Toolbar.vue +10 -15
  23. package/src/components/form/inputs/RichText2/formatting.ts +69 -25
  24. package/src/components/form/inputs/RichText2/index.vue +40 -33
  25. package/src/components/form/inputs/RichText2/richtext-types.ts +1 -0
  26. package/src/components/form/inputs/index.ts +2 -2
  27. package/src/components/layout/BottomMenu.vue +1 -0
package/dist/index.mjs CHANGED
@@ -599,9 +599,11 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
599
599
  }
600
600
  function updateHeight() {
601
601
  if (!props2.autoHeight || !bglSlider.value) return;
602
- const children2 = Array.from(bglSlider.value.children[activeSlideIndex.value].children);
603
- const totalHeight = children2.reduce((sum, el) => sum + el.clientHeight, 0);
604
- yHeight.value = `${totalHeight}px`;
602
+ setTimeout(() => {
603
+ const children2 = Array.from(bglSlider.value.children[activeSlideIndex.value].children);
604
+ const totalHeight = children2.reduce((sum, el) => sum + el.clientHeight, 0);
605
+ yHeight.value = `${totalHeight}px`;
606
+ }, 200);
605
607
  }
606
608
  function easeScroll(target, duration = 500) {
607
609
  if (!bglSlider.value || isPressed.value) return;
@@ -737,7 +739,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
737
739
  };
738
740
  }
739
741
  });
740
- const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-5da489eb"]]);
742
+ const Carousel = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-ca63f224"]]);
741
743
  function _isPlaceholder(a2) {
742
744
  return a2 != null && typeof a2 === "object" && a2["@@functional/placeholder"] === true;
743
745
  }
@@ -9585,7 +9587,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
9585
9587
  if (props2.field.$el === "select") return SelectInput;
9586
9588
  if (props2.field.$el === "toggle") return ToggleInput;
9587
9589
  if (props2.field.$el === "check") return CheckInput;
9588
- if (props2.field.$el === "richtext") return _sfc_main$w;
9590
+ if (props2.field.$el === "richtext") return RichText;
9589
9591
  if (props2.field.$el === "file") return $el;
9590
9592
  if (props2.field.$el === "date") return _sfc_main$F;
9591
9593
  return props2.field.$el ?? "div";
@@ -43396,12 +43398,16 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
43396
43398
  };
43397
43399
  }
43398
43400
  });
43401
+ let modal;
43399
43402
  function applyFormatting(command2, value = "") {
43400
43403
  const selection = window.getSelection();
43401
43404
  if (selection && selection.rangeCount > 0) {
43402
43405
  const range2 = selection.getRangeAt(0);
43403
43406
  const span = document.createElement("span");
43404
43407
  switch (command2) {
43408
+ case "formatBlock":
43409
+ formatBlock(value);
43410
+ break;
43405
43411
  case "bold":
43406
43412
  span.style.fontWeight = "bold";
43407
43413
  break;
@@ -43466,8 +43472,9 @@ function applyFormatting(command2, value = "") {
43466
43472
  increaseFontSize();
43467
43473
  break;
43468
43474
  case "decreaseFontSize":
43475
+ decreaseFontSize();
43469
43476
  break;
43470
- case "insertLink":
43477
+ case "link":
43471
43478
  insertLink();
43472
43479
  break;
43473
43480
  case "image":
@@ -43483,6 +43490,15 @@ function applyFormatting(command2, value = "") {
43483
43490
  range2.surroundContents(span);
43484
43491
  }
43485
43492
  }
43493
+ function formatBlock(value) {
43494
+ if (!value) return;
43495
+ const selection = window.getSelection();
43496
+ const range2 = selection == null ? void 0 : selection.getRangeAt(0);
43497
+ if (!range2) return;
43498
+ range2.selectNodeContents(range2.startContainer);
43499
+ const el = document.createElement(value);
43500
+ range2.surroundContents(el);
43501
+ }
43486
43502
  function increaseFontSize() {
43487
43503
  const selection = window.getSelection();
43488
43504
  if (selection && selection.rangeCount > 0) {
@@ -43494,6 +43510,17 @@ function increaseFontSize() {
43494
43510
  range2.surroundContents(span);
43495
43511
  }
43496
43512
  }
43513
+ function decreaseFontSize() {
43514
+ const selection = window.getSelection();
43515
+ if (selection && selection.rangeCount > 0) {
43516
+ const range2 = selection.getRangeAt(0);
43517
+ const span = document.createElement("span");
43518
+ const currentFontSize = Number.parseInt(range2.startContainer.parentNode.style.fontSize || "16", 10);
43519
+ const newFontSize = currentFontSize - 2;
43520
+ span.style.fontSize = `${newFontSize}px`;
43521
+ range2.surroundContents(span);
43522
+ }
43523
+ }
43497
43524
  function removeFormatting() {
43498
43525
  const selection = window.getSelection();
43499
43526
  if (selection && selection.rangeCount > 0) {
@@ -43526,22 +43553,38 @@ function insertList(type3) {
43526
43553
  }
43527
43554
  }
43528
43555
  function insertLink() {
43529
- const url = prompt("Enter the URL:");
43530
- if (url) {
43531
- const selection = window.getSelection();
43532
- if (selection && selection.rangeCount > 0) {
43533
- const range2 = selection.getRangeAt(0);
43556
+ const selection = window.getSelection();
43557
+ if (!selection || selection.rangeCount < 1) return;
43558
+ const range2 = selection.getRangeAt(0);
43559
+ modal.showModalForm({ title: "Insert Link", schema: [
43560
+ { id: "url", $el: "text", label: "URL" },
43561
+ { id: "openInNewTab", $el: "check", label: "Open in new tab" }
43562
+ ], onSubmit: (data2) => {
43563
+ const { url, openInNewTab } = data2;
43564
+ if (url) {
43534
43565
  const anchor = document.createElement("a");
43535
43566
  anchor.href = url;
43536
43567
  range2.surroundContents(anchor);
43568
+ if (openInNewTab) anchor.target = "_blank";
43537
43569
  }
43538
- }
43570
+ } });
43539
43571
  }
43540
43572
  function insertImage() {
43541
- console.log("image");
43542
- const { showModalForm } = useModal();
43543
- console.log(showModalForm);
43544
- showModalForm({ title: "Upload Image", schema: [{ id: "image", type: "file" }], onSubmit: (_data) => {
43573
+ const selection = window.getSelection();
43574
+ if (!selection || selection.rangeCount < 1) return;
43575
+ const range2 = selection.getRangeAt(0);
43576
+ modal.showModalForm({ title: "Upload Image", schema: [
43577
+ { id: "src", $el: "file", attrs: { bindkey: "url" } },
43578
+ { id: "alt", $el: "text", label: "Alt Text" }
43579
+ ], onSubmit: (_data) => {
43580
+ const { src } = _data;
43581
+ if (src) {
43582
+ const img = document.createElement("img");
43583
+ img.src = src;
43584
+ img.alt = _data.alt;
43585
+ range2.deleteContents();
43586
+ range2.insertNode(img);
43587
+ }
43545
43588
  } });
43546
43589
  }
43547
43590
  function createTable() {
@@ -43568,6 +43611,25 @@ function createTable() {
43568
43611
  }
43569
43612
  }
43570
43613
  }
43614
+ function clearFormatting() {
43615
+ const selection = window.getSelection();
43616
+ const range2 = selection == null ? void 0 : selection.getRangeAt(0);
43617
+ if (!range2) return;
43618
+ range2.selectNodeContents(range2.startContainer);
43619
+ const contents = range2.extractContents();
43620
+ const text = contents.textContent;
43621
+ if (text !== null && text !== "") {
43622
+ range2.deleteContents();
43623
+ const textNode = document.createTextNode(`${text}`);
43624
+ setTimeout(() => {
43625
+ range2.insertNode(textNode);
43626
+ }, 1);
43627
+ }
43628
+ }
43629
+ function useFormatting(modalInstance) {
43630
+ modal = modalInstance;
43631
+ return { applyFormatting, clearFormatting };
43632
+ }
43571
43633
  const _hoisted_1$o = { class: "flex gap-05" };
43572
43634
  const _hoisted_2$f = ["disabled"];
43573
43635
  const _hoisted_3$c = { key: 1 };
@@ -43875,6 +43937,11 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
43875
43937
  setup(__props, { emit: __emit }) {
43876
43938
  const emit2 = __emit;
43877
43939
  const toolbarOptions = [
43940
+ { name: "formatBlock", label: "h2", icon: "format_h2" },
43941
+ { name: "formatBlock", label: "h3", icon: "format_h3" },
43942
+ { name: "formatBlock", label: "h4", icon: "format_h4" },
43943
+ { name: "formatBlock", label: "h5", icon: "format_h5" },
43944
+ { name: "formatBlock", label: "h6", icon: "format_h6" },
43878
43945
  { name: "separator" },
43879
43946
  { name: "bold", label: "Bold", icon: "format_bold" },
43880
43947
  { name: "italic", label: "Italic", icon: "format_italic" },
@@ -43891,31 +43958,22 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
43891
43958
  { name: "clear", label: "Clear Formatting", icon: "format_clear" },
43892
43959
  { name: "fullScreen", label: "Full Screen", icon: "fullscreen", class: "ms-auto" }
43893
43960
  ];
43894
- function handleSelectChange(selectedOption) {
43895
- emit2("action", "formatBlock", selectedOption);
43896
- }
43897
43961
  return (_ctx, _cache) => {
43898
43962
  const _directive_tooltip = resolveDirective("tooltip");
43899
43963
  return openBlock(), createElementBlock("div", _hoisted_1$n, [
43900
- createVNode(SelectInput, {
43901
- class: "m-0 w150",
43902
- options: ["Text", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Heading 5", "Heading 6", "Blockquote", "Code"],
43903
- onChange: handleSelectChange
43904
- }),
43905
43964
  (openBlock(), createElementBlock(Fragment$1, null, renderList(toolbarOptions, (action, index2) => {
43906
- return openBlock(), createElementBlock(Fragment$1, null, [
43965
+ return openBlock(), createElementBlock(Fragment$1, { key: index2 }, [
43907
43966
  action.name !== "separator" && _ctx.config.includes(action.name) ? withDirectives((openBlock(), createBlock(unref(Btn), {
43908
- key: action.name,
43967
+ key: 0,
43968
+ icon: action.icon,
43909
43969
  thin: "",
43910
43970
  flat: "",
43911
- class: normalizeClass([action.class, "radius-05"]),
43912
43971
  "aria-label": action.name,
43913
- icon: action.icon,
43914
- onClick: ($event) => emit2("action", action.name)
43915
- }, null, 8, ["class", "aria-label", "icon", "onClick"])), [
43972
+ class: normalizeClass([action.class, "radius-05"]),
43973
+ onClick: ($event) => emit2("action", action.name, action.label)
43974
+ }, null, 8, ["icon", "aria-label", "class", "onClick"])), [
43916
43975
  [_directive_tooltip, action.label]
43917
- ]) : createCommentVNode("", true),
43918
- action.name === "separator" ? (openBlock(), createElementBlock("span", {
43976
+ ]) : action.name === "separator" ? (openBlock(), createElementBlock("span", {
43919
43977
  key: `separator-${index2}`,
43920
43978
  class: "opacity-2 mb-025"
43921
43979
  }, "|")) : createCommentVNode("", true)
@@ -43925,9 +43983,9 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
43925
43983
  };
43926
43984
  }
43927
43985
  });
43928
- const _hoisted_1$m = { class: "rich-text-editor rounded pt-05 px-1 pb-1" };
43986
+ const _hoisted_1$m = { class: "rich-text-editor rounded pt-05 px-05 pb-1" };
43929
43987
  const _hoisted_2$e = { class: "editor-container flex flex-stretch gap-1 m_column" };
43930
- const _hoisted_3$b = { class: "content-area radius-05 p-1 shadow-light w-100 grid" };
43988
+ const _hoisted_3$b = { class: "content-area radius-05 p-1 w-100 grid" };
43931
43989
  const _hoisted_4$7 = ["textContent"];
43932
43990
  const _sfc_main$t = /* @__PURE__ */ defineComponent({
43933
43991
  __name: "index",
@@ -43939,8 +43997,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
43939
43997
  setup(__props, { emit: __emit }) {
43940
43998
  const props2 = __props;
43941
43999
  const emit2 = __emit;
44000
+ const modal2 = useModal();
44001
+ const { applyFormatting: applyFormatting2, clearFormatting: clearFormatting2 } = useFormatting(modal2);
43942
44002
  const editableContent = ref();
43943
44003
  const defaultConfig2 = [
44004
+ "formatBlock",
43944
44005
  "bold",
43945
44006
  "italic",
43946
44007
  "underline",
@@ -43978,39 +44039,32 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
43978
44039
  }
43979
44040
  emit2("update:modelValue", contentHtml.value);
43980
44041
  }
44042
+ function updateToolbarHighlight() {
44043
+ if (document.getSelection()) {
44044
+ const selection = document.getSelection();
44045
+ const range2 = (selection == null ? void 0 : selection.rangeCount) ? selection.getRangeAt(0) : null;
44046
+ const container = range2 == null ? void 0 : range2.commonAncestorContainer;
44047
+ if (container) {
44048
+ let currentElement = container.nodeType === 3 ? container.parentElement : container;
44049
+ while (currentElement && currentElement !== editableContent.value) {
44050
+ if (["H1", "H2", "H3"].includes(currentElement.tagName)) {
44051
+ break;
44052
+ }
44053
+ currentElement = currentElement.parentElement;
44054
+ }
44055
+ }
44056
+ }
44057
+ }
44058
+ document.addEventListener("selectionchange", updateToolbarHighlight);
43981
44059
  function handleToolbarAction(action, value) {
43982
44060
  if (!editableContent.value) return;
43983
44061
  if (["alignLeft", "alignCenter", "alignRight", "alignJustify"].includes(action))
43984
44062
  value = action.replace("align", "").toLowerCase();
43985
- switch (action) {
43986
- case "link":
43987
- applyFormatting("insertLink");
43988
- break;
43989
- case "orderedList":
43990
- applyFormatting("insertOrderedList");
43991
- break;
43992
- case "unorderedList":
43993
- applyFormatting("insertUnorderedList");
43994
- break;
43995
- case "blockquote":
43996
- applyFormatting("formatBlock", "<blockquote>");
43997
- break;
43998
- case "codeBlock":
43999
- applyFormatting("formatBlock", "<pre>");
44000
- break;
44001
- case "splitView":
44002
- isSplitView.value = !isSplitView.value;
44003
- break;
44004
- case "codeView":
44005
- isCodeView.value = !isCodeView.value;
44006
- break;
44007
- case "fullScreen":
44008
- toggleFullScreen();
44009
- break;
44010
- default:
44011
- applyFormatting(action, value);
44012
- break;
44013
- }
44063
+ if (action === "splitView") isSplitView.value = !isSplitView.value;
44064
+ else if (action === "codeView") isCodeView.value = !isCodeView.value;
44065
+ else if (action === "fullScreen") toggleFullScreen();
44066
+ else if (action === "clear") clearFormatting2();
44067
+ else applyFormatting2(action, value);
44014
44068
  updateContent();
44015
44069
  }
44016
44070
  function toggleFullScreen() {
@@ -44093,7 +44147,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
44093
44147
  key: 0,
44094
44148
  contenteditable: "true",
44095
44149
  class: "preview-area w-100 radius-05 p-1",
44096
- onInput: logInput,
44150
+ onInput: _cache[1] || (_cache[1] = (e) => logInput(e)),
44097
44151
  textContent: toDisplayString(unref(contentHtml))
44098
44152
  }, null, 40, _hoisted_4$7)) : createCommentVNode("", true)
44099
44153
  ])
@@ -44101,7 +44155,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
44101
44155
  };
44102
44156
  }
44103
44157
  });
44104
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-ee4d5b26"]]);
44158
+ const RichText = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-492bb647"]]);
44105
44159
  /*!
44106
44160
  * Signature Pad v5.0.4 | https://github.com/szimek/signature_pad
44107
44161
  * (c) 2024 Szymon Nowak | Released under the MIT license
@@ -52532,14 +52586,15 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
52532
52586
  ]),
52533
52587
  _: 2
52534
52588
  }, 1032, ["to", "onClick"]);
52535
- }), 128))
52589
+ }), 128)),
52590
+ renderSlot(_ctx.$slots, "end", {}, void 0, true)
52536
52591
  ]),
52537
52592
  _: 3
52538
52593
  });
52539
52594
  };
52540
52595
  }
52541
52596
  });
52542
- const BottomMenu = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-557bcad0"]]);
52597
+ const BottomMenu = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-ee7b8f1a"]]);
52543
52598
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
52544
52599
  __name: "Layout",
52545
52600
  props: {
@@ -52988,13 +53043,13 @@ function _sfc_render$2(_ctx, _cache) {
52988
53043
  }
52989
53044
  const ListView = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$2]]);
52990
53045
  const _hoisted_1$8 = ["id"];
52991
- const defaultMarkerSVG = '<svg id="eCJDQPwuXje1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 36 36" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" project-id="ac827abc0a8c4922b76bac4df7bd7646" export-id="2cc86932ccbc4825a31fd063b3e75478" cached="false"><style><![CDATA[#eCJDQPwuXje3_ts {animation: eCJDQPwuXje3_ts__ts 3000ms linear infinite normal forwards}@keyframes eCJDQPwuXje3_ts__ts { 0% {transform: translate(18px,18px) scale(1,1)} 3.333333% {transform: translate(18px,18px) scale(1,1);animation-timing-function: cubic-bezier(0.42,0,0.58,1)} 100% {transform: translate(18px,18px) scale(1.8,1.8)}} #eCJDQPwuXje3 {animation: eCJDQPwuXje3_c_o 3000ms linear infinite normal forwards}@keyframes eCJDQPwuXje3_c_o { 0% {opacity: 0} 3.333333% {opacity: 1;animation-timing-function: cubic-bezier(0.42,0,0.58,1)} 100% {opacity: 0}}]]></style><ellipse rx="10.049312" ry="10.049312" transform="translate(18 18)" fill="#2e5bff" stroke-width="0"/><g id="eCJDQPwuXje3_ts" transform="translate(18,18) scale(1,1)"><ellipse id="eCJDQPwuXje3" rx="10.049312" ry="10.049312" transform="translate(0,0)" opacity="0" fill="#2e5bff" stroke-width="0"/></g></svg>';
53046
+ const defaultMarkerSVG = '<svg width="28" height="38" viewBox="0 0 28 38" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.2263 37.7955C17.0897 37.7955 19.4109 37.0138 19.4109 36.0496C19.4109 35.0854 17.0897 34.3037 14.2263 34.3037C11.363 34.3037 9.04175 35.0854 9.04175 36.0496C9.04175 37.0138 11.363 37.7955 14.2263 37.7955Z" fill="black" fill-opacity="0.1"/><path d="M14.2265 0.549591C21.2842 0.549591 27.0131 6.23786 27.0787 13.28V13.4024C27.0787 19.3328 24.4759 24.4306 21.5627 28.2764C18.6511 32.12 15.4577 34.6754 14.3457 35.5097C14.2748 35.5629 14.1778 35.5629 14.1068 35.5097C12.9947 34.675 9.80135 32.1197 6.88984 28.2762C3.97665 24.4304 1.37378 19.3328 1.37378 13.4024C1.37378 6.30387 7.12806 0.549591 14.2265 0.549591Z" fill="#ED1b3E" stroke="#ED6C6F"/><path d="M14.2263 21.6185C18.7639 21.6185 22.4424 17.94 22.4424 13.4024C22.4424 8.86477 18.7639 5.18631 14.2263 5.18631C9.68872 5.18631 6.01025 8.86477 6.01025 13.4024C6.01025 17.94 9.68872 21.6185 14.2263 21.6185Z" fill="white"/></svg>';
52992
53047
  const leafletScriptUrl = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js";
52993
53048
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
52994
53049
  __name: "MapEmbed",
52995
53050
  props: {
52996
53051
  center: { default: () => [31.7683, 35.2137] },
52997
- zoom: { default: 13 },
53052
+ zoom: { default: 15 },
52998
53053
  height: { default: 400 },
52999
53054
  zoomControl: { type: Boolean, default: true },
53000
53055
  markers: {},
@@ -53022,19 +53077,36 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
53022
53077
  L2.value.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { maxZoom: 18 }).addTo(map4.value);
53023
53078
  }
53024
53079
  }
53025
- function addMarker(L22, latlng) {
53080
+ function addMarker(L22, latlng, label) {
53026
53081
  const iconSVG = props2.markerIcon || defaultMarkerSVG;
53027
53082
  const customIcon = L22 == null ? void 0 : L22.icon({
53028
53083
  iconUrl: `data:image/svg+xml;utf8,${encodeURIComponent(iconSVG)}`,
53029
53084
  iconSize: [32, 32]
53030
53085
  });
53031
53086
  const marker = L22 == null ? void 0 : L22.marker(latlng, { icon: customIcon }).addTo(map4.value);
53087
+ if (label) {
53088
+ marker.bindTooltip(label, { direction: "top" });
53089
+ }
53090
+ marker.on("click", () => {
53091
+ console.log("Marker clicked:", latlng);
53092
+ marker.openPopup();
53093
+ });
53032
53094
  _markers.value.push(marker);
53033
53095
  }
53034
53096
  function fitMarkers(L22) {
53035
- var _a2;
53097
+ var _a2, _b;
53036
53098
  if (_markers.value.length > 0) {
53037
- (_a2 = map4.value) == null ? void 0 : _a2.fitBounds(L22.featureGroup(_markers.value).getBounds());
53099
+ const latLngs = _markers.value.map((marker) => marker.getLatLng());
53100
+ const bounds = L22.latLngBounds(latLngs);
53101
+ console.log(props2.zoom, bounds.getCenter());
53102
+ (_a2 = map4.value) == null ? void 0 : _a2.setView(bounds.getCenter(), props2.zoom);
53103
+ (_b = map4.value) == null ? void 0 : _b.fitBounds(bounds, {
53104
+ animate: true,
53105
+ maxZoom: props2.zoom,
53106
+ // B
53107
+ padding: [20, 20]
53108
+ // Adjust padding as needed
53109
+ });
53038
53110
  }
53039
53111
  }
53040
53112
  async function watchMarkers(markers) {
@@ -53042,11 +53114,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
53042
53114
  _markers.value.forEach((marker) => marker.remove());
53043
53115
  if (!markers) return;
53044
53116
  for (const marker of markers) {
53045
- const [lat, lon] = Array.isArray(marker) ? marker : [marker.lat, marker.lon];
53117
+ const [lat, lon, label] = Array.isArray(marker) ? [marker[0], marker[1], marker[2]] : [marker.lat, marker.lon, marker.label];
53046
53118
  if (!map4.value) initializeMap();
53047
- addMarker(L2.value, [lat, lon]);
53048
- fitMarkers(L2.value);
53119
+ addMarker(L2.value, [+lat, +lon], label);
53049
53120
  }
53121
+ fitMarkers(L2.value);
53050
53122
  }
53051
53123
  watch(() => props2.markers, watchMarkers, { immediate: true });
53052
53124
  watch(() => props2.center, (center2) => {
@@ -53058,7 +53130,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
53058
53130
  return openBlock(), createElementBlock("div", {
53059
53131
  id: id.value,
53060
53132
  class: "leaflet-map",
53061
- style: normalizeStyle({ height: `${props2.height || 400}px` })
53133
+ style: normalizeStyle({ height: `${props2.height || 400}px` }),
53134
+ dir: "ltr"
53062
53135
  }, null, 12, _hoisted_1$8);
53063
53136
  };
53064
53137
  }
@@ -53279,7 +53352,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
53279
53352
  const props2 = __props;
53280
53353
  const emit2 = __emit;
53281
53354
  const bagel = useBagel();
53282
- const modal = ref();
53355
+ const modal2 = ref();
53283
53356
  const computedFormSchema = computed(() => {
53284
53357
  if (typeof props2.schema === "function") return props2.schema();
53285
53358
  return props2.schema;
@@ -53288,7 +53361,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
53288
53361
  const form = ref();
53289
53362
  const closeModal = () => {
53290
53363
  var _a2;
53291
- return (_a2 = modal.value) == null ? void 0 : _a2.closeModal();
53364
+ return (_a2 = modal2.value) == null ? void 0 : _a2.closeModal();
53292
53365
  };
53293
53366
  let submitting = ref(false);
53294
53367
  async function runSubmit() {
@@ -53317,7 +53390,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
53317
53390
  return (_ctx, _cache) => {
53318
53391
  return openBlock(), createBlock(unref(_sfc_main$b), {
53319
53392
  ref_key: "modal",
53320
- ref: modal,
53393
+ ref: modal2,
53321
53394
  side: _ctx.side,
53322
53395
  width: _ctx.width,
53323
53396
  visible: _ctx.visible,
@@ -55611,21 +55684,21 @@ const ModalPlugin = {
55611
55684
  const ModalComponent = defineComponent({
55612
55685
  data: () => ({ modalStack: modalStack.value }),
55613
55686
  render() {
55614
- return this.modalStack.map((modal, index2) => {
55687
+ return this.modalStack.map((modal2, index2) => {
55615
55688
  const props2 = {
55616
- ...modal.modalOptions,
55689
+ ...modal2.modalOptions,
55617
55690
  "visible": true,
55618
55691
  "onUpdate:visible": () => {
55619
55692
  hideModal(index2);
55620
55693
  }
55621
55694
  };
55622
- switch (modal.modalType) {
55695
+ switch (modal2.modalType) {
55623
55696
  case "modalForm":
55624
- return h$2(ModalForm, props2, modal.componentSlots);
55697
+ return h$2(ModalForm, props2, modal2.componentSlots);
55625
55698
  case "confirmModal":
55626
55699
  return h$2(_sfc_main$a, props2, {});
55627
55700
  default:
55628
- return h$2(_sfc_main$b, props2, modal.componentSlots);
55701
+ return h$2(_sfc_main$b, props2, modal2.componentSlots);
55629
55702
  }
55630
55703
  });
55631
55704
  }
@@ -56007,8 +56080,8 @@ export {
56007
56080
  RadioGroup,
56008
56081
  RadioPillsInput,
56009
56082
  RangeInput,
56010
- _sfc_main$w as RichText,
56011
- index$1 as RichText2,
56083
+ RichText,
56084
+ _sfc_main$w as RichText2,
56012
56085
  RouterWrapper,
56013
56086
  SelectInput,
56014
56087
  SidebarMenu,
package/dist/style.css CHANGED
@@ -350,7 +350,7 @@ display: block;
350
350
  padding: 0;
351
351
  }
352
352
 
353
- .blocker[data-v-5da489eb] {
353
+ .blocker[data-v-ca63f224] {
354
354
  position: fixed;
355
355
  top: 0;
356
356
  left: 0;
@@ -358,7 +358,7 @@ display: block;
358
358
  height: 100%;
359
359
  z-index: 100;
360
360
  }
361
- .bgl-slider[data-v-5da489eb] {
361
+ .bgl-slider[data-v-ca63f224] {
362
362
  display: grid;
363
363
  position: relative;
364
364
  /* scroll-behavior: smooth; */
@@ -367,43 +367,43 @@ display: block;
367
367
  /* scroll-snap-type: x mandatory; */
368
368
  overflow-x: hidden;
369
369
  }
370
- .autoHeight[data-v-5da489eb] {
370
+ .autoHeight[data-v-ca63f224] {
371
371
  transition: height ease 0.7s;
372
372
  }
373
- .bgl-slider.allowScroll[data-v-5da489eb] {
373
+ .bgl-slider.allowScroll[data-v-ca63f224] {
374
374
  overflow-x: scroll;
375
375
  }
376
- .bgl-slider[data-v-5da489eb] {
376
+ .bgl-slider[data-v-ca63f224] {
377
377
  grid-auto-columns: calc(100% / var(--item-count) - calc(var(--item-count) - 1) * 1%);
378
378
  gap: 1%;
379
379
  }
380
- .bgl-slider.odd[data-v-5da489eb] {
380
+ .bgl-slider.odd[data-v-ca63f224] {
381
381
  grid-auto-columns: calc(100% / var(--item-count) - calc(var(--item-count) - 2) * 1%);
382
382
  }
383
- .bgl-slider.slides-1[data-v-5da489eb] {
383
+ .bgl-slider.slides-1[data-v-ca63f224] {
384
384
  grid-auto-columns: 100%;
385
385
  gap: 0;
386
386
  }
387
- .bgl-slider[data-v-5da489eb]::-webkit-scrollbar {
387
+ .bgl-slider[data-v-ca63f224]::-webkit-scrollbar {
388
388
  display: none;
389
389
  }
390
- .bgl-slider[data-v-5da489eb] * {
390
+ .bgl-slider[data-v-ca63f224] * {
391
391
  scroll-snap-align: start;
392
392
  }
393
- .dragging.bgl-slider[data-v-5da489eb] {
393
+ .dragging.bgl-slider[data-v-ca63f224] {
394
394
  cursor: grabbing;
395
395
  cursor: -webkit-grabbing;
396
396
  scroll-snap-type: unset;
397
397
  }
398
- .clicking.bgl-slider[data-v-5da489eb] {
398
+ .clicking.bgl-slider[data-v-ca63f224] {
399
399
  scroll-behavior: unset;
400
400
  }
401
- .dragging.bgl-slider[data-v-5da489eb] * {
401
+ .dragging.bgl-slider[data-v-ca63f224] * {
402
402
  scroll-snap-align: unset;
403
403
  user-select: none;
404
404
  }
405
405
  @media screen and (max-width: 600px) {
406
- .bgl-slider.slides-1[data-v-5da489eb]> * {
406
+ .bgl-slider.slides-1[data-v-ca63f224]> * {
407
407
  margin-inline-start: 0%;
408
408
  }
409
409
  }
@@ -1288,29 +1288,29 @@ p {
1288
1288
  8 #818181 /* few chars */
1289
1289
  ;
1290
1290
  }
1291
- .preview-area[data-v-ee4d5b26]{
1291
+ .preview-area[data-v-492bb647]{
1292
1292
  font-family: "FontWithASyntaxHighlighter", monospace;
1293
1293
  font-palette: --myCustomPalette;
1294
1294
  background: var(--bgl-code-bg);
1295
1295
  color: var(--bgl-code-color)
1296
1296
  }
1297
- .rich-text-editor[data-v-ee4d5b26] {
1297
+ .rich-text-editor[data-v-492bb647] {
1298
1298
  background: var(--input-bg);
1299
1299
  margin-bottom: 0.5rem;
1300
1300
  width: 100%;
1301
1301
  }
1302
- .editableContent[data-v-ee4d5b26]{
1302
+ .editableContent[data-v-492bb647]{
1303
1303
  min-height: 100%;
1304
1304
  white-space: pre-wrap;
1305
1305
  outline: none;
1306
1306
  }
1307
- .content-area[data-v-ee4d5b26]{
1307
+ .content-area[data-v-492bb647]{
1308
1308
  background: var(--bgl-richtext-color);
1309
1309
  }
1310
- .content-area[data-v-ee4d5b26], .preview-area[data-v-ee4d5b26]{
1310
+ .content-area[data-v-492bb647], .preview-area[data-v-492bb647]{
1311
1311
  min-height: 200px;
1312
1312
  }
1313
- .fullscreen-mode[data-v-ee4d5b26] {
1313
+ .fullscreen-mode[data-v-492bb647] {
1314
1314
  position: fixed;
1315
1315
  top: 0;
1316
1316
  left: 0;
@@ -1322,14 +1322,14 @@ p {
1322
1322
  overflow: auto;
1323
1323
  border-radius: 0;
1324
1324
  }
1325
- .fullscreen-mode .content-area[data-v-ee4d5b26]{
1325
+ .fullscreen-mode .content-area[data-v-492bb647]{
1326
1326
  height: calc(100vh - 5rem);
1327
1327
  padding: 4rem !important;
1328
1328
  max-width: 900px;
1329
1329
  margin-inline: auto ;
1330
1330
  overflow-y: auto;
1331
1331
  }
1332
- .fullscreen-mode .toolbar[data-v-ee4d5b26]{
1332
+ .fullscreen-mode .toolbar[data-v-492bb647]{
1333
1333
  max-width: 900px;
1334
1334
  margin-inline: auto ;
1335
1335
  /* border-bottom: 1px solid var(--border-color); */
@@ -1733,7 +1733,7 @@ p {
1733
1733
  gap: 0;
1734
1734
  }
1735
1735
 
1736
- .bgl_bottombar[data-v-557bcad0] {
1736
+ .bgl_bottombar[data-v-ee7b8f1a] {
1737
1737
  background-color: var(--bgl-primary);
1738
1738
  color: var(--bgl-light-text);
1739
1739
  grid-template-columns: repeat(auto-fill, var(--bgl_bottombar-btn-width));
@@ -1742,16 +1742,16 @@ p {
1742
1742
  padding: 0;
1743
1743
  --bgl_bottombar-btn-width: 62px;
1744
1744
  }
1745
- .bgl_bottombar[data-v-557bcad0]>* {
1745
+ .bgl_bottombar[data-v-ee7b8f1a]>* {
1746
1746
  width: var(--bgl_bottombar-btn-width);
1747
1747
  }
1748
- .bgl_bottombar[data-v-557bcad0]::-webkit-scrollbar {
1748
+ .bgl_bottombar[data-v-ee7b8f1a]::-webkit-scrollbar {
1749
1749
  display: none;
1750
1750
  }
1751
- .bgl_bottombar .nav-button[data-v-557bcad0] {
1751
+ .bgl_bottombar .nav-button[data-v-ee7b8f1a] {
1752
1752
  border-radius: var(--card-border-radius);
1753
1753
  }
1754
- .bgl_bottombar .router-link-active[data-v-557bcad0] {
1754
+ .bgl_bottombar .router-link-active[data-v-ee7b8f1a] {
1755
1755
  background: var(--bgl-popup-bg);
1756
1756
  color: var(--bgl-primary) !important;
1757
1757
  }
@@ -2667,7 +2667,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
2667
2667
  height: 100%;
2668
2668
  border-radius: var(--input-border-radius);
2669
2669
  position: relative;
2670
- background: var(--bgl-bg)
2670
+ background: var(--bgl-bg);
2671
+ direction: ltr;
2671
2672
  }
2672
2673
  .leaflet-map::after {
2673
2674
  content: "";
@@ -2683,7 +2684,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
2683
2684
  display: none;
2684
2685
  }
2685
2686
  .leaflet-pane.leaflet-marker-pane img {
2686
- filter: drop-shadow(0px 8px 3px rgba(0, 0, 0, 0.2));
2687
+ /* filter: drop-shadow(0px 8px 3px rgba(0, 0, 0, 0.2)); */
2687
2688
  }
2688
2689
  .leaflet-touch .leaflet-control-zoom-in,
2689
2690
  .leaflet-touch .leaflet-control-zoom-out {
@@ -2719,6 +2720,9 @@ svg.leaflet-image-layer.leaflet-interactive path {
2719
2720
  .leaflet-bar a:focus {
2720
2721
  filter: var(--bgl-active-filter);
2721
2722
  }
2723
+ .leaflet-marker-icon {
2724
+ cursor: pointer;
2725
+ }
2722
2726
  .bg-dark {
2723
2727
  position: fixed;
2724
2728
  top: 0;