Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { TEAL } from "@/lib/theme";
import { BrandMark } from "../shared/BrandMark";
import { type StructuredSection, StructuredSections } from "../shared/StructuredSections";
import { DataSourceNearbyTransit } from "./DataSourceNearbyTransit";
import { useDataSourceI18nResolver } from "./useDataSourceI18nResolver.js";
import { useDataSourceI18nResolver } from "./useDataSourceI18nResolver";

/** Section header config per data source type. */
const SOURCE_HEADERS: Record<string, { icon: ReactNode; titleKey: string }> = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ vi.mock("@/lib/frameworkStringsContext", () => ({
}) satisfies LocaleStrings,
}));

import { useDataSourceI18nResolver } from "../useDataSourceI18nResolver.js";
import { useDataSourceI18nResolver } from "../useDataSourceI18nResolver";

describe("useDataSourceI18nResolver", () => {
it("resolves an integration-scoped token via the matching integration", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BoundingBox, LngLat, OsmFilter } from "@openmapx/core";
import type { Attribution } from "@openmapx/mobility-core/attribution";
import type { MobilityResult } from "@openmapx/mobility-core/result";
import type { I18nToken, Translatable } from "../../strings/index.js";
import type { I18nToken, Translatable } from "../../strings/index";

export interface DataSourceAttribution {
text: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-framework/src/loader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LocaleStrings } from "../strings/index.js";
import type { LocaleStrings } from "../strings/index";
import type { CustomHealthCheckFn } from "./context";
import type { IntegrationManifest } from "./manifest";

Expand Down
8 changes: 4 additions & 4 deletions packages/integration-framework/strings/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export { type ResolveOptions, resolveToken } from "./src/resolver.js";
export { sharedStrings, sharedT, token } from "./src/token.js";
export type { I18nToken, LocaleCatalog, LocaleStrings, Translatable } from "./src/types.js";
export { type ResolveOptions, resolveToken } from "./src/resolver";
export { sharedStrings, sharedT, token } from "./src/token";
export type { I18nToken, LocaleCatalog, LocaleStrings, Translatable } from "./src/types";

/**
* Runtime check for whether a value is an `I18nToken`. Used by the client
* resolver to decide between translating a token and rendering a passthrough
* `string | number` value.
*/
export function isI18nToken(value: unknown): value is import("./src/types.js").I18nToken {
export function isI18nToken(value: unknown): value is import("./src/types").I18nToken {
return (
typeof value === "object" &&
value !== null &&
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-framework/strings/src/resolver.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IntlMessageFormat } from "intl-messageformat";
import type { I18nToken, LocaleStrings } from "./types.js";
import type { I18nToken, LocaleStrings } from "./types";

export interface ResolveOptions {
/** Active locale (e.g. "en", "de"). */
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-framework/strings/src/token.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import deShared from "../locales/de.json" with { type: "json" };
import enShared from "../locales/en.json" with { type: "json" };
import type { I18nToken, LocaleStrings } from "./types.js";
import type { I18nToken, LocaleStrings } from "./types";

/**
* The framework's shared-vocabulary catalog. Indexed by locale code; each
Expand Down
Loading