glass-easel-devtools-panel 0.9.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/.eslintignore +2 -0
- package/dist/app.d.ts +0 -0
- package/dist/bootstrap.d.ts +5 -0
- package/dist/bootstrap.js +3 -0
- package/dist/bootstrap.js.LICENSE.txt +1 -0
- package/dist/events.d.ts +41 -0
- package/dist/global_components/image/image.d.ts +1 -0
- package/dist/global_components/index.d.ts +2 -0
- package/dist/global_components/view/view.d.ts +1 -0
- package/dist/index.css +17 -0
- package/dist/message_channel.d.ts +11 -0
- package/dist/pages/detail/detail.d.ts +1 -0
- package/dist/pages/detail/section.d.ts +0 -0
- package/dist/pages/detail/value.d.ts +1 -0
- package/dist/pages/index/index.d.ts +1 -0
- package/dist/pages/store.d.ts +9 -0
- package/dist/pages/tree/element.d.ts +1 -0
- package/dist/resources/logo_256.png +0 -0
- package/dist/utils.d.ts +4 -0
- package/package.json +21 -0
- package/src/app.ts +1 -0
- package/src/app.wxss +1 -0
- package/src/bootstrap.ts +80 -0
- package/src/events.ts +97 -0
- package/src/global_components/image/image.json +3 -0
- package/src/global_components/image/image.ts +1 -0
- package/src/global_components/image/image.wxml +1 -0
- package/src/global_components/image/image.wxss +3 -0
- package/src/global_components/index.ts +12 -0
- package/src/global_components/view/view.json +3 -0
- package/src/global_components/view/view.ts +40 -0
- package/src/global_components/view/view.wxml +14 -0
- package/src/global_components/view/view.wxss +0 -0
- package/src/message_channel.ts +70 -0
- package/src/pages/common.wxss +12 -0
- package/src/pages/detail/detail.json +7 -0
- package/src/pages/detail/detail.ts +190 -0
- package/src/pages/detail/detail.wxml +179 -0
- package/src/pages/detail/detail.wxss +84 -0
- package/src/pages/detail/section.json +3 -0
- package/src/pages/detail/section.ts +17 -0
- package/src/pages/detail/section.wxml +8 -0
- package/src/pages/detail/section.wxss +47 -0
- package/src/pages/detail/value.json +3 -0
- package/src/pages/detail/value.ts +107 -0
- package/src/pages/detail/value.wxml +7 -0
- package/src/pages/detail/value.wxss +44 -0
- package/src/pages/index/index.json +6 -0
- package/src/pages/index/index.ts +121 -0
- package/src/pages/index/index.wxml +29 -0
- package/src/pages/index/index.wxss +75 -0
- package/src/pages/store.ts +33 -0
- package/src/pages/tree/element.json +6 -0
- package/src/pages/tree/element.ts +295 -0
- package/src/pages/tree/element.wxml +47 -0
- package/src/pages/tree/element.wxss +113 -0
- package/src/resources/logo_256.png +0 -0
- package/src/utils.ts +16 -0
- package/src.d.ts +10 -0
- package/tsconfig.json +11 -0
- package/typings/miniprogram.d.ts +6 -0
- package/webpack.config.js +79 -0
- package/webpack.dev.config.js +12 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@import url('../common.wxss');
|
|
2
|
+
|
|
3
|
+
@keyframes update-ani {
|
|
4
|
+
from {
|
|
5
|
+
background: @update-bg;
|
|
6
|
+
}
|
|
7
|
+
to {
|
|
8
|
+
background: transparent;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.updated {
|
|
12
|
+
background: @update-bg;
|
|
13
|
+
animation-duration: 1s;
|
|
14
|
+
animation-fill-mode: both;
|
|
15
|
+
animation-name: update-ani;
|
|
16
|
+
animation-timing-function: ease;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host {
|
|
20
|
+
display: block;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.tag {
|
|
24
|
+
color: @common-text;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fold-arrow {
|
|
29
|
+
display: inline-block;
|
|
30
|
+
width: 1em;
|
|
31
|
+
height: 1em;
|
|
32
|
+
line-height: 1em;
|
|
33
|
+
color: #444;
|
|
34
|
+
text-align: center;
|
|
35
|
+
}
|
|
36
|
+
.fold-arrow-icon {
|
|
37
|
+
width: 1em;
|
|
38
|
+
transition: transform 200ms ease;
|
|
39
|
+
}
|
|
40
|
+
.fold-arrow-icon_open {
|
|
41
|
+
transform: rotate(90deg);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tag-body {
|
|
45
|
+
display: inline-block;
|
|
46
|
+
}
|
|
47
|
+
.tag-body_hover {
|
|
48
|
+
background: @hover-bg;
|
|
49
|
+
}
|
|
50
|
+
.tag-body_selected {
|
|
51
|
+
background: @selected-bg;
|
|
52
|
+
}
|
|
53
|
+
.tag-body_highlight {
|
|
54
|
+
background-color: rgba(0, 128, 192, 0.25);
|
|
55
|
+
}
|
|
56
|
+
.tag-text {
|
|
57
|
+
display: inline;
|
|
58
|
+
}
|
|
59
|
+
.tag-name {
|
|
60
|
+
display: inline-block;
|
|
61
|
+
color: @tag-name;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.tag-var-name-wrapper {
|
|
65
|
+
display: inline;
|
|
66
|
+
}
|
|
67
|
+
.tag-var-name {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
margin-left: 0.25em;
|
|
70
|
+
height: 1em;
|
|
71
|
+
line-height: 1em;
|
|
72
|
+
min-width: 1em;
|
|
73
|
+
text-align: center;
|
|
74
|
+
font-size: 0.8em;
|
|
75
|
+
font-style: italic;
|
|
76
|
+
color: @important-text;
|
|
77
|
+
}
|
|
78
|
+
.tag-var-name_hover {
|
|
79
|
+
background: @hover-bg;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.attribute {
|
|
83
|
+
display: inline-block;
|
|
84
|
+
margin-left: 0.5em;
|
|
85
|
+
}
|
|
86
|
+
.attribute-name {
|
|
87
|
+
display: inline-block;
|
|
88
|
+
color: @core-attribute-name;
|
|
89
|
+
}
|
|
90
|
+
.attribute-name_property {
|
|
91
|
+
color: @property-name;
|
|
92
|
+
}
|
|
93
|
+
.attribute-value {
|
|
94
|
+
display: inline-block;
|
|
95
|
+
color: @attribute-value;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.children {
|
|
99
|
+
margin-left: 1em;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.virtual-tag-name {
|
|
103
|
+
display: inline-block;
|
|
104
|
+
font-style: italic;
|
|
105
|
+
}
|
|
106
|
+
.virtual-tag-name_hover {
|
|
107
|
+
background: @selected-bg;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.text-content {
|
|
111
|
+
color: @important-text;
|
|
112
|
+
padding: 1px 0;
|
|
113
|
+
}
|
|
Binary file
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const DEV: boolean
|
|
2
|
+
|
|
3
|
+
export const error = (msg: string, ...args: unknown[]) => {
|
|
4
|
+
// eslint-disable-next-line no-console
|
|
5
|
+
console.error(`[glass-easel-miniprogram-panel] ${msg}`, ...args)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const warn = (msg: string, ...args: unknown[]) => {
|
|
9
|
+
// eslint-disable-next-line no-console
|
|
10
|
+
console.warn(`[glass-easel-miniprogram-panel] ${msg}`, ...args)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const debug = (msg: string, ...args: unknown[]) => {
|
|
14
|
+
// eslint-disable-next-line no-console
|
|
15
|
+
if (DEV) console.debug(`[glass-easel-miniprogram-panel] ${msg}`, ...args)
|
|
16
|
+
}
|
package/src.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as adapter from 'glass-easel-miniprogram-adapter'
|
|
2
|
+
|
|
3
|
+
export declare const env: adapter.MiniProgramEnv
|
|
4
|
+
export declare const codeSpace: adapter.CodeSpace
|
|
5
|
+
export declare const registerGlobalEventListener: (
|
|
6
|
+
backend: adapter.glassEasel.GeneralBackendContext,
|
|
7
|
+
) => void
|
|
8
|
+
export declare const initWithBackend: (
|
|
9
|
+
backend: adapter.glassEasel.GeneralBackendContext,
|
|
10
|
+
) => adapter.AssociatedBackend
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
|
|
4
|
+
const path = require('path')
|
|
5
|
+
const { DefinePlugin } = require('webpack')
|
|
6
|
+
const {
|
|
7
|
+
GlassEaselMiniprogramWebpackPlugin,
|
|
8
|
+
GlassEaselMiniprogramWxmlLoader,
|
|
9
|
+
GlassEaselMiniprogramWxssLoader,
|
|
10
|
+
} = require('glass-easel-miniprogram-webpack-plugin')
|
|
11
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
12
|
+
|
|
13
|
+
module.exports = [
|
|
14
|
+
{
|
|
15
|
+
mode: 'production',
|
|
16
|
+
entry: './src/bootstrap.ts',
|
|
17
|
+
output: {
|
|
18
|
+
filename: 'bootstrap.js',
|
|
19
|
+
path: path.join(__dirname, 'dist'),
|
|
20
|
+
library: {
|
|
21
|
+
type: 'commonjs2',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
devtool: 'inline-source-map',
|
|
25
|
+
resolve: {
|
|
26
|
+
extensions: ['.ts', '.js'],
|
|
27
|
+
alias: {
|
|
28
|
+
'glass-easel': 'glass-easel',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
module: {
|
|
32
|
+
rules: [
|
|
33
|
+
{
|
|
34
|
+
test: /\.ts$/,
|
|
35
|
+
loader: 'ts-loader',
|
|
36
|
+
exclude: /node_modules/,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
// wxml should be explicit handled with a loader
|
|
40
|
+
test: /\.wxml$/,
|
|
41
|
+
use: GlassEaselMiniprogramWxmlLoader,
|
|
42
|
+
exclude: /node_modules/,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
// wxss should be explicit handled like CSS
|
|
46
|
+
test: /\.wxss$/,
|
|
47
|
+
use: [
|
|
48
|
+
MiniCssExtractPlugin.loader,
|
|
49
|
+
'css-loader',
|
|
50
|
+
GlassEaselMiniprogramWxssLoader,
|
|
51
|
+
// Add more loaders here if you work with less, sass, Stylus, etc.
|
|
52
|
+
// Currently `@import` does not work well without a preprocessor (such as `less`).
|
|
53
|
+
// This is a bug (#113) and will be fixed in future.
|
|
54
|
+
'less-loader',
|
|
55
|
+
],
|
|
56
|
+
exclude: /node_modules/,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
performance: {
|
|
61
|
+
hints: false,
|
|
62
|
+
maxEntrypointSize: 4 * 1024 * 1024,
|
|
63
|
+
maxAssetSize: 4 * 1024 * 1024,
|
|
64
|
+
},
|
|
65
|
+
plugins: [
|
|
66
|
+
new DefinePlugin({
|
|
67
|
+
DEV: 'false',
|
|
68
|
+
}),
|
|
69
|
+
new MiniCssExtractPlugin({
|
|
70
|
+
filename: 'index.css',
|
|
71
|
+
}),
|
|
72
|
+
new GlassEaselMiniprogramWebpackPlugin({
|
|
73
|
+
path: path.join(__dirname, 'src'),
|
|
74
|
+
resourceFilePattern: /\.(jpg|jpeg|png|gif)$/,
|
|
75
|
+
customBootstrap: true,
|
|
76
|
+
}),
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
+
|
|
4
|
+
const { DefinePlugin } = require('webpack')
|
|
5
|
+
const config = require('./webpack.config')
|
|
6
|
+
|
|
7
|
+
config[0].mode = 'development'
|
|
8
|
+
config[0].devtool = 'inline-source-map'
|
|
9
|
+
config[0].plugins[0] = new DefinePlugin({ DEV: 'true' })
|
|
10
|
+
// config[0].resolve.alias['glass-easel'] = 'glass-easel/dist/glass_easel.dev.all.es.js'
|
|
11
|
+
|
|
12
|
+
module.exports = config
|