Commit Graph

29 Commits

Author SHA1 Message Date
Fabio Pliger
fcaa57307f See you later tailwind (#452)
* start removing tailwind and rebuilding some css

* add css to pybox and add class to repl

* set output component visibility

* replace tailwind class with single component class

* add styles to css

* replace classes on  button

* replace classes on input

* replace classes in title

* replace classes on list

* replace classes

* add new style file

* add list element style

* remove tailwind classes from todo example

* revert link on examples files

* remove tailwind config files

* remove commented old code

* add missing ;
2022-06-24 18:30:07 -05:00
Jeff Glass
b767a78b05 Provide Visible Error if <py-env> paths is used in a local HTML file (#311)
* Add onscreen error when using py-env paths in local HTTP files without file server

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove redundant code, fix error handling, add 404 error

* Lint and Format

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* manage errors loading files

* use handleFetchError for handling fetch errors in env

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Fabio Pliger <fabio.pliger@gmail.com>
2022-05-17 23:48:02 -05:00
Fabio Pliger
363f3751f9 support different pyodide versions (#328)
* add PyLoader class

* create global loader during app creation time and remove it when pyscript loading operations are done

* make the loader global and open/close when apps is starting. Also add concept of app config so users can set if they want to autoclose the loader of handle it themselves

* add pyconfig file

* auto add global config if there's no config set in the page

* export initializer type

* define type for config

* move initialization out of svelte file, into app config

* change runtimes from strings to objects

* fix typo
2022-05-11 16:59:13 -05:00
ic-768
2526d242bc Change let to const; Minor code improvement (#300)
* Change let to const; Minor code improvement

* Indentation fix
2022-05-10 16:15:32 -05:00
Fabio Pliger
71319d0969 add app loading splash screen and AppConfig (#279)
* add PyLoader class

* create global loader during app creation time and remove it when pyscript loading operations are done

* make the loader global and open/close when apps is starting. Also add concept of app config so users can set if they want to autoclose the loader of handle it themselves

* add pyconfig file

* auto add global config if there's no config set in the page

* remove changes to simple_clock example
2022-05-10 16:00:25 -05:00
woxtu
a993d61885 Use async/await instead of promise chaining (#266)
* Use async/await instead of promise chaining

* Await asynchronous operations
2022-05-09 12:32:01 -05:00
Fabio Pliger
b7d748c96a Moves Python code out of interpreter file (#207)
* make copy of .py files part of build process

* move code out ofinterpreter file and make it download and load code during initialization

* fix double ; in interpreter

* remove debugging print

* update dependencies

* fix project name and version

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* lint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change fmt-py

* lint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* remove extra content

* define missing strict type

* create build folder if doesn't exist

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-05-05 23:12:54 -05:00
Fabio Pliger
788af88422 fix enviroment promise loading bug on pyenv 2022-04-28 15:59:35 -06:00
Fabio Pliger
62737bf868 disable lint on specific line 2022-04-28 15:06:50 -06:00
Fabio Pliger
ec38f9c151 more cleaning 2022-04-28 14:00:31 -06:00
Fabio Pliger
3f05d33ebc remove unused code in App 2022-04-28 12:12:24 -06:00
Princiya Sequeira
091d109da2 updated styles for repl2, styled the play button 2022-04-27 23:56:10 +02:00
Ross Bermudez
27deee3f86 [PYS-12] Format and lint 2022-04-25 15:00:14 +02:00
Fabio Pliger
a6d00318c3 add PyListTemplate and PyItemTemplate so that classes implementing list and list item widgets can subclass from it and hide complexity to users 2022-04-20 12:48:25 -05:00
Fabio Pliger
82f3ace53e reduce space needed for repl buttons on top 2022-04-13 15:12:20 -05:00
Fabio Pliger
8dc1ade1e2 add (TEMP) timer to post initializers until we have proper state management and bump pyodide version 2022-04-11 20:13:57 -05:00
Fabio Pliger
7fd2b56bfe remove old files and old code references 2022-04-08 18:19:34 -05:00
Philipp Rudiger
60232bf91b Ensure env is created before executing scripts 2022-04-08 18:51:10 +02:00
Fabio Pliger
5ec85695b9 add initializers that run before py-script scripts run and post initializers that run after. Also add function to unescape some of the characters when read form html tags 2022-04-01 10:45:52 -05:00
Fabio Pliger
2b7cbe0129 add array of initializers, to run after the python runtime has loaded 2022-03-25 16:57:54 -05:00
Fabio Pliger
72be1aa13e if mode is play, execute all scripts scheduled for execution, when the page loads 2022-03-24 11:22:35 -05:00
Fabio Pliger
c6a99e816c Add visibility css for pyscript dev buttons and support for opening/close component details nav 2022-03-15 19:55:12 -05:00
Fabio Pliger
2f019d317b fix left side navbar and add button to add componente to the page 2022-03-10 17:28:39 -06:00
Fabio Pliger
bcb9eb94a1 reorganize UI so with header, footer and left side navbar 2022-03-10 14:55:55 -06:00
Fabio Pliger
92db010f08 add initial global runtimes to App 2022-03-09 11:51:23 -06:00
Fabio Pliger
45c0dbe416 add codemirror cmd to capture ctrl+enter and shift+enter to call evaluate function 2022-03-07 17:16:32 -06:00
Fabio Pliger
0a636118be initialize and connect pyodide to a py-script tag 2022-03-04 09:46:26 -06:00
Fabio Pliger
5d7570adea add editor, context dev buttons and output text area to pyscript element when rendered 2022-03-03 17:37:44 -06:00
Fabio Pliger
e619288555 add new pyscript project files 2022-02-28 16:05:19 -06:00