* build(deps-dev): bump eslint from 8.57.1 to 9.13.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.13.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.57.1...v9.13.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Upgrade EsLint * Fix all new lint errors --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dolan Miu <dolan_miu@hotmail.com>
26 lines
789 B
TypeScript
26 lines
789 B
TypeScript
import { IMediaData } from "@file/media";
|
|
import { BuilderElement, XmlComponent } from "@file/xml-components";
|
|
|
|
import { createExtentionList } from "./blip-extentions";
|
|
|
|
type BlipAttributes = {
|
|
readonly embed: string;
|
|
readonly cstate: string;
|
|
};
|
|
|
|
export const createBlip = (mediaData: IMediaData): XmlComponent =>
|
|
new BuilderElement<BlipAttributes>({
|
|
name: "a:blip",
|
|
attributes: {
|
|
embed: {
|
|
key: "r:embed",
|
|
value: `rId{${mediaData.type === "svg" ? mediaData.fallback.fileName : mediaData.fileName}}`,
|
|
},
|
|
cstate: {
|
|
key: "cstate",
|
|
value: "none",
|
|
},
|
|
},
|
|
children: mediaData.type === "svg" ? [createExtentionList(mediaData)] : [],
|
|
});
|