diff --git a/doc/package.json b/doc/package.json index 0fe8981..c6ea1e5 100644 --- a/doc/package.json +++ b/doc/package.json @@ -9,10 +9,11 @@ "eject": "react-scripts eject" }, "dependencies": { + "@publicodes/react-ui": "^1.0.1", "@types/node": "^16.18.46", "@types/react": "^18.2.21", "@types/react-dom": "^18.2.7", - "publicodes-react": "^1.0.0-beta.77", + "publicodes": "^1.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-markdown": "^8.0.7", @@ -21,8 +22,7 @@ "typescript": "^4.9.5" }, "devDependencies": { - "gh-pages": "^6.0.0", - "publicodes": "1.0.0-beta.77" + "gh-pages": "^6.0.0" }, "eslintConfig": { "extends": [ diff --git a/doc/src/App.tsx b/doc/src/App.tsx index 2c14e10..f8f0db0 100644 --- a/doc/src/App.tsx +++ b/doc/src/App.tsx @@ -1,6 +1,6 @@ import Engine from "publicodes" import "./App.css" -import { RulePage } from "publicodes-react" +import { RulePage } from "@publicodes/react-ui" import { Link, Route, Routes, useParams } from "react-router-dom" import { ComponentProps, useRef } from "react" import ReactMardown from "react-markdown" diff --git a/doc/yarn.lock b/doc/yarn.lock index ae7ae52..650a086 100644 --- a/doc/yarn.lock +++ b/doc/yarn.lock @@ -1663,6 +1663,13 @@ schema-utils "^3.0.0" source-map "^0.7.3" +"@publicodes/react-ui@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@publicodes/react-ui/-/react-ui-1.0.1.tgz#6f86e5960a094bc4311e44b7f77a0e929cfa0f19" + integrity sha512-+fByE6jAnnn2tvhTMWjwzJRl6BUdj6YnrDCfeSvQTL3UGcaFniNf9zfMOrmlcFae5g4949Ew8MH1rB7To7YTtA== + dependencies: + styled-components "^6.1.1" + "@remix-run/router@1.15.0": version "1.15.0" resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.15.0.tgz#461a952c2872dd82c8b2e9b74c4dfaff569123e2" @@ -7937,17 +7944,10 @@ psl@^1.1.33: resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== -publicodes-react@^1.0.0-beta.77: - version "1.0.0-beta.77" - resolved "https://registry.yarnpkg.com/publicodes-react/-/publicodes-react-1.0.0-beta.77.tgz#da9550b4fd8cbebc330336a11e6831317ece7db1" - integrity sha512-6DigDTzhiSDWG3MPuHe022ef7Vs1JLxezeH41bbjHT91I7xh2x2zTAFVlanyFSMm8QO0GhA9micCHkBUzfAIsw== - dependencies: - styled-components "^6.0.8" - -publicodes@1.0.0-beta.77: - version "1.0.0-beta.77" - resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.0-beta.77.tgz#45e3c4d2a46bfadcc932e1405ea037e659c28134" - integrity sha512-F8U3WGUWMo3/rxhWYS1gWIiG20g1Yy/+PpXdHM99d6ZHKWnnyh/4txVEuyVE75glgDs+mTjwZPnmoKWsTMXluA== +publicodes@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.1.tgz#07c1e5d94b3609a2fe09b531490969c9f4960086" + integrity sha512-vrgnLCKeu3orxmBhyjll8/rxnL3k2EYtIYa7D7GiJVYWmOE08J5S6c/1j15LnC3cQkYqYgOJR5JnX5gxooQGLA== punycode@^2.1.0, punycode@^2.1.1: version "2.3.1" @@ -9001,7 +9001,7 @@ style-to-object@^0.4.0: dependencies: inline-style-parser "0.1.1" -styled-components@^6.0.8: +styled-components@^6.1.1: version "6.1.8" resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-6.1.8.tgz#c109d36aeea52d8f049e12de2f3be39a6fc86201" integrity sha512-PQ6Dn+QxlWyEGCKDS71NGsXoVLKfE1c3vApkvDYS5KAK+V8fNWGhbSUEo9Gg2iaID2tjLXegEW3bZDUGpofRWw== diff --git a/package.json b/package.json index 63cd1f0..f576465 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "main": "index.js", "module": "index.js", "devDependencies": { - "@incubateur-ademe/nosgestesclimat": "^1.5.2", - "@incubateur-ademe/publicodes-commun": "^0.1.4", - "@publicodes/tools": "^0.4.7", - "publicodes": "1.0.0-beta.77" + "@incubateur-ademe/nosgestesclimat": "^2.0.0-rc.1", + "@incubateur-ademe/publicodes-commun": "^1.0.0", + "@publicodes/tools": "^1.0.0-rc.1", + "publicodes": "^1.0.1" }, "authors": [ "Clément Auger ", diff --git a/rules/alimentation/artistes.publicodes b/rules/alimentation/artistes.publicodes index db53e91..710f0b6 100644 --- a/rules/alimentation/artistes.publicodes +++ b/rules/alimentation/artistes.publicodes @@ -9,12 +9,10 @@ alimentation . artistes: Par défaut, on considère que les artistes consomment un repas sur place, un petit déjeuner s'ils sont hébergés. alimentation . artistes . repas: - formule: - recalcul: - règle: alimentation . repas - avec: - informations . nombre de repas total: informations . nombre artistes * 1 repas - alimentation . repas . proposition: alimentation . artistes . repas . type + valeur: alimentation . repas + contexte: + informations . nombre de repas total: informations . nombre artistes * 1 repas + alimentation . repas . proposition: alimentation . artistes . repas . type alimentation . artistes . repas . type: titre: Régime alimentaire des artistes @@ -40,11 +38,9 @@ alimentation . artistes . repas . type . viande uniquement: alimentation . artistes . petits déjeuners: applicable si: hébergement . artistes présent - formule: - recalcul: - règle: alimentation . petits déjeuners - avec: - alimentation . petits déjeuners . nombre: informations . nombre artistes * 1 repas + valeur: alimentation . petits déjeuners + contexte: + alimentation . petits déjeuners . nombre: informations . nombre artistes * 1 repas alimentation . artistes . eau en bouteille: applicable si: eau en bouteille présent diff --git a/rules/transport/transport.publicodes b/rules/transport/transport.publicodes index b6f0d8d..3941850 100644 --- a/rules/transport/transport.publicodes +++ b/rules/transport/transport.publicodes @@ -52,6 +52,7 @@ transport . train . empreinte par km . TER: note: | Facteur d'émission issu de la base empreinte "TER/2022/Traction moyenne". +transport . commun: transport . commun . empreinte par km: formule: moyenne: diff --git a/yarn.lock b/yarn.lock index d09efba..de3cade 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@incubateur-ademe/nosgestesclimat@^1.5.2": - version "1.5.2" - resolved "https://registry.yarnpkg.com/@incubateur-ademe/nosgestesclimat/-/nosgestesclimat-1.5.2.tgz#9f9aded3d564292c4064003be80fbe67fc316f4d" - integrity sha512-YN+RhI1oN731pV3Mitvpi8z9hTD5kQHA6oIzjBU2eyN2caq0G6MmcTqbhSc2UC7YBukyjm0HIYiEvKFMZyHIgw== +"@incubateur-ademe/nosgestesclimat@^2.0.0-rc.1": + version "2.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@incubateur-ademe/nosgestesclimat/-/nosgestesclimat-2.0.0-rc.1.tgz#00514276d96fd243ce842a7d89cbb86582558322" + integrity sha512-mQKApRDeCkS4suGoCmOFrju0BPHjwhI3s6+SCjzgN46anbs4dtw3r8O0dMh1xy2N6iPtIqQrlpIAFwqiyVcSwg== dependencies: csv-parser "^3.0.0" futureco-data "^0.1.0" @@ -13,23 +13,23 @@ http-server "^14.1.1" nodemon "^3.0.1" prettier "^3.1.0" - publicodes "1.0.0-beta.77" + publicodes "^1.0.1" yaml "^2.2.2" -"@incubateur-ademe/publicodes-commun@^0.1.4": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@incubateur-ademe/publicodes-commun/-/publicodes-commun-0.1.5.tgz#9720644ae83bb4331d447624988a5f4c34b1a7c4" - integrity sha512-VMrbYX2tpMccGU8nnyWjeogri0PPOMbEBace40Kek7KT4SbJKFaX6+HU/RnTkGCgkYz0Mb5acfuaoUHqAcXbpA== +"@incubateur-ademe/publicodes-commun@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@incubateur-ademe/publicodes-commun/-/publicodes-commun-1.0.0.tgz#c2b947e26058733a1716ea5c51cdc4bfb3e605ea" + integrity sha512-tqT32fCizW9LbEDy8sRu9QmlM1170Ag2In2AyCZiyJXP6xlQBOAZK8UV22mMusxw/h81S8lhBPp5TW9o8ty2wA== dependencies: - publicodes "1.0.0-beta.77" + publicodes "^1.0.1" -"@publicodes/tools@^0.4.7": - version "0.4.7" - resolved "https://registry.yarnpkg.com/@publicodes/tools/-/tools-0.4.7.tgz#a9dd113d3569b180b02aae656823ff260c99aaf3" - integrity sha512-ujg4Dppcraxc0J955EEnHVk5PWhIOp9VBKMEYggdQtI1U83OQK59nofZkvjgfSK+GwELqZ1+VoQkKIeBbmeUqA== +"@publicodes/tools@^1.0.0-rc.1": + version "1.0.0-rc.1" + resolved "https://registry.yarnpkg.com/@publicodes/tools/-/tools-1.0.0-rc.1.tgz#ee38395e4ac3756b4a44814b2ff34bd7311d3fa0" + integrity sha512-LVxwS9LV9qTcP7SsbosoKinlgyIHSKTztXI34B6easx6xts0XJF+TNwRcAoeRt04BCr3PZVViWx9wmG7kExMXw== dependencies: "@types/node" "^18.11.18" - publicodes "1.0.0-beta.77" + publicodes "^1.0.1" "@types/node@^18.11.18": version "18.19.14" @@ -534,10 +534,10 @@ pstree.remy@^1.1.8: resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a" integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w== -publicodes@1.0.0-beta.77: - version "1.0.0-beta.77" - resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.0-beta.77.tgz#45e3c4d2a46bfadcc932e1405ea037e659c28134" - integrity sha512-F8U3WGUWMo3/rxhWYS1gWIiG20g1Yy/+PpXdHM99d6ZHKWnnyh/4txVEuyVE75glgDs+mTjwZPnmoKWsTMXluA== +publicodes@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/publicodes/-/publicodes-1.0.1.tgz#07c1e5d94b3609a2fe09b531490969c9f4960086" + integrity sha512-vrgnLCKeu3orxmBhyjll8/rxnL3k2EYtIYa7D7GiJVYWmOE08J5S6c/1j15LnC3cQkYqYgOJR5JnX5gxooQGLA== qs@^6.4.0: version "6.11.2"