yafowil.widget.ace 1.3__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.
- yafowil/widget/ace/__init__.py +27 -0
- yafowil/widget/ace/example.py +85 -0
- yafowil/widget/ace/resources/ace/ace.js +11 -0
- yafowil/widget/ace/resources/ace/keybinding-emacs.js +1 -0
- yafowil/widget/ace/resources/ace/keybinding-vim.js +1 -0
- yafowil/widget/ace/resources/ace/mode-c9search.js +1 -0
- yafowil/widget/ace/resources/ace/mode-c_cpp.js +1 -0
- yafowil/widget/ace/resources/ace/mode-clojure.js +1 -0
- yafowil/widget/ace/resources/ace/mode-coffee.js +1 -0
- yafowil/widget/ace/resources/ace/mode-coldfusion.js +1 -0
- yafowil/widget/ace/resources/ace/mode-csharp.js +1 -0
- yafowil/widget/ace/resources/ace/mode-css.js +1 -0
- yafowil/widget/ace/resources/ace/mode-diff.js +1 -0
- yafowil/widget/ace/resources/ace/mode-glsl.js +1 -0
- yafowil/widget/ace/resources/ace/mode-golang.js +1 -0
- yafowil/widget/ace/resources/ace/mode-groovy.js +1 -0
- yafowil/widget/ace/resources/ace/mode-haxe.js +1 -0
- yafowil/widget/ace/resources/ace/mode-html.js +1 -0
- yafowil/widget/ace/resources/ace/mode-jade.js +1 -0
- yafowil/widget/ace/resources/ace/mode-java.js +1 -0
- yafowil/widget/ace/resources/ace/mode-javascript.js +1 -0
- yafowil/widget/ace/resources/ace/mode-json.js +1 -0
- yafowil/widget/ace/resources/ace/mode-jsp.js +1 -0
- yafowil/widget/ace/resources/ace/mode-jsx.js +1 -0
- yafowil/widget/ace/resources/ace/mode-latex.js +1 -0
- yafowil/widget/ace/resources/ace/mode-less.js +1 -0
- yafowil/widget/ace/resources/ace/mode-liquid.js +1 -0
- yafowil/widget/ace/resources/ace/mode-lua.js +1 -0
- yafowil/widget/ace/resources/ace/mode-luahtml.js +1 -0
- yafowil/widget/ace/resources/ace/mode-luapage.js +1 -0
- yafowil/widget/ace/resources/ace/mode-markdown.js +1 -0
- yafowil/widget/ace/resources/ace/mode-ocaml.js +1 -0
- yafowil/widget/ace/resources/ace/mode-perl.js +1 -0
- yafowil/widget/ace/resources/ace/mode-pgsql.js +1 -0
- yafowil/widget/ace/resources/ace/mode-php.js +1 -0
- yafowil/widget/ace/resources/ace/mode-powershell.js +1 -0
- yafowil/widget/ace/resources/ace/mode-python.js +1 -0
- yafowil/widget/ace/resources/ace/mode-ruby.js +1 -0
- yafowil/widget/ace/resources/ace/mode-scad.js +1 -0
- yafowil/widget/ace/resources/ace/mode-scala.js +1 -0
- yafowil/widget/ace/resources/ace/mode-scss.js +1 -0
- yafowil/widget/ace/resources/ace/mode-sh.js +1 -0
- yafowil/widget/ace/resources/ace/mode-sql.js +1 -0
- yafowil/widget/ace/resources/ace/mode-svg.js +1 -0
- yafowil/widget/ace/resources/ace/mode-tcl.js +1 -0
- yafowil/widget/ace/resources/ace/mode-text.js +0 -0
- yafowil/widget/ace/resources/ace/mode-textile.js +1 -0
- yafowil/widget/ace/resources/ace/mode-xml.js +1 -0
- yafowil/widget/ace/resources/ace/mode-xquery.js +1 -0
- yafowil/widget/ace/resources/ace/mode-yaml.js +1 -0
- yafowil/widget/ace/resources/ace/theme-ambiance.js +1 -0
- yafowil/widget/ace/resources/ace/theme-chrome.js +1 -0
- yafowil/widget/ace/resources/ace/theme-clouds.js +1 -0
- yafowil/widget/ace/resources/ace/theme-clouds_midnight.js +1 -0
- yafowil/widget/ace/resources/ace/theme-cobalt.js +1 -0
- yafowil/widget/ace/resources/ace/theme-crimson_editor.js +1 -0
- yafowil/widget/ace/resources/ace/theme-dawn.js +1 -0
- yafowil/widget/ace/resources/ace/theme-dreamweaver.js +1 -0
- yafowil/widget/ace/resources/ace/theme-eclipse.js +1 -0
- yafowil/widget/ace/resources/ace/theme-github.js +1 -0
- yafowil/widget/ace/resources/ace/theme-idle_fingers.js +1 -0
- yafowil/widget/ace/resources/ace/theme-kr_theme.js +1 -0
- yafowil/widget/ace/resources/ace/theme-merbivore.js +1 -0
- yafowil/widget/ace/resources/ace/theme-merbivore_soft.js +1 -0
- yafowil/widget/ace/resources/ace/theme-mono_industrial.js +1 -0
- yafowil/widget/ace/resources/ace/theme-monokai.js +1 -0
- yafowil/widget/ace/resources/ace/theme-pastel_on_dark.js +1 -0
- yafowil/widget/ace/resources/ace/theme-solarized_dark.js +1 -0
- yafowil/widget/ace/resources/ace/theme-solarized_light.js +1 -0
- yafowil/widget/ace/resources/ace/theme-textmate.js +1 -0
- yafowil/widget/ace/resources/ace/theme-tomorrow.js +1 -0
- yafowil/widget/ace/resources/ace/theme-tomorrow_night.js +1 -0
- yafowil/widget/ace/resources/ace/theme-tomorrow_night_blue.js +1 -0
- yafowil/widget/ace/resources/ace/theme-tomorrow_night_bright.js +1 -0
- yafowil/widget/ace/resources/ace/theme-tomorrow_night_eighties.js +1 -0
- yafowil/widget/ace/resources/ace/theme-twilight.js +1 -0
- yafowil/widget/ace/resources/ace/theme-vibrant_ink.js +1 -0
- yafowil/widget/ace/resources/ace/theme-xcode.js +1 -0
- yafowil/widget/ace/resources/ace/worker-coffee.js +1 -0
- yafowil/widget/ace/resources/ace/worker-css.js +1 -0
- yafowil/widget/ace/resources/ace/worker-javascript.js +1 -0
- yafowil/widget/ace/resources/ace/worker-json.js +1 -0
- yafowil/widget/ace/resources/ace/worker-xquery.js +1 -0
- yafowil/widget/ace/resources/widget.css +9 -0
- yafowil/widget/ace/resources/widget.js +64 -0
- yafowil/widget/ace/tests.py +75 -0
- yafowil/widget/ace/widget.py +68 -0
- yafowil.widget.ace-1.3-py3.9-nspkg.pth +2 -0
- yafowil_widget_ace-1.3.dist-info/METADATA +126 -0
- yafowil_widget_ace-1.3.dist-info/RECORD +95 -0
- yafowil_widget_ace-1.3.dist-info/WHEEL +5 -0
- yafowil_widget_ace-1.3.dist-info/entry_points.txt +3 -0
- yafowil_widget_ace-1.3.dist-info/licenses/LICENSE.rst +27 -0
- yafowil_widget_ace-1.3.dist-info/namespace_packages.txt +2 -0
- yafowil_widget_ace-1.3.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from yafowil.base import factory
|
|
2
|
+
from yafowil.utils import entry_point
|
|
3
|
+
import os
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
resourcedir = os.path.join(os.path.dirname(__file__), 'resources')
|
|
7
|
+
js = [{
|
|
8
|
+
'group': 'yafowil.widget.ace.dependencies',
|
|
9
|
+
'resource': 'ace/ace.js',
|
|
10
|
+
'order': 20,
|
|
11
|
+
}, {
|
|
12
|
+
'group': 'yafowil.widget.ace.common',
|
|
13
|
+
'resource': 'widget.js',
|
|
14
|
+
'order': 21,
|
|
15
|
+
}]
|
|
16
|
+
css = [{
|
|
17
|
+
'group': 'yafowil.widget.ace.common',
|
|
18
|
+
'resource': 'widget.css',
|
|
19
|
+
'order': 20,
|
|
20
|
+
}]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@entry_point(order=10)
|
|
24
|
+
def register():
|
|
25
|
+
from yafowil.widget.ace import widget # noqa
|
|
26
|
+
factory.register_theme('default', 'yafowil.widget.ace',
|
|
27
|
+
resourcedir, js=js, css=css)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
from yafowil.base import factory
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
DOC_ACE_PYTHON = """
|
|
5
|
+
ACE in Python mode
|
|
6
|
+
------------------
|
|
7
|
+
|
|
8
|
+
.. code-block:: python
|
|
9
|
+
|
|
10
|
+
value = '''
|
|
11
|
+
def foo():
|
|
12
|
+
return 'foo'
|
|
13
|
+
'''
|
|
14
|
+
ace = factory('#field:ace', value=value, props={
|
|
15
|
+
'label': 'Python source',
|
|
16
|
+
'required': 'Code is required',
|
|
17
|
+
'theme': 'github',
|
|
18
|
+
'mode': 'python',
|
|
19
|
+
})
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
ace_py_value = """\
|
|
23
|
+
def foo():
|
|
24
|
+
return 'foo'
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def ace_python():
|
|
29
|
+
part = factory(u'fieldset', name='yafowil.widget.ace.python')
|
|
30
|
+
part['ace'] = factory('#field:ace', value=ace_py_value, props={
|
|
31
|
+
'label': 'Python source',
|
|
32
|
+
'required': 'Code is required',
|
|
33
|
+
'theme': 'github',
|
|
34
|
+
'mode': 'python',
|
|
35
|
+
})
|
|
36
|
+
return {
|
|
37
|
+
'widget': part,
|
|
38
|
+
'doc': DOC_ACE_PYTHON,
|
|
39
|
+
'title': 'Python',
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
DOC_ACE_JS = """
|
|
44
|
+
ACE in Javascript mode
|
|
45
|
+
----------------------
|
|
46
|
+
|
|
47
|
+
.. code-block:: python
|
|
48
|
+
|
|
49
|
+
value = '''
|
|
50
|
+
var foo = function() {
|
|
51
|
+
return 'foo';
|
|
52
|
+
};
|
|
53
|
+
'''
|
|
54
|
+
ace = factory('#field:ace', value=value, props={
|
|
55
|
+
'label': 'Javascript Source',
|
|
56
|
+
'required': 'Code is required',
|
|
57
|
+
'theme': 'github',
|
|
58
|
+
'mode': 'javascript',
|
|
59
|
+
})
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
ace_js_value = """\
|
|
63
|
+
var foo = function() {
|
|
64
|
+
return 'foo';
|
|
65
|
+
};
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def ace_js():
|
|
70
|
+
part = factory(u'fieldset', name='yafowil.widget.ace.js')
|
|
71
|
+
part['ace'] = factory('#field:ace', value=ace_js_value, props={
|
|
72
|
+
'label': 'Javascript Source',
|
|
73
|
+
'required': 'Code is required',
|
|
74
|
+
'theme': 'github',
|
|
75
|
+
'mode': 'javascript',
|
|
76
|
+
})
|
|
77
|
+
return {
|
|
78
|
+
'widget': part,
|
|
79
|
+
'doc': DOC_ACE_JS,
|
|
80
|
+
'title': 'Javascript',
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def get_example():
|
|
85
|
+
return [ace_python(), ace_js()]
|