eco-vue-js 0.11.47 → 0.11.49
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/components/Input/WInput.vue.d.ts.map +1 -1
 - package/dist/components/Input/WInput.vue.js +10 -2
 - package/dist/components/Input/components/ContentEditable.vue.d.ts.map +1 -1
 - package/dist/components/Input/components/ContentEditable.vue2.js +13 -4
 - package/package.json +1 -1
 - package/tailwind-base/plugins/internal-variables.ts +5 -1
 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AA6PA; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"WInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/WInput.vue"],"names":[],"mappings":"AA6PA;AAilBA,OAAO,KAAK,EAAC,UAAU,EAAE,aAAa,EAAC,MAAM,SAAS,CAAA;AAatD,OAAO,EAAC,KAAK,WAAW,EAAC,MAAM,gBAAgB,CAAA;yBAE9B,IAAI,SAAS,SAAS,GAAG,MAAM,EAC/C,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAg1BO,mBAAmB,CAAC,oCAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;qBAzoB7B,IAAI;oBAOL,IAAI;+BAmES,aAAa;0BAvNlB,MAAM,QAAQ,MAAM,KAAG,IAAI;wBAN/B,WAAW;;;oBAqCf,IAAI;oBAgBJ,IAAI;MAuuBgD,GAAG,IAAI;WACpE,GAAG;;uBAjEgB,GAAG;0BACA,GAAG;wBACJ,GAAG;;;YAGH,GAAG;;;YAFH,GAAG;;;YAGH,GAAG;;mCArgBF,aAAa;YAmgBb,GAAG;uBAGL,GAAG;;;;YACF,GAAG;uBACJ,GAAG;uBACH,GAAG;wBACF,GAAG;;;YAjwB1B,oBAAoB,SAAS,4CAAa,SAAS,GAAG,IAAI;YAC1D,gBAAgB,SAAS,aAAa,GAAG,IAAI;YAC7C,aAAa,SAAS,aAAa,GAAG,IAAI;YAC1C,eAAe,SAAS,aAAa,GAAG,IAAI;YAC5C,iBAAiB,SAAS,aAAa,GAAG,IAAI;YAC9C,oBAAoB,SAAS,aAAa,GAAG,IAAI;YACjD,aAAa,GAAG,IAAI;YACpB,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,IAAI;YAC7C,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,WAAW,SAAS,UAAU,GAAG,IAAI;YACrC,cAAc,SAAS,KAAK,GAAG,IAAI;YACnC,OAAO,GAAG,IAAI;;EA+yBhB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA31BzE,wBA21B4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
         
     | 
| 
         @@ -198,8 +198,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ 
     | 
|
| 
       198 
198 
     | 
    
         
             
                const blur = () => inputRef.value?.blur();
         
     | 
| 
       199 
199 
     | 
    
         
             
                const onPaste = async (e) => {
         
     | 
| 
       200 
200 
     | 
    
         
             
                  if (props.loading || isDisabled.value || isReadonly.value || props.unclickable) return;
         
     | 
| 
       201 
     | 
    
         
            -
                   
     | 
| 
       202 
     | 
    
         
            -
                   
     | 
| 
      
 201 
     | 
    
         
            +
                  let text = e.clipboardData?.getData("text/plain");
         
     | 
| 
      
 202 
     | 
    
         
            +
                  if (!text) {
         
     | 
| 
      
 203 
     | 
    
         
            +
                    try {
         
     | 
| 
      
 204 
     | 
    
         
            +
                      text = await navigator.clipboard.readText();
         
     | 
| 
      
 205 
     | 
    
         
            +
                    } catch {
         
     | 
| 
      
 206 
     | 
    
         
            +
                      Notify.error({ title: "Clipboard API not available" });
         
     | 
| 
      
 207 
     | 
    
         
            +
                      return;
         
     | 
| 
      
 208 
     | 
    
         
            +
                    }
         
     | 
| 
      
 209 
     | 
    
         
            +
                  }
         
     | 
| 
      
 210 
     | 
    
         
            +
                  text = text.replace(/\r\n?/g, "\n");
         
     | 
| 
       203 
211 
     | 
    
         
             
                  if (!text) {
         
     | 
| 
       204 
212 
     | 
    
         
             
                    fieldWrapperRef.value?.showMessage("Nothing to paste");
         
     | 
| 
       205 
213 
     | 
    
         
             
                    return;
         
     | 
| 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            {"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAiBA; 
     | 
| 
      
 1 
     | 
    
         
            +
            {"version":3,"file":"ContentEditable.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/components/ContentEditable.vue"],"names":[],"mappings":"AAiBA;AAmVA,OAAO,KAAK,EAAC,QAAQ,EAAG,aAAa,EAAC,MAAM,UAAU,CAAA;AAUtD,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAA;IACjC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B,CAAC;;;;2BA6K4B,aAAa,KAAG,IAAI;2BATpB,MAAM,aAAa,MAAM;;;;;;;;;;;;;;;;;;AAsNvD,wBAUG"}
         
     | 
| 
         @@ -1,4 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import { defineComponent, useTemplateRef, ref, watch, onMounted, createElementBlock, openBlock, withModifiers, nextTick } from 'vue';
         
     | 
| 
      
 2 
     | 
    
         
            +
            import { Notify } from '../../../utils/Notify.js';
         
     | 
| 
       2 
3 
     | 
    
         
             
            import { WrapSelectionType } from '../../../utils/utils.js';
         
     | 
| 
       3 
4 
     | 
    
         
             
            import { preserveIndentation } from '../models/toolbarActions.js';
         
     | 
| 
       4 
5 
     | 
    
         
             
            import { getCaretOffset, setCaretOffset } from '../models/utils.js';
         
     | 
| 
         @@ -104,9 +105,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ 
     | 
|
| 
       104 
105 
     | 
    
         
             
                  }
         
     | 
| 
       105 
106 
     | 
    
         
             
                };
         
     | 
| 
       106 
107 
     | 
    
         
             
                const onPaste = async (e) => {
         
     | 
| 
       107 
     | 
    
         
            -
                   
     | 
| 
       108 
     | 
    
         
            -
                   
     | 
| 
       109 
     | 
    
         
            -
                   
     | 
| 
      
 108 
     | 
    
         
            +
                  if (props.readonly || props.disabled) return;
         
     | 
| 
      
 109 
     | 
    
         
            +
                  let text = e.clipboardData?.getData("text/plain") || "";
         
     | 
| 
      
 110 
     | 
    
         
            +
                  if (!text) {
         
     | 
| 
      
 111 
     | 
    
         
            +
                    try {
         
     | 
| 
      
 112 
     | 
    
         
            +
                      text = await navigator.clipboard.readText();
         
     | 
| 
      
 113 
     | 
    
         
            +
                    } catch (error) {
         
     | 
| 
      
 114 
     | 
    
         
            +
                      Notify.error({ title: "Clipboard API not available" });
         
     | 
| 
      
 115 
     | 
    
         
            +
                      return;
         
     | 
| 
      
 116 
     | 
    
         
            +
                    }
         
     | 
| 
      
 117 
     | 
    
         
            +
                  }
         
     | 
| 
      
 118 
     | 
    
         
            +
                  insertPlain(text.replace(/\r\n?/g, "\n"));
         
     | 
| 
       110 
119 
     | 
    
         
             
                };
         
     | 
| 
       111 
120 
     | 
    
         
             
                const insertPlain = (text) => {
         
     | 
| 
       112 
121 
     | 
    
         
             
                  const root = elementRef.value;
         
     | 
| 
         @@ -242,7 +251,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({ 
     | 
|
| 
       242 
251 
     | 
    
         
             
                    "aria-multiline": "true",
         
     | 
| 
       243 
252 
     | 
    
         
             
                    spellcheck: "false",
         
     | 
| 
       244 
253 
     | 
    
         
             
                    placeholder: _ctx.placeholder,
         
     | 
| 
       245 
     | 
    
         
            -
                    class: "relative whitespace 
     | 
| 
      
 254 
     | 
    
         
            +
                    class: "relative [white-space:var(--w-input-whitespace,pre)]",
         
     | 
| 
       246 
255 
     | 
    
         
             
                    onInput,
         
     | 
| 
       247 
256 
     | 
    
         
             
                    onBeforeinput: _cache[0] || (_cache[0] = ($event) => insertParagraph($event)),
         
     | 
| 
       248 
257 
     | 
    
         
             
                    onPaste: withModifiers(onPaste, ["prevent"]),
         
     | 
    
        package/package.json
    CHANGED
    
    
| 
         @@ -1,7 +1,11 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette'
         
     | 
| 
       2 
2 
     | 
    
         
             
            import plugin from 'tailwindcss/plugin.js'
         
     | 
| 
       3 
3 
     | 
    
         | 
| 
       4 
     | 
    
         
            -
            const pluginDefault = plugin(function ({matchUtilities, theme}) {
         
     | 
| 
      
 4 
     | 
    
         
            +
            const pluginDefault = plugin(function ({matchUtilities, theme, addBase}) {
         
     | 
| 
      
 5 
     | 
    
         
            +
              addBase({
         
     | 
| 
      
 6 
     | 
    
         
            +
                '.w-input-whitespace-pre-wrap': {'--w-input-whitespace': 'pre-wrap'},
         
     | 
| 
      
 7 
     | 
    
         
            +
              })
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       5 
9 
     | 
    
         
             
              matchUtilities(
         
     | 
| 
       6 
10 
     | 
    
         
             
                {
         
     | 
| 
       7 
11 
     | 
    
         
             
                  'w-scroll-bar-color': value => ({'--w-scroll-bar-color': value}),
         
     |