Skip to content

Commit

Permalink
feat(translation): expose translation context in loader packages
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 999367c734463750ce6c04a1cce052be38b35241
  • Loading branch information
IcaroG authored and actions-user committed Dec 16, 2024
1 parent 77eecc5 commit 41745fe
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/loader-nextjs/api/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { PlasmicComponentLoader } from '@plasmicapp/loader-react';
import { plasmicPrepass } from '@plasmicapp/loader-react';
import { PlasmicRootProvider as PlasmicRootProvider_2 } from '@plasmicapp/loader-react';
import { PlasmicTranslator } from '@plasmicapp/loader-react';
import { PlasmicTranslatorContext } from '@plasmicapp/loader-react';
import { PropType } from '@plasmicapp/loader-react';
import * as React_2 from 'react';
import { repeatedElement } from '@plasmicapp/loader-react';
Expand Down Expand Up @@ -123,6 +124,8 @@ export function PlasmicRootProvider(props: Omit<React_2.ComponentProps<typeof Pl

export { PlasmicTranslator }

export { PlasmicTranslatorContext }

export { PropType }

export { repeatedElement }
Expand Down
1 change: 1 addition & 0 deletions packages/loader-nextjs/api/react-server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { PlasmicComponentLoader as PlasmicComponentLoader_2 } from '@plasmicapp/
import { plasmicPrepass } from '@plasmicapp/loader-react';
import { PlasmicRootProvider as PlasmicRootProvider_2 } from '@plasmicapp/loader-react';
import { PlasmicTranslator } from '@plasmicapp/loader-react';
import { PlasmicTranslatorContext } from '@plasmicapp/loader-react';
import { PropType } from '@plasmicapp/loader-react';
import { default as React_2 } from 'react';
import * as React_3 from 'react';
Expand Down
1 change: 1 addition & 0 deletions packages/loader-nextjs/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export {
PlasmicCanvasContext,
PlasmicCanvasHost,
PlasmicComponent,
PlasmicTranslatorContext,
plasmicPrepass,
repeatedElement,
useDataEnv,
Expand Down
3 changes: 3 additions & 0 deletions packages/loader-react/api/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { PlasmicCanvasHost } from '@plasmicapp/host';
import { PlasmicDataSourceContextValue } from '@plasmicapp/data-sources-context';
import { PlasmicModulesFetcher } from '@plasmicapp/loader-core';
import { PlasmicTracker } from '@plasmicapp/loader-core';
import { PlasmicTranslatorContext } from '@plasmicapp/host';
import { PropType } from '@plasmicapp/host';
import { react } from 'react';
import * as React_2 from 'react';
Expand Down Expand Up @@ -292,6 +293,8 @@ export type PlasmicTranslator = (str: string, opts?: {
};
}) => React_2.ReactNode;

export { PlasmicTranslatorContext }

export { PropType }

// @public (undocumented)
Expand Down
4 changes: 2 additions & 2 deletions packages/loader-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export {
PageParamsProvider,
PlasmicCanvasContext,
PlasmicCanvasHost,
PlasmicTranslatorContext,
repeatedElement,
useDataEnv,
usePlasmicCanvasContext,
Expand All @@ -38,9 +39,8 @@ export {
export * from "./shared-exports";
export { usePlasmicComponent } from "./usePlasmicComponent";
export type { ComponentLookupSpec } from "./utils";
export type { CodeComponentMeta };
export type { FetchComponentDataOpts };
export { InternalPlasmicComponentLoader, PlasmicComponentLoader };
export type { CodeComponentMeta, FetchComponentDataOpts };

export function initPlasmicLoader(opts: InitOptions): PlasmicComponentLoader {
const internal = new InternalPlasmicComponentLoader(opts);
Expand Down

0 comments on commit 41745fe

Please sign in to comment.