Skip to content
Open
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
node_modules

# Build artifacts
dist/
packages/react/dist
examples/minimal-ts-webpack/dist
tools/testing/dist
build.tar.gz

# TypeScript cache
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rush install
Build all packages:
```
rush build
./make-UI-compatible.sh
```

To run an individual package's `package.json` commands, use the `rushx` command from within that package's directory, e.g.:
Expand Down
1 change: 1 addition & 0 deletions make-UI-compatible.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sed -i '' 's|\"production\"!==process.env.NODE_ENV|true|g' ./packages/c2pa-wc/dist/components/Popover/popover.js
1 change: 1 addition & 0 deletions packages/c2pa-wc/dist/06170432.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const e=e=>n=>"function"==typeof n?((e,n)=>(window.customElements.define(e,n),n))(e,n):((e,n)=>{const{kind:t,elements:i}=n;return{kind:t,elements:i,finisher(n){window.customElements.define(e,n)}}})(e,n);export{e as n};
1 change: 1 addition & 0 deletions packages/c2pa-wc/dist/12d8f3c3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import{e as t}from"./b803f408.js";function r(r){return t({...r,state:!0})}export{r as t};
1 change: 1 addition & 0 deletions packages/c2pa-wc/dist/b803f408.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions packages/c2pa-wc/dist/badge.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Copyright 2022 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
import { L2Ingredient, L2ManifestStore } from 'c2pa';
import { Badge } from './components/Thumbnail';
export declare function getBadgeFromManifestStore(manifestStore?: L2ManifestStore | null): Badge;
export declare function getBadgeFromIngredient(ingredient: L2Ingredient): Badge;
1 change: 1 addition & 0 deletions packages/c2pa-wc/dist/badge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
function r(r){if(!r.hasManifest)return"none";switch(r.error){case"otgp":return"missing";case"error":return"alert";default:return"info"}}export{r as getBadgeFromIngredient};
30 changes: 30 additions & 0 deletions packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Copyright 2022 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
import { LitElement } from 'lit';
import '../Thumbnail';
import '../PanelSection';
declare global {
interface HTMLElementTagNameMap {
'cai-assets-used-dm-plugin': AssetsUsed;
}
namespace JSX {
interface IntrinsicElements {
'cai-assets-used-dm-plugin': any;
}
}
}
export interface AssetsUsedConfig {
stringMap: Record<string, string>;
}
declare const AssetsUsed_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface<Record<string, any>>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface<unknown>) & typeof LitElement;
export declare class AssetsUsed extends AssetsUsed_base {
static get styles(): import("lit").CSSResult[];
render(): import("lit-html").TemplateResult<2 | 1>;
}
export {};
26 changes: 26 additions & 0 deletions packages/c2pa-wc/dist/components/AssetsUsed/AssetsUsed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import{__decorate as o}from"../../b803f408.js";import{r as s,$ as i,s as t}from"../../e4c0417e.js";import{n as e}from"../../06170432.js";import{defaultStyles as r,baseSectionStyles as n}from"../../styles.js";import{getBadgeFromIngredient as l}from"../../badge.js";import{ConfigurablePanelSection as c}from"../../mixins/configurablePanelSection.js";import"../Thumbnail/Thumbnail.js";import"../PanelSection/PanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../../icons/monochrome/broken-image.js";import"../../icons/color/info.js";import"../../icons/color/alert.js";import"../../icons/color/missing.js";const a={stringMap:{"assets-used.header":"Assets used","assets-used.helpText":"Any assets used or added to this content"}};let m=class extends(c(t,{dataSelector:o=>o.ingredients,isEmpty:o=>!o.length,config:a})){static get styles(){return[r,n,s`
.section-assets-used-dm-plugin {
--cai-thumbnail-size: 48px;
display: grid;
color: blue;
grid-template-columns: repeat(
auto-fill,
var(--cai-thumbnail-size, 48px)
);
grid-gap: 10px;
text-align: left;
}
`]}render(){var o;return this.renderSection(i` <cai-panel-section-dm-plugin
header=${this._config.stringMap["assets-used.header"]}
helpText=${this._config.stringMap["assets-used.helpText"]}
>
<div class="section-assets-used-dm-plugin">
${null===(o=this._data)||void 0===o?void 0:o.map((o=>i`
<cai-thumbnail-dm-plugin
class="section-assets-used-thumbnail-dm-plugin"
src=${o.thumbnail}
badge=${l(o)}
></cai-thumbnail-dm-plugin>
`))}
</div>
</cai-panel-section-dm-plugin>`)}};m=o([e("cai-assets-used-dm-plugin")],m);
9 changes: 9 additions & 0 deletions packages/c2pa-wc/dist/components/AssetsUsed/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Copyright 2022 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
export * from './AssetsUsed';
1 change: 1 addition & 0 deletions packages/c2pa-wc/dist/components/AssetsUsed/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright 2023 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
import { LitElement } from 'lit';
import '../../../assets/svg/monochrome/generic-info.svg';
import '../Icon';
import '../PanelSection';
declare global {
interface HTMLElementTagNameMap {
'cai-content-summary-dm-plugin': ContentSummary;
}
namespace JSX {
interface IntrinsicElements {
'cai-content-summary-dm-plugin': any;
}
}
}
export interface ContentSummaryConfig {
stringMap: Record<string, string>;
}
declare const ContentSummary_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface<Record<string, any>>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface<import("c2pa").GenerativeInfo[] | null>) & typeof LitElement;
export declare class ContentSummary extends ContentSummary_base {
static get styles(): import("lit").CSSResult[];
render(): import("lit-html").TemplateResult<2 | 1>;
}
export {};
21 changes: 21 additions & 0 deletions packages/c2pa-wc/dist/components/ContentSummary/ContentSummary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import{__decorate as o}from"../../b803f408.js";import{s as i,r as n,$ as t}from"../../e4c0417e.js";import{n as s}from"../../06170432.js";import{ConfigurablePanelSection as e}from"../../mixins/configurablePanelSection.js";import{defaultStyles as r,baseSectionStyles as c}from"../../styles.js";import"../../icons/monochrome/generic-info.js";import"../Icon/Icon.js";import"../PanelSection/PanelSection.js";import"../../mixins/configurable.js";import"../../12d8f3c3.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";import"../Tooltip/Tooltip.js";import"../Popover/Popover.js";import"../../icons/monochrome/help.js";const m={stringMap:{"content-summary.header":"Content summary","content-summary.content.aiGenerated":"This content was generated with an AI tool."}};let l=class extends(e(i,{dataSelector:o=>null==o?void 0:o.generativeInfo,config:m})){static get styles(){return[r,c,n`
.section-process-content-dm-plugin {
display: flex;
align-items: center;
}
.section-icon-content-dm-plugin {
display: flex;
align-items: flex-start;
gap: var(--cai-icon-spacing, 8px);
}
`]}render(){return this.renderSection(t`<cai-panel-section-dm-plugin
header=${this._config.stringMap["content-summary.header"]}
helpText=${this._config.stringMap["content-summary.helpText"]}
>
<div class="section-icon-content-dm-plugin">
<cai-icon-generic-info-dm-plugin></cai-icon-generic-info-dm-plugin>
<span>
${this._config.stringMap["content-summary.content.aiGenerated"]}
</span>
</div>
</cai-panel-section-dm-plugin>`)}};l=o([s("cai-content-summary-dm-plugin")],l);
9 changes: 9 additions & 0 deletions packages/c2pa-wc/dist/components/ContentSummary/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Copyright 2023 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
export * from './ContentSummary';
1 change: 1 addition & 0 deletions packages/c2pa-wc/dist/components/ContentSummary/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* Copyright 2022 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
import { LitElement } from 'lit';
import '../PanelSection';
declare global {
interface HTMLElementTagNameMap {
'cai-edits-and-activity-dm-plugin': EditsAndActivity;
}
namespace JSX {
interface IntrinsicElements {
'cai-edits-and-activity-dm-plugin': any;
}
}
}
export interface EditsAndActivityConfig {
stringMap: Record<string, string>;
showDescriptions: boolean;
}
declare const EditsAndActivity_base: (new (...args: any[]) => import("../../mixins/configurable").ConfigurableInterface<Record<string, any>>) & (new (...args: any[]) => import("../../mixins/panelSection").PanelSectionInterface<unknown>) & typeof LitElement;
export declare class EditsAndActivity extends EditsAndActivity_base {
static get styles(): import("lit").CSSResult[];
render(): import("lit-html").TemplateResult<2 | 1>;
}
export {};
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import{__decorate as i}from"../../b803f408.js";import{s as t,r as o,$ as s}from"../../e4c0417e.js";import{n}from"../../06170432.js";import{o as e}from"../Popover/Popover.js";import{defaultStyles as c,baseSectionStyles as l}from"../../styles.js";import{ConfigurablePanelSection as a}from"../../mixins/configurablePanelSection.js";import"../PanelSection/PanelSection.js";import"../../12d8f3c3.js";import"../../icons/monochrome/help.js";import"../../mixins/configurable.js";import"../../utils.js";import"../../mixins/panelSection.js";import"../Tooltip/Tooltip.js";import"../Icon/Icon.js";import"../../icons/color/logos/adobe-stock.js";import"../../icons/color/logos/adobe.js";import"../../icons/color/logos/behance.js";import"../../icons/color/logos/cai.js";import"../../icons/color/logos/facebook.js";import"../../icons/color/logos/instagram.js";import"../../icons/color/logos/lightroom.js";import"../../icons/color/logos/photoshop.js";import"../../icons/color/logos/truepic.js";import"../../icons/color/logos/twitter.js";const d={stringMap:{"edits-and-activity.header":"Edits and activity","edits-and-activity.helpText":"Changes and actions taken to produce this content"},showDescriptions:!1};let r=class extends(a(t,{dataSelector:i=>i.editsAndActivity,isEmpty:i=>!(null==i?void 0:i.length),config:d})){static get styles(){return[c,l,o`
.section-edits-and-activity-content-dm-plugin {
display: flex;
flex-direction: column;
}

.section-edits-and-activity-list-dm-plugin {
display: flex;
flex-direction: column;
gap: var(--cai-edits-and-activity-item-spacing, 6px);
list-style: none;
padding: 0;
margin: 0;
overflow: hidden;
}

.section-edits-and-activity-list-item-term-dm-plugin {
display: flex;
align-items: center;
}

.section-edits-and-activity-list-item-icon-dm-plugin {
margin-right: 8px;
width: 16px;
}

.section-edits-and-activity-list-item-label-dm-plugin {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.section-edits-and-activity-list-item-description-dm-plugin {
color: var(--cai-secondary-color);
margin-left: 0px;
}

.section-edits-and-activity-list-item-description-dm-plugin.has-icon {
margin-left: 24px;
}
`]}render(){var i;return this.renderSection(s`
<cai-panel-section-dm-plugin
header=${this._config.stringMap["edits-and-activity.header"]}
helpText=${this._config.stringMap["edits-and-activity.helpText"]}
>
<dl class="section-edits-and-activity-list-dm-plugin">
${null===(i=this._data)||void 0===i?void 0:i.map((({icon:i,label:t,description:o})=>s`
<div class="section-edits-and-activity-list-item-dm-plugin">
<dt class="section-edits-and-activity-list-item-term-dm-plugin">
${i?s`<img
class="section-edits-and-activity-list-item-icon-dm-plugin"
src=${i}
alt=${t}
/>`:null}
<span
class="section-edits-and-activity-list-item-label-dm-plugin"
>
${t}
</span>
</dt>
${this._config.showDescriptions?s`
<dd
class=${e({"section-edits-and-activity-list-item-description-dm-plugin":!0,"has-icon":!!i})}
>
${o}
</dd>
`:null}
</div>
`))}
</dl>
</cai-panel-section-dm-plugin>
`)}};r=i([n("cai-edits-and-activity-dm-plugin")],r);
9 changes: 9 additions & 0 deletions packages/c2pa-wc/dist/components/EditsAndActivity/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* Copyright 2022 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
export * from './EditsAndActivity';
1 change: 1 addition & 0 deletions packages/c2pa-wc/dist/components/EditsAndActivity/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions packages/c2pa-wc/dist/components/Icon/Icon.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Copyright 2022 Adobe
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it.
*/
import { LitElement, nothing, TemplateResult } from 'lit';
import '../../../assets/svg/color/logos/adobe-stock.svg';
import '../../../assets/svg/color/logos/adobe.svg';
import '../../../assets/svg/color/logos/behance.svg';
import '../../../assets/svg/color/logos/cai.svg';
import '../../../assets/svg/color/logos/facebook.svg';
import '../../../assets/svg/color/logos/instagram.svg';
import '../../../assets/svg/color/logos/lightroom.svg';
import '../../../assets/svg/color/logos/photoshop.svg';
import '../../../assets/svg/color/logos/truepic.svg';
import '../../../assets/svg/color/logos/twitter.svg';
declare global {
interface HTMLElementTagNameMap {
'cai-icon': Icon;
}
namespace JSX {
interface IntrinsicElements {
'cai-icon': any;
}
}
}
export declare class Icon extends LitElement {
source: string;
static readonly matchers: {
pattern: RegExp;
icon: TemplateResult<1>;
}[];
protected icon: TemplateResult | undefined;
updated(changedProperties: any): void;
static get styles(): import("lit").CSSResult[];
render(): TemplateResult<1> | typeof nothing;
}
Loading