@opentripplanner/core-utils 12.0.0-alpha.8 → 12.0.0
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.
- package/esm/__tests__/__mocks__/bike-rental-itinerary.json +863 -0
- package/esm/__tests__/__mocks__/config.json +54 -0
- package/esm/__tests__/__mocks__/fare-products-itinerary.json +1299 -0
- package/esm/__tests__/__mocks__/routes.json +107 -0
- package/esm/__tests__/__mocks__/tnc-itinerary.json +1726 -0
- package/esm/bike-rental-itinerary.json +863 -0
- package/esm/config.json +54 -0
- package/esm/fare-products-itinerary.json +1299 -0
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/esm/itinerary.js +46 -21
- package/esm/itinerary.js.map +1 -1
- package/esm/otpSchema.json +13373 -0
- package/esm/planQuery.graphql +281 -0
- package/esm/profile.js +1 -1
- package/esm/profile.js.map +1 -1
- package/esm/query-gen.js +8 -5
- package/esm/query-gen.js.map +1 -1
- package/esm/query.js +1 -5
- package/esm/query.js.map +1 -1
- package/esm/routes.json +107 -0
- package/esm/storage.js +2 -6
- package/esm/storage.js.map +1 -1
- package/esm/suspense.js +13 -0
- package/esm/suspense.js.map +1 -0
- package/esm/tnc-itinerary.json +1726 -0
- package/lib/__tests__/__mocks__/bike-rental-itinerary.json +863 -0
- package/lib/__tests__/__mocks__/config.json +54 -0
- package/lib/__tests__/__mocks__/fare-products-itinerary.json +1299 -0
- package/lib/__tests__/__mocks__/routes.json +107 -0
- package/lib/__tests__/__mocks__/tnc-itinerary.json +1726 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -1
- package/lib/itinerary.d.ts +13 -4
- package/lib/itinerary.d.ts.map +1 -1
- package/lib/itinerary.js +59 -22
- package/lib/itinerary.js.map +1 -1
- package/lib/otpSchema.json +13373 -0
- package/lib/planQuery.graphql +281 -0
- package/lib/profile.js +1 -1
- package/lib/profile.js.map +1 -1
- package/lib/query-gen.d.ts +3 -1
- package/lib/query-gen.d.ts.map +1 -1
- package/lib/query-gen.js +8 -5
- package/lib/query-gen.js.map +1 -1
- package/lib/query.js +1 -5
- package/lib/query.js.map +1 -1
- package/lib/storage.d.ts.map +1 -1
- package/lib/storage.js +2 -6
- package/lib/storage.js.map +1 -1
- package/lib/suspense.d.ts +8 -0
- package/lib/suspense.d.ts.map +1 -0
- package/lib/suspense.js +26 -0
- package/lib/suspense.js.map +1 -0
- package/package.json +3 -3
- package/src/__tests__/itinerary.ts +36 -1
- package/src/core-utils.story.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/itinerary.ts +68 -26
- package/src/otpSchema.json +0 -12
- package/src/planQuery.graphql +27 -0
- package/src/profile.js +1 -1
- package/src/query-gen.ts +8 -4
- package/src/query.js +1 -4
- package/src/storage.ts +5 -9
- package/src/suspense.tsx +19 -0
- package/tsconfig.json +1 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/core-utils.story.d.ts +0 -22
- package/lib/core-utils.story.d.ts.map +0 -1
- package/lib/core-utils.story.js +0 -69
- package/lib/core-utils.story.js.map +0 -1
package/lib/core-utils.story.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.RouteColorTester = void 0;
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
|
-
const route_1 = require("./route");
|
|
33
|
-
exports.default = {
|
|
34
|
-
title: "core-utils"
|
|
35
|
-
};
|
|
36
|
-
const ColorBlock = styled_components_1.default.div `
|
|
37
|
-
background: ${props => props.bg};
|
|
38
|
-
color: ${props => props.fg};
|
|
39
|
-
padding: 10px;
|
|
40
|
-
`;
|
|
41
|
-
const ColorBlockWrapper = styled_components_1.default.div `
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-direction: row;
|
|
44
|
-
gap: 10px;
|
|
45
|
-
`;
|
|
46
|
-
const ColorPair = ({ fg, bg }) => {
|
|
47
|
-
return (react_1.default.createElement(ColorBlockWrapper, null,
|
|
48
|
-
react_1.default.createElement(ColorBlock, { fg: fg, bg: bg }, "Provided color pair"),
|
|
49
|
-
react_1.default.createElement(ColorBlock, { fg: (0, route_1.getMostReadableTextColor)(bg, fg), bg: bg }, "Corrected color pair")));
|
|
50
|
-
};
|
|
51
|
-
const RouteColorTester = () => {
|
|
52
|
-
const [fg, setFg] = (0, react_1.useState)("#333333");
|
|
53
|
-
const [bg, setBg] = (0, react_1.useState)("#cbeb55");
|
|
54
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
55
|
-
react_1.default.createElement(ColorPair, { bg: bg, fg: fg }),
|
|
56
|
-
react_1.default.createElement("label", null,
|
|
57
|
-
"Foreground Color",
|
|
58
|
-
react_1.default.createElement("input", { onChange: e => setFg(e.target.value), type: "color", value: fg })),
|
|
59
|
-
react_1.default.createElement("label", null,
|
|
60
|
-
"Background Color",
|
|
61
|
-
react_1.default.createElement("input", { onChange: e => setBg(e.target.value), type: "color", value: bg }))));
|
|
62
|
-
};
|
|
63
|
-
exports.RouteColorTester = RouteColorTester;
|
|
64
|
-
// Disable color contrast checking for the uncorrected color pairs.
|
|
65
|
-
exports.RouteColorTester.parameters = {
|
|
66
|
-
a11y: { config: { rules: [{ id: "color-contrast", reviewOnFail: true }] } },
|
|
67
|
-
storyshots: { disable: true }
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=core-utils.story.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core-utils.story.js","sourceRoot":"","sources":["../src/core-utils.story.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AACxC,0EAAuC;AACvC,mCAAmD;AAEnD,kBAAe;IACb,KAAK,EAAE,YAAY;CACpB,CAAC;AAEF,MAAM,UAAU,GAAG,2BAAM,CAAC,GAAG,CAA4B;gBACzC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;WACtB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;;CAE3B,CAAC;AAEF,MAAM,iBAAiB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;CAInC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAA8B,EAAE,EAAE;IAC3D,OAAO,CACL,8BAAC,iBAAiB;QAChB,8BAAC,UAAU,IAAC,EAAE,EAA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