Skip to content

Commit f550707

Browse files
authored
Merge pull request #263 from contentauth/remove-js-sandboxes
Remove some legacy JS examples and docs
2 parents 159fd49 + edd699c commit f550707

File tree

12 files changed

+6
-119
lines changed

12 files changed

+6
-119
lines changed

docs/js-sdk/deprecation-notice.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:::warning Warning
2-
The legacy JavaScript library is deprecated and the repository has been renamed to [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy). The new JavaScript web library is now in the https://github.com/contentauth/c2pa-js repository. The old package will no longer be updated or supported.
2+
This is documentation for the deprecated legacy JavaScript library, [c2pa-js-legacy](https://github.com/contentauth/c2pa-js-legacy). This library will no longer be updated or supported.
33

4-
If you're starting a new application, use the new library instead.
4+
The new JavaScript web library is in the https://github.com/contentauth/c2pa-js repository. If you're starting a new application, use the new library instead.
55
:::

docs/js-sdk/examples/.gitkeep

Whitespace-only changes.

docs/js-sdk/examples/quickstart/.gitkeep

Whitespace-only changes.

docs/js-sdk/examples/view-manifest/.gitkeep

Whitespace-only changes.

docs/js-sdk/getting-started/quick-start.mdx

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can bring in the JavaScript library by using a content delivery network (CDN
3636

3737
The quickest way to get up and running is to use a CDN such as [jsDelivr](https://www.jsdelivr.com/). One of the big advantages of using a CDN is that it provides all the required static assets, so you don't have to host them. The CDN also delivers the files at the edge, which enables faster downloads to your users.
3838

39-
Static assets include the following, as seen in the config passed to [`createC2pa`](../../js-sdk/api/c2pa.createc2pa):
39+
For example:
4040

4141
```js
4242
const version = '0.24.2';
@@ -68,33 +68,3 @@ When loading via a package manager, the library needs access to two externally-h
6868
:::note
6969
Be sure to configure your server to send proper `Content-Type` headers for these files. For more information, see [Hosting](../guides/hosting).
7070
:::
71-
72-
Examples for common build systems are shown below. They are also available in the [c2pa-js-examples repository](https://github.com/contentauth/c2pa-js-examples).
73-
74-
import CodeBlock from '@theme/CodeBlock';
75-
import ViteExample from '!!raw-loader!../examples/quickstart/vite-main.ts';
76-
import RollupExample from '!!raw-loader!../examples/quickstart/rollup-main.ts';
77-
import WebPackExample from '!!raw-loader!../examples/quickstart/webpack-main.ts';
78-
79-
<Tabs lazy>
80-
<TabItem value="vite" label="Vite" default>
81-
82-
This example is from [c2pa-js-examples/minimal-ts-vite/](https://github.com/contentauth/c2pa-js-examples/blob/main/minimal-ts-vite/). To view and execute this example in a live [code sandbox](https://codesandbox.io/docs/learn/legacy-sandboxes/overview), see [Code Sandbox: Vite example](../guides/sandbox-qs-vite.mdx).
83-
84-
<CodeBlock language="ts">{ViteExample}</CodeBlock>
85-
</TabItem>
86-
87-
<TabItem value="rollup" label="Rollup">
88-
89-
This example is from [c2pa-js-examples/minimal-ts-rollup/](https://github.com/contentauth/c2pa-js-examples/blob/main/minimal-ts-rollup/). To view and execute this example in a live [code sandbox](https://codesandbox.io/docs/learn/legacy-sandboxes/overview), see [Code Sandbox: Rollup example](../guides/sandbox-qs-rollup.mdx).
90-
91-
<CodeBlock language="ts">{RollupExample}</CodeBlock>
92-
</TabItem>
93-
94-
<TabItem value="webpack" label="Webpack">
95-
96-
This example is from [c2pa-js-examples/minimal-ts-webpack/](https://github.com/contentauth/c2pa-js-examples/blob/main/minimal-ts-webpack/). To view and execute this example in a live [code sandbox](https://codesandbox.io/docs/learn/legacy-sandboxes/overview), see [Code Sandbox: Webpack example](../guides/sandbox-qs-webpack.mdx).
97-
98-
<CodeBlock language="ts">{WebPackExample}</CodeBlock>
99-
</TabItem>
100-
</Tabs>

docs/js-sdk/guides/examples.mdx

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,4 @@ JavaScript examples are in **[contentauth/c2pa-js-examples](https://github.com/c
1313
As noted in the [overview](../getting-started/overview#technologies-that-the-library-uses), the JavaScript library uses a number of modern JavaScript technologies such as WebAssembly (Wasm) and Web Workers. To understand the JavaScript examples, you should be familiar with these technologies, [TypeScript](https://www.typescriptlang.org/) and at least one bundler tool such as [Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/), or [Vite](https://vitejs.dev/).
1414
:::
1515

16-
Additionally, the JavaScript examples use TypeScript for type safety.
17-
18-
## Examples
19-
20-
| Example | Tooling | UI framework | Notes |
21-
| -------------------------------------------------------------------------------------------------- | ---------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------- |
22-
| [esm-imports](https://github.com/contentauth/c2pa-js/tree/main/examples/esm-imports) | None | None | The simplest example using vanilla JavaScript (ECMAScript). |
23-
| [minimal-ts-webpack](https://github.com/contentauth/c2pa-js/tree/main/examples/minimal-ts-webpack) | [Webpack](https://webpack.js.org/) | None | Uses TypeScript. |
24-
| [minimal-ts-rollup](https://github.com/contentauth/c2pa-js/tree/main/examples/minimal-ts-rollup) | [Rollup](https://rollupjs.org/) | None | Uses TypeScript. |
25-
| [minimal-ts-vite](https://github.com/contentauth/c2pa-js/tree/main/examples/minimal-ts-vite) | [Vite](https://vitejs.dev/) | None | Uses TypeScript.<br/>Includes multiple examples; see [below](#examples-in-minimal-ts-vite). |
26-
| [react-ts-vite](https://github.com/contentauth/c2pa-js/tree/main/examples/react-ts-vite) | [Vite](https://vitejs.dev/) | [React](https://react.dev/) | Uses TypeScript. |
27-
28-
### Minimal-ts-vite examples
29-
30-
The `minimal-ts-vite` example directory contains these examples:
31-
32-
- active-manifest: Displays a simple table with info on the active manifest.
33-
- cdn: Illustrates loading the JavaScript library from a content delivery network (CDN).
34-
- check-provenance: Illustrates how to determine whether asset files have provenance.
35-
- quick-start: Dumps the manifest store and active manifest to the JavaScript developer console.
36-
- web-components: Displays a test image with the Content Credentials pin, using c2pa-wc
16+
Additionally, the JavaScript examples use TypeScript for type safety. |

docs/js-sdk/guides/sandbox-qs-rollup.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/js-sdk/guides/sandbox-qs-vite.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/js-sdk/guides/sandbox-qs-webpack.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/js-sdk/guides/sandbox-view-manifest.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)