@v1nt1248/3nclient-lib 0.0.1 → 0.0.2
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/README.md +9 -18
- package/package.json +34 -3
- package/dist/components/ui3n-button.vue.d.ts +0 -16
- package/dist/components/ui3n-emoji.vue.d.ts +0 -28
- package/dist/index.d.ts +0 -2
- package/dist/style.css +0 -1
- package/dist/types.d.ts +0 -9
- package/dist/ui-3n-lib.js +0 -65
- package/dist/ui-3n-lib.umd.cjs +0 -1
package/README.md
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
##
|
|
10
|
-
|
|
11
|
-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
12
|
-
|
|
13
|
-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
14
|
-
|
|
15
|
-
1. Disable the built-in TypeScript Extension
|
|
16
|
-
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
17
|
-
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
18
|
-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
1
|
+
# Library for 3NWeb clients (Vue + Typescript)
|
|
2
|
+
|
|
3
|
+
## Constants
|
|
4
|
+
## Components
|
|
5
|
+
## Directives
|
|
6
|
+
## Plugins
|
|
7
|
+
## Store plugins
|
|
8
|
+
## Services
|
|
9
|
+
## Helpers
|
package/package.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"license": "AGPL-3.0-or-later",
|
|
5
5
|
"author": "v1nt1248",
|
|
6
|
-
"version": "0.0.
|
|
7
|
-
"description": "
|
|
6
|
+
"version": "0.0.2",
|
|
7
|
+
"description": "Library for 3NWeb clients",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
@@ -23,15 +23,46 @@
|
|
|
23
23
|
"dev": "vite",
|
|
24
24
|
"generate:types": "vue-tsc --declaration --emitDeclarationOnly --outdir ./dist",
|
|
25
25
|
"build": "vite build && yarn generate:types",
|
|
26
|
-
"preview": "vite preview"
|
|
26
|
+
"preview": "vite preview",
|
|
27
|
+
"stylelint": "stylelint --config .stylelint.config.cjs 'src/**/*.{vue,scss}'",
|
|
28
|
+
"stylelint:fix": "stylelint --config .stylelint.config.cjs --fix 'src/**/*.{vue,scss}'",
|
|
29
|
+
"linter": "eslint -c .eslintrc.cjs --ext .js,.vue,.ts, src",
|
|
30
|
+
"linter:fix": "eslint -c .eslintrc.cjs --fix --ext .js,.vue,.ts, src",
|
|
31
|
+
"lint": "yarn linter && yarn stylelint",
|
|
32
|
+
"lint:fix": "yarn linter:fix && yarn stylelint:fix"
|
|
27
33
|
},
|
|
28
34
|
"dependencies": {
|
|
35
|
+
"@iconify-icons/ic": "^1.2.13",
|
|
36
|
+
"@iconify/vue": "^4.1.1",
|
|
37
|
+
"dayjs": "^1.11.9",
|
|
38
|
+
"lodash": "^4.17.21",
|
|
39
|
+
"mitt": "^3.0.1",
|
|
40
|
+
"sanitize-html": "^2.11.0",
|
|
29
41
|
"vue": "^3.3.4"
|
|
30
42
|
},
|
|
31
43
|
"devDependencies": {
|
|
44
|
+
"@types/lodash": "^4.14.197",
|
|
32
45
|
"@types/node": "^20.5.6",
|
|
46
|
+
"@types/sanitize-html": "^2.9.0",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
48
|
+
"@typescript-eslint/parser": "^6.4.1",
|
|
33
49
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
50
|
+
"@vue/eslint-config-typescript": "^11.0.3",
|
|
51
|
+
"@vuedx/typescript-plugin-vue": "^0.7.6",
|
|
52
|
+
"eslint": "^8.48.0",
|
|
53
|
+
"eslint-plugin-import": "^2.28.1",
|
|
54
|
+
"eslint-plugin-node": "^11.1.0",
|
|
55
|
+
"eslint-plugin-promise": "^6.1.1",
|
|
56
|
+
"eslint-plugin-vue": "^9.17.0",
|
|
57
|
+
"pinia": "^2.1.6",
|
|
58
|
+
"postcss-html": "^1.5.0",
|
|
34
59
|
"sass": "^1.66.1",
|
|
60
|
+
"stylelint": "^15.10.3",
|
|
61
|
+
"stylelint-config-recommended-scss": "^12.0.0",
|
|
62
|
+
"stylelint-config-recommended-vue": "^1.5.0",
|
|
63
|
+
"stylelint-config-standard": "^34.0.0",
|
|
64
|
+
"stylelint-rscss": "^0.4.0",
|
|
65
|
+
"stylelint-scss": "^5.1.0",
|
|
35
66
|
"typescript": "^5.2.2",
|
|
36
67
|
"vite": "^4.4.5",
|
|
37
68
|
"vue-tsc": "^1.8.5"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
disabled: {
|
|
3
|
-
type: import("vue").PropType<boolean>;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
-
click: (value: Event) => void;
|
|
8
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
-
disabled: {
|
|
10
|
-
type: import("vue").PropType<boolean>;
|
|
11
|
-
required: true;
|
|
12
|
-
};
|
|
13
|
-
}>> & {
|
|
14
|
-
onClick?: ((value: Event) => any) | undefined;
|
|
15
|
-
}, {}, {}>;
|
|
16
|
-
export default _default;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
emoji: {
|
|
3
|
-
type: import("vue").PropType<string>;
|
|
4
|
-
required: true;
|
|
5
|
-
};
|
|
6
|
-
size: {
|
|
7
|
-
type: import("vue").PropType<string | number>;
|
|
8
|
-
};
|
|
9
|
-
readonly: {
|
|
10
|
-
type: import("vue").PropType<boolean>;
|
|
11
|
-
};
|
|
12
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
click: (value: Event) => void;
|
|
14
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
-
emoji: {
|
|
16
|
-
type: import("vue").PropType<string>;
|
|
17
|
-
required: true;
|
|
18
|
-
};
|
|
19
|
-
size: {
|
|
20
|
-
type: import("vue").PropType<string | number>;
|
|
21
|
-
};
|
|
22
|
-
readonly: {
|
|
23
|
-
type: import("vue").PropType<boolean>;
|
|
24
|
-
};
|
|
25
|
-
}>> & {
|
|
26
|
-
onClick?: ((value: Event) => any) | undefined;
|
|
27
|
-
}, {}, {}>;
|
|
28
|
-
export default _default;
|
package/dist/index.d.ts
DELETED
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ui3n-button[data-v-f0e2ff6b]{display:flex;border:none;outline:none;border-radius:4px;background-color:#00f;font-size:12px;font-weight:400;color:#fff;padding:0 8px;height:32px}.ui3n-emoji[data-v-a270b984]{--emoji-size: 16px;display:flex;width:var(--emoji-size);height:var(--emoji-size);justify-content:center;align-items:center;cursor:pointer}.ui3n-emoji--readonly[data-v-a270b984]{cursor:default}
|
package/dist/types.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type Ui3nButton from './components/ui3n-button.vue';
|
|
2
|
-
import type Ui3nEmoji from './components/ui3n-emoji.vue';
|
|
3
|
-
export * from "./index";
|
|
4
|
-
declare module 'vue' {
|
|
5
|
-
interface GlobalComponents {
|
|
6
|
-
Ui3nButton: typeof Ui3nButton;
|
|
7
|
-
Ui3nEmoji: typeof Ui3nEmoji;
|
|
8
|
-
}
|
|
9
|
-
}
|
package/dist/ui-3n-lib.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { defineComponent as l, resolveComponent as m, openBlock as r, createElementBlock as _, createVNode as d, ref as f, computed as y, onMounted as v, mergeProps as b, toHandlers as j, toDisplayString as k } from "vue";
|
|
2
|
-
const B = ["disabled"], g = /* @__PURE__ */ l({
|
|
3
|
-
__name: "ui3n-button",
|
|
4
|
-
props: {
|
|
5
|
-
disabled: { type: Boolean }
|
|
6
|
-
},
|
|
7
|
-
emits: ["click"],
|
|
8
|
-
setup(t, { emit: i }) {
|
|
9
|
-
const n = t;
|
|
10
|
-
return (s, o) => {
|
|
11
|
-
const c = m("v-slot");
|
|
12
|
-
return r(), _("button", {
|
|
13
|
-
class: "ui3n-button",
|
|
14
|
-
type: "button",
|
|
15
|
-
disabled: n.disabled,
|
|
16
|
-
onClick: o[0] || (o[0] = (e) => i("click", e))
|
|
17
|
-
}, [
|
|
18
|
-
d(c)
|
|
19
|
-
], 8, B);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
const u = (t, i) => {
|
|
24
|
-
const n = t.__vccOpts || t;
|
|
25
|
-
for (const [s, o] of i)
|
|
26
|
-
n[s] = o;
|
|
27
|
-
return n;
|
|
28
|
-
}, z = /* @__PURE__ */ u(g, [["__scopeId", "data-v-f0e2ff6b"]]), E = /* @__PURE__ */ l({
|
|
29
|
-
__name: "ui3n-emoji",
|
|
30
|
-
props: {
|
|
31
|
-
emoji: {},
|
|
32
|
-
size: {},
|
|
33
|
-
readonly: { type: Boolean }
|
|
34
|
-
},
|
|
35
|
-
emits: ["click"],
|
|
36
|
-
setup(t, { emit: i }) {
|
|
37
|
-
const n = t, s = f(null), o = y(() => {
|
|
38
|
-
const {
|
|
39
|
-
emoji: e,
|
|
40
|
-
size: a = 16,
|
|
41
|
-
readonly: p = !1
|
|
42
|
-
} = n;
|
|
43
|
-
return { emoji: e, size: a, readonly: p };
|
|
44
|
-
});
|
|
45
|
-
v(() => {
|
|
46
|
-
s.value && s.value.style.setProperty("--emoji-size", `${o.value.size}px`);
|
|
47
|
-
});
|
|
48
|
-
const c = (e) => {
|
|
49
|
-
e.stopImmediatePropagation(), i("click", e);
|
|
50
|
-
};
|
|
51
|
-
return (e, a) => (r(), _("div", b({
|
|
52
|
-
ref_key: "emojiElement",
|
|
53
|
-
ref: s,
|
|
54
|
-
class: [
|
|
55
|
-
"ui3n-emoji",
|
|
56
|
-
{ "ui3n-emoji--readonly": o.value.readonly }
|
|
57
|
-
]
|
|
58
|
-
}, j(e.readonly ? {} : { click: c }, !0)), k(e.emoji), 17));
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const C = /* @__PURE__ */ u(E, [["__scopeId", "data-v-a270b984"]]);
|
|
62
|
-
export {
|
|
63
|
-
z as Ui3nButton,
|
|
64
|
-
C as Ui3nEmoji
|
|
65
|
-
};
|
package/dist/ui-3n-lib.umd.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n.Ui3nLib={},n.Vue))})(this,function(n,e){"use strict";const p=["disabled"],_=e.defineComponent({__name:"ui3n-button",props:{disabled:{type:Boolean}},emits:["click"],setup(i,{emit:l}){const s=i;return(c,t)=>{const r=e.resolveComponent("v-slot");return e.openBlock(),e.createElementBlock("button",{class:"ui3n-button",type:"button",disabled:s.disabled,onClick:t[0]||(t[0]=o=>l("click",o))},[e.createVNode(r)],8,p)}}}),b="",a=(i,l)=>{const s=i.__vccOpts||i;for(const[c,t]of l)s[c]=t;return s},u=a(_,[["__scopeId","data-v-f0e2ff6b"]]),m=e.defineComponent({__name:"ui3n-emoji",props:{emoji:{},size:{},readonly:{type:Boolean}},emits:["click"],setup(i,{emit:l}){const s=i,c=e.ref(null),t=e.computed(()=>{const{emoji:o,size:d=16,readonly:y=!1}=s;return{emoji:o,size:d,readonly:y}});e.onMounted(()=>{c.value&&c.value.style.setProperty("--emoji-size",`${t.value.size}px`)});const r=o=>{o.stopImmediatePropagation(),l("click",o)};return(o,d)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({ref_key:"emojiElement",ref:c,class:["ui3n-emoji",{"ui3n-emoji--readonly":t.value.readonly}]},e.toHandlers(o.readonly?{}:{click:r},!0)),e.toDisplayString(o.emoji),17))}}),j="",f=a(m,[["__scopeId","data-v-a270b984"]]);n.Ui3nButton=u,n.Ui3nEmoji=f,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
|