vuepy-core 0.1.8a1__py3-none-any.whl

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.
Files changed (109) hide show
  1. ipywui/__init__.py +9 -0
  2. ipywui/components/Accordion.vue +21 -0
  3. ipywui/components/AccordionItem.vue +16 -0
  4. ipywui/components/AppLayout.vue +38 -0
  5. ipywui/components/Box.vue +19 -0
  6. ipywui/components/Button.vue +47 -0
  7. ipywui/components/Checkbox.vue +38 -0
  8. ipywui/components/Clipboard.vue +25 -0
  9. ipywui/components/Col.vue +23 -0
  10. ipywui/components/ColorPicker.vue +35 -0
  11. ipywui/components/Combobox.vue +47 -0
  12. ipywui/components/Controller.vue +19 -0
  13. ipywui/components/DatePicker.vue +31 -0
  14. ipywui/components/DateTimePicker.vue +28 -0
  15. ipywui/components/Dialog.vue +38 -0
  16. ipywui/components/Display.vue +20 -0
  17. ipywui/components/Dropdown.vue +40 -0
  18. ipywui/components/FileUpload.vue +36 -0
  19. ipywui/components/HBox.vue +26 -0
  20. ipywui/components/HtmlMath.vue +26 -0
  21. ipywui/components/Image.vue +32 -0
  22. ipywui/components/Input.vue +46 -0
  23. ipywui/components/InputNumber.vue +42 -0
  24. ipywui/components/Label.vue +24 -0
  25. ipywui/components/MarkdownViewer.vue +16 -0
  26. ipywui/components/Play.vue +44 -0
  27. ipywui/components/Progress.vue +51 -0
  28. ipywui/components/RadioButtons.vue +41 -0
  29. ipywui/components/Row.vue +38 -0
  30. ipywui/components/Select.vue +52 -0
  31. ipywui/components/SelectColors.vue +28 -0
  32. ipywui/components/SelectNumbers.vue +43 -0
  33. ipywui/components/SelectTags.vue +28 -0
  34. ipywui/components/Slider.vue +68 -0
  35. ipywui/components/Stack.vue +19 -0
  36. ipywui/components/StackItem.vue +18 -0
  37. ipywui/components/TabPane.vue +16 -0
  38. ipywui/components/Tabs.vue +21 -0
  39. ipywui/components/TimePicker.vue +37 -0
  40. ipywui/components/ToggleButton.vue +48 -0
  41. ipywui/components/ToggleButtons.vue +52 -0
  42. ipywui/components/VBox.vue +26 -0
  43. ipywui/components/Valid.vue +25 -0
  44. ipywui/components/_Stub.vue +13 -0
  45. ipywui/comps.py +603 -0
  46. ipywui/core.py +81 -0
  47. ipywui/widgets/__init__.py +700 -0
  48. ipywui/widgets/assets/css/md_code_highlight.css +75 -0
  49. ipywui/widgets/custom/clipboard/__init__.py +33 -0
  50. ipywui/widgets/custom/clipboard/index.css +0 -0
  51. ipywui/widgets/custom/clipboard/index.js +61 -0
  52. ipywui/widgets/custom/dialog/__init__.py +41 -0
  53. ipywui/widgets/custom/dialog/index.css +73 -0
  54. ipywui/widgets/custom/dialog/index.js +73 -0
  55. ipywui/widgets/custom/message/__init__.py +90 -0
  56. ipywui/widgets/custom/message/index.css +131 -0
  57. ipywui/widgets/custom/message/index.js +57 -0
  58. vuepy/__init__.py +70 -0
  59. vuepy/__main__.py +23 -0
  60. vuepy/cli/__init__.py +15 -0
  61. vuepy/cli/create_vue.py +81 -0
  62. vuepy/cli/template_vue/App.vue +14 -0
  63. vuepy/cli/template_vue/app.ipynb +41 -0
  64. vuepy/cli/template_vue/app.py +6 -0
  65. vuepy/compiler_core/__init__.py +0 -0
  66. vuepy/compiler_core/ast.py +268 -0
  67. vuepy/compiler_core/component_expr.py +74 -0
  68. vuepy/compiler_core/errors.py +13 -0
  69. vuepy/compiler_core/options.py +26 -0
  70. vuepy/compiler_core/utils.py +64 -0
  71. vuepy/compiler_dom/__init__.py +0 -0
  72. vuepy/compiler_dom/codegen.py +219 -0
  73. vuepy/compiler_sfc/__init__.py +0 -0
  74. vuepy/compiler_sfc/codegen.py +469 -0
  75. vuepy/compiler_sfc/compile.py +189 -0
  76. vuepy/compiler_sfc/compile_script.py +69 -0
  77. vuepy/compiler_sfc/compile_template.py +240 -0
  78. vuepy/js_stubs/vue.js +43 -0
  79. vuepy/log.py +58 -0
  80. vuepy/reactivity/__init__.py +0 -0
  81. vuepy/reactivity/computed.py +91 -0
  82. vuepy/reactivity/config.py +5 -0
  83. vuepy/reactivity/constant.py +27 -0
  84. vuepy/reactivity/dep.py +25 -0
  85. vuepy/reactivity/effect.py +421 -0
  86. vuepy/reactivity/effect_scope.py +123 -0
  87. vuepy/reactivity/reactive.py +428 -0
  88. vuepy/reactivity/ref.py +174 -0
  89. vuepy/reactivity/watch.py +309 -0
  90. vuepy/runtime/__init__.py +0 -0
  91. vuepy/runtime/core/__init__.py +0 -0
  92. vuepy/runtime/core/api_create_app.py +217 -0
  93. vuepy/runtime/core/api_lifecycle.py +61 -0
  94. vuepy/runtime/core/api_setup_helpers.py +130 -0
  95. vuepy/runtime/core/import_sfc.py +24 -0
  96. vuepy/utils/__init__.py +0 -0
  97. vuepy/utils/appstore.py +12 -0
  98. vuepy/utils/common.py +36 -0
  99. vuepy/utils/factory.py +22 -0
  100. vuepy/utils/image_processer.py +29 -0
  101. vuepy/utils/magic.py +199 -0
  102. vuepy/utils/singleton.py +16 -0
  103. vuepy/version.py +40 -0
  104. vuepy_core-0.1.8a1.dist-info/LICENSE +21 -0
  105. vuepy_core-0.1.8a1.dist-info/METADATA +183 -0
  106. vuepy_core-0.1.8a1.dist-info/RECORD +109 -0
  107. vuepy_core-0.1.8a1.dist-info/WHEEL +5 -0
  108. vuepy_core-0.1.8a1.dist-info/entry_points.txt +2 -0
  109. vuepy_core-0.1.8a1.dist-info/top_level.txt +2 -0
ipywui/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ # ---------------------------------------------------------
2
+ # Copyright (c) vuepy.org. All rights reserved.
3
+ # ---------------------------------------------------------
4
+ from ipywui.comps import *
5
+ from ipywui.core import IPywidgetsComponent
6
+ from ipywui.core import wui
7
+ from vuepy.version import VERSION
8
+
9
+ __version__ = VERSION
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <slot></slot>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "Accordion",
8
+ props: {
9
+ selected_index: {
10
+ type: Number,
11
+ },
12
+ style: {
13
+ type: String,
14
+ },
15
+ },
16
+ }
17
+ </script>
18
+
19
+ <style scoped>
20
+
21
+ </style>
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <slot></slot>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "AccordionItem",
8
+ props: {
9
+ title: String,
10
+ }
11
+ }
12
+ </script>
13
+
14
+ <style scoped>
15
+
16
+ </style>
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div>
3
+ <slot name="header"></slot>
4
+ <slot name="left_sidebar"></slot>
5
+ <slot name="right_sidebar"></slot>
6
+ <slot name="center"></slot>
7
+ <slot name="footer"></slot>
8
+ </div>
9
+
10
+ </template>
11
+
12
+ <script>
13
+ export default {
14
+ name: 'AppLayout',
15
+ props: {
16
+ width: {
17
+ type: String,
18
+ },
19
+ height: {
20
+ type: String,
21
+ },
22
+ // [3, 3, 1]
23
+ // [1, 5, '60px']
24
+ pane_widths: {
25
+ type: Array,
26
+ default: () => []
27
+ },
28
+ pane_heights: {
29
+ type: Array,
30
+ default: () => []
31
+ },
32
+ }
33
+ }
34
+ </script>
35
+
36
+ <style scoped>
37
+
38
+ </style>
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <slot></slot>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'Box',
8
+ props: {
9
+ children: {
10
+ type: Array,
11
+ default: () => []
12
+ }
13
+ }
14
+ }
15
+ </script>
16
+
17
+ <style scoped>
18
+
19
+ </style>
@@ -0,0 +1,47 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'Button',
8
+ props: {
9
+ label: {
10
+ type: String,
11
+ default: ''
12
+ },
13
+ icon: String,
14
+ type: {
15
+ type: String,
16
+ default: '',
17
+ validator: function (value) {
18
+ return ['success', 'info', 'warning', 'danger', ''].includes(value)
19
+ },
20
+ },
21
+ tooltip: {
22
+ type: String,
23
+ default: ''
24
+ },
25
+ loading: {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ 'loading-icon': {
30
+ type: String,
31
+ default: 'fa-spinner'
32
+ },
33
+ disabled: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ style: {
38
+ // background-color, font-family, font-size, font-style, font-variant, font-weight, color, text-decoration
39
+ type: string,
40
+ },
41
+ }
42
+ }
43
+ </script>
44
+
45
+ <style scoped>
46
+
47
+ </style>
@@ -0,0 +1,38 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ // https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html#checkbox
7
+ // https://element-plus.org/zh-CN/component/checkbox.html
8
+ export default {
9
+ name: "Checkbox",
10
+ props: {
11
+ value: {
12
+ type: Boolean,
13
+ default: false
14
+ },
15
+ label: {
16
+ type: String,
17
+ default: ''
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false
22
+ },
23
+ indent: {
24
+ type: Boolean,
25
+ default: true,
26
+ },
27
+ style: {
28
+ // background, description-width
29
+ type: string,
30
+ },
31
+ }
32
+
33
+ }
34
+ </script>
35
+
36
+ <style scoped>
37
+
38
+ </style>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <slot></slot>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "Clipboard",
8
+ props: {
9
+ tag: {
10
+ type: String,
11
+ default: 'div',
12
+ },
13
+ copy: {
14
+ type: Object,
15
+ },
16
+ },
17
+ emits: [
18
+ 'copy',
19
+ ]
20
+ }
21
+ </script>
22
+
23
+ <style scoped>
24
+
25
+ </style>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <slot></slot>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "Col",
8
+ props: {
9
+ span: {
10
+ type: Number,
11
+ default: 24,
12
+ },
13
+ offset: {
14
+ type: Number,
15
+ default: 0,
16
+ },
17
+ }
18
+ }
19
+ </script>
20
+
21
+ <style scoped>
22
+
23
+ </style>
@@ -0,0 +1,35 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'ColorPicker',
8
+ props: {
9
+ label: {
10
+ type: String,
11
+ default: ''
12
+ },
13
+ concise: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ tooltip: {
18
+ type: string,
19
+ },
20
+ style: {
21
+ // background, description-width
22
+ type: string,
23
+ },
24
+ disabled: {
25
+ type: Boolean,
26
+ default: false
27
+ },
28
+ },
29
+ }
30
+ </script>
31
+
32
+ <style scoped>
33
+
34
+ </style>
35
+
@@ -0,0 +1,47 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ // el-autocomplete.
7
+ export default {
8
+ name: "Combobox",
9
+ props: {
10
+ value: {
11
+ type: String,
12
+ default: null
13
+ },
14
+ label: {
15
+ type: String,
16
+ default: ''
17
+ },
18
+ placeholder: {
19
+ type: String,
20
+ },
21
+ options: {
22
+ type: Array,
23
+ default: () => []
24
+ },
25
+ ensure_option: {
26
+ type: Boolean,
27
+ default: false,
28
+ },
29
+ continuous_update: {
30
+ type: Boolean,
31
+ default: false,
32
+ },
33
+ disabled: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ style: {
38
+ // background, description_width, font_size, text_color
39
+ type: string,
40
+ },
41
+ },
42
+ }
43
+ </script>
44
+
45
+ <style scoped>
46
+
47
+ </style>
@@ -0,0 +1,19 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "Controller",
8
+ props: {
9
+ index: {
10
+ type: Number,
11
+ default: 0,
12
+ },
13
+ },
14
+ }
15
+ </script>
16
+
17
+ <style scoped>
18
+
19
+ </style>
@@ -0,0 +1,31 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'DatePicker',
8
+ props: {
9
+ value: {
10
+ type: Date,
11
+ },
12
+ label: {
13
+ type: String,
14
+ default: ''
15
+ },
16
+ disabled: {
17
+ type: Boolean,
18
+ default: false
19
+ },
20
+ style: {
21
+ // description_width
22
+ type: string,
23
+ },
24
+ },
25
+ }
26
+ </script>
27
+
28
+ <style scoped>
29
+
30
+ </style>
31
+
@@ -0,0 +1,28 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'DateTimePicker',
8
+ props: {
9
+ description: {
10
+ type: String,
11
+ default: ''
12
+ },
13
+ disabled: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ style: {
18
+ // description_width
19
+ type: string,
20
+ },
21
+ },
22
+ }
23
+ </script>
24
+
25
+ <style scoped>
26
+
27
+ </style>
28
+
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div class="wui-modal-header">{{ title }}</div>
3
+ <div class="wui-modal-body">
4
+ <slot></slot>
5
+ </div>
6
+ <div class="wui-modal-footer">
7
+ <slot name="footer"></slot>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: "Dialog",
14
+ props: {
15
+ value: {
16
+ type: Boolean,
17
+ default: false,
18
+ },
19
+ title: {
20
+ type: String,
21
+ default: '',
22
+ },
23
+ width: {
24
+ type: String,
25
+ default: '50%',
26
+ },
27
+ },
28
+ emits: [
29
+ 'update:modelValue',
30
+ 'open',
31
+ 'close',
32
+ ]
33
+ }
34
+ </script>
35
+
36
+ <style scoped>
37
+
38
+ </style>
@@ -0,0 +1,20 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "Display",
8
+ props: {
9
+ obj: Object,
10
+ multi_thread: {
11
+ type: Boolean,
12
+ default: false,
13
+ },
14
+ }
15
+ }
16
+ </script>
17
+
18
+ <style scoped>
19
+
20
+ </style>
@@ -0,0 +1,40 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ // https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20List.html#dropdown
8
+ // https://element-plus.org/zh-CN/component/select.html
9
+ name: 'Dropdown',
10
+ props: {
11
+ description: {
12
+ type: String,
13
+ default: ''
14
+ },
15
+ // index: Number,
16
+ value: {
17
+ type: [String, Number],
18
+ default: null
19
+ },
20
+ options: {
21
+ // ['1', '2', '3'] value: '1'
22
+ // [('One', 1), ('Two', 2), ('Three', 3)] value: 1
23
+ type: Array,
24
+ default: () => []
25
+ },
26
+ disabled: {
27
+ type: Boolean,
28
+ default: false
29
+ },
30
+ style: {
31
+ // description_width
32
+ type: string,
33
+ },
34
+ },
35
+ }
36
+ </script>
37
+
38
+ <style scoped>
39
+
40
+ </style>
@@ -0,0 +1,36 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ // el-upload
7
+ export default {
8
+ name: "FileUpload",
9
+ props: {
10
+ value: {
11
+ type: Array,
12
+ default: () => [
13
+ {
14
+ name: String, // xx.txt
15
+ type: String, // text/plain
16
+ size: Number,
17
+ last_modified: Object, // datetime.datetime
18
+ content: Object
19
+ },
20
+ ]
21
+ },
22
+ accept: {
23
+ type: String, // Accepted file extension e.g. '.txt', '.pdf', 'image/*', 'image/*,.pdf'
24
+ default: ''
25
+ },
26
+ multiple: {
27
+ type: Boolean,
28
+ default: false
29
+ }
30
+ },
31
+ }
32
+ </script>
33
+
34
+ <style scoped>
35
+
36
+ </style>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <slot></slot>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: 'HBox',
8
+ props: {
9
+ children: {
10
+ type: Array,
11
+ default: () => []
12
+ },
13
+ box_style: {
14
+ type: String,
15
+ default: '',
16
+ validator: function (value) {
17
+ return ['success', 'info', 'warning', 'danger', ''].includes(value)
18
+ },
19
+ },
20
+ }
21
+ }
22
+ </script>
23
+
24
+ <style scoped>
25
+
26
+ </style>
@@ -0,0 +1,26 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "HtmlMath",
8
+ props: {
9
+ value: {
10
+ type: String
11
+ },
12
+ placeholder: {
13
+ type: String,
14
+ default: ''
15
+ },
16
+ description: {
17
+ type: String,
18
+ default: ''
19
+ },
20
+ },
21
+ }
22
+ </script>
23
+
24
+ <style scoped>
25
+
26
+ </style>
@@ -0,0 +1,32 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ name: "Image",
8
+ props: {
9
+ value: {
10
+ type: String,
11
+ default: ''
12
+ },
13
+ format: {
14
+ type: String,
15
+ default: 'png'
16
+ },
17
+ width: {
18
+ type: Number,
19
+ },
20
+ height: {
21
+ type: Number,
22
+ },
23
+ style: {
24
+ type: String,
25
+ },
26
+ },
27
+ }
28
+ </script>
29
+
30
+ <style scoped>
31
+
32
+ </style>
@@ -0,0 +1,46 @@
1
+ <template>
2
+
3
+ </template>
4
+
5
+ <script>
6
+ // el-input
7
+ export default {
8
+ name: "Input",
9
+ props: {
10
+ value: {
11
+ type: String
12
+ },
13
+ type: {
14
+ type: String,
15
+ default: '',
16
+ validator: function (value) {
17
+ return ['text', 'textarea', 'password'].includes(value)
18
+ },
19
+ },
20
+ placeholder: {
21
+ type: String,
22
+ default: ''
23
+ },
24
+ label: {
25
+ type: String,
26
+ default: ''
27
+ },
28
+ continuous_update: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
32
+ disabled: {
33
+ type: Boolean,
34
+ default: false
35
+ },
36
+ style: {
37
+ // background, description_width, font_size, text_color
38
+ type: string,
39
+ },
40
+ },
41
+ }
42
+ </script>
43
+
44
+ <style scoped>
45
+
46
+ </style>