@easy-editor/setters 0.0.2 → 0.0.3

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.cjs CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ require('./styles/global.css');
5
6
  var React = require('react');
6
7
  var reactSlot = require('@radix-ui/react-slot');
7
8
  var jsxRuntime = require('react/jsx-runtime');
@@ -14,20 +15,20 @@ var TabsPrimitive = require('@radix-ui/react-tabs');
14
15
  var LabelPrimitive = require('@radix-ui/react-label');
15
16
 
16
17
  function _interopNamespaceDefault(e) {
17
- var n = Object.create(null);
18
- if (e) {
19
- Object.keys(e).forEach(function (k) {
20
- if (k !== 'default') {
21
- var d = Object.getOwnPropertyDescriptor(e, k);
22
- Object.defineProperty(n, k, d.get ? d : {
23
- enumerable: true,
24
- get: function () { return e[k]; }
18
+ var n = Object.create(null);
19
+ if (e) {
20
+ Object.keys(e).forEach(function (k) {
21
+ if (k !== 'default') {
22
+ var d = Object.getOwnPropertyDescriptor(e, k);
23
+ Object.defineProperty(n, k, d.get ? d : {
24
+ enumerable: true,
25
+ get: function () { return e[k]; }
26
+ });
27
+ }
25
28
  });
26
- }
27
- });
28
- }
29
- n.default = e;
30
- return Object.freeze(n);
29
+ }
30
+ n.default = e;
31
+ return Object.freeze(n);
31
32
  }
32
33
 
33
34
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
@@ -37,34 +38,6 @@ var CollapsiblePrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(Coll
37
38
  var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(TabsPrimitive);
38
39
  var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespaceDefault(LabelPrimitive);
39
40
 
40
- function styleInject(css, ref) {
41
- if (ref === void 0) ref = {};
42
- var insertAt = ref.insertAt;
43
- if (typeof document === 'undefined') {
44
- return;
45
- }
46
- var head = document.head || document.getElementsByTagName('head')[0];
47
- var style = document.createElement('style');
48
- style.type = 'text/css';
49
- if (insertAt === 'top') {
50
- if (head.firstChild) {
51
- head.insertBefore(style, head.firstChild);
52
- } else {
53
- head.appendChild(style);
54
- }
55
- } else {
56
- head.appendChild(style);
57
- }
58
- if (style.styleSheet) {
59
- style.styleSheet.cssText = css;
60
- } else {
61
- style.appendChild(document.createTextNode(css));
62
- }
63
- }
64
-
65
- var css_248z = "@import \"tailwindcss\";@import \"tw-animate-css\";@custom-variant dark (&:is(.dark *));:root{--background:#fff;--foreground:#09090b;--card:#fff;--card-foreground:#09090b;--popover:#fff;--popover-foreground:#09090b;--primary:#18181b;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#18181b;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#18181b;--destructive:#ef4444;--destructive-foreground:#fafafa;--border:#e4e4e7;--input:#e4e4e7;--ring:#09090b;--chart-1:#e76e50;--chart-2:#2a9d90;--chart-3:#274754;--chart-4:#e8c468;--chart-5:#f4a462;--radius:0.6rem;--sidebar:#fafafa;--sidebar-foreground:#3f3f46;--sidebar-primary:#18181b;--sidebar-primary-foreground:#fafafa;--sidebar-accent:#f4f4f5;--sidebar-accent-foreground:#18181b;--sidebar-border:#e5e7eb;--sidebar-ring:#3b82f6}.dark{--background:#09090b;--foreground:#fafafa;--card:#09090b;--card-foreground:#fafafa;--popover:#09090b;--popover-foreground:#fafafa;--primary:#fafafa;--primary-foreground:#18181b;--secondary:#27272a;--secondary-foreground:#fafafa;--muted:#27272a;--muted-foreground:#a1a1aa;--accent:#27272a;--accent-foreground:#fafafa;--destructive:#7f1d1d;--destructive-foreground:#fafafa;--border:#27272a;--input:#27272a;--ring:#d4d4d8;--chart-1:#2662d9;--chart-2:#2eb88a;--chart-3:#e88c30;--chart-4:#af57db;--chart-5:#e23670;--sidebar:#18181b;--sidebar-foreground:#f4f4f5;--sidebar-primary:#1d4ed8;--sidebar-primary-foreground:#fff;--sidebar-accent:#27272a;--sidebar-accent-foreground:#f4f4f5;--sidebar-border:#27272a;--sidebar-ring:#3b82f6}@theme inline{--color-background:var(--background);--color-foreground:var(--foreground);--color-card:var(--card);--color-card-foreground:var(--card-foreground);--color-popover:var(--popover);--color-popover-foreground:var(--popover-foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-secondary:var(--secondary);--color-secondary-foreground:var(--secondary-foreground);--color-muted:var(--muted);--color-muted-foreground:var(--muted-foreground);--color-accent:var(--accent);--color-accent-foreground:var(--accent-foreground);--color-destructive:var(--destructive);--color-destructive-foreground:var(--destructive-foreground);--color-border:var(--border);--color-input:var(--input);--color-ring:var(--ring);--color-chart-1:var(--chart-1);--color-chart-2:var(--chart-2);--color-chart-3:var(--chart-3);--color-chart-4:var(--chart-4);--color-chart-5:var(--chart-5);--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--color-sidebar:var(--sidebar);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-border:var(--sidebar-border);--color-sidebar-ring:var(--sidebar-ring)}@layer base{*,body{@apply bg-background text-foreground}}[data-color-mode*=dark] .w-color-sketch{--sketch-background:var(--popover)!important}[data-color-mode*=dark] .w-color-swatch{--sketch-swatch-border-top:1px solid var(--border)!important}[data-color-mode*=dark] .w-color-editable-input{--editable-input-label-color:var(--primary)!important;--editable-input-box-shadow:var(--border) 0px 0px 0px 1px inset!important;--editable-input-color:var(--primary)!important}[data-color-mode*=dark] .w-color-alpha{--alpha-pointer-background-color:var(--popover)!important;--alpha-pointer-box-shadow:transparent 0px 1px 4px 0px!important}";
66
- styleInject(css_248z,{"insertAt":"top"});
67
-
68
41
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
69
42
 
70
43
  const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
@@ -3311,7 +3284,7 @@ const NumberSetter = props => {
3311
3284
  value: value ?? initialValue
3312
3285
  }), !!suffix && /*#__PURE__*/jsxRuntime.jsx("span", {
3313
3286
  "aria-label": `Unit: ${suffix}`,
3314
- className: "-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",
3287
+ className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",
3315
3288
  children: suffix
3316
3289
  })]
3317
3290
  });
@@ -3339,7 +3312,7 @@ const RectSetter = props => {
3339
3312
  value: formatDecimal(value.x)
3340
3313
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
3341
3314
  "aria-label": 'Unit: X',
3342
- className: "-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",
3315
+ className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",
3343
3316
  children: "X"
3344
3317
  })]
3345
3318
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -3351,7 +3324,7 @@ const RectSetter = props => {
3351
3324
  value: formatDecimal(value.y)
3352
3325
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
3353
3326
  "aria-label": 'Unit: Y',
3354
- className: "-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",
3327
+ className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",
3355
3328
  children: "Y"
3356
3329
  })]
3357
3330
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -3363,7 +3336,7 @@ const RectSetter = props => {
3363
3336
  value: formatDecimal(value.width)
3364
3337
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
3365
3338
  "aria-label": 'Unit: W',
3366
- className: "-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",
3339
+ className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",
3367
3340
  children: "W"
3368
3341
  })]
3369
3342
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
@@ -3375,7 +3348,7 @@ const RectSetter = props => {
3375
3348
  value: formatDecimal(value.height)
3376
3349
  }), /*#__PURE__*/jsxRuntime.jsx("span", {
3377
3350
  "aria-label": 'Unit: H',
3378
- className: "-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",
3351
+ className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",
3379
3352
  children: "H"
3380
3353
  })]
3381
3354
  })]
@@ -3401,7 +3374,7 @@ const StringSetter = props => {
3401
3374
  value: value || initialValue
3402
3375
  }), !!suffix && /*#__PURE__*/jsxRuntime.jsx("span", {
3403
3376
  "aria-label": `Unit: ${suffix}`,
3404
- className: "-translate-y-1/2 pointer-events-none absolute top-1/2 right-3 text-muted-foreground",
3377
+ className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-muted-foreground",
3405
3378
  children: suffix
3406
3379
  })]
3407
3380
  });
@@ -3590,7 +3563,7 @@ const CollapseSetter = props => {
3590
3563
  } = props;
3591
3564
  const [isOpen, setIsOpen] = React.useState(initialValue ?? true);
3592
3565
  return /*#__PURE__*/jsxRuntime.jsxs(Collapsible, {
3593
- className: "-translate-x-4 w-[calc(100%_+_32px)] space-y-2",
3566
+ className: "w-[calc(100%_+_32px)] -translate-x-4 space-y-2",
3594
3567
  onOpenChange: setIsOpen,
3595
3568
  open: isOpen,
3596
3569
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {