@shopify/react-native-skia 0.1.221 → 0.1.223
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/RNSkAndroidView.h +3 -0
- package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp +1 -0
- package/android/cpp/rnskia-android/SkiaOpenGLHelper.h +0 -1
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.h +46 -6
- package/android/src/main/java/com/shopify/reactnative/skia/PlatformContext.java +3 -3
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +8 -14
- package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +93 -105
- package/cpp/api/JsiSkApi.h +5 -0
- package/cpp/api/JsiSkFontMgrFactory.h +9 -4
- package/cpp/api/JsiSkParagraph.h +135 -0
- package/cpp/api/JsiSkParagraphBuilder.h +159 -0
- package/cpp/api/JsiSkParagraphStyle.h +124 -0
- package/cpp/api/JsiSkStrutStyle.h +96 -0
- package/cpp/api/JsiSkTextStyle.h +185 -0
- package/cpp/jsi/JsiHostObject.h +21 -0
- package/cpp/rnskia/dom/JsiDomApi.h +4 -0
- package/cpp/rnskia/dom/nodes/JsiParagraphNode.h +62 -0
- package/cpp/rnskia/dom/props/ParagraphProp.h +45 -0
- package/cpp/skia/modules/skunicode/include/SkUnicode.h +312 -0
- package/cpp/skia/src/base/SkTInternalLList.h +304 -0
- package/cpp/skia/src/base/SkUTF.h +95 -0
- package/cpp/skia/src/core/SkLRUCache.h +130 -0
- package/cpp/utils/RNSkLog.h +3 -3
- package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +2 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +7 -0
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/ParagraphNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/ParagraphNode.js +41 -0
- package/lib/commonjs/dom/nodes/drawings/ParagraphNode.js.map +1 -0
- package/lib/commonjs/dom/types/NodeType.d.ts +2 -1
- package/lib/commonjs/dom/types/NodeType.js +1 -0
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/dom/types/Paragraph.d.ts +8 -0
- package/lib/commonjs/dom/types/Paragraph.js +6 -0
- package/lib/commonjs/dom/types/Paragraph.js.map +1 -0
- package/lib/commonjs/dom/types/SkDOM.d.ts +2 -0
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/dom/types/index.d.ts +1 -0
- package/lib/commonjs/dom/types/index.js +13 -0
- package/lib/commonjs/dom/types/index.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +3 -1
- package/lib/commonjs/renderer/HostComponents.js +4 -0
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/components/index.d.ts +1 -0
- package/lib/commonjs/renderer/components/index.js +13 -0
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/renderer/components/paragraph/Paragraph.d.ts +4 -0
- package/lib/commonjs/renderer/components/paragraph/Paragraph.js +17 -0
- package/lib/commonjs/renderer/components/paragraph/Paragraph.js.map +1 -0
- package/lib/commonjs/renderer/components/paragraph/index.d.ts +1 -0
- package/lib/commonjs/renderer/components/paragraph/index.js +19 -0
- package/lib/commonjs/renderer/components/paragraph/index.js.map +1 -0
- package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +56 -0
- package/lib/commonjs/skia/types/Paragraph/Paragraph.js +6 -0
- package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -0
- package/lib/commonjs/skia/types/Paragraph/ParagraphBuilder.d.ts +60 -0
- package/lib/commonjs/skia/types/Paragraph/ParagraphBuilder.js +18 -0
- package/lib/commonjs/skia/types/Paragraph/ParagraphBuilder.js.map +1 -0
- package/lib/commonjs/skia/types/Paragraph/ParagraphStyle.d.ts +41 -0
- package/lib/commonjs/skia/types/Paragraph/ParagraphStyle.js +36 -0
- package/lib/commonjs/skia/types/Paragraph/ParagraphStyle.js.map +1 -0
- package/lib/commonjs/skia/types/Paragraph/TextStyle.d.ts +62 -0
- package/lib/commonjs/skia/types/Paragraph/TextStyle.js +35 -0
- package/lib/commonjs/skia/types/Paragraph/TextStyle.js.map +1 -0
- package/lib/commonjs/skia/types/Paragraph/index.d.ts +6 -0
- package/lib/commonjs/skia/types/Paragraph/index.js +84 -0
- package/lib/commonjs/skia/types/Paragraph/index.js.map +1 -0
- package/lib/commonjs/skia/types/Skia.d.ts +2 -0
- package/lib/commonjs/skia/types/Skia.js.map +1 -1
- package/lib/commonjs/skia/types/index.d.ts +1 -0
- package/lib/commonjs/skia/types/index.js +13 -0
- package/lib/commonjs/skia/types/index.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.js +0 -6
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +16 -0
- package/lib/commonjs/skia/web/JsiSkParagraph.js +91 -0
- package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkParagraphBuilder.d.ts +15 -0
- package/lib/commonjs/skia/web/JsiSkParagraphBuilder.js +85 -0
- package/lib/commonjs/skia/web/JsiSkParagraphBuilder.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.d.ts +8 -0
- package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +34 -0
- package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkParagraphStyle.d.ts +5 -0
- package/lib/commonjs/skia/web/JsiSkParagraphStyle.js +59 -0
- package/lib/commonjs/skia/web/JsiSkParagraphStyle.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextStyle.d.ts +5 -0
- package/lib/commonjs/skia/web/JsiSkTextStyle.js +54 -0
- package/lib/commonjs/skia/web/JsiSkTextStyle.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkia.js +4 -1
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.d.ts +2 -0
- package/lib/module/dom/nodes/JsiSkDOM.js +6 -0
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/drawings/ParagraphNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/ParagraphNode.js +30 -0
- package/lib/module/dom/nodes/drawings/ParagraphNode.js.map +1 -0
- package/lib/module/dom/types/NodeType.d.ts +2 -1
- package/lib/module/dom/types/NodeType.js +1 -0
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/dom/types/Paragraph.d.ts +8 -0
- package/lib/module/dom/types/Paragraph.js +2 -0
- package/lib/module/dom/types/Paragraph.js.map +1 -0
- package/lib/module/dom/types/SkDOM.d.ts +2 -0
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/dom/types/index.d.ts +1 -0
- package/lib/module/dom/types/index.js +1 -0
- package/lib/module/dom/types/index.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +3 -1
- package/lib/module/renderer/HostComponents.js +4 -0
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/components/index.d.ts +1 -0
- package/lib/module/renderer/components/index.js +1 -0
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/renderer/components/paragraph/Paragraph.d.ts +4 -0
- package/lib/module/renderer/components/paragraph/Paragraph.js +5 -0
- package/lib/module/renderer/components/paragraph/Paragraph.js.map +1 -0
- package/lib/module/renderer/components/paragraph/index.d.ts +1 -0
- package/lib/module/renderer/components/paragraph/index.js +2 -0
- package/lib/module/renderer/components/paragraph/index.js.map +1 -0
- package/lib/module/skia/types/Paragraph/Paragraph.d.ts +56 -0
- package/lib/module/skia/types/Paragraph/Paragraph.js +2 -0
- package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -0
- package/lib/module/skia/types/Paragraph/ParagraphBuilder.d.ts +60 -0
- package/lib/module/skia/types/Paragraph/ParagraphBuilder.js +11 -0
- package/lib/module/skia/types/Paragraph/ParagraphBuilder.js.map +1 -0
- package/lib/module/skia/types/Paragraph/ParagraphStyle.d.ts +41 -0
- package/lib/module/skia/types/Paragraph/ParagraphStyle.js +27 -0
- package/lib/module/skia/types/Paragraph/ParagraphStyle.js.map +1 -0
- package/lib/module/skia/types/Paragraph/TextStyle.d.ts +62 -0
- package/lib/module/skia/types/Paragraph/TextStyle.js +26 -0
- package/lib/module/skia/types/Paragraph/TextStyle.js.map +1 -0
- package/lib/module/skia/types/Paragraph/index.d.ts +6 -0
- package/lib/module/skia/types/Paragraph/index.js +7 -0
- package/lib/module/skia/types/Paragraph/index.js.map +1 -0
- package/lib/module/skia/types/Skia.d.ts +2 -0
- package/lib/module/skia/types/Skia.js.map +1 -1
- package/lib/module/skia/types/index.d.ts +1 -0
- package/lib/module/skia/types/index.js +1 -0
- package/lib/module/skia/types/index.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.js +0 -6
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraph.d.ts +16 -0
- package/lib/module/skia/web/JsiSkParagraph.js +81 -0
- package/lib/module/skia/web/JsiSkParagraph.js.map +1 -0
- package/lib/module/skia/web/JsiSkParagraphBuilder.d.ts +15 -0
- package/lib/module/skia/web/JsiSkParagraphBuilder.js +73 -0
- package/lib/module/skia/web/JsiSkParagraphBuilder.js.map +1 -0
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.d.ts +8 -0
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +21 -0
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkParagraphStyle.d.ts +5 -0
- package/lib/module/skia/web/JsiSkParagraphStyle.js +49 -0
- package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextStyle.d.ts +5 -0
- package/lib/module/skia/web/JsiSkTextStyle.js +45 -0
- package/lib/module/skia/web/JsiSkTextStyle.js.map +1 -0
- package/lib/module/skia/web/JsiSkia.js +3 -1
- package/lib/module/skia/web/JsiSkia.js.map +1 -1
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +2 -0
- package/lib/typescript/src/dom/nodes/drawings/ParagraphNode.d.ts +8 -0
- package/lib/typescript/src/dom/types/NodeType.d.ts +2 -1
- package/lib/typescript/src/dom/types/Paragraph.d.ts +8 -0
- package/lib/typescript/src/dom/types/SkDOM.d.ts +2 -0
- package/lib/typescript/src/dom/types/index.d.ts +1 -0
- package/lib/typescript/src/renderer/HostComponents.d.ts +3 -1
- package/lib/typescript/src/renderer/components/index.d.ts +1 -0
- package/lib/typescript/src/renderer/components/paragraph/Paragraph.d.ts +4 -0
- package/lib/typescript/src/renderer/components/paragraph/index.d.ts +1 -0
- package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +56 -0
- package/lib/typescript/src/skia/types/Paragraph/ParagraphBuilder.d.ts +60 -0
- package/lib/typescript/src/skia/types/Paragraph/ParagraphStyle.d.ts +41 -0
- package/lib/typescript/src/skia/types/Paragraph/TextStyle.d.ts +62 -0
- package/lib/typescript/src/skia/types/Paragraph/index.d.ts +6 -0
- package/lib/typescript/src/skia/types/Skia.d.ts +2 -0
- package/lib/typescript/src/skia/types/index.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkParagraphBuilder.d.ts +15 -0
- package/lib/typescript/src/skia/web/JsiSkParagraphBuilderFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkParagraphStyle.d.ts +5 -0
- package/lib/typescript/src/skia/web/JsiSkTextStyle.d.ts +5 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/Info.plist +5 -5
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/Info.plist +5 -5
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +1 -1
- package/src/dom/nodes/JsiSkDOM.ts +9 -0
- package/src/dom/nodes/drawings/ParagraphNode.ts +22 -0
- package/src/dom/types/NodeType.ts +3 -0
- package/src/dom/types/Paragraph.ts +10 -0
- package/src/dom/types/SkDOM.ts +4 -0
- package/src/dom/types/index.ts +1 -0
- package/src/renderer/HostComponents.ts +10 -0
- package/src/renderer/components/index.ts +2 -0
- package/src/renderer/components/paragraph/Paragraph.tsx +8 -0
- package/src/renderer/components/paragraph/index.ts +1 -0
- package/src/skia/types/Paragraph/Paragraph.ts +59 -0
- package/src/skia/types/Paragraph/ParagraphBuilder.ts +96 -0
- package/src/skia/types/Paragraph/ParagraphStyle.ts +45 -0
- package/src/skia/types/Paragraph/TextStyle.ts +70 -0
- package/src/skia/types/Paragraph/index.ts +6 -0
- package/src/skia/types/Skia.ts +3 -0
- package/src/skia/types/index.ts +1 -0
- package/src/skia/web/JsiSkImage.ts +0 -6
- package/src/skia/web/JsiSkParagraph.ts +69 -0
- package/src/skia/web/JsiSkParagraphBuilder.ts +99 -0
- package/src/skia/web/JsiSkParagraphBuilderFactory.ts +42 -0
- package/src/skia/web/JsiSkParagraphStyle.ts +65 -0
- package/src/skia/web/JsiSkTextStyle.ts +53 -0
- package/src/skia/web/JsiSkia.ts +2 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["ckEnum","getCkEnum","HostObject","JsiSkMatrix","JsiSkShader","toBase64String","bytes","Buffer","from","toString","CHUNK_SIZE","index","length","result","slice","Math","min","String","fromCharCode","apply","btoa","JsiSkImage","constructor","CanvasKit","ref","delete","height","width","getImageInfo","info","colorType","value","alphaType","makeShaderOptions","tx","ty","fm","mm","localMatrix","fromValue","undefined","makeShaderCubic","B","C","encodeToBytes","fmt","quality","Error","encodeToBase64","readPixels","srcX","srcY","imageInfo","
|
1
|
+
{"version":3,"names":["ckEnum","getCkEnum","HostObject","JsiSkMatrix","JsiSkShader","toBase64String","bytes","Buffer","from","toString","CHUNK_SIZE","index","length","result","slice","Math","min","String","fromCharCode","apply","btoa","JsiSkImage","constructor","CanvasKit","ref","delete","height","width","getImageInfo","info","colorType","value","alphaType","makeShaderOptions","tx","ty","fm","mm","localMatrix","fromValue","undefined","makeShaderCubic","B","C","encodeToBytes","fmt","quality","Error","encodeToBase64","readPixels","srcX","srcY","imageInfo","pxInfo","colorSpace","ColorSpace","SRGB","AlphaType","ColorType","makeNonTextureImage","MakeImageFromEncoded"],"sources":["JsiSkImage.ts"],"sourcesContent":["import type {\n CanvasKit,\n ImageInfo as CKImageInfo,\n Image,\n} from \"canvaskit-wasm\";\n\nimport type {\n FilterMode,\n MipmapMode,\n SkImage,\n SkMatrix,\n SkShader,\n TileMode,\n ImageFormat,\n ImageInfo,\n} from \"../types\";\n\nimport { ckEnum, getCkEnum, HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\n// https://github.com/google/skia/blob/1f193df9b393d50da39570dab77a0bb5d28ec8ef/modules/canvaskit/htmlcanvas/util.js\nexport const toBase64String = (bytes: Uint8Array) => {\n if (typeof Buffer !== \"undefined\") {\n // Are we on node?\n return Buffer.from(bytes).toString(\"base64\");\n } else {\n // From https://stackoverflow.com/a/25644409\n // because the naive solution of\n // btoa(String.fromCharCode.apply(null, bytes));\n // would occasionally throw \"Maximum call stack size exceeded\"\n var CHUNK_SIZE = 0x8000; //arbitrary number\n var index = 0;\n var { length } = bytes;\n var result = \"\";\n var slice;\n while (index < length) {\n slice = bytes.slice(index, Math.min(index + CHUNK_SIZE, length));\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result += String.fromCharCode.apply(null, slice as any);\n index += CHUNK_SIZE;\n }\n return btoa(result);\n }\n};\n\nexport class JsiSkImage extends HostObject<Image, \"Image\"> implements SkImage {\n constructor(CanvasKit: CanvasKit, ref: Image) {\n super(CanvasKit, ref, \"Image\");\n }\n\n height() {\n return this.ref.height();\n }\n\n width() {\n return this.ref.width();\n }\n\n getImageInfo(): ImageInfo {\n const info = this.ref.getImageInfo();\n return {\n width: info.width,\n height: info.height,\n colorType: info.colorType.value,\n alphaType: info.alphaType.value,\n };\n }\n\n makeShaderOptions(\n tx: TileMode,\n ty: TileMode,\n fm: FilterMode,\n mm: MipmapMode,\n localMatrix?: SkMatrix\n ): SkShader {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderOptions(\n ckEnum(tx),\n ckEnum(ty),\n ckEnum(fm),\n ckEnum(mm),\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined\n )\n );\n }\n\n makeShaderCubic(\n tx: TileMode,\n ty: TileMode,\n B: number,\n C: number,\n localMatrix?: SkMatrix\n ): SkShader {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderCubic(\n ckEnum(tx),\n ckEnum(ty),\n B,\n C,\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined\n )\n );\n }\n\n encodeToBytes(fmt?: ImageFormat, quality?: number) {\n let result: Uint8Array | null;\n if (fmt && quality) {\n result = this.ref.encodeToBytes(ckEnum(fmt), quality);\n } else if (fmt) {\n result = this.ref.encodeToBytes(ckEnum(fmt));\n } else {\n result = this.ref.encodeToBytes();\n }\n if (!result) {\n throw new Error(\"encodeToBytes failed\");\n }\n return result;\n }\n\n encodeToBase64(fmt?: ImageFormat, quality?: number) {\n const bytes = this.encodeToBytes(fmt, quality);\n return toBase64String(bytes);\n }\n\n readPixels(srcX?: number, srcY?: number, imageInfo?: ImageInfo) {\n const info = this.getImageInfo();\n const pxInfo: CKImageInfo = {\n colorSpace: this.CanvasKit.ColorSpace.SRGB,\n width: imageInfo?.width ?? info.width,\n height: imageInfo?.height ?? info.height,\n alphaType: getCkEnum(\n this.CanvasKit.AlphaType,\n (imageInfo ?? info).alphaType\n ),\n colorType: getCkEnum(\n this.CanvasKit.ColorType,\n (imageInfo ?? info).colorType\n ),\n };\n return this.ref.readPixels(srcX ?? 0, srcY ?? 0, pxInfo);\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n makeNonTextureImage(): SkImage {\n return new JsiSkImage(\n this.CanvasKit,\n this.CanvasKit.MakeImageFromEncoded(this.encodeToBytes())!\n );\n }\n}\n"],"mappings":";;AAiBA,SAASA,MAAT,EAAiBC,SAAjB,EAA4BC,UAA5B,QAA8C,QAA9C;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,WAAT,QAA4B,eAA5B,C,CAEA;;AACA,OAAO,MAAMC,cAAc,GAAIC,KAAD,IAAuB;EACnD,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;IACjC;IACA,OAAOA,MAAM,CAACC,IAAP,CAAYF,KAAZ,EAAmBG,QAAnB,CAA4B,QAA5B,CAAP;EAC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anvasKit, Paragraph } from "canvaskit-wasm";
|
2
|
+
import type { SkRect, SkRectWithDirection, SkParagraph } from "../types";
|
3
|
+
import { HostObject } from "./Host";
|
4
|
+
import type { JsiSkCanvas } from "./JsiSkCanvas";
|
5
|
+
export declare class JsiSkParagraph extends HostObject<Paragraph, "Paragraph"> implements SkParagraph {
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: Paragraph);
|
7
|
+
layout(width: number): void;
|
8
|
+
paint(canvas: JsiSkCanvas, x: number, y: number): void;
|
9
|
+
getHeight(): number;
|
10
|
+
getMaxWidth(): number;
|
11
|
+
getGlyphPositionAtCoordinate(x: number, y: number): number;
|
12
|
+
getRectsForPlaceholders(): SkRectWithDirection[];
|
13
|
+
getRectsForRange(start: number, end: number): SkRect[];
|
14
|
+
getLineMetrics(): SkRect[];
|
15
|
+
dispose(): void;
|
16
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import { HostObject } from "./Host";
|
2
|
+
export class JsiSkParagraph extends HostObject {
|
3
|
+
constructor(CanvasKit, ref) {
|
4
|
+
super(CanvasKit, ref, "Paragraph");
|
5
|
+
}
|
6
|
+
|
7
|
+
layout(width) {
|
8
|
+
this.ref.layout(width);
|
9
|
+
}
|
10
|
+
|
11
|
+
paint(canvas, x, y) {
|
12
|
+
canvas.ref.drawParagraph(this.ref, x, y);
|
13
|
+
}
|
14
|
+
|
15
|
+
getHeight() {
|
16
|
+
return this.ref.getHeight();
|
17
|
+
}
|
18
|
+
|
19
|
+
getMaxWidth() {
|
20
|
+
return this.ref.getMaxWidth();
|
21
|
+
}
|
22
|
+
|
23
|
+
getGlyphPositionAtCoordinate(x, y) {
|
24
|
+
return this.ref.getGlyphPositionAtCoordinate(x, y).pos;
|
25
|
+
}
|
26
|
+
|
27
|
+
getRectsForPlaceholders() {
|
28
|
+
return this.ref.getRectsForPlaceholders().map(_ref => {
|
29
|
+
let {
|
30
|
+
rect,
|
31
|
+
dir
|
32
|
+
} = _ref;
|
33
|
+
return {
|
34
|
+
rect: {
|
35
|
+
x: rect.at(0),
|
36
|
+
y: rect.at(1),
|
37
|
+
width: rect.at(2),
|
38
|
+
height: rect.at(3)
|
39
|
+
},
|
40
|
+
direction: dir.value
|
41
|
+
};
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
getRectsForRange(start, end) {
|
46
|
+
return this.ref.getRectsForRange(start, end, {
|
47
|
+
value: 0
|
48
|
+
}
|
49
|
+
/** kTight */
|
50
|
+
, {
|
51
|
+
value: 0
|
52
|
+
}
|
53
|
+
/** kTight */
|
54
|
+
).map(_ref2 => {
|
55
|
+
let {
|
56
|
+
rect
|
57
|
+
} = _ref2;
|
58
|
+
return {
|
59
|
+
x: rect[0],
|
60
|
+
y: rect[1],
|
61
|
+
width: rect[2],
|
62
|
+
height: rect[3]
|
63
|
+
};
|
64
|
+
});
|
65
|
+
}
|
66
|
+
|
67
|
+
getLineMetrics() {
|
68
|
+
return this.ref.getLineMetrics().map((r, index) => ({
|
69
|
+
x: r.left,
|
70
|
+
y: index * r.height,
|
71
|
+
width: r.width,
|
72
|
+
height: r.height
|
73
|
+
}));
|
74
|
+
}
|
75
|
+
|
76
|
+
dispose() {
|
77
|
+
this.ref.delete();
|
78
|
+
}
|
79
|
+
|
80
|
+
}
|
81
|
+
//# sourceMappingURL=JsiSkParagraph.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["HostObject","JsiSkParagraph","constructor","CanvasKit","ref","layout","width","paint","canvas","x","y","drawParagraph","getHeight","getMaxWidth","getGlyphPositionAtCoordinate","pos","getRectsForPlaceholders","map","rect","dir","at","height","direction","value","getRectsForRange","start","end","getLineMetrics","r","index","left","dispose","delete"],"sources":["JsiSkParagraph.ts"],"sourcesContent":["import type { CanvasKit, Paragraph } from \"canvaskit-wasm\";\n\nimport type { SkRect, SkRectWithDirection, SkParagraph } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport type { JsiSkCanvas } from \"./JsiSkCanvas\";\n\nexport class JsiSkParagraph\n extends HostObject<Paragraph, \"Paragraph\">\n implements SkParagraph\n{\n constructor(CanvasKit: CanvasKit, ref: Paragraph) {\n super(CanvasKit, ref, \"Paragraph\");\n }\n\n layout(width: number): void {\n this.ref.layout(width);\n }\n paint(canvas: JsiSkCanvas, x: number, y: number): void {\n canvas.ref.drawParagraph(this.ref, x, y);\n }\n getHeight(): number {\n return this.ref.getHeight();\n }\n getMaxWidth(): number {\n return this.ref.getMaxWidth();\n }\n getGlyphPositionAtCoordinate(x: number, y: number): number {\n return this.ref.getGlyphPositionAtCoordinate(x, y).pos;\n }\n getRectsForPlaceholders(): SkRectWithDirection[] {\n return this.ref.getRectsForPlaceholders().map(({ rect, dir }) => ({\n rect: {\n x: rect.at(0)!,\n y: rect.at(1)!,\n width: rect.at(2)!,\n height: rect.at(3)!,\n },\n direction: dir.value,\n }));\n }\n getRectsForRange(start: number, end: number): SkRect[] {\n return this.ref\n .getRectsForRange(\n start,\n end,\n { value: 0 } /** kTight */,\n { value: 0 } /** kTight */\n )\n .map(({ rect }) => ({\n x: rect[0],\n y: rect[1],\n width: rect[2],\n height: rect[3],\n }));\n }\n getLineMetrics(): SkRect[] {\n return this.ref.getLineMetrics().map((r, index) => ({\n x: r.left,\n y: index * r.height,\n width: r.width,\n height: r.height,\n }));\n }\n\n dispose() {\n this.ref.delete();\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAGA,OAAO,MAAMC,cAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAuC;IAChD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,WAAtB;EACD;;EAEDC,MAAM,CAACC,KAAD,EAAsB;IAC1B,KAAKF,GAAL,CAASC,MAAT,CAAgBC,KAAhB;EACD;;EACDC,KAAK,CAACC,MAAD,EAAsBC,CAAtB,EAAiCC,CAAjC,EAAkD;IACrDF,MAAM,CAACJ,GAAP,CAAWO,aAAX,CAAyB,KAAKP,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M,CAAf;IAAA,CAPA,CAAP;EAaD;;EACDS,cAAc,GAAa;IACzB,OAAO,KAAKvB,GAAL,CAASuB,cAAT,GAA0BV,GAA1B,CAA8B,CAACW,CAAD,EAAIC,KAAJ,MAAe;MAClDpB,CAAC,EAAEmB,CAAC,CAACE,IAD6C;MAElDpB,CAAC,EAAEmB,KAAK,GAAGD,CAAC,CAACP,MAFqC;MAGlDf,KAAK,EAAEsB,CAAC,CAACtB,KAHyC;MAIlDe,MAAM,EAAEO,CAAC,CAACP;IAJwC,CAAf,CAA9B,CAAP;EAMD;;EAEDU,OAAO,GAAG;IACR,KAAK3B,GAAL,CAAS4B,MAAT;EACD;;AAzDH"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type { CanvasKit, ParagraphBuilder } from "canvaskit-wasm";
|
2
|
+
import type { SkParagraphBuilder, SkParagraph, SkTextStyle, SkPaint } from "../types";
|
3
|
+
import { PlaceholderAlignment, TextBaseline } from "../types";
|
4
|
+
import { HostObject } from "./Host";
|
5
|
+
export declare class JsiSkParagraphBuilder extends HostObject<ParagraphBuilder, "ParagraphBuilder"> implements SkParagraphBuilder {
|
6
|
+
constructor(CanvasKit: CanvasKit, ref: ParagraphBuilder);
|
7
|
+
addPlaceholder(width?: number | undefined, height?: number | undefined, alignment?: PlaceholderAlignment | undefined, baseline?: TextBaseline | undefined, offset?: number | undefined): SkParagraphBuilder;
|
8
|
+
addText(text: string): SkParagraphBuilder;
|
9
|
+
build(): SkParagraph;
|
10
|
+
reset(): void;
|
11
|
+
pushStyle(style: SkTextStyle, foregroundPaint?: SkPaint | undefined, backgroundPaint?: SkPaint | undefined): SkParagraphBuilder;
|
12
|
+
pop(): SkParagraphBuilder;
|
13
|
+
dispose(): void;
|
14
|
+
private makePaint;
|
15
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { PlaceholderAlignment, TextBaseline } from "../types";
|
2
|
+
import { HostObject } from "./Host";
|
3
|
+
import { JsiSkParagraph } from "./JsiSkParagraph";
|
4
|
+
import { JsiSkTextStyle } from "./JsiSkTextStyle";
|
5
|
+
import { JsiSkPaint } from "./JsiSkPaint";
|
6
|
+
export class JsiSkParagraphBuilder extends HostObject {
|
7
|
+
constructor(CanvasKit, ref) {
|
8
|
+
super(CanvasKit, ref, "ParagraphBuilder");
|
9
|
+
}
|
10
|
+
|
11
|
+
addPlaceholder() {
|
12
|
+
let width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
13
|
+
let height = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
14
|
+
let alignment = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : PlaceholderAlignment.Baseline;
|
15
|
+
let baseline = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : TextBaseline.Alphabetic;
|
16
|
+
let offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
17
|
+
this.ref.addPlaceholder(width, height, {
|
18
|
+
value: alignment
|
19
|
+
}, {
|
20
|
+
value: baseline
|
21
|
+
}, offset);
|
22
|
+
return this;
|
23
|
+
}
|
24
|
+
|
25
|
+
addText(text) {
|
26
|
+
this.ref.addText(text);
|
27
|
+
return this;
|
28
|
+
}
|
29
|
+
|
30
|
+
build() {
|
31
|
+
return new JsiSkParagraph(this.CanvasKit, this.ref.build());
|
32
|
+
}
|
33
|
+
|
34
|
+
reset() {
|
35
|
+
this.ref.reset();
|
36
|
+
}
|
37
|
+
|
38
|
+
pushStyle(style, foregroundPaint, backgroundPaint) {
|
39
|
+
const textStyle = JsiSkTextStyle.toTextStyle(style);
|
40
|
+
|
41
|
+
if (foregroundPaint || backgroundPaint) {
|
42
|
+
var _textStyle$color, _textStyle$background;
|
43
|
+
|
44
|
+
// Due the canvaskit API not exposing textStyle methods,
|
45
|
+
// we set the default paint color to black for the foreground
|
46
|
+
// and transparent for the background
|
47
|
+
const fg = foregroundPaint ? JsiSkPaint.fromValue(foregroundPaint) : this.makePaint((_textStyle$color = textStyle.color) !== null && _textStyle$color !== void 0 ? _textStyle$color : Float32Array.of(0, 0, 0, 1));
|
48
|
+
const bg = backgroundPaint ? JsiSkPaint.fromValue(backgroundPaint) : this.makePaint((_textStyle$background = textStyle.backgroundColor) !== null && _textStyle$background !== void 0 ? _textStyle$background : Float32Array.of(0, 0, 0, 0));
|
49
|
+
this.ref.pushPaintStyle(new this.CanvasKit.TextStyle(textStyle), fg, bg);
|
50
|
+
} else {
|
51
|
+
this.ref.pushStyle(new this.CanvasKit.TextStyle(textStyle));
|
52
|
+
}
|
53
|
+
|
54
|
+
return this;
|
55
|
+
}
|
56
|
+
|
57
|
+
pop() {
|
58
|
+
this.ref.pop();
|
59
|
+
return this;
|
60
|
+
}
|
61
|
+
|
62
|
+
dispose() {
|
63
|
+
this.ref.delete();
|
64
|
+
}
|
65
|
+
|
66
|
+
makePaint(color) {
|
67
|
+
const paint = new this.CanvasKit.Paint();
|
68
|
+
paint.setColor(color);
|
69
|
+
return paint;
|
70
|
+
}
|
71
|
+
|
72
|
+
}
|
73
|
+
//# sourceMappingURL=JsiSkParagraphBuilder.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["PlaceholderAlignment","TextBaseline","HostObject","JsiSkParagraph","JsiSkTextStyle","JsiSkPaint","JsiSkParagraphBuilder","constructor","CanvasKit","ref","addPlaceholder","width","height","alignment","Baseline","baseline","Alphabetic","offset","value","addText","text","build","reset","pushStyle","style","foregroundPaint","backgroundPaint","textStyle","toTextStyle","fg","fromValue","makePaint","color","Float32Array","of","bg","backgroundColor","pushPaintStyle","TextStyle","pop","dispose","delete","paint","Paint","setColor"],"sources":["JsiSkParagraphBuilder.ts"],"sourcesContent":["import type {\n CanvasKit,\n InputColor,\n Paint,\n ParagraphBuilder,\n TextStyle,\n} from \"canvaskit-wasm\";\n\nimport type {\n SkParagraphBuilder,\n SkParagraph,\n SkTextStyle,\n SkPaint,\n} from \"../types\";\nimport { PlaceholderAlignment, TextBaseline } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkParagraph } from \"./JsiSkParagraph\";\nimport { JsiSkTextStyle } from \"./JsiSkTextStyle\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\n\nexport class JsiSkParagraphBuilder\n extends HostObject<ParagraphBuilder, \"ParagraphBuilder\">\n implements SkParagraphBuilder\n{\n constructor(CanvasKit: CanvasKit, ref: ParagraphBuilder) {\n super(CanvasKit, ref, \"ParagraphBuilder\");\n }\n\n addPlaceholder(\n width: number | undefined = 0,\n height: number | undefined = 0,\n alignment: PlaceholderAlignment | undefined = PlaceholderAlignment.Baseline,\n baseline: TextBaseline | undefined = TextBaseline.Alphabetic,\n offset: number | undefined = 0\n ): SkParagraphBuilder {\n this.ref.addPlaceholder(\n width,\n height,\n { value: alignment },\n { value: baseline },\n offset\n );\n return this;\n }\n addText(text: string): SkParagraphBuilder {\n this.ref.addText(text);\n return this;\n }\n\n build(): SkParagraph {\n return new JsiSkParagraph(this.CanvasKit, this.ref.build());\n }\n\n reset(): void {\n this.ref.reset();\n }\n\n pushStyle(\n style: SkTextStyle,\n foregroundPaint?: SkPaint | undefined,\n backgroundPaint?: SkPaint | undefined\n ): SkParagraphBuilder {\n const textStyle: TextStyle = JsiSkTextStyle.toTextStyle(style);\n if (foregroundPaint || backgroundPaint) {\n // Due the canvaskit API not exposing textStyle methods,\n // we set the default paint color to black for the foreground\n // and transparent for the background\n const fg: Paint = foregroundPaint\n ? JsiSkPaint.fromValue(foregroundPaint)\n : this.makePaint(textStyle.color ?? Float32Array.of(0, 0, 0, 1));\n const bg: Paint = backgroundPaint\n ? JsiSkPaint.fromValue(backgroundPaint)\n : this.makePaint(\n textStyle.backgroundColor ?? Float32Array.of(0, 0, 0, 0)\n );\n this.ref.pushPaintStyle(new this.CanvasKit.TextStyle(textStyle), fg, bg);\n } else {\n this.ref.pushStyle(new this.CanvasKit.TextStyle(textStyle));\n }\n\n return this;\n }\n\n pop(): SkParagraphBuilder {\n this.ref.pop();\n return this;\n }\n\n dispose() {\n this.ref.delete();\n }\n\n private makePaint(color: InputColor) {\n const paint = new this.CanvasKit.Paint();\n paint.setColor(color);\n return paint;\n }\n}\n"],"mappings":"AAcA,SAASA,oBAAT,EAA+BC,YAA/B,QAAmD,UAAnD;AAEA,SAASC,UAAT,QAA2B,QAA3B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,SAASC,cAAT,QAA+B,kBAA/B;AACA,SAASC,UAAT,QAA2B,cAA3B;AAEA,OAAO,MAAMC,qBAAN,SACGJ,UADH,CAGP;EACEK,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAA8C;IACvD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,kBAAtB;EACD;;EAEDC,cAAc,GAMQ;IAAA,IALpBC,KAKoB,uEALQ,CAKR;IAAA,IAJpBC,MAIoB,uEAJS,CAIT;IAAA,IAHpBC,SAGoB,uEAH0Bb,oBAAoB,CAACc,QAG/C;IAAA,IAFpBC,QAEoB,uEAFiBd,YAAY,CAACe,UAE9B;IAAA,IADpBC,MACoB,uEADS,CACT;IACpB,KAAKR,GAAL,CAASC,cAAT,CACEC,KADF,EAEEC,MAFF,EAGE;MAAEM,KAAK,EAAEL;IAAT,CAHF,EAIE;MAAEK,KAAK,EAAEH;IAAT,CAJF,EAKEE,MALF;IAOA,OAAO,IAAP;EACD;;EACDE,OAAO,CAACC,IAAD,EAAmC;IACxC,KAAKX,GAAL,CAASU,OAAT,CAAiBC,IAAjB;IACA,OAAO,IAAP;EACD;;EAEDC,KAAK,GAAgB;IACnB,OAAO,IAAIlB,cAAJ,CAAmB,KAAKK,SAAxB,EAAmC,KAAKC,GAAL,CAASY,KAAT,EAAnC,CAAP;EACD;;EAEDC,KAAK,GAAS;IACZ,KAAKb,GAAL,CAASa,KAAT;EACD;;EAEDC,SAAS,CACPC,KADO,EAEPC,eAFO,EAGPC,eAHO,EAIa;IACpB,MAAMC,SAAoB,GAAGvB,cAAc,CAACwB,WAAf,CAA2BJ,KAA3B,CAA7B;;IACA,IAAIC,eAAe,IAAIC,eAAvB,EAAwC;MAAA;;MACtC;MACA;MACA;MACA,MAAMG,EAAS,GAAGJ,eAAe,GAC7BpB,UAAU,CAACyB,SAAX,CAAqBL,eAArB,CAD6B,GAE7B,KAAKM,SAAL,qBAAeJ,SAAS,CAACK,KAAzB,+DAAkCC,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CAAlC,CAFJ;MAGA,MAAMC,EAAS,GAAGT,eAAe,GAC7BrB,UAAU,CAACyB,SAAX,CAAqBJ,eAArB,CAD6B,GAE7B,KAAKK,SAAL,0BACEJ,SAAS,CAACS,eADZ,yEAC+BH,YAAY,CAACC,EAAb,CAAgB,CAAhB,EAAmB,CAAnB,EAAsB,CAAtB,EAAyB,CAAzB,CAD/B,CAFJ;MAKA,KAAKzB,GAAL,CAAS4B,cAAT,CAAwB,IAAI,KAAK7B,SAAL,CAAe8B,SAAnB,CAA6BX,SAA7B,CAAxB,EAAiEE,EAAjE,EAAqEM,EAArE;IACD,CAbD,MAaO;MACL,KAAK1B,GAAL,CAASc,SAAT,CAAmB,IAAI,KAAKf,SAAL,CAAe8B,SAAnB,CAA6BX,SAA7B,CAAnB;IACD;;IAED,OAAO,IAAP;EACD;;EAEDY,GAAG,GAAuB;IACxB,KAAK9B,GAAL,CAAS8B,GAAT;IACA,OAAO,IAAP;EACD;;EAEDC,OAAO,GAAG;IACR,KAAK/B,GAAL,CAASgC,MAAT;EACD;;EAEOV,SAAS,CAACC,KAAD,EAAoB;IACnC,MAAMU,KAAK,GAAG,IAAI,KAAKlC,SAAL,CAAemC,KAAnB,EAAd;IACAD,KAAK,CAACE,QAAN,CAAeZ,KAAf;IACA,OAAOU,KAAP;EACD;;AAzEH"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { CanvasKit } from "canvaskit-wasm";
|
2
|
+
import type { ParagraphBuilderFactory, SkParagraphStyle, SkTypefaceFontProvider } from "../types";
|
3
|
+
import { Host } from "./Host";
|
4
|
+
import { JsiSkParagraphBuilder } from "./JsiSkParagraphBuilder";
|
5
|
+
export declare class JsiSkParagraphBuilderFactory extends Host implements ParagraphBuilderFactory {
|
6
|
+
constructor(CanvasKit: CanvasKit);
|
7
|
+
Make(paragraphStyle: SkParagraphStyle, typefaceProvider?: SkTypefaceFontProvider): JsiSkParagraphBuilder;
|
8
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Host } from "./Host";
|
2
|
+
import { JsiSkParagraphBuilder } from "./JsiSkParagraphBuilder";
|
3
|
+
import { JsiSkParagraphStyle } from "./JsiSkParagraphStyle";
|
4
|
+
import { JsiSkTypeface } from "./JsiSkTypeface";
|
5
|
+
export class JsiSkParagraphBuilderFactory extends Host {
|
6
|
+
constructor(CanvasKit) {
|
7
|
+
super(CanvasKit);
|
8
|
+
}
|
9
|
+
|
10
|
+
Make(paragraphStyle, typefaceProvider) {
|
11
|
+
const style = new this.CanvasKit.ParagraphStyle(JsiSkParagraphStyle.toParagraphStyle(this.CanvasKit, paragraphStyle !== null && paragraphStyle !== void 0 ? paragraphStyle : {}));
|
12
|
+
|
13
|
+
if (typefaceProvider === undefined) {
|
14
|
+
throw new Error("SkTypefaceFontProvider is required on React Native Web.");
|
15
|
+
}
|
16
|
+
|
17
|
+
return new JsiSkParagraphBuilder(this.CanvasKit, this.CanvasKit.ParagraphBuilder.MakeFromFontProvider(style, JsiSkTypeface.fromValue(typefaceProvider)));
|
18
|
+
}
|
19
|
+
|
20
|
+
}
|
21
|
+
//# sourceMappingURL=JsiSkParagraphBuilderFactory.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Host","JsiSkParagraphBuilder","JsiSkParagraphStyle","JsiSkTypeface","JsiSkParagraphBuilderFactory","constructor","CanvasKit","Make","paragraphStyle","typefaceProvider","style","ParagraphStyle","toParagraphStyle","undefined","Error","ParagraphBuilder","MakeFromFontProvider","fromValue"],"sources":["JsiSkParagraphBuilderFactory.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n ParagraphBuilderFactory,\n SkParagraphStyle,\n SkTypefaceFontProvider,\n} from \"../types\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkParagraphBuilder } from \"./JsiSkParagraphBuilder\";\nimport { JsiSkParagraphStyle } from \"./JsiSkParagraphStyle\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\n\nexport class JsiSkParagraphBuilderFactory\n extends Host\n implements ParagraphBuilderFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n Make(\n paragraphStyle: SkParagraphStyle,\n typefaceProvider?: SkTypefaceFontProvider\n ) {\n const style = new this.CanvasKit.ParagraphStyle(\n JsiSkParagraphStyle.toParagraphStyle(this.CanvasKit, paragraphStyle ?? {})\n );\n if (typefaceProvider === undefined) {\n throw new Error(\n \"SkTypefaceFontProvider is required on React Native Web.\"\n );\n }\n return new JsiSkParagraphBuilder(\n this.CanvasKit,\n this.CanvasKit.ParagraphBuilder.MakeFromFontProvider(\n style,\n JsiSkTypeface.fromValue(typefaceProvider)\n )\n );\n }\n}\n"],"mappings":"AAQA,SAASA,IAAT,QAAqB,QAArB;AACA,SAASC,qBAAT,QAAsC,yBAAtC;AACA,SAASC,mBAAT,QAAoC,uBAApC;AACA,SAASC,aAAT,QAA8B,iBAA9B;AAEA,OAAO,MAAMC,4BAAN,SACGJ,IADH,CAGP;EACEK,WAAW,CAACC,SAAD,EAAuB;IAChC,MAAMA,SAAN;EACD;;EAEDC,IAAI,CACFC,cADE,EAEFC,gBAFE,EAGF;IACA,MAAMC,KAAK,GAAG,IAAI,KAAKJ,SAAL,CAAeK,cAAnB,CACZT,mBAAmB,CAACU,gBAApB,CAAqC,KAAKN,SAA1C,EAAqDE,cAArD,aAAqDA,cAArD,cAAqDA,cAArD,GAAuE,EAAvE,CADY,CAAd;;IAGA,IAAIC,gBAAgB,KAAKI,SAAzB,EAAoC;MAClC,MAAM,IAAIC,KAAJ,CACJ,yDADI,CAAN;IAGD;;IACD,OAAO,IAAIb,qBAAJ,CACL,KAAKK,SADA,EAEL,KAAKA,SAAL,CAAeS,gBAAf,CAAgCC,oBAAhC,CACEN,KADF,EAEEP,aAAa,CAACc,SAAd,CAAwBR,gBAAxB,CAFF,CAFK,CAAP;EAOD;;AAxBH"}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { SkTextDirection } from "../types";
|
2
|
+
export class JsiSkParagraphStyle {
|
3
|
+
static toParagraphStyle(ck, value) {
|
4
|
+
var _value$disableHinting, _value$ellipsis, _value$heightMultipli, _value$maxLines, _value$replaceTabChar, _ps$strutStyle, _value$strutStyle$fon, _value$strutStyle, _value$strutStyle$fon2, _value$strutStyle2, _value$strutStyle$hei, _value$strutStyle3, _value$strutStyle$lea, _value$strutStyle4, _value$strutStyle$for, _value$strutStyle5, _ps$strutStyle$fontSt, _value$strutStyle6, _value$strutStyle6$fo, _value$strutStyle7, _value$strutStyle7$fo, _value$strutStyle8, _value$strutStyle8$fo, _value$strutStyle$hal, _value$strutStyle9, _value$strutStyle$str, _value$strutStyle10;
|
5
|
+
|
6
|
+
// Seems like we need to provide the textStyle.color value, otherwise
|
7
|
+
// the constructor crashes.
|
8
|
+
const ps = new ck.ParagraphStyle({
|
9
|
+
textStyle: {
|
10
|
+
color: ck.BLACK
|
11
|
+
}
|
12
|
+
});
|
13
|
+
ps.disableHinting = (_value$disableHinting = value.disableHinting) !== null && _value$disableHinting !== void 0 ? _value$disableHinting : ps.disableHinting;
|
14
|
+
ps.ellipsis = (_value$ellipsis = value.ellipsis) !== null && _value$ellipsis !== void 0 ? _value$ellipsis : ps.ellipsis;
|
15
|
+
ps.heightMultiplier = (_value$heightMultipli = value.heightMultiplier) !== null && _value$heightMultipli !== void 0 ? _value$heightMultipli : ps.heightMultiplier;
|
16
|
+
ps.maxLines = (_value$maxLines = value.maxLines) !== null && _value$maxLines !== void 0 ? _value$maxLines : ps.maxLines;
|
17
|
+
ps.replaceTabCharacters = (_value$replaceTabChar = value.replaceTabCharacters) !== null && _value$replaceTabChar !== void 0 ? _value$replaceTabChar : ps.replaceTabCharacters;
|
18
|
+
ps.textAlign = value.textAlign !== undefined ? {
|
19
|
+
value: value.textAlign
|
20
|
+
} : undefined !== null && undefined !== void 0 ? undefined : ps.textAlign;
|
21
|
+
ps.textDirection = value.textDirection !== undefined ? {
|
22
|
+
value: value.textDirection === SkTextDirection.LTR ? 1 : 0
|
23
|
+
} : ps.textDirection;
|
24
|
+
ps.textHeightBehavior = value.textHeightBehavior !== undefined ? {
|
25
|
+
value: value.textHeightBehavior
|
26
|
+
} : ps.textHeightBehavior;
|
27
|
+
ps.strutStyle = (_ps$strutStyle = ps.strutStyle) !== null && _ps$strutStyle !== void 0 ? _ps$strutStyle : {};
|
28
|
+
ps.strutStyle.fontFamilies = (_value$strutStyle$fon = (_value$strutStyle = value.strutStyle) === null || _value$strutStyle === void 0 ? void 0 : _value$strutStyle.fontFamilies) !== null && _value$strutStyle$fon !== void 0 ? _value$strutStyle$fon : ps.strutStyle.fontFamilies;
|
29
|
+
ps.strutStyle.fontSize = (_value$strutStyle$fon2 = (_value$strutStyle2 = value.strutStyle) === null || _value$strutStyle2 === void 0 ? void 0 : _value$strutStyle2.fontSize) !== null && _value$strutStyle$fon2 !== void 0 ? _value$strutStyle$fon2 : ps.strutStyle.fontSize;
|
30
|
+
ps.strutStyle.heightMultiplier = (_value$strutStyle$hei = (_value$strutStyle3 = value.strutStyle) === null || _value$strutStyle3 === void 0 ? void 0 : _value$strutStyle3.heightMultiplier) !== null && _value$strutStyle$hei !== void 0 ? _value$strutStyle$hei : ps.strutStyle.heightMultiplier;
|
31
|
+
ps.strutStyle.leading = (_value$strutStyle$lea = (_value$strutStyle4 = value.strutStyle) === null || _value$strutStyle4 === void 0 ? void 0 : _value$strutStyle4.leading) !== null && _value$strutStyle$lea !== void 0 ? _value$strutStyle$lea : ps.strutStyle.leading;
|
32
|
+
ps.strutStyle.forceStrutHeight = (_value$strutStyle$for = (_value$strutStyle5 = value.strutStyle) === null || _value$strutStyle5 === void 0 ? void 0 : _value$strutStyle5.forceStrutHeight) !== null && _value$strutStyle$for !== void 0 ? _value$strutStyle$for : ps.strutStyle.forceStrutHeight;
|
33
|
+
ps.strutStyle.fontStyle = (_ps$strutStyle$fontSt = ps.strutStyle.fontStyle) !== null && _ps$strutStyle$fontSt !== void 0 ? _ps$strutStyle$fontSt : {};
|
34
|
+
ps.strutStyle.fontStyle.slant = ((_value$strutStyle6 = value.strutStyle) === null || _value$strutStyle6 === void 0 ? void 0 : (_value$strutStyle6$fo = _value$strutStyle6.fontStyle) === null || _value$strutStyle6$fo === void 0 ? void 0 : _value$strutStyle6$fo.slant) !== undefined ? {
|
35
|
+
value: value.strutStyle.fontStyle.slant
|
36
|
+
} : ps.strutStyle.fontStyle.slant;
|
37
|
+
ps.strutStyle.fontStyle.width = ((_value$strutStyle7 = value.strutStyle) === null || _value$strutStyle7 === void 0 ? void 0 : (_value$strutStyle7$fo = _value$strutStyle7.fontStyle) === null || _value$strutStyle7$fo === void 0 ? void 0 : _value$strutStyle7$fo.width) !== undefined ? {
|
38
|
+
value: value.strutStyle.fontStyle.width
|
39
|
+
} : ps.strutStyle.fontStyle.width;
|
40
|
+
ps.strutStyle.fontStyle.weight = ((_value$strutStyle8 = value.strutStyle) === null || _value$strutStyle8 === void 0 ? void 0 : (_value$strutStyle8$fo = _value$strutStyle8.fontStyle) === null || _value$strutStyle8$fo === void 0 ? void 0 : _value$strutStyle8$fo.weight) !== undefined ? {
|
41
|
+
value: value.strutStyle.fontStyle.weight
|
42
|
+
} : ps.strutStyle.fontStyle.weight;
|
43
|
+
ps.strutStyle.halfLeading = (_value$strutStyle$hal = (_value$strutStyle9 = value.strutStyle) === null || _value$strutStyle9 === void 0 ? void 0 : _value$strutStyle9.halfLeading) !== null && _value$strutStyle$hal !== void 0 ? _value$strutStyle$hal : ps.strutStyle.halfLeading;
|
44
|
+
ps.strutStyle.strutEnabled = (_value$strutStyle$str = (_value$strutStyle10 = value.strutStyle) === null || _value$strutStyle10 === void 0 ? void 0 : _value$strutStyle10.strutEnabled) !== null && _value$strutStyle$str !== void 0 ? _value$strutStyle$str : ps.strutStyle.strutEnabled;
|
45
|
+
return ps;
|
46
|
+
}
|
47
|
+
|
48
|
+
}
|
49
|
+
//# sourceMappingURL=JsiSkParagraphStyle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["SkTextDirection","JsiSkParagraphStyle","toParagraphStyle","ck","value","ps","ParagraphStyle","textStyle","color","BLACK","disableHinting","ellipsis","heightMultiplier","maxLines","replaceTabCharacters","textAlign","undefined","textDirection","LTR","textHeightBehavior","strutStyle","fontFamilies","fontSize","leading","forceStrutHeight","fontStyle","slant","width","weight","halfLeading","strutEnabled"],"sources":["JsiSkParagraphStyle.ts"],"sourcesContent":["import type { CanvasKit, ParagraphStyle } from \"canvaskit-wasm\";\n\nimport { SkTextDirection, type SkParagraphStyle } from \"../types\";\n\nexport class JsiSkParagraphStyle {\n static toParagraphStyle(\n ck: CanvasKit,\n value: SkParagraphStyle\n ): ParagraphStyle {\n // Seems like we need to provide the textStyle.color value, otherwise\n // the constructor crashes.\n const ps = new ck.ParagraphStyle({ textStyle: { color: ck.BLACK } });\n\n ps.disableHinting = value.disableHinting ?? ps.disableHinting;\n ps.ellipsis = value.ellipsis ?? ps.ellipsis;\n ps.heightMultiplier = value.heightMultiplier ?? ps.heightMultiplier;\n ps.maxLines = value.maxLines ?? ps.maxLines;\n ps.replaceTabCharacters =\n value.replaceTabCharacters ?? ps.replaceTabCharacters;\n ps.textAlign =\n value.textAlign !== undefined\n ? { value: value.textAlign }\n : undefined ?? ps.textAlign;\n ps.textDirection =\n value.textDirection !== undefined\n ? { value: value.textDirection === SkTextDirection.LTR ? 1 : 0 }\n : ps.textDirection;\n ps.textHeightBehavior =\n value.textHeightBehavior !== undefined\n ? { value: value.textHeightBehavior }\n : ps.textHeightBehavior;\n\n ps.strutStyle = ps.strutStyle ?? {};\n ps.strutStyle.fontFamilies =\n value.strutStyle?.fontFamilies ?? ps.strutStyle.fontFamilies;\n ps.strutStyle.fontSize =\n value.strutStyle?.fontSize ?? ps.strutStyle.fontSize;\n ps.strutStyle.heightMultiplier =\n value.strutStyle?.heightMultiplier ?? ps.strutStyle.heightMultiplier;\n ps.strutStyle.leading = value.strutStyle?.leading ?? ps.strutStyle.leading;\n ps.strutStyle.forceStrutHeight =\n value.strutStyle?.forceStrutHeight ?? ps.strutStyle.forceStrutHeight;\n\n ps.strutStyle.fontStyle = ps.strutStyle.fontStyle ?? {};\n\n ps.strutStyle.fontStyle.slant =\n value.strutStyle?.fontStyle?.slant !== undefined\n ? { value: value.strutStyle.fontStyle.slant }\n : ps.strutStyle.fontStyle.slant;\n ps.strutStyle.fontStyle.width =\n value.strutStyle?.fontStyle?.width !== undefined\n ? { value: value.strutStyle.fontStyle.width }\n : ps.strutStyle.fontStyle.width;\n ps.strutStyle.fontStyle.weight =\n value.strutStyle?.fontStyle?.weight !== undefined\n ? { value: value.strutStyle.fontStyle.weight }\n : ps.strutStyle.fontStyle.weight;\n ps.strutStyle.halfLeading =\n value.strutStyle?.halfLeading ?? ps.strutStyle.halfLeading;\n ps.strutStyle.strutEnabled =\n value.strutStyle?.strutEnabled ?? ps.strutStyle.strutEnabled;\n\n return ps;\n }\n}\n"],"mappings":"AAEA,SAASA,eAAT,QAAuD,UAAvD;AAEA,OAAO,MAAMC,mBAAN,CAA0B;EACR,OAAhBC,gBAAgB,CACrBC,EADqB,EAErBC,KAFqB,EAGL;IAAA;;IAChB;IACA;IACA,MAAMC,EAAE,GAAG,IAAIF,EAAE,CAACG,cAAP,CAAsB;MAAEC,SAAS,EAAE;QAAEC,KAAK,EAAEL,EAAE,CAACM;MAAZ;IAAb,CAAtB,CAAX;IAEAJ,EAAE,CAACK,cAAH,4BAAoBN,KAAK,CAACM,cAA1B,yEAA4CL,EAAE,CAACK,cAA/C;IACAL,EAAE,CAAC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Ad,CAAwBG,MAH9B;IAIAvB,EAAE,CAACe,UAAH,CAAcS,WAAd,kDACEzB,KAAK,CAACgB,UADR,uDACE,mBAAkBS,WADpB,yEACmCxB,EAAE,CAACe,UAAH,CAAcS,WADjD;IAEAxB,EAAE,CAACe,UAAH,CAAcU,YAAd,mDACE1B,KAAK,CAACgB,UADR,wDACE,oBAAkBU,YADpB,yEACoCzB,EAAE,CAACe,UAAH,CAAcU,YADlD;IAGA,OAAOzB,EAAP;EACD;;AA3D8B"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
export class JsiSkTextStyle {
|
2
|
+
static toTextStyle(value) {
|
3
|
+
return {
|
4
|
+
backgroundColor: value.backgroundColor,
|
5
|
+
color: value.color,
|
6
|
+
decoration: value.decoration,
|
7
|
+
decorationColor: value.decorationColor,
|
8
|
+
decorationStyle: value.decorationStyle ? {
|
9
|
+
value: value.decorationStyle
|
10
|
+
} : undefined,
|
11
|
+
decorationThickness: value.decorationThickness,
|
12
|
+
fontFamilies: value.fontFamilies,
|
13
|
+
fontSize: value.fontSize,
|
14
|
+
fontStyle: value.fontStyle ? {
|
15
|
+
slant: value.fontStyle.slant ? {
|
16
|
+
value: value.fontStyle.slant
|
17
|
+
} : undefined,
|
18
|
+
weight: value.fontStyle.weight ? {
|
19
|
+
value: value.fontStyle.weight
|
20
|
+
} : undefined,
|
21
|
+
width: value.fontStyle.width ? {
|
22
|
+
value: value.fontStyle.width
|
23
|
+
} : undefined
|
24
|
+
} : undefined,
|
25
|
+
fontFeatures: value.fontFeatures,
|
26
|
+
foregroundColor: value.foregroundColor,
|
27
|
+
fontVariations: value.fontVariations,
|
28
|
+
halfLeading: value.halfLeading,
|
29
|
+
heightMultiplier: value.heightMultiplier,
|
30
|
+
letterSpacing: value.letterSpacing,
|
31
|
+
locale: value.locale,
|
32
|
+
shadows: value.shadows ? value.shadows.map(shadow => ({
|
33
|
+
blurRadius: shadow.blurRadius,
|
34
|
+
color: shadow.color,
|
35
|
+
offset: shadow.offset ? [shadow.offset.x, shadow.offset.y] : undefined
|
36
|
+
})) : undefined,
|
37
|
+
textBaseline: value.textBaseline ? {
|
38
|
+
value: value.textBaseline
|
39
|
+
} : undefined,
|
40
|
+
wordSpacing: value.wordSpacing
|
41
|
+
};
|
42
|
+
}
|
43
|
+
|
44
|
+
}
|
45
|
+
//# sourceMappingURL=JsiSkTextStyle.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["JsiSkTextStyle","toTextStyle","value","backgroundColor","color","decoration","decorationColor","decorationStyle","undefined","decorationThickness","fontFamilies","fontSize","fontStyle","slant","weight","width","fontFeatures","foregroundColor","fontVariations","halfLeading","heightMultiplier","letterSpacing","locale","shadows","map","shadow","blurRadius","offset","x","y","textBaseline","wordSpacing"],"sources":["JsiSkTextStyle.ts"],"sourcesContent":["import type { TextStyle } from \"canvaskit-wasm\";\n\nimport type { SkTextStyle } from \"../types\";\n\nexport class JsiSkTextStyle {\n static toTextStyle(value: SkTextStyle): TextStyle {\n return {\n backgroundColor: value.backgroundColor,\n color: value.color,\n decoration: value.decoration,\n decorationColor: value.decorationColor,\n decorationStyle: value.decorationStyle\n ? { value: value.decorationStyle }\n : undefined,\n decorationThickness: value.decorationThickness,\n fontFamilies: value.fontFamilies,\n fontSize: value.fontSize,\n fontStyle: value.fontStyle\n ? {\n slant: value.fontStyle.slant\n ? { value: value.fontStyle.slant }\n : undefined,\n weight: value.fontStyle.weight\n ? { value: value.fontStyle.weight }\n : undefined,\n width: value.fontStyle.width\n ? { value: value.fontStyle.width }\n : undefined,\n }\n : undefined,\n fontFeatures: value.fontFeatures,\n foregroundColor: value.foregroundColor,\n fontVariations: value.fontVariations,\n halfLeading: value.halfLeading,\n heightMultiplier: value.heightMultiplier,\n letterSpacing: value.letterSpacing,\n locale: value.locale,\n shadows: value.shadows\n ? value.shadows.map((shadow) => ({\n blurRadius: shadow.blurRadius,\n color: shadow.color,\n offset: shadow.offset\n ? [shadow.offset.x, shadow.offset.y]\n : undefined,\n }))\n : undefined,\n textBaseline: value.textBaseline\n ? { value: value.textBaseline }\n : undefined,\n wordSpacing: value.wordSpacing,\n };\n }\n}\n"],"mappings":"AAIA,OAAO,MAAMA,cAAN,CAAqB;EACR,OAAXC,WAAW,CAACC,KAAD,EAAgC;IAChD,OAAO;MACLC,eAAe,EAAED,KAAK,CAACC,eADlB;MAELC,KAAK,EAAEF,KAAK,CAACE,KAFR;MAGLC,UAAU,EAAEH,KAAK,CAACG,UAHb;MAILC,eAAe,EAAEJ,KAAK,CAACI,eAJlB;MAKLC,eAAe,EAAEL,KAAK,CAACK,eAAN,GACb;QAAEL,KAAK,EAAEA,KAAK,CAACK;MAAf,CADa,GAEbC,SAPC;MAQLC,mBAAmB,EAAEP,KAAK,CAACO,mBARtB;MASLC,YAAY,EAAER,KAAK,CAACQ,YATf;MAULC,QAAQ,EAAET,KAAK,CAACS,QAVX;MAWLC,SAAS,EAAEV,KAAK,CAACU,SAAN,GACP;QACEC,KAAK,EAAEX,KAAK,CAACU,SAAN,CAAgBC,KAAhB,GACH;UAAEX,KAAK,EAAEA,KAAK,CAACU,SAAN,CAAgBC;QAAzB,CADG,GAEHL,SAHN;QAIEM,MAAM,EAAEZ,KAAK,CAACU,SAAN,CAAgBE,MAAhB,GACJ;UAAEZ,KAAK,EAAEA,KAAK,CAACU,SAAN,CAAgBE;QAAzB,CADI,GAEJN,SANN;QAOEO,KAAK,EAAEb,KAAK,CAACU,SAAN,CAAgBG,KAAhB,GACH;UAAEb,KAAK,EAAEA,KAAK,CAACU,SAAN,CAAgBG;QAAzB,CADG,GAEHP;MATN,CADO,GAYPA,SAvBC;MAwBLQ,YAAY,EAAEd,KAAK,CAACc,YAxBf;MAyBLC,eAAe,EAAEf,KAAK,CAACe,eAzBlB;MA0BLC,cAAc,EAAEhB,KAAK,CAACgB,cA1BjB;MA2BLC,WAAW,EAAEjB,KAAK,CAACiB,WA3Bd;MA4BLC,gBAAgB,EAAElB,KAAK,CAACkB,gBA5BnB;MA6BLC,aAAa,EAAEnB,KAAK,CAACmB,aA7BhB;MA8BLC,MAAM,EAAEpB,KAAK,CAACoB,MA9BT;MA+BLC,OAAO,EAAErB,KAAK,CAACqB,OAAN,GACLrB,KAAK,CAACqB,OAAN,CAAcC,GAAd,CAAmBC,MAAD,KAAa;QAC7BC,UAAU,EAAED,MAAM,CAACC,UADU;QAE7BtB,KAAK,EAAEqB,MAAM,CAACrB,KAFe;QAG7BuB,MAAM,EAAEF,MAAM,CAACE,MAAP,GACJ,CAACF,MAAM,CAACE,MAAP,CAAcC,CAAf,EAAkBH,MAAM,CAACE,MAAP,CAAcE,CAAhC,CADI,GAEJrB;MALyB,CAAb,CAAlB,CADK,GAQLA,SAvCC;MAwCLsB,YAAY,EAAE5B,KAAK,CAAC4B,YAAN,GACV;QAAE5B,KAAK,EAAEA,KAAK,CAAC4B;MAAf,CADU,GAEVtB,SA1CC;MA2CLuB,WAAW,EAAE7B,KAAK,CAAC6B;IA3Cd,CAAP;EA6CD;;AA/CyB"}
|
@@ -28,6 +28,7 @@ import { JsiSkTypeface } from "./JsiSkTypeface";
|
|
28
28
|
import { JsiSkTypefaceFontProviderFactory } from "./JsiSkTypefaceFontProviderFactory";
|
29
29
|
import { JsiSkFontMgrFactory } from "./JsiSkFontMgrFactory";
|
30
30
|
import { JsiSkAnimatedImageFactory } from "./JsiSkAnimatedImageFactory";
|
31
|
+
import { JsiSkParagraphBuilderFactory } from "./JsiSkParagraphBuilderFactory";
|
31
32
|
export const JsiSkApi = CanvasKit => ({
|
32
33
|
Point: (x, y) => new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),
|
33
34
|
RuntimeShaderBuilder: _ => {
|
@@ -65,6 +66,7 @@ export const JsiSkApi = CanvasKit => ({
|
|
65
66
|
},
|
66
67
|
Surface: new JsiSkSurfaceFactory(CanvasKit),
|
67
68
|
TypefaceFontProvider: new JsiSkTypefaceFontProviderFactory(CanvasKit),
|
68
|
-
FontMgr: new JsiSkFontMgrFactory(CanvasKit)
|
69
|
+
FontMgr: new JsiSkFontMgrFactory(CanvasKit),
|
70
|
+
ParagraphBuilder: new JsiSkParagraphBuilderFactory(CanvasKit)
|
69
71
|
});
|
70
72
|
//# sourceMappingURL=JsiSkia.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["JsiSkPoint","JsiSkPaint","JsiSkRect","Color","JsiSkSurfaceFactory","JsiSkRRect","JsiSkRSXform","JsiSkContourMeasureIter","JsiSkPictureRecorder","JsiSkPictureFactory","JsiSkPathFactory","JsiSkMatrix","JsiSkColorFilterFactory","JsiSkTypefaceFactory","JsiSkMaskFilterFactory","JsiSkRuntimeEffectFactory","JsiSkImageFilterFactory","JsiSkShaderFactory","JsiSkPathEffectFactory","JsiSkDataFactory","JsiSkImageFactory","JsiSkSVGFactory","JsiSkTextBlobFactory","JsiSkFont","MakeVertices","JsiSkPath","JsiSkTypeface","JsiSkTypefaceFontProviderFactory","JsiSkFontMgrFactory","JsiSkAnimatedImageFactory","JsiSkApi","CanvasKit","Point","x","y","Float32Array","of","RuntimeShaderBuilder","_","Error","RRectXY","rect","rx","ry","RSXform","scos","ssin","tx","ty","ContourMeasureIter","path","forceClosed","resScale","fromValue","Paint","paint","setAntiAlias","PictureRecorder","Picture","Path","Matrix","matrix","identity","ColorFilter","Font","typeface","size","undefined","Typeface","MaskFilter","RuntimeEffect","ImageFilter","Shader","PathEffect","bind","Data","Image","AnimatedImage","SVG","TextBlob","XYWHRect","width","height","Surface","TypefaceFontProvider","FontMgr"],"sources":["JsiSkia.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n SkContourMeasureIter,\n Skia,\n SkPath,\n SkRect,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n SkTypeface,\n} from \"../types\";\n\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkRSXform } from \"./JsiSkRSXform\";\nimport { JsiSkContourMeasureIter } from \"./JsiSkContourMeasureIter\";\nimport { JsiSkPictureRecorder } from \"./JsiSkPictureRecorder\";\nimport { JsiSkPictureFactory } from \"./JsiSkPictureFactory\";\nimport { JsiSkPathFactory } from \"./JsiSkPathFactory\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkColorFilterFactory } from \"./JsiSkColorFilterFactory\";\nimport { JsiSkTypefaceFactory } from \"./JsiSkTypefaceFactory\";\nimport { JsiSkMaskFilterFactory } from \"./JsiSkMaskFilterFactory\";\nimport { JsiSkRuntimeEffectFactory } from \"./JsiSkRuntimeEffectFactory\";\nimport { JsiSkImageFilterFactory } from \"./JsiSkImageFilterFactory\";\nimport { JsiSkShaderFactory } from \"./JsiSkShaderFactory\";\nimport { JsiSkPathEffectFactory } from \"./JsiSkPathEffectFactory\";\nimport { JsiSkDataFactory } from \"./JsiSkDataFactory\";\nimport { JsiSkImageFactory } from \"./JsiSkImageFactory\";\nimport { JsiSkSVGFactory } from \"./JsiSkSVGFactory\";\nimport { JsiSkTextBlobFactory } from \"./JsiSkTextBlobFactory\";\nimport { JsiSkFont } from \"./JsiSkFont\";\nimport { MakeVertices } from \"./JsiSkVerticesFactory\";\nimport { JsiSkPath } from \"./JsiSkPath\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\nimport { JsiSkTypefaceFontProviderFactory } from \"./JsiSkTypefaceFontProviderFactory\";\nimport { JsiSkFontMgrFactory } from \"./JsiSkFontMgrFactory\";\nimport { JsiSkAnimatedImageFactory } from \"./JsiSkAnimatedImageFactory\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit): Skia => ({\n Point: (x: number, y: number) =>\n new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),\n RuntimeShaderBuilder: (_: SkRuntimeEffect): SkRuntimeShaderBuilder => {\n throw new Error(\"Not implemented on React Native Web\");\n },\n RRectXY: (rect: SkRect, rx: number, ry: number) =>\n new JsiSkRRect(CanvasKit, rect, rx, ry),\n RSXform: (scos: number, ssin: number, tx: number, ty: number) =>\n new JsiSkRSXform(CanvasKit, Float32Array.of(scos, ssin, tx, ty)),\n Color,\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ): SkContourMeasureIter =>\n new JsiSkContourMeasureIter(\n CanvasKit,\n new CanvasKit.ContourMeasureIter(\n JsiSkPath.fromValue(path),\n forceClosed,\n resScale\n )\n ),\n Paint: () => {\n const paint = new JsiSkPaint(CanvasKit, new CanvasKit.Paint());\n paint.setAntiAlias(true);\n return paint;\n },\n PictureRecorder: () =>\n new JsiSkPictureRecorder(CanvasKit, new CanvasKit.PictureRecorder()),\n Picture: new JsiSkPictureFactory(CanvasKit),\n Path: new JsiSkPathFactory(CanvasKit),\n Matrix: (matrix?: readonly number[]) =>\n new JsiSkMatrix(\n CanvasKit,\n matrix\n ? Float32Array.of(...matrix)\n : Float32Array.of(...CanvasKit.Matrix.identity())\n ),\n ColorFilter: new JsiSkColorFilterFactory(CanvasKit),\n Font: (typeface?: SkTypeface, size?: number) =>\n new JsiSkFont(\n CanvasKit,\n new CanvasKit.Font(\n typeface === undefined ? null : JsiSkTypeface.fromValue(typeface),\n size\n )\n ),\n Typeface: new JsiSkTypefaceFactory(CanvasKit),\n MaskFilter: new JsiSkMaskFilterFactory(CanvasKit),\n RuntimeEffect: new JsiSkRuntimeEffectFactory(CanvasKit),\n ImageFilter: new JsiSkImageFilterFactory(CanvasKit),\n Shader: new JsiSkShaderFactory(CanvasKit),\n PathEffect: new JsiSkPathEffectFactory(CanvasKit),\n MakeVertices: MakeVertices.bind(null, CanvasKit),\n Data: new JsiSkDataFactory(CanvasKit),\n Image: new JsiSkImageFactory(CanvasKit),\n AnimatedImage: new JsiSkAnimatedImageFactory(CanvasKit),\n SVG: new JsiSkSVGFactory(CanvasKit),\n TextBlob: new JsiSkTextBlobFactory(CanvasKit),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n TypefaceFontProvider: new JsiSkTypefaceFontProviderFactory(CanvasKit),\n FontMgr: new JsiSkFontMgrFactory(CanvasKit),\n});\n"],"mappings":"AAYA,SAASA,UAAT,QAA2B,cAA3B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,KAAT,QAAsB,cAAtB;AACA,SAASC,mBAAT,QAAoC,uBAApC;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,uBAAT,QAAwC,2BAAxC;AACA,SAASC,oBAAT,QAAqC,wBAArC;AACA,SAASC,mBAAT,QAAoC,uBAApC;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,uBAAT,QAAwC,2BAAxC;AACA,SAASC,oBAAT,QAAqC,wBAArC;AACA,SAASC,sBAAT,QAAuC,0BAAvC;AACA,SAASC,yBAAT,QAA0C,6BAA1C;AACA,SAASC,uBAAT,QAAwC,2BAAxC;AACA,SAASC,kBAAT,QAAmC,sBAAnC;AACA,SAASC,sBAAT,QAAuC,0BAAvC;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,oBAAT,QAAqC,wBAArC;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,YAAT,QAA6B,wBAA7B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,gCAAT,QAAiD,oCAAjD;AACA,SAASC,mBAAT,QAAoC,uBAApC;AACA,SAASC,yBAAT,QAA0C,6BAA1C;AAEA,OAAO,MAAMC,QAAQ,GAAIC,SAAD,KAAiC;EACvDC,KAAK,EAAE,CAACC,CAAD,EAAYC,CAAZ,KACL,
|
1
|
+
{"version":3,"names":["JsiSkPoint","JsiSkPaint","JsiSkRect","Color","JsiSkSurfaceFactory","JsiSkRRect","JsiSkRSXform","JsiSkContourMeasureIter","JsiSkPictureRecorder","JsiSkPictureFactory","JsiSkPathFactory","JsiSkMatrix","JsiSkColorFilterFactory","JsiSkTypefaceFactory","JsiSkMaskFilterFactory","JsiSkRuntimeEffectFactory","JsiSkImageFilterFactory","JsiSkShaderFactory","JsiSkPathEffectFactory","JsiSkDataFactory","JsiSkImageFactory","JsiSkSVGFactory","JsiSkTextBlobFactory","JsiSkFont","MakeVertices","JsiSkPath","JsiSkTypeface","JsiSkTypefaceFontProviderFactory","JsiSkFontMgrFactory","JsiSkAnimatedImageFactory","JsiSkParagraphBuilderFactory","JsiSkApi","CanvasKit","Point","x","y","Float32Array","of","RuntimeShaderBuilder","_","Error","RRectXY","rect","rx","ry","RSXform","scos","ssin","tx","ty","ContourMeasureIter","path","forceClosed","resScale","fromValue","Paint","paint","setAntiAlias","PictureRecorder","Picture","Path","Matrix","matrix","identity","ColorFilter","Font","typeface","size","undefined","Typeface","MaskFilter","RuntimeEffect","ImageFilter","Shader","PathEffect","bind","Data","Image","AnimatedImage","SVG","TextBlob","XYWHRect","width","height","Surface","TypefaceFontProvider","FontMgr","ParagraphBuilder"],"sources":["JsiSkia.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n SkContourMeasureIter,\n Skia,\n SkPath,\n SkRect,\n SkRuntimeEffect,\n SkRuntimeShaderBuilder,\n SkTypeface,\n} from \"../types\";\n\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { Color } from \"./JsiSkColor\";\nimport { JsiSkSurfaceFactory } from \"./JsiSkSurfaceFactory\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkRSXform } from \"./JsiSkRSXform\";\nimport { JsiSkContourMeasureIter } from \"./JsiSkContourMeasureIter\";\nimport { JsiSkPictureRecorder } from \"./JsiSkPictureRecorder\";\nimport { JsiSkPictureFactory } from \"./JsiSkPictureFactory\";\nimport { JsiSkPathFactory } from \"./JsiSkPathFactory\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkColorFilterFactory } from \"./JsiSkColorFilterFactory\";\nimport { JsiSkTypefaceFactory } from \"./JsiSkTypefaceFactory\";\nimport { JsiSkMaskFilterFactory } from \"./JsiSkMaskFilterFactory\";\nimport { JsiSkRuntimeEffectFactory } from \"./JsiSkRuntimeEffectFactory\";\nimport { JsiSkImageFilterFactory } from \"./JsiSkImageFilterFactory\";\nimport { JsiSkShaderFactory } from \"./JsiSkShaderFactory\";\nimport { JsiSkPathEffectFactory } from \"./JsiSkPathEffectFactory\";\nimport { JsiSkDataFactory } from \"./JsiSkDataFactory\";\nimport { JsiSkImageFactory } from \"./JsiSkImageFactory\";\nimport { JsiSkSVGFactory } from \"./JsiSkSVGFactory\";\nimport { JsiSkTextBlobFactory } from \"./JsiSkTextBlobFactory\";\nimport { JsiSkFont } from \"./JsiSkFont\";\nimport { MakeVertices } from \"./JsiSkVerticesFactory\";\nimport { JsiSkPath } from \"./JsiSkPath\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\nimport { JsiSkTypefaceFontProviderFactory } from \"./JsiSkTypefaceFontProviderFactory\";\nimport { JsiSkFontMgrFactory } from \"./JsiSkFontMgrFactory\";\nimport { JsiSkAnimatedImageFactory } from \"./JsiSkAnimatedImageFactory\";\nimport { JsiSkParagraphBuilderFactory } from \"./JsiSkParagraphBuilderFactory\";\n\nexport const JsiSkApi = (CanvasKit: CanvasKit): Skia => ({\n Point: (x: number, y: number) =>\n new JsiSkPoint(CanvasKit, Float32Array.of(x, y)),\n RuntimeShaderBuilder: (_: SkRuntimeEffect): SkRuntimeShaderBuilder => {\n throw new Error(\"Not implemented on React Native Web\");\n },\n RRectXY: (rect: SkRect, rx: number, ry: number) =>\n new JsiSkRRect(CanvasKit, rect, rx, ry),\n RSXform: (scos: number, ssin: number, tx: number, ty: number) =>\n new JsiSkRSXform(CanvasKit, Float32Array.of(scos, ssin, tx, ty)),\n Color,\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ): SkContourMeasureIter =>\n new JsiSkContourMeasureIter(\n CanvasKit,\n new CanvasKit.ContourMeasureIter(\n JsiSkPath.fromValue(path),\n forceClosed,\n resScale\n )\n ),\n Paint: () => {\n const paint = new JsiSkPaint(CanvasKit, new CanvasKit.Paint());\n paint.setAntiAlias(true);\n return paint;\n },\n PictureRecorder: () =>\n new JsiSkPictureRecorder(CanvasKit, new CanvasKit.PictureRecorder()),\n Picture: new JsiSkPictureFactory(CanvasKit),\n Path: new JsiSkPathFactory(CanvasKit),\n Matrix: (matrix?: readonly number[]) =>\n new JsiSkMatrix(\n CanvasKit,\n matrix\n ? Float32Array.of(...matrix)\n : Float32Array.of(...CanvasKit.Matrix.identity())\n ),\n ColorFilter: new JsiSkColorFilterFactory(CanvasKit),\n Font: (typeface?: SkTypeface, size?: number) =>\n new JsiSkFont(\n CanvasKit,\n new CanvasKit.Font(\n typeface === undefined ? null : JsiSkTypeface.fromValue(typeface),\n size\n )\n ),\n Typeface: new JsiSkTypefaceFactory(CanvasKit),\n MaskFilter: new JsiSkMaskFilterFactory(CanvasKit),\n RuntimeEffect: new JsiSkRuntimeEffectFactory(CanvasKit),\n ImageFilter: new JsiSkImageFilterFactory(CanvasKit),\n Shader: new JsiSkShaderFactory(CanvasKit),\n PathEffect: new JsiSkPathEffectFactory(CanvasKit),\n MakeVertices: MakeVertices.bind(null, CanvasKit),\n Data: new JsiSkDataFactory(CanvasKit),\n Image: new JsiSkImageFactory(CanvasKit),\n AnimatedImage: new JsiSkAnimatedImageFactory(CanvasKit),\n SVG: new JsiSkSVGFactory(CanvasKit),\n TextBlob: new JsiSkTextBlobFactory(CanvasKit),\n XYWHRect: (x: number, y: number, width: number, height: number) => {\n return new JsiSkRect(CanvasKit, CanvasKit.XYWHRect(x, y, width, height));\n },\n Surface: new JsiSkSurfaceFactory(CanvasKit),\n TypefaceFontProvider: new JsiSkTypefaceFontProviderFactory(CanvasKit),\n FontMgr: new JsiSkFontMgrFactory(CanvasKit),\n ParagraphBuilder: new JsiSkParagraphBuilderFactory(CanvasKit),\n});\n"],"mappings":"AAYA,SAASA,UAAT,QAA2B,cAA3B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,KAAT,QAAsB,cAAtB;AACA,SAASC,mBAAT,QAAoC,uBAApC;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,uBAAT,QAAwC,2BAAxC;AACA,SAASC,oBAAT,QAAqC,wBAArC;AACA,SAASC,mBAAT,QAAoC,uBAApC;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,uBAAT,QAAwC,2BAAxC;AACA,SAASC,oBAAT,QAAqC,wBAArC;AACA,SAASC,sBAAT,QAAuC,0BAAvC;AACA,SAASC,yBAAT,QAA0C,6BAA1C;AACA,SAASC,uBAAT,QAAwC,2BAAxC;AACA,SAASC,kBAAT,QAAmC,sBAAnC;AACA,SAASC,sBAAT,QAAuC,0BAAvC;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,oBAAT,QAAqC,wBAArC;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,YAAT,QAA6B,wBAA7B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA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D4C,IAAI,EAAE,IAAIzD,gBAAJ,CAAqBa,SAArB,CAxDiD;EAyDvD6C,KAAK,EAAE,IAAIzD,iBAAJ,CAAsBY,SAAtB,CAzDgD;EA0DvD8C,aAAa,EAAE,IAAIjD,yBAAJ,CAA8BG,SAA9B,CA1DwC;EA2DvD+C,GAAG,EAAE,IAAI1D,eAAJ,CAAoBW,SAApB,CA3DkD;EA4DvDgD,QAAQ,EAAE,IAAI1D,oBAAJ,CAAyBU,SAAzB,CA5D6C;EA6DvDiD,QAAQ,EAAE,CAAC/C,CAAD,EAAYC,CAAZ,EAAuB+C,KAAvB,EAAsCC,MAAtC,KAAyD;IACjE,OAAO,IAAIjF,SAAJ,CAAc8B,SAAd,EAAyBA,SAAS,CAACiD,QAAV,CAAmB/C,CAAnB,EAAsBC,CAAtB,EAAyB+C,KAAzB,EAAgCC,MAAhC,CAAzB,CAAP;EACD,CA/DsD;EAgEvDC,OAAO,EAAE,IAAIhF,mBAAJ,CAAwB4B,SAAxB,CAhE8C;EAiEvDqD,oBAAoB,EAAE,IAAI1D,gCAAJ,CAAqCK,SAArC,CAjEiC;EAkEvDsD,OAAO,EAAE,IAAI1D,mBAAJ,CAAwBI,SAAxB,CAlE8C;EAmEvDuD,gBAAgB,EAAE,IAAIzD,4BAAJ,CAAiCE,SAAjC;AAnEqC,CAAjC,CAAjB"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { PathProps, SkDOM, GroupProps, ImageProps, BlurImageFilterProps, MatrixColorFilterProps, CircleProps, BlurMaskFilterProps, LinearGradientProps, PaintProps, ShaderProps, ImageShaderProps, CustomDrawingNodeProps, LineProps, OvalProps, PatchProps, PointsProps, RectProps, RoundedRectProps, VerticesProps, TextProps, DiffRectProps, OffsetImageFilterProps, BlendColorFilterProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, FractalNoiseProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, DrawingNodeProps, BoxProps, BoxShadowProps, ChildrenProps } from "../types";
|
2
2
|
import type { BlendImageFilterProps, BlendProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, MorphologyImageFilterProps, RuntimeShaderImageFilterProps } from "../types/ImageFilters";
|
3
3
|
import type { CornerPathEffectProps, DashPathEffectProps, DiscretePathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps } from "../types/PathEffects";
|
4
|
+
import type { ParagraphProps } from "../types/Paragraph";
|
4
5
|
import type { NodeContext } from "./Node";
|
5
6
|
export declare class JsiSkDOM implements SkDOM {
|
6
7
|
private ctx;
|
@@ -61,4 +62,5 @@ export declare class JsiSkDOM implements SkDOM {
|
|
61
62
|
BackdropFilter(props: ChildrenProps): import("../types").RenderNode<ChildrenProps>;
|
62
63
|
Box(props: BoxProps): import("../types").RenderNode<BoxProps>;
|
63
64
|
BoxShadow(props: BoxShadowProps): import("../types").DeclarationNode<BoxShadowProps>;
|
65
|
+
Paragraph(props: ParagraphProps): import("../types").RenderNode<ParagraphProps>;
|
64
66
|
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { DrawingContext, ParagraphProps } from "../../types";
|
2
|
+
import { JsiDrawingNode } from "../DrawingNode";
|
3
|
+
import type { NodeContext } from "../Node";
|
4
|
+
export declare class ParagraphNode extends JsiDrawingNode<ParagraphProps, null> {
|
5
|
+
constructor(ctx: NodeContext, props: ParagraphProps);
|
6
|
+
deriveProps(): null;
|
7
|
+
draw({ canvas }: DrawingContext): void;
|
8
|
+
}
|
@@ -54,7 +54,8 @@ export declare const enum NodeType {
|
|
54
54
|
TextBlob = "skTextBlob",
|
55
55
|
Glyphs = "skGlyphs",
|
56
56
|
Picture = "skPicture",
|
57
|
-
ImageSVG = "skImageSVG"
|
57
|
+
ImageSVG = "skImageSVG",
|
58
|
+
Paragraph = "skParagraph"
|
58
59
|
}
|
59
60
|
export declare const enum DeclarationType {
|
60
61
|
Paint = 0,
|
@@ -6,6 +6,7 @@ import type { ImageProps, CircleProps, PathProps, CustomDrawingNodeProps, LinePr
|
|
6
6
|
import type { BlurMaskFilterProps } from "./MaskFilters";
|
7
7
|
import type { FractalNoiseProps, SweepGradientProps, ImageShaderProps, LinearGradientProps, ShaderProps, TurbulenceProps, TwoPointConicalGradientProps, RadialGradientProps, ColorProps } from "./Shaders";
|
8
8
|
import type { CornerPathEffectProps, DashPathEffectProps, DiscretePathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps } from "./PathEffects";
|
9
|
+
import type { ParagraphProps } from "./Paragraph";
|
9
10
|
type ImageFilterNode<P> = DeclarationNode<P>;
|
10
11
|
type PathEffectNode<P> = DeclarationNode<P>;
|
11
12
|
type NullablePathEffectNode<P> = DeclarationNode<P>;
|
@@ -67,5 +68,6 @@ export interface SkDOM {
|
|
67
68
|
BackdropFilter(props: ChildrenProps): RenderNode<ChildrenProps>;
|
68
69
|
Box(props: BoxProps): RenderNode<BoxProps>;
|
69
70
|
BoxShadow(props: BoxShadowProps): DeclarationNode<BoxShadowProps>;
|
71
|
+
Paragraph(props: ParagraphProps): RenderNode<ParagraphProps>;
|
70
72
|
}
|
71
73
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { NodeType } from "../dom/types";
|
2
|
-
import type { DeclarationNode, FractalNoiseProps, RenderNode, CircleProps, DrawingNodeProps, ImageProps, PaintProps, PathProps, CustomDrawingNodeProps, LineProps, OvalProps, DiffRectProps, PointsProps, RectProps, RoundedRectProps, TextProps, VerticesProps, BlurMaskFilterProps, BlendImageFilterProps, BlurImageFilterProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, MatrixColorFilterProps, ShaderProps, ImageShaderProps, LinearGradientProps, GroupProps, PatchProps, BlendColorFilterProps, DashPathEffectProps, DiscretePathEffectProps, CornerPathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, BoxProps, BoxShadowProps } from "../dom/types";
|
2
|
+
import type { DeclarationNode, FractalNoiseProps, RenderNode, CircleProps, DrawingNodeProps, ImageProps, PaintProps, PathProps, CustomDrawingNodeProps, LineProps, OvalProps, DiffRectProps, PointsProps, RectProps, RoundedRectProps, TextProps, VerticesProps, BlurMaskFilterProps, BlendImageFilterProps, BlurImageFilterProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, MatrixColorFilterProps, ShaderProps, ImageShaderProps, LinearGradientProps, GroupProps, PatchProps, BlendColorFilterProps, DashPathEffectProps, DiscretePathEffectProps, CornerPathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, BoxProps, BoxShadowProps, ParagraphProps } from "../dom/types";
|
3
3
|
import type { ChildrenProps } from "../dom/types/Common";
|
4
4
|
import type { BlendProps, MorphologyImageFilterProps } from "../dom/types/ImageFilters";
|
5
5
|
import type { SkRect, SkRRect } from "../skia/types";
|
@@ -68,6 +68,7 @@ declare global {
|
|
68
68
|
BoxNode: (prop: BoxProps) => RenderNode<BoxProps>;
|
69
69
|
BoxShadowNode: (prop: BoxShadowProps) => DeclarationNode<BoxShadowProps>;
|
70
70
|
LayerNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;
|
71
|
+
ParagraphNode: (props: ParagraphProps) => RenderNode<ParagraphProps>;
|
71
72
|
};
|
72
73
|
namespace JSX {
|
73
74
|
interface IntrinsicElements {
|
@@ -127,6 +128,7 @@ declare global {
|
|
127
128
|
skBackdropFilter: SkiaProps<ChildrenProps>;
|
128
129
|
skBox: SkiaProps<BoxProps>;
|
129
130
|
skBoxShadow: SkiaProps<BoxShadowProps>;
|
131
|
+
skParagraph: SkiaProps<ParagraphProps>;
|
130
132
|
}
|
131
133
|
}
|
132
134
|
}
|