@biztoken/design-tokens 0.1.0 → 0.1.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/index.html +11 -0
- package/index.ts +23 -0
- package/package.json +10 -6
- package/tokens-DTCGS.back.json +8363 -0
- package/tokens-DTCGS.json +98 -98
package/index.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html style="height:100%;width:100%">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>BizToken Design Tokens</title>
|
|
6
|
+
</head>
|
|
7
|
+
<body style="height:100%;width:100%">
|
|
8
|
+
<div id="app" style="height:100%;width:100%"></div>
|
|
9
|
+
<script type="module" src="./index.ts"></script>
|
|
10
|
+
</body>
|
|
11
|
+
</html>
|
package/index.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { render } from '@biztoken/simple-editor';
|
|
2
|
+
import tokens from './tokens-DTCGS.json' assert { type: 'json' };
|
|
3
|
+
|
|
4
|
+
const simpleEditor = render(document.getElementById('app'), {
|
|
5
|
+
title: 'BizToken Design Tokens',
|
|
6
|
+
tokens,
|
|
7
|
+
onTokenUpdate(val, oldVal) {
|
|
8
|
+
console.log('onTokenUpdate', val, oldVal);
|
|
9
|
+
simpleEditor.tsd?.sdInstance.formatPlatform('figma', { cache: true }).then((data) => {
|
|
10
|
+
console.log('$$$$', data);
|
|
11
|
+
console.log('$$$$', JSON.stringify(data));
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
onTokenCreate(args) {
|
|
15
|
+
console.log('onTokenCreate', args);
|
|
16
|
+
},
|
|
17
|
+
onTokenDelete(args) {
|
|
18
|
+
console.log('onTokenDelete', args);
|
|
19
|
+
},
|
|
20
|
+
onTokenChange(args) {
|
|
21
|
+
console.log('onTokenChange', args);
|
|
22
|
+
},
|
|
23
|
+
});
|
package/package.json
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@biztoken/design-tokens",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "the design tokens for biz",
|
|
6
6
|
"main": "tokens-DTCGS.json",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
-
},
|
|
10
7
|
"publishConfig": {
|
|
11
8
|
"access": "public"
|
|
12
9
|
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"vite": "^7.2.7",
|
|
12
|
+
"@biztoken/simple-editor": "0.1.3"
|
|
13
|
+
},
|
|
13
14
|
"keywords": [],
|
|
14
15
|
"author": "im.shenshen@qq.com",
|
|
15
16
|
"license": "ISC",
|
|
16
|
-
"
|
|
17
|
-
|
|
17
|
+
"scripts": {
|
|
18
|
+
"dev": "vite",
|
|
19
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
20
|
+
}
|
|
21
|
+
}
|