@storyblok/vue 3.0.0 → 5.0.0

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/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@storyblok/vue",
3
- "version": "3.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Storyblok directive for get editable elements.",
5
- "main": "./dist/storyblok-vue.umd.js",
6
- "module": "./dist/storyblok-vue.es.js",
5
+ "main": "./dist/storyblok-vue.js",
6
+ "module": "./dist/storyblok-vue.mjs",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./dist/storyblok-vue.es.js",
13
- "require": "./dist/storyblok-vue.umd.js"
12
+ "import": "./dist/storyblok-vue.mjs",
13
+ "require": "./dist/storyblok-vue.js"
14
14
  }
15
15
  },
16
16
  "scripts": {
@@ -22,33 +22,36 @@
22
22
  "test:e2e-watch": "cypress open-ct",
23
23
  "prepublishOnly": "npm run build && cp ../README.md ./"
24
24
  },
25
+ "dependencies": {
26
+ "@storyblok/js": "^1.0.0"
27
+ },
25
28
  "devDependencies": {
26
29
  "@babel/core": "^7.15.0",
27
- "@cypress/vite-dev-server": "^2.0.7",
28
- "@cypress/vue": "^3.0.3",
30
+ "@cypress/vite-dev-server": "^2.2.2",
31
+ "@cypress/vue": "^2.2.3",
29
32
  "@vitejs/plugin-vue": "^1.3.0",
30
33
  "@vue/babel-preset-app": "^4.5.13",
31
- "@vue/compiler-sfc": "^3.2.1",
32
- "@vue/test-utils": "next",
34
+ "@vue/test-utils": "^1.2.2",
33
35
  "babel-jest": "^26.6.3",
34
- "cypress": "^8.3.0",
36
+ "cypress": "^9.3.1",
35
37
  "eslint-plugin-cypress": "^2.12.1",
36
38
  "eslint-plugin-jest": "^25.2.4",
37
39
  "jest": "^26.6.3",
38
40
  "vite": "^2.4.4",
39
- "vue": "^3.0.0",
40
- "vue-jest": "next"
41
- },
42
- "eslintConfig": {
43
- "env": {
44
- "node": true
45
- }
41
+ "vue": "^2.6.14",
42
+ "vue-jest": "^4.0.1",
43
+ "vue-template-compiler": "^2.6.14"
46
44
  },
47
45
  "babel": {
48
46
  "presets": [
49
47
  "@vue/babel-preset-app"
50
48
  ]
51
49
  },
50
+ "eslintConfig": {
51
+ "env": {
52
+ "node": true
53
+ }
54
+ },
52
55
  "jest": {
53
56
  "moduleFileExtensions": [
54
57
  "js",
@@ -69,9 +72,17 @@
69
72
  "storyblok"
70
73
  ],
71
74
  "author": "Alexander Feiglstorfer",
72
- "license": "MIT",
73
75
  "bugs": {
74
76
  "url": "https://github.com/storyblok/storyblok-vue/issues"
75
77
  },
76
- "homepage": "https://github.com/storyblok/storyblok-vue"
78
+ "homepage": "https://github.com/storyblok/storyblok-vue",
79
+ "release": {
80
+ "branches": [
81
+ "master",
82
+ "next"
83
+ ]
84
+ },
85
+ "publishConfig": {
86
+ "access": "public"
87
+ }
77
88
  }
@@ -1,26 +0,0 @@
1
- const addClass = (el, className) => {
2
- if (el.classList) {
3
- el.classList.add(className);
4
- } else if (!new RegExp("\\b" + className + "\\b").test(el.className)) {
5
- el.className += " " + className;
6
- }
7
- };
8
- var index = {
9
- install: (app) => {
10
- app.directive("editable", {
11
- beforeMount(el, binding) {
12
- if (binding.value) {
13
- const node = binding.value._editable;
14
- if (typeof node === "undefined" || node === null)
15
- return;
16
- const cleared = node.replace("<!--#storyblok#", "").replace("-->", "");
17
- const options = JSON.parse(cleared);
18
- el.setAttribute("data-blok-c", JSON.stringify(options));
19
- el.setAttribute("data-blok-uid", options.id + "-" + options.uid);
20
- addClass(el, "storyblok__outline");
21
- }
22
- }
23
- });
24
- }
25
- };
26
- export { index as default };
@@ -1 +0,0 @@
1
- (function(i,s){typeof exports=="object"&&typeof module!="undefined"?module.exports=s():typeof define=="function"&&define.amd?define(s):(i=typeof globalThis!="undefined"?globalThis:i||self,i.storyblok=s())})(this,function(){"use strict";const i=(t,e)=>{t.classList?t.classList.add(e):new RegExp("\\b"+e+"\\b").test(t.className)||(t.className+=" "+e)};var s={install:t=>{t.directive("editable",{beforeMount(e,d){if(d.value){const o=d.value._editable;if(typeof o=="undefined"||o===null)return;const u=o.replace("<!--#storyblok#","").replace("-->",""),n=JSON.parse(u);e.setAttribute("data-blok-c",JSON.stringify(n)),e.setAttribute("data-blok-uid",n.id+"-"+n.uid),i(e,"storyblok__outline")}}})}};return s});