From fe5170955405762ef05b08beac50c084e88c9b52 Mon Sep 17 00:00:00 2001 From: Youen Toupin Date: Tue, 5 Oct 2021 23:30:43 +0200 Subject: [PATCH] whole application embedded in a single js file, loaded in iframe --- .gitignore | 3 + simulator/src/3rdparty/bulma/CHANGELOG.md | 1558 +++++++++++++++++ simulator/src/3rdparty/bulma/LICENSE | 21 + simulator/src/3rdparty/bulma/README.md | 134 ++ simulator/src/3rdparty/bulma/bulma.sass | 10 + .../src/{ => 3rdparty/bulma/css}/bulma.css | 0 simulator/src/3rdparty/bulma/package.json | 82 + simulator/src/3rdparty/bulma/sass/.DS_Store | Bin 0 -> 6148 bytes .../src/3rdparty/bulma/sass/base/.DS_Store | Bin 0 -> 6148 bytes .../src/3rdparty/bulma/sass/base/_all.sass | 6 + .../3rdparty/bulma/sass/base/animations.sass | 5 + .../src/3rdparty/bulma/sass/base/generic.sass | 145 ++ .../src/3rdparty/bulma/sass/base/helpers.sass | 1 + .../3rdparty/bulma/sass/base/minireset.sass | 79 + .../3rdparty/bulma/sass/components/_all.sass | 15 + .../bulma/sass/components/breadcrumb.sass | 77 + .../3rdparty/bulma/sass/components/card.sass | 103 ++ .../bulma/sass/components/dropdown.sass | 83 + .../3rdparty/bulma/sass/components/level.sass | 79 + .../3rdparty/bulma/sass/components/media.sass | 59 + .../3rdparty/bulma/sass/components/menu.sass | 59 + .../bulma/sass/components/message.sass | 101 ++ .../3rdparty/bulma/sass/components/modal.sass | 117 ++ .../bulma/sass/components/navbar.sass | 446 +++++ .../bulma/sass/components/pagination.sass | 166 ++ .../3rdparty/bulma/sass/components/panel.sass | 121 ++ .../3rdparty/bulma/sass/components/tabs.sass | 176 ++ .../3rdparty/bulma/sass/elements/_all.sass | 16 + .../src/3rdparty/bulma/sass/elements/box.sass | 26 + .../3rdparty/bulma/sass/elements/button.sass | 345 ++++ .../bulma/sass/elements/container.sass | 29 + .../3rdparty/bulma/sass/elements/content.sass | 159 ++ .../3rdparty/bulma/sass/elements/form.sass | 1 + .../3rdparty/bulma/sass/elements/icon.sass | 46 + .../3rdparty/bulma/sass/elements/image.sass | 73 + .../bulma/sass/elements/notification.sass | 52 + .../3rdparty/bulma/sass/elements/other.sass | 31 + .../bulma/sass/elements/progress.sass | 73 + .../3rdparty/bulma/sass/elements/table.sass | 133 ++ .../src/3rdparty/bulma/sass/elements/tag.sass | 140 ++ .../3rdparty/bulma/sass/elements/title.sass | 70 + .../src/3rdparty/bulma/sass/form/_all.sass | 9 + .../bulma/sass/form/checkbox-radio.sass | 22 + .../src/3rdparty/bulma/sass/form/file.sass | 184 ++ .../bulma/sass/form/input-textarea.sass | 66 + .../src/3rdparty/bulma/sass/form/select.sass | 87 + .../src/3rdparty/bulma/sass/form/shared.sass | 60 + .../src/3rdparty/bulma/sass/form/tools.sass | 215 +++ .../src/3rdparty/bulma/sass/grid/_all.sass | 5 + .../src/3rdparty/bulma/sass/grid/columns.sass | 513 ++++++ .../src/3rdparty/bulma/sass/grid/tiles.sass | 36 + .../src/3rdparty/bulma/sass/helpers/_all.sass | 12 + .../3rdparty/bulma/sass/helpers/color.sass | 39 + .../3rdparty/bulma/sass/helpers/flexbox.sass | 35 + .../3rdparty/bulma/sass/helpers/float.sass | 10 + .../3rdparty/bulma/sass/helpers/other.sass | 14 + .../3rdparty/bulma/sass/helpers/overflow.sass | 2 + .../3rdparty/bulma/sass/helpers/position.sass | 7 + .../3rdparty/bulma/sass/helpers/spacing.sass | 31 + .../bulma/sass/helpers/typography.sass | 103 ++ .../bulma/sass/helpers/visibility.sass | 122 ++ .../src/3rdparty/bulma/sass/layout/_all.sass | 6 + .../3rdparty/bulma/sass/layout/footer.sass | 11 + .../src/3rdparty/bulma/sass/layout/hero.sass | 153 ++ .../3rdparty/bulma/sass/layout/section.sass | 17 + .../3rdparty/bulma/sass/utilities/.DS_Store | Bin 0 -> 6148 bytes .../3rdparty/bulma/sass/utilities/_all.sass | 9 + .../bulma/sass/utilities/animations.sass | 1 + .../bulma/sass/utilities/controls.sass | 49 + .../sass/utilities/derived-variables.sass | 114 ++ .../bulma/sass/utilities/extends.sass | 25 + .../bulma/sass/utilities/functions.sass | 136 ++ .../sass/utilities/initial-variables.sass | 78 + .../3rdparty/bulma/sass/utilities/mixins.sass | 280 +++ simulator/src/{ => app}/app.css | 2 +- simulator/src/{ => app}/app.ts | 3 + simulator/src/app/tsconfig.json | 11 + simulator/src/simulator-in-iframe.css | 12 + simulator/src/simulator.html | 133 ++ simulator/src/simulator.ts | 26 + simulator/src/tsconfig.json | 2 +- simulator/tools/build.js | 16 +- simulator/tools/embed-app.js | 21 + simulator/tools/embed.js | 33 +- simulator/tools/purify.js | 6 +- simulator/www/simulator.html | 145 -- simulator/www/vhelio-simulator.html | 19 + 87 files changed, 7566 insertions(+), 154 deletions(-) create mode 100644 simulator/src/3rdparty/bulma/CHANGELOG.md create mode 100644 simulator/src/3rdparty/bulma/LICENSE create mode 100644 simulator/src/3rdparty/bulma/README.md create mode 100644 simulator/src/3rdparty/bulma/bulma.sass rename simulator/src/{ => 3rdparty/bulma/css}/bulma.css (100%) create mode 100644 simulator/src/3rdparty/bulma/package.json create mode 100644 simulator/src/3rdparty/bulma/sass/.DS_Store create mode 100644 simulator/src/3rdparty/bulma/sass/base/.DS_Store create mode 100644 simulator/src/3rdparty/bulma/sass/base/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/base/animations.sass create mode 100644 simulator/src/3rdparty/bulma/sass/base/generic.sass create mode 100644 simulator/src/3rdparty/bulma/sass/base/helpers.sass create mode 100644 simulator/src/3rdparty/bulma/sass/base/minireset.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/breadcrumb.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/card.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/dropdown.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/level.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/media.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/menu.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/message.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/modal.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/navbar.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/pagination.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/panel.sass create mode 100644 simulator/src/3rdparty/bulma/sass/components/tabs.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/box.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/button.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/container.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/content.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/form.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/icon.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/image.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/notification.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/other.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/progress.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/table.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/tag.sass create mode 100644 simulator/src/3rdparty/bulma/sass/elements/title.sass create mode 100644 simulator/src/3rdparty/bulma/sass/form/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/form/checkbox-radio.sass create mode 100644 simulator/src/3rdparty/bulma/sass/form/file.sass create mode 100644 simulator/src/3rdparty/bulma/sass/form/input-textarea.sass create mode 100644 simulator/src/3rdparty/bulma/sass/form/select.sass create mode 100644 simulator/src/3rdparty/bulma/sass/form/shared.sass create mode 100644 simulator/src/3rdparty/bulma/sass/form/tools.sass create mode 100644 simulator/src/3rdparty/bulma/sass/grid/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/grid/columns.sass create mode 100644 simulator/src/3rdparty/bulma/sass/grid/tiles.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/color.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/flexbox.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/float.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/other.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/overflow.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/position.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/spacing.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/typography.sass create mode 100644 simulator/src/3rdparty/bulma/sass/helpers/visibility.sass create mode 100644 simulator/src/3rdparty/bulma/sass/layout/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/layout/footer.sass create mode 100644 simulator/src/3rdparty/bulma/sass/layout/hero.sass create mode 100644 simulator/src/3rdparty/bulma/sass/layout/section.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/.DS_Store create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/_all.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/animations.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/controls.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/derived-variables.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/extends.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/functions.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/initial-variables.sass create mode 100644 simulator/src/3rdparty/bulma/sass/utilities/mixins.sass rename simulator/src/{ => app}/app.css (99%) rename simulator/src/{ => app}/app.ts (93%) create mode 100644 simulator/src/app/tsconfig.json create mode 100644 simulator/src/simulator-in-iframe.css create mode 100644 simulator/src/simulator.html create mode 100644 simulator/src/simulator.ts create mode 100644 simulator/tools/embed-app.js delete mode 100644 simulator/www/simulator.html create mode 100644 simulator/www/vhelio-simulator.html diff --git a/.gitignore b/.gitignore index e737257..25dc968 100644 --- a/.gitignore +++ b/.gitignore @@ -184,3 +184,6 @@ local.properties /.local/ /simulator/www/simulator.css *.svg.ts +/simulator/src/climate-zones-data.ts +/simulator/src/simulator.html.ts +/simulator/.intermediate/ diff --git a/simulator/src/3rdparty/bulma/CHANGELOG.md b/simulator/src/3rdparty/bulma/CHANGELOG.md new file mode 100644 index 0000000..543531a --- /dev/null +++ b/simulator/src/3rdparty/bulma/CHANGELOG.md @@ -0,0 +1,1558 @@ +# Bulma Changelog + +## 0.9.3 + +### New features + +- New `is-underlined` class for underlined text and links +- New `auto` value for margin and padding helper classes + +### Improvements + +- New `$section-padding-desktop` Sass variable +- New `$hero-body-padding-tablet` Sass variable +- New `$shadow` Sass variable (used for `.box`, `.card`, `.dropdown` and `.panel`) +- Add `is-normal` size modifiers to `.file` and `.content` +- New `%reset` placeholder + +### Bugfix + +- #3362 Fix slash divide + +## 0.9.2 + +### Breaking change + +To fix duplicate imports, all Sass placeholders have moved from the `utilities/mixins` file to its own `utilities/extends` file. + +The Sass placeholders are: + +- `%control` +- `%unselectable` +- `%arrow` +- `%block` +- `%delete` +- `%loader` +- `%overlay` + +If you were importing them directly from `utilities/mixins`, you'll need to import `utilities/extends` instead. +If you were importing `utilities/_all` or even `bulma.sass` directly, no change is required. + +### New features + +- Fix #1583 New `is-ghost` button that behaves / looks like a regular link +- New `icon-text` component, to combine an icon with text on its side + +### Bug fixes + +- #3005 Fix `column` offsets in RTL +- Fix #3145 Dropdown content is bounded by a parent card +- Fix #3089 Sub columns of a variable columns have weird gap +- Fix #2937 Add `width: unset` for narrow columns +- #3208 Fix #3163 Do not override is-rounded with button-small +- #3216 Removed duplicate `mixins` imports, created a single `extends` file +- #3216 Removed all references to the `.sass` file extension have been removed, since they're unnecessary when there's no ambiguity between a `.sass` file or a `.scss` file + +### Improvements + +- Fix #3012 Add `$media-*` variables, set to `!default` +- Fix #2797 Import dependencies individually for each component +- Remove list style from pagination list + +## 0.9.1 + +### New features + +- #3047 Flexbox helpers +- #3085 Add `is-clickable` helper +- #3086 Allow each component to have its own colors and default to global ones +- New variables `$navbar-colors`, `$button-colors`, `$notification-colors`, `$progress-colors`, `$table-colors`, `$tag-colors`, `$file-colors`, `$textarea-colors`, `$select-colors`, `$form-colors`, `$label-colors` and `$hero-colors` + +### Improvements + +- #2630 Fixes #2598 -> Add `$card-radius` variable +- Add `$card-overflow` variable +- #2540 Fixes #2539 -> Fix indeterminate progress styling in IE11 +- #3057 Make the default text color of `$code` listings more accessible +- #3088 Adds not allowed cursor to missing inputs +- #3101 Add `$modal-breakpoint` variable for modal breakpoint +- #3107 Add `optgroup` to `generic.sass` + +## 0.9.0 + +### Deprecation warning + +The `base/helpers.sass` file is **deprecated**. It has moved into its own `/helpers` folder. If you were importing `base/helpers.sass` or `base/_all.sass`, please import `sass/helpers/_all.sass` now. +If you were simply importing the whole of Bulma with `@import "~/bulma/bulma.sass"` or similar, you won't have to change anything, and everything will work as before. + +The `list` component is also **deprecated**: the `components/list.sass` file has been deleted. It was never officially supported as it was too similar to `panel` component. Use that one instead. + +### RTL support + +Bulma now has **RTL support**. + +By setting the Sass flag `$rtl` to `true`, you can create an RTL version of Bulma, thanks to 4 new Sass mixins: + +- `=ltr` +- `=rtl` +- `=ltr-property($property, $spacing, $right: true)` +- `=ltr-position($spacing, $right: true)` + +The Bulma package now also comes with a `bulma-rtl.css` and `bulma-rtl.min.css` file to be used straight away. + +### Spacing helpers + +Bulma now has **spacing helpers**: https://bulma.io/documentation/helpers/spacing-helpers/ + +

Bulma provides margin m* and padding p* helpers in all directions:

+ + + +

+ You need to combine a margin/padding prefix with a direction suffix. For example: +

+ + + +

+ Each of these property-direction combinations needs to be appended with one of 6 value suffixes +

+ +This release also includes the following helpers: + +- light and dark color helpers +- light and dark background color helpers + +### Improvements + +- #2925 Center table cell content vertically with `is-vcentered` + +### Bug fixes + +- #2955 Fix issue when there's only one `is-toggle` tag + +## 0.8.2 + +### Bug fixes + +- Fix #2885 -> Revert `$input-color: $text-strong` + +## 0.8.1 + +### Improvements + +- #2709 Add light colors to the `notification` element +- #2740 Fixes #2739 -> Add variables size for layout `hero` +- Fix #2741 -> Create `bulmaRgba()` function to support `inherit` value +- #2756 Add `$button-text-decoration` variable + +### Bug fixes + +- #2664 Fixes #2671 -> Add `$panel-colors` variable + +## 0.8.0 + +### Big update + +#### Larger form controls + +Controls and buttons are now `2.5em` high. You can revert this resizing by setting these previous values: + +```sass +$control-height: 2.25em +$control-padding-vertical: calc(0.375em - #{$control-border-width}) +$control-padding-horizontal: calc(0.625em - #{$control-border-width}) +$button-padding-vertical: calc(0.375em - #{$button-border-width}) +$button-padding-horizontal: 0.75em +``` + +#### Light and dark colors + +Each main color (`"primary"`, `"info"`, `"success"`, `"warning"`, `"danger"`) now has a `*-light` and `*-dark` version. They are calculated using 2 new color functions: + +- `findLightColor()` which finds the light version of a color +- `findDarkColor()` which finds the dark version of a color + +The light colors are used by the `button` element, while the light and dark colors are used by the `message` component. + +#### Panel colors + +The `panel` component is now available in all the different colors. + +#### 4-value color map + +The `$colors` Sass map now accepts, for each of its values, a map of up to **4** values. For example: the key `"info"` now has the `($info, $info-invert, $info-light, $info-dark)` map. + +If you provide a `$custom-colors` map, you can decide to provide a map of 1, 2, 3 or 4 values for each value. If fewer than 4 are provided, Bulma will calculate the remaining ones: + +```scss +$custom-colors: ( + 'lime': ( + lime, + ), + 'tomato': ( + tomato, + white, + ), + 'orange': ( + $orange, + $orange-invert, + $orange-light, + ), + 'lavender': ( + $lavender, + $lavender-invert, + $lavender-light, + $lavender-dark, + ), +); +``` + +This is processed by the updated `mergeColorMaps()` Sass function. + +#### Scheme variables + +There are 6 new `$scheme` derived variables: `$scheme-main` `$scheme-main-bis` `$scheme-main-ter` `$scheme-invert` `$scheme-invert-bis` `$scheme-invert-ter` +They replace the `$white` and `$black` occurrences in the codebase. This makes it easy to create a "Dark mode" simply by swapping the values: + +```sass +$scheme-main: $black +$scheme-invert: $white +// etc. +``` + +That is also why most of the codebase now references **derived** variables (`$text`, `$background`, `$border` etc.) instead of **initial** ones (`$grey`, `$grey-lighter`, `$grey-darker` etc.): updating the derived variables will affect all elements and components directly. + +#### Initial variables + +- `$green: hsl(141, 53%, 53%)` +- `$cyan: hsl(204, 71%, 53%)` +- `$red: hsl(348, 86%, 61%)` + +#### Derived variables + +- `$primary-invert: findColorInvert($primary)` +- `$primary-light: findLightColor($primary)` +- `$primary-dark: findDarkColor($primary)` +- `$info-invert: findColorInvert($info)` +- `$info-light: findLightColor($info)` +- `$info-dark: findDarkColor($info)` +- `$success-invert: findColorInvert($success)` +- `$success-light: findLightColor($success)` +- `$success-dark: findDarkColor($success)` +- `$warning-invert: findColorInvert($warning)` +- `$warning-light: findLightColor($warning)` +- `$warning-dark: findDarkColor($warning)` +- `$danger-invert: findColorInvert($danger)` +- `$danger-light: findLightColor($danger)` +- `$danger-dark: findDarkColor($danger)` +- `$light-invert: findColorInvert($light)` +- `$dark-invert: findColorInvert($dark)` + +- `$scheme-main: $white` +- `$scheme-main-bis: $white-bis` +- `$scheme-main-ter: $white-ter` +- `$scheme-invert: $black` +- `$scheme-invert-bis: $black-bis` +- `$scheme-invert-ter: $black-ter` + +### Other variables + +- `$control-height: 2.5em` +- `$control-padding-vertical: calc(0.5em - #{$control-border-width})` +- `$control-padding-horizontal: calc(0.75em - #{$control-border-width})` +- `$media-border-color: rgba($border, 0.5)` +- `$notification-code-background-color: $scheme-main` +- `$panel-radius: $radius-large` +- `$panel-shadow: 0 0.5em 1em -0.125em rgba($scheme-invert, 0.1), 0 0px 0 1px rgba($scheme-invert, 0.02)` +- `$textarea-padding: $control-padding-horizontal` +- `$textarea-max-height: 40em` +- `$textarea-min-height: 8em` + +### Bug fixes + +- Fix #2647 -> Missing meta tags in snippet +- Fix #2031, Fix #2483 -> Invalid output when declaring a custom shade map +- Fix #2060 -> `height: auto` on HTML `audio` element breaks height of element +- Fix #706 -> Derive `-invert` variables using `findColorInvert()` +- #1608 Fix #1552 -> `.container.is-fluid` margins + +### New features + +- #2563 `.image` has a new `.is-fullwidth` modifier + +## 0.7.5 + +### Deprecation warning + +The `form.sass` file is **deprecated**. It has moved into its own `/form` folder. If you were importing `form.sass`, please import `sass/form/_all.sass` now. +If you were simply importing the whole of Bulma with `@import "~/bulma/bulma.sass"` or similar, you won't have to change anything, and everything will work as before. + +### New features + +#### Support for overriding the `font-family` + +You can now specify a different `font-family` for the `.title`, `.subtitle` and `.button` by using the variables `$title-family`, `$subtitle-family` and `$button-family` respectively. + +Simply set a value when importing Bulma: + +```scss +$title-family: 'Georgia', serif; +``` + +- #2375 Add `.is-relative` helper +- #2321 Make `.navbar` focus behave like hover for the navigation +- #2290 Fix #1186 -> Reset the offset on columns +- #2231 Add `.has-text-weight-medium` helper +- #2224 Add customizable border radius to progress bar +- #2480 Add `$footer-color` variable + +### Improvements + +- #2396 Update docs with webpack 4 example +- #2381 Make centered buttons have equal margin +- Fix #2297 -> Remove `.container` fixed width values, use `flex-grow` +- #2478 Move form.sass into its own folder + +### Bug fixes + +- #2420 Fix #2414 -> Fix `align` attribute in `td/th` being ignored +- #2463 Remove duplicate `.has-addons` in `tag.sass` +- #2253 Fix `$gap` variable default value +- #2273 Fix #2258 -> Fix Indeterminate Progress Bar animation in Firefox +- #2175 Proper aligning for `.tabs` within `.content` +- #2476 Fix #2441 -> Correct active pagination link text color on hero + +Fix #1979 -> Correct loading spinner color when a button is: + +- outlined and hovered/focused +- outlined, inverted and hovered/focused + +### New variables + +#### Initial variables + +- `$block-spacing` + +#### Base + +- `$body-font-size` +- `$small-font-size` +- `$pre-font-size` +- `$pre-padding` +- `$pre-code-font-size` + +#### Components + +- `$card-header-padding` +- `$card-content-padding` +- `$card-media-margin` +- `$dropdown-menu-min-width` +- `$dropdown-content-padding-bottom` +- `$dropdown-content-padding-top` +- `$level-item-spacing` +- `$menu-list-line-height` +- `$menu-list-link-padding` +- `$menu-nested-list-margin` +- `$menu-nested-list-padding-left` +- `$menu-label-font-size` +- `$menu-label-letter-spacing` +- `$menu-label-spacing` +- `$pagination-item-font-size` +- `$pagination-item-margin` +- `$pagination-item-padding-left` +- `$pagination-item-padding-right` +- `$panel-margin` +- `$panel-tabs-font-size` + +#### Elements + +- `$container-offset` + +#### Grid + +- `$tile-spacing` + +## 0.7.3 + +### New features + +- #2145 Fix #372 -> New indeterminate progress bars +- #2206 Fix #2046 -> New variables `$table-head-background-color`, `$table-body-background-color` and `$table-foot-background-color` for the `.table` element +- #592 -> Give arbitrary elements access to the image/ratio classes +- #1682 Fix #1681 -> Adds disabled styles for `
` +- #2201 Fix #1875 -> `.buttons` and `.tags` group sizing (`.are-small`, `.are-medium`, `.are-large`) + +### Improvements + +- #1978 Fix #1696 -> Force `box-sizing: border-box` on `details` element +- #2167 Fix #1878 -> New `$footer-padding` variable +- #2168 -> New `$input-placeholder-color` and `$input-disabled-placeholder-color` variables + +### Bug fixes + +- #2157 Fix #1656 -> Allow border radius if only one `.control` in `.field` +- #2091 Fix #2091 -> Remove CSS rule which causes `.tag.has-addons` to not work correctly +- #2186 Fix #1130 -> Prevent `.dropdown` links underlining in `.message` component +- Fix #2154 -> Move `.hero.is-fullheight-with-navbar` to `navbar.sass` file + +### Deprecation + +- `.control.has-icon` deprecated in favor of `.control.has-icons` + +## 0.7.2 + +### New features + +- #1884 New `$navbar-burger-color` variable +- #1679 Add breakpoint based column gaps +- #1905 Fix `modal` for IE11 #1902 +- #1919 New `is-arrowless` class for navbar items +- #1949 New `is-fullheight-with-navbar` class for heros +- #1764 New `.is-sr-only` helper +- #2109 Add and use `$navbar-breakpoint` variable +- New variables `$control-height`, `$control-line-height`, `$pagination-min-width`, `$input-height` +- #1720 Add list element feature +- #2123 Add `.content ol` types: `.is-lower-roman`, `.is-upper-roman`, `.is-lower-alpha`, `.is-upper-alpha`, and support for the `type=` HTML attribute + +### Improvements + +- #1964 Allow `.notification` to have a `.dropdown-item` +- #1999 Change `$border` to `$grey-lighter` in mixins +- #2085 `.media-content` will allow scrolling horizontally if the content is too wide +- #1744 Fix #1710 by using `$table-striped-row-even-hover-background-color` only for even rows +- #2074 Allow ` + + + + \ No newline at end of file diff --git a/simulator/src/simulator.ts b/simulator/src/simulator.ts new file mode 100644 index 0000000..dd83872 --- /dev/null +++ b/simulator/src/simulator.ts @@ -0,0 +1,26 @@ +document.addEventListener('DOMContentLoaded', function() { + let frame = document.querySelector('iframe#simulator'); + let doc = frame.contentWindow.document; + + frame.style.width = '100%'; + frame.style.border = 'none'; + frame.setAttribute('scrolling', 'no'); + + // Insert HTML code in the iframe + doc.open(); + doc.write((window)['simulator.html']); + doc.close(); + + // Load iframe specific CSS + doc.head.innerHTML += (window)['simulator-in-iframe.css']; + + // Add script inside frame + let script = doc.createElement('script'); + script.type = "text/javascript"; + script.innerText = (window)['app.js']; + doc.body.appendChild(script); + + setInterval(() => { + frame.height = Math.max(doc.body.scrollHeight, 700) + 'px'; + }, 100); +}); diff --git a/simulator/src/tsconfig.json b/simulator/src/tsconfig.json index 92316fa..da134d5 100644 --- a/simulator/src/tsconfig.json +++ b/simulator/src/tsconfig.json @@ -7,5 +7,5 @@ "outFile": "../www/simulator.js", "sourceMap": true }, - "include": ["./**/*"] + "include": ["./*", "../.intermediate/simulator.html.ts", "../.intermediate/simulator-in-iframe.css.ts", "../.intermediate/app.js.ts"] } diff --git a/simulator/tools/build.js b/simulator/tools/build.js index 3b601d8..47a7cd6 100644 --- a/simulator/tools/build.js +++ b/simulator/tools/build.js @@ -1,13 +1,25 @@ let child_process = require('child_process'); +let fs = require('fs'); let toolsDir = __dirname; let srcDir = toolsDir + "/../src"; +let intermediateDir = toolsDir + "/../.intermediate"; let nodeModulesDir = toolsDir + "/../node_modules"; +if (!fs.existsSync(intermediateDir)){ + fs.mkdirSync(intermediateDir); +} + +if (!fs.existsSync(intermediateDir+'/app')){ + fs.mkdirSync(intermediateDir+'/app'); +} + let commands = [ + () => child_process.fork(toolsDir + '/purify.js', {'cwd': srcDir}), () => child_process.fork(toolsDir + '/embed.js'), - () => child_process.fork(nodeModulesDir + '/typescript/lib/tsc.js', {'cwd': srcDir}), - () => child_process.fork(toolsDir + '/purify.js', {'cwd': srcDir}) + () => child_process.fork(nodeModulesDir + '/typescript/lib/tsc.js', {'cwd': srcDir+'/app'}), + () => child_process.fork(toolsDir + '/embed-app.js'), + () => child_process.fork(nodeModulesDir + '/typescript/lib/tsc.js', {'cwd': srcDir}) ]; let commandIdx = 0; diff --git a/simulator/tools/embed-app.js b/simulator/tools/embed-app.js new file mode 100644 index 0000000..1fd8e54 --- /dev/null +++ b/simulator/tools/embed-app.js @@ -0,0 +1,21 @@ +let fs = require('fs') + +function embedJs(src, dst) { + fs.readFile(src, 'utf8', function(err, data) { + if(err) throw err; + + data = data.replace(/\\"/g, '\\\\"'); + data = "(window)['"+src.replace(/^.*[\\\/]/, '')+"'] = `" + data + "`;"; + + fs.writeFile(dst, data, function(err) { + if(err) throw err; + }); + }); +} + +let toolsDir = __dirname; +let dataDir = toolsDir + "/../data"; +let srcDir = toolsDir + "/../src"; +let intermediateDir = toolsDir + "/../.intermediate"; + +embedJs(intermediateDir+'/app.js', intermediateDir+'/app.js.ts'); diff --git a/simulator/tools/embed.js b/simulator/tools/embed.js index 7834235..fce7702 100644 --- a/simulator/tools/embed.js +++ b/simulator/tools/embed.js @@ -1,5 +1,30 @@ let fs = require('fs') +function embedHtml(src, dst) { + fs.readFile(src, 'utf8', function(err, data) { + if(err) throw err; + + data = "(window)['"+src.replace(/^.*[\\\/]/, '')+"'] = `" + data + "`;"; + + fs.writeFile(dst, data, function(err) { + if(err) throw err; + }); + }); +} + +function embedCss(src, dst) { + fs.readFile(src, 'utf8', function(err, data) { + if(err) throw err; + + data = "(window)['"+src.replace(/^.*[\\\/]/, '')+"'] = ``;"; + data = data.replace(/"/g, "'"); + + fs.writeFile(dst, data, function(err) { + if(err) throw err; + }); + }); +} + function embedSvg(src, dst) { fs.readFile(src, 'utf8', function(err, data) { if(err) throw err; @@ -50,6 +75,10 @@ function embedCsv(src, dst) { let toolsDir = __dirname; let dataDir = toolsDir + "/../data"; let srcDir = toolsDir + "/../src"; +let intermediateDir = toolsDir + "/../.intermediate"; -embedSvg(dataDir+'/climate-zones-map.svg', srcDir+'/climate-zones-map.svg.ts'); -embedCsv(dataDir+'/climate-zones-data.csv', srcDir+'/climate-zones-data.ts'); +embedHtml(srcDir+'/simulator.html', intermediateDir+'/simulator.html.ts'); +embedCss(intermediateDir+'/app.css', intermediateDir+'/app/app.css.ts'); +embedCss(srcDir+'/simulator-in-iframe.css', intermediateDir+'/simulator-in-iframe.css.ts'); +embedSvg(dataDir+'/climate-zones-map.svg', intermediateDir+'/app/climate-zones-map.svg.ts'); +embedCsv(dataDir+'/climate-zones-data.csv', intermediateDir+'/app/climate-zones-data.ts'); diff --git a/simulator/tools/purify.js b/simulator/tools/purify.js index c8f0e27..ecf0706 100644 --- a/simulator/tools/purify.js +++ b/simulator/tools/purify.js @@ -1,13 +1,13 @@ const purify = require("purify-css") // Reference of all HTML files from root directory -let content = ['../www/*.html']; +let content = ['./*.html']; // Reference of all CSS files from root directory -let css = ['*.css']; +let css = ['3rdparty/bulma/css/bulma.css', './app/app.css']; let files = { - output: '../www/simulator.css', + output: '../.intermediate/app.css', whitelist: ['is-multiple', 'is-loading', 'is-narrow', 'is-active', 'climate-zone'], minify: true, info: true diff --git a/simulator/www/simulator.html b/simulator/www/simulator.html deleted file mode 100644 index 54d79d1..0000000 --- a/simulator/www/simulator.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - -
-
-
-
-
-
- -
-
-
-

- -

-

- kWh -

-
-
-
- -
-
- -
-
-
-

- -

-

- kg -

-
-
-
- -
-
- -
-
-
-
-
- -
-
-

- Choix sur la carte... -

-
-
-
- -
-
- -
-
-
-

- -

-

- km/jour -

-
-
-
- -
-
- -
-
-
-

- -

-

- m/jour -

-
-
-
- -
-
-
-
-
-

- Simuler -

-
-
-
-
-
-
-
- - - - - - - - diff --git a/simulator/www/vhelio-simulator.html b/simulator/www/vhelio-simulator.html new file mode 100644 index 0000000..fe4f004 --- /dev/null +++ b/simulator/www/vhelio-simulator.html @@ -0,0 +1,19 @@ + + + + + + + + + +

Simulateur de vhélio

+

Estimez votre autonomie et votre consommation d'énergie

+ + + + + +