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.
Files changed (95) hide show
  1. yafowil/widget/ace/__init__.py +27 -0
  2. yafowil/widget/ace/example.py +85 -0
  3. yafowil/widget/ace/resources/ace/ace.js +11 -0
  4. yafowil/widget/ace/resources/ace/keybinding-emacs.js +1 -0
  5. yafowil/widget/ace/resources/ace/keybinding-vim.js +1 -0
  6. yafowil/widget/ace/resources/ace/mode-c9search.js +1 -0
  7. yafowil/widget/ace/resources/ace/mode-c_cpp.js +1 -0
  8. yafowil/widget/ace/resources/ace/mode-clojure.js +1 -0
  9. yafowil/widget/ace/resources/ace/mode-coffee.js +1 -0
  10. yafowil/widget/ace/resources/ace/mode-coldfusion.js +1 -0
  11. yafowil/widget/ace/resources/ace/mode-csharp.js +1 -0
  12. yafowil/widget/ace/resources/ace/mode-css.js +1 -0
  13. yafowil/widget/ace/resources/ace/mode-diff.js +1 -0
  14. yafowil/widget/ace/resources/ace/mode-glsl.js +1 -0
  15. yafowil/widget/ace/resources/ace/mode-golang.js +1 -0
  16. yafowil/widget/ace/resources/ace/mode-groovy.js +1 -0
  17. yafowil/widget/ace/resources/ace/mode-haxe.js +1 -0
  18. yafowil/widget/ace/resources/ace/mode-html.js +1 -0
  19. yafowil/widget/ace/resources/ace/mode-jade.js +1 -0
  20. yafowil/widget/ace/resources/ace/mode-java.js +1 -0
  21. yafowil/widget/ace/resources/ace/mode-javascript.js +1 -0
  22. yafowil/widget/ace/resources/ace/mode-json.js +1 -0
  23. yafowil/widget/ace/resources/ace/mode-jsp.js +1 -0
  24. yafowil/widget/ace/resources/ace/mode-jsx.js +1 -0
  25. yafowil/widget/ace/resources/ace/mode-latex.js +1 -0
  26. yafowil/widget/ace/resources/ace/mode-less.js +1 -0
  27. yafowil/widget/ace/resources/ace/mode-liquid.js +1 -0
  28. yafowil/widget/ace/resources/ace/mode-lua.js +1 -0
  29. yafowil/widget/ace/resources/ace/mode-luahtml.js +1 -0
  30. yafowil/widget/ace/resources/ace/mode-luapage.js +1 -0
  31. yafowil/widget/ace/resources/ace/mode-markdown.js +1 -0
  32. yafowil/widget/ace/resources/ace/mode-ocaml.js +1 -0
  33. yafowil/widget/ace/resources/ace/mode-perl.js +1 -0
  34. yafowil/widget/ace/resources/ace/mode-pgsql.js +1 -0
  35. yafowil/widget/ace/resources/ace/mode-php.js +1 -0
  36. yafowil/widget/ace/resources/ace/mode-powershell.js +1 -0
  37. yafowil/widget/ace/resources/ace/mode-python.js +1 -0
  38. yafowil/widget/ace/resources/ace/mode-ruby.js +1 -0
  39. yafowil/widget/ace/resources/ace/mode-scad.js +1 -0
  40. yafowil/widget/ace/resources/ace/mode-scala.js +1 -0
  41. yafowil/widget/ace/resources/ace/mode-scss.js +1 -0
  42. yafowil/widget/ace/resources/ace/mode-sh.js +1 -0
  43. yafowil/widget/ace/resources/ace/mode-sql.js +1 -0
  44. yafowil/widget/ace/resources/ace/mode-svg.js +1 -0
  45. yafowil/widget/ace/resources/ace/mode-tcl.js +1 -0
  46. yafowil/widget/ace/resources/ace/mode-text.js +0 -0
  47. yafowil/widget/ace/resources/ace/mode-textile.js +1 -0
  48. yafowil/widget/ace/resources/ace/mode-xml.js +1 -0
  49. yafowil/widget/ace/resources/ace/mode-xquery.js +1 -0
  50. yafowil/widget/ace/resources/ace/mode-yaml.js +1 -0
  51. yafowil/widget/ace/resources/ace/theme-ambiance.js +1 -0
  52. yafowil/widget/ace/resources/ace/theme-chrome.js +1 -0
  53. yafowil/widget/ace/resources/ace/theme-clouds.js +1 -0
  54. yafowil/widget/ace/resources/ace/theme-clouds_midnight.js +1 -0
  55. yafowil/widget/ace/resources/ace/theme-cobalt.js +1 -0
  56. yafowil/widget/ace/resources/ace/theme-crimson_editor.js +1 -0
  57. yafowil/widget/ace/resources/ace/theme-dawn.js +1 -0
  58. yafowil/widget/ace/resources/ace/theme-dreamweaver.js +1 -0
  59. yafowil/widget/ace/resources/ace/theme-eclipse.js +1 -0
  60. yafowil/widget/ace/resources/ace/theme-github.js +1 -0
  61. yafowil/widget/ace/resources/ace/theme-idle_fingers.js +1 -0
  62. yafowil/widget/ace/resources/ace/theme-kr_theme.js +1 -0
  63. yafowil/widget/ace/resources/ace/theme-merbivore.js +1 -0
  64. yafowil/widget/ace/resources/ace/theme-merbivore_soft.js +1 -0
  65. yafowil/widget/ace/resources/ace/theme-mono_industrial.js +1 -0
  66. yafowil/widget/ace/resources/ace/theme-monokai.js +1 -0
  67. yafowil/widget/ace/resources/ace/theme-pastel_on_dark.js +1 -0
  68. yafowil/widget/ace/resources/ace/theme-solarized_dark.js +1 -0
  69. yafowil/widget/ace/resources/ace/theme-solarized_light.js +1 -0
  70. yafowil/widget/ace/resources/ace/theme-textmate.js +1 -0
  71. yafowil/widget/ace/resources/ace/theme-tomorrow.js +1 -0
  72. yafowil/widget/ace/resources/ace/theme-tomorrow_night.js +1 -0
  73. yafowil/widget/ace/resources/ace/theme-tomorrow_night_blue.js +1 -0
  74. yafowil/widget/ace/resources/ace/theme-tomorrow_night_bright.js +1 -0
  75. yafowil/widget/ace/resources/ace/theme-tomorrow_night_eighties.js +1 -0
  76. yafowil/widget/ace/resources/ace/theme-twilight.js +1 -0
  77. yafowil/widget/ace/resources/ace/theme-vibrant_ink.js +1 -0
  78. yafowil/widget/ace/resources/ace/theme-xcode.js +1 -0
  79. yafowil/widget/ace/resources/ace/worker-coffee.js +1 -0
  80. yafowil/widget/ace/resources/ace/worker-css.js +1 -0
  81. yafowil/widget/ace/resources/ace/worker-javascript.js +1 -0
  82. yafowil/widget/ace/resources/ace/worker-json.js +1 -0
  83. yafowil/widget/ace/resources/ace/worker-xquery.js +1 -0
  84. yafowil/widget/ace/resources/widget.css +9 -0
  85. yafowil/widget/ace/resources/widget.js +64 -0
  86. yafowil/widget/ace/tests.py +75 -0
  87. yafowil/widget/ace/widget.py +68 -0
  88. yafowil.widget.ace-1.3-py3.9-nspkg.pth +2 -0
  89. yafowil_widget_ace-1.3.dist-info/METADATA +126 -0
  90. yafowil_widget_ace-1.3.dist-info/RECORD +95 -0
  91. yafowil_widget_ace-1.3.dist-info/WHEEL +5 -0
  92. yafowil_widget_ace-1.3.dist-info/entry_points.txt +3 -0
  93. yafowil_widget_ace-1.3.dist-info/licenses/LICENSE.rst +27 -0
  94. yafowil_widget_ace-1.3.dist-info/namespace_packages.txt +2 -0
  95. 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()]