@tecof/theme-editor 0.0.8 → 0.0.11

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/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React__default from 'react';
2
2
  import React__default__default, { createContext, memo, forwardRef, createElement, useRef, useContext, useState, useCallback, useEffect, useMemo, useLayoutEffect } from 'react';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import { fieldsPlugin, Puck, Render } from '@puckeditor/core';
4
+ import { fieldsPlugin, Puck, Render, FieldLabel } from '@puckeditor/core';
5
5
  import { useEditor, EditorContent } from '@tiptap/react';
6
6
  import Document from '@tiptap/extension-document';
7
7
  import Paragraph from '@tiptap/extension-paragraph';
@@ -1007,7 +1007,7 @@ var createLanguageField = (options = {}) => {
1007
1007
  label,
1008
1008
  labelIcon,
1009
1009
  visible,
1010
- render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(
1010
+ render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(FieldLabel, { label: label || "", icon: labelIcon, readOnly, children: /* @__PURE__ */ jsx(
1011
1011
  LanguageField,
1012
1012
  {
1013
1013
  field,
@@ -1018,7 +1018,7 @@ var createLanguageField = (options = {}) => {
1018
1018
  readOnly,
1019
1019
  ...fieldOptions
1020
1020
  }
1021
- )
1021
+ ) })
1022
1022
  };
1023
1023
  };
1024
1024
  var createExtensions = () => [
@@ -1297,7 +1297,7 @@ var createEditorField = (options = {}) => {
1297
1297
  label,
1298
1298
  labelIcon,
1299
1299
  visible,
1300
- render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(
1300
+ render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(FieldLabel, { label: label || "", icon: labelIcon, readOnly, children: /* @__PURE__ */ jsx(
1301
1301
  EditorField,
1302
1302
  {
1303
1303
  field,
@@ -1308,7 +1308,7 @@ var createEditorField = (options = {}) => {
1308
1308
  readOnly,
1309
1309
  ...fieldOptions
1310
1310
  }
1311
- )
1311
+ ) })
1312
1312
  };
1313
1313
  };
1314
1314
 
@@ -20772,6 +20772,8 @@ var Root = Dialog;
20772
20772
  var Portal2 = DialogPortal;
20773
20773
  var Overlay = DialogOverlay;
20774
20774
  var Content = DialogContent;
20775
+ var Title = DialogTitle;
20776
+ var Description = DialogDescription;
20775
20777
  function __insertCSS(code) {
20776
20778
  if (typeof document == "undefined") return;
20777
20779
  let head = document.head || document.getElementsByTagName("head")[0];
@@ -22233,7 +22235,10 @@ var Drawer = {
22233
22235
  Root: Root2,
22234
22236
  Content: Content2,
22235
22237
  Overlay: Overlay2,
22236
- Portal: Portal3};
22238
+ Portal: Portal3,
22239
+ Title,
22240
+ Description
22241
+ };
22237
22242
  registerPlugin(
22238
22243
  filepond_plugin_file_validate_size_esm_default,
22239
22244
  filepond_plugin_file_validate_type_esm_default,
@@ -22676,6 +22681,8 @@ var UploadField = ({
22676
22681
  }, children: /* @__PURE__ */ jsxs(Drawer.Portal, { children: [
22677
22682
  /* @__PURE__ */ jsx(Drawer.Overlay, { className: "tecof-upload-drawer-overlay" }),
22678
22683
  /* @__PURE__ */ jsxs(Drawer.Content, { className: "tecof-upload-drawer-content", children: [
22684
+ /* @__PURE__ */ jsx(Drawer.Title, { className: "tecof-sr-only", children: "Medya Y\xF6neticisi" }),
22685
+ /* @__PURE__ */ jsx(Drawer.Description, { className: "tecof-sr-only", children: "Sunucudaki dosyalardan birini se\xE7in veya yeni dosya y\xFCkleyin" }),
22679
22686
  /* @__PURE__ */ jsx("div", { className: "tecof-upload-drawer-handle" }),
22680
22687
  /* @__PURE__ */ jsxs("div", { className: "tecof-upload-drawer-inner", children: [
22681
22688
  /* @__PURE__ */ jsxs("div", { className: "tecof-upload-drawer-header", children: [
@@ -22769,7 +22776,7 @@ var createUploadField = (options = {}) => {
22769
22776
  label,
22770
22777
  labelIcon,
22771
22778
  visible,
22772
- render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(
22779
+ render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(FieldLabel, { label: label || "", icon: labelIcon, readOnly, children: /* @__PURE__ */ jsx(
22773
22780
  UploadField,
22774
22781
  {
22775
22782
  field,
@@ -22780,7 +22787,7 @@ var createUploadField = (options = {}) => {
22780
22787
  readOnly,
22781
22788
  ...fieldOptions
22782
22789
  }
22783
- )
22790
+ ) })
22784
22791
  };
22785
22792
  };
22786
22793
 
@@ -23458,7 +23465,7 @@ var createCodeEditorField = (options = {}) => {
23458
23465
  label,
23459
23466
  labelIcon,
23460
23467
  visible,
23461
- render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(
23468
+ render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(FieldLabel, { label: label || "", icon: labelIcon, readOnly, children: /* @__PURE__ */ jsx(
23462
23469
  CodeEditorField,
23463
23470
  {
23464
23471
  field,
@@ -23469,7 +23476,7 @@ var createCodeEditorField = (options = {}) => {
23469
23476
  readOnly,
23470
23477
  ...fieldOptions
23471
23478
  }
23472
- )
23479
+ ) })
23473
23480
  };
23474
23481
  };
23475
23482
  var LinkField = ({
@@ -23608,6 +23615,8 @@ var LinkField = ({
23608
23615
  /* @__PURE__ */ jsx(Drawer.Root, { open: drawerOpen, onOpenChange: setDrawerOpen, children: /* @__PURE__ */ jsxs(Drawer.Portal, { children: [
23609
23616
  /* @__PURE__ */ jsx(Drawer.Overlay, { className: "tecof-link-drawer-overlay" }),
23610
23617
  /* @__PURE__ */ jsxs(Drawer.Content, { className: "tecof-link-drawer-content", children: [
23618
+ /* @__PURE__ */ jsx(Drawer.Title, { className: "tecof-sr-only", children: "Ba\u011Flant\u0131 Sayfas\u0131 Se\xE7ici" }),
23619
+ /* @__PURE__ */ jsx(Drawer.Description, { className: "tecof-sr-only", children: "Sayfa listesinden se\xE7im yap\u0131n veya arama yap\u0131n" }),
23611
23620
  /* @__PURE__ */ jsxs("div", { className: "tecof-link-drawer-header", children: [
23612
23621
  /* @__PURE__ */ jsx("h2", { className: "tecof-link-drawer-title", children: "Sayfa Se\xE7" }),
23613
23622
  /* @__PURE__ */ jsx("button", { className: "tecof-link-drawer-close-btn", onClick: () => setDrawerOpen(false), children: /* @__PURE__ */ jsx(X, { size: 16 }) })
@@ -23659,18 +23668,18 @@ var createLinkField = (options = {}) => {
23659
23668
  label,
23660
23669
  labelIcon,
23661
23670
  visible,
23662
- render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(
23671
+ render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(FieldLabel, { label: label || "", icon: labelIcon, readOnly, children: /* @__PURE__ */ jsx(
23663
23672
  LinkField,
23664
23673
  {
23665
23674
  field,
23666
23675
  name: name3,
23667
23676
  id,
23668
- value: value || null,
23677
+ value: value || { url: "" },
23669
23678
  onChange,
23670
23679
  readOnly,
23671
23680
  ...fieldOptions
23672
23681
  }
23673
- )
23682
+ ) })
23674
23683
  };
23675
23684
  };
23676
23685
  var PRESET_COLORS = [
@@ -23934,7 +23943,7 @@ var createColorField = (options = {}) => {
23934
23943
  label,
23935
23944
  labelIcon,
23936
23945
  visible,
23937
- render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(
23946
+ render: ({ value, onChange, readOnly, field, name: name3, id }) => /* @__PURE__ */ jsx(FieldLabel, { label: label || "", icon: labelIcon, readOnly, children: /* @__PURE__ */ jsx(
23938
23947
  ColorField,
23939
23948
  {
23940
23949
  field,
@@ -23945,7 +23954,7 @@ var createColorField = (options = {}) => {
23945
23954
  readOnly,
23946
23955
  ...fieldOptions
23947
23956
  }
23948
- )
23957
+ ) })
23949
23958
  };
23950
23959
  };
23951
23960