mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
♻️ Refactor wasm loading strategy on worker
This commit is contained in:
@@ -81,7 +81,7 @@
|
|||||||
:source-map-detail-level :all}}}
|
:source-map-detail-level :all}}}
|
||||||
|
|
||||||
:worker
|
:worker
|
||||||
{:target :esm
|
{:target :browser
|
||||||
:output-dir "resources/public/js/worker/"
|
:output-dir "resources/public/js/worker/"
|
||||||
:asset-path "/js/worker"
|
:asset-path "/js/worker"
|
||||||
:devtools {:browser-inject :main
|
:devtools {:browser-inject :main
|
||||||
@@ -92,6 +92,7 @@
|
|||||||
{:main
|
{:main
|
||||||
{:entries [app.worker]
|
{:entries [app.worker]
|
||||||
:web-worker true
|
:web-worker true
|
||||||
|
:prepend-js "importScripts('/js/worker/render.js');"
|
||||||
:depends-on #{}}}
|
:depends-on #{}}}
|
||||||
|
|
||||||
:js-options
|
:js-options
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
public-uri))
|
public-uri))
|
||||||
|
|
||||||
(def worker-uri
|
(def worker-uri
|
||||||
(obj/get global "penpotWorkerURI" "/js/worker.js"))
|
(obj/get global "penpotWorkerURI" "/js/worker/main.js"))
|
||||||
|
|
||||||
(defn external-feature-flag
|
(defn external-feature-flag
|
||||||
[flag value]
|
[flag value]
|
||||||
@@ -188,6 +188,11 @@
|
|||||||
(true? thumbnail?) (u/join (dm/str id "/thumbnail"))
|
(true? thumbnail?) (u/join (dm/str id "/thumbnail"))
|
||||||
(false? thumbnail?) (u/join (dm/str id)))))))
|
(false? thumbnail?) (u/join (dm/str id)))))))
|
||||||
|
|
||||||
(defn resolve-static-asset
|
(defn resolve-href
|
||||||
[path]
|
[resource]
|
||||||
(u/join public-uri path))
|
(let [version (get version :full)
|
||||||
|
href (-> public-uri
|
||||||
|
(u/ensure-path-slash)
|
||||||
|
(u/join resource)
|
||||||
|
(get :path))]
|
||||||
|
(str href "?version=" version)))
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
[app.common.types.path :as path]
|
[app.common.types.path :as path]
|
||||||
[app.common.types.path.impl :as path.impl]
|
[app.common.types.path.impl :as path.impl]
|
||||||
[app.common.types.shape.layout :as ctl]
|
[app.common.types.shape.layout :as ctl]
|
||||||
|
[app.common.uri :as u]
|
||||||
[app.common.uuid :as uuid]
|
[app.common.uuid :as uuid]
|
||||||
[app.config :as cf]
|
[app.config :as cf]
|
||||||
[app.main.fonts :as fonts]
|
[app.main.fonts :as fonts]
|
||||||
@@ -1317,51 +1318,16 @@
|
|||||||
(mem/free)
|
(mem/free)
|
||||||
content)))
|
content)))
|
||||||
|
|
||||||
|
|
||||||
(defn init-wasm-module
|
(defn init-wasm-module
|
||||||
[module]
|
[module]
|
||||||
(let [default-fn (unchecked-get module "default")
|
(let [default-fn (unchecked-get module "default")
|
||||||
serializers
|
href (cf/resolve-href "js/render-wasm.wasm")]
|
||||||
#js
|
(default-fn #js {:locateFile (constantly href)})))
|
||||||
{:blur-type (unchecked-get module "RawBlurType")
|
|
||||||
:blend-mode (unchecked-get module "RawBlendMode")
|
|
||||||
:bool-type (unchecked-get module "RawBoolType")
|
|
||||||
:font-style (unchecked-get module "RawFontStyle")
|
|
||||||
:flex-direction (unchecked-get module "RawFlexDirection")
|
|
||||||
:grid-direction (unchecked-get module "RawGridDirection")
|
|
||||||
:grow-type (unchecked-get module "RawGrowType")
|
|
||||||
:align-items (unchecked-get module "RawAlignItems")
|
|
||||||
:align-self (unchecked-get module "RawAlignSelf")
|
|
||||||
:align-content (unchecked-get module "RawAlignContent")
|
|
||||||
:justify-items (unchecked-get module "RawJustifyItems")
|
|
||||||
:justify-content (unchecked-get module "RawJustifyContent")
|
|
||||||
:justify-self (unchecked-get module "RawJustifySelf")
|
|
||||||
:wrap-type (unchecked-get module "RawWrapType")
|
|
||||||
:grid-track-type (unchecked-get module "RawGridTrackType")
|
|
||||||
:shadow-style (unchecked-get module "RawShadowStyle")
|
|
||||||
:stroke-style (unchecked-get module "RawStrokeStyle")
|
|
||||||
:stroke-cap (unchecked-get module "RawStrokeCap")
|
|
||||||
:shape-type (unchecked-get module "RawShapeType")
|
|
||||||
:constraint-h (unchecked-get module "RawConstraintH")
|
|
||||||
:constraint-v (unchecked-get module "RawConstraintV")
|
|
||||||
:sizing (unchecked-get module "RawSizing")
|
|
||||||
:vertical-align (unchecked-get module "RawVerticalAlign")
|
|
||||||
:fill-data (unchecked-get module "RawFillData")
|
|
||||||
:text-align (unchecked-get module "RawTextAlign")
|
|
||||||
:text-direction (unchecked-get module "RawTextDirection")
|
|
||||||
:text-decoration (unchecked-get module "RawTextDecoration")
|
|
||||||
:text-transform (unchecked-get module "RawTextTransform")
|
|
||||||
:segment-data (unchecked-get module "RawSegmentData")
|
|
||||||
:stroke-linecap (unchecked-get module "RawStrokeLineCap")
|
|
||||||
:stroke-linejoin (unchecked-get module "RawStrokeLineJoin")
|
|
||||||
:fill-rule (unchecked-get module "RawFillRule")}]
|
|
||||||
(set! wasm/serializers serializers)
|
|
||||||
(default-fn)))
|
|
||||||
|
|
||||||
(defonce module
|
(defonce module
|
||||||
(delay
|
(delay
|
||||||
(if (exists? js/dynamicImport)
|
(if (exists? js/dynamicImport)
|
||||||
(let [uri (cf/resolve-static-asset "js/render-wasm.js")]
|
(let [uri (cf/resolve-href "js/render-wasm.js")]
|
||||||
(->> (mod/import uri)
|
(->> (mod/import uri)
|
||||||
(p/mcat init-wasm-module)
|
(p/mcat init-wasm-module)
|
||||||
(p/fmap
|
(p/fmap
|
||||||
|
|||||||
242
frontend/src/app/render_wasm/api/shared.js
Normal file
242
frontend/src/app/render_wasm/api/shared.js
Normal file
@@ -0,0 +1,242 @@
|
|||||||
|
export const GrowType = {
|
||||||
|
"fixed": 0,
|
||||||
|
"auto-width": 1,
|
||||||
|
"auto-height": 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawBlendMode = {
|
||||||
|
"normal": 3,
|
||||||
|
"screen": 14,
|
||||||
|
"overlay": 15,
|
||||||
|
"darken": 16,
|
||||||
|
"lighten": 17,
|
||||||
|
"color-dodge": 18,
|
||||||
|
"color-burn": 19,
|
||||||
|
"hard-light": 20,
|
||||||
|
"soft-light": 21,
|
||||||
|
"difference": 22,
|
||||||
|
"exclusion": 23,
|
||||||
|
"multiply": 24,
|
||||||
|
"hue": 25,
|
||||||
|
"saturation": 26,
|
||||||
|
"color": 27,
|
||||||
|
"luminosity": 28,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawBlurType = {
|
||||||
|
"layer-blur": 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawFillData = {
|
||||||
|
"solid": 0,
|
||||||
|
"linear": 1,
|
||||||
|
"radial": 2,
|
||||||
|
"image": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawFontStyle = {
|
||||||
|
"normal": 0,
|
||||||
|
"italic": 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawAlignItems = {
|
||||||
|
"start": 0,
|
||||||
|
"end": 1,
|
||||||
|
"center": 2,
|
||||||
|
"stretch": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawAlignContent = {
|
||||||
|
"start": 0,
|
||||||
|
"end": 1,
|
||||||
|
"center": 2,
|
||||||
|
"space-between": 3,
|
||||||
|
"space-around": 4,
|
||||||
|
"space-evenly": 5,
|
||||||
|
"stretch": 6,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawJustifyItems = {
|
||||||
|
"start": 0,
|
||||||
|
"end": 1,
|
||||||
|
"center": 2,
|
||||||
|
"stretch": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawJustifyContent = {
|
||||||
|
"start": 0,
|
||||||
|
"end": 1,
|
||||||
|
"center": 2,
|
||||||
|
"space-between": 3,
|
||||||
|
"space-around": 4,
|
||||||
|
"space-evenly": 5,
|
||||||
|
"stretch": 6,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawJustifySelf = {
|
||||||
|
"none": 0,
|
||||||
|
"auto": 1,
|
||||||
|
"start": 2,
|
||||||
|
"end": 3,
|
||||||
|
"center": 4,
|
||||||
|
"stretch": 5,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawAlignSelf = {
|
||||||
|
"none": 0,
|
||||||
|
"auto": 1,
|
||||||
|
"start": 2,
|
||||||
|
"end": 3,
|
||||||
|
"center": 4,
|
||||||
|
"stretch": 5,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawVerticalAlign = {
|
||||||
|
"top": 0,
|
||||||
|
"center": 1,
|
||||||
|
"bottom": 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawConstraintH = {
|
||||||
|
"left": 0,
|
||||||
|
"right": 1,
|
||||||
|
"leftright": 2,
|
||||||
|
"center": 3,
|
||||||
|
"scale": 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawConstraintV = {
|
||||||
|
"top": 0,
|
||||||
|
"bottom": 1,
|
||||||
|
"topbottom": 2,
|
||||||
|
"center": 3,
|
||||||
|
"scale": 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawFlexDirection = {
|
||||||
|
"row": 0,
|
||||||
|
"row-reverse": 1,
|
||||||
|
"column": 2,
|
||||||
|
"column-reverse": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawWrapType = {
|
||||||
|
"wrap": 0,
|
||||||
|
"nowrap": 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawGridDirection = {
|
||||||
|
"row": 0,
|
||||||
|
"column": 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawGridTrackType = {
|
||||||
|
"percent": 0,
|
||||||
|
"flex": 1,
|
||||||
|
"auto": 2,
|
||||||
|
"fixed": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawSizing = {
|
||||||
|
"fill": 0,
|
||||||
|
"fix": 1,
|
||||||
|
"auto": 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawBoolType = {
|
||||||
|
"union": 0,
|
||||||
|
"difference": 1,
|
||||||
|
"intersection": 2,
|
||||||
|
"exclusion": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawSegmentData = {
|
||||||
|
"move-to": 1,
|
||||||
|
"line-to": 2,
|
||||||
|
"curve-to": 3,
|
||||||
|
"close": 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawShadowStyle = {
|
||||||
|
"drop-shadow": 0,
|
||||||
|
"inner-shadow": 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawShapeType = {
|
||||||
|
"frame": 0,
|
||||||
|
"group": 1,
|
||||||
|
"bool": 2,
|
||||||
|
"rect": 3,
|
||||||
|
"path": 4,
|
||||||
|
"text": 5,
|
||||||
|
"circle": 6,
|
||||||
|
"svg-raw": 7,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawStrokeStyle = {
|
||||||
|
"solid": 0,
|
||||||
|
"dotted": 1,
|
||||||
|
"dashed": 2,
|
||||||
|
"mixed": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawStrokeCap = {
|
||||||
|
"none": 0,
|
||||||
|
"line-arrow": 1,
|
||||||
|
"triangle-arrow": 2,
|
||||||
|
"square-marker": 3,
|
||||||
|
"circle-marker": 4,
|
||||||
|
"diamond-marker": 5,
|
||||||
|
"round": 6,
|
||||||
|
"square": 7,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawFillRule = {
|
||||||
|
"nonzero": 0,
|
||||||
|
"evenodd": 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawStrokeLineCap = {
|
||||||
|
"butt": 0,
|
||||||
|
"round": 1,
|
||||||
|
"square": 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawStrokeLineJoin = {
|
||||||
|
"miter": 0,
|
||||||
|
"round": 1,
|
||||||
|
"bevel": 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawTextAlign = {
|
||||||
|
"left": 0,
|
||||||
|
"center": 1,
|
||||||
|
"right": 2,
|
||||||
|
"justify": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawTextDirection = {
|
||||||
|
"ltr": 0,
|
||||||
|
"rtl": 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawTextDecoration = {
|
||||||
|
"none": 0,
|
||||||
|
"underline": 1,
|
||||||
|
"line-through": 2,
|
||||||
|
"overline": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawTextTransform = {
|
||||||
|
"none": 0,
|
||||||
|
"uppercase": 1,
|
||||||
|
"lowercase": 2,
|
||||||
|
"capitalize": 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RawGrowType = {
|
||||||
|
"fixed": 0,
|
||||||
|
"auto-width": 1,
|
||||||
|
"auto-height": 2,
|
||||||
|
};
|
||||||
|
|
||||||
@@ -4,9 +4,43 @@
|
|||||||
;;
|
;;
|
||||||
;; Copyright (c) KALEIDOS INC
|
;; Copyright (c) KALEIDOS INC
|
||||||
|
|
||||||
(ns app.render-wasm.wasm)
|
(ns app.render-wasm.wasm
|
||||||
|
(:require ["./api/shared.js" :as shared]))
|
||||||
|
|
||||||
(defonce internal-frame-id nil)
|
(defonce internal-frame-id nil)
|
||||||
(defonce internal-module #js {})
|
(defonce internal-module #js {})
|
||||||
(defonce serializers #js {})
|
(defonce serializers
|
||||||
|
#js {:blur-type (unchecked-get shared "RawBlurType")
|
||||||
|
:blend-mode (unchecked-get shared "RawBlendMode")
|
||||||
|
:bool-type (unchecked-get shared "RawBoolType")
|
||||||
|
:font-style (unchecked-get shared "RawFontStyle")
|
||||||
|
:flex-direction (unchecked-get shared "RawFlexDirection")
|
||||||
|
:grid-direction (unchecked-get shared "RawGridDirection")
|
||||||
|
:grow-type (unchecked-get shared "RawGrowType")
|
||||||
|
:align-items (unchecked-get shared "RawAlignItems")
|
||||||
|
:align-self (unchecked-get shared "RawAlignSelf")
|
||||||
|
:align-content (unchecked-get shared "RawAlignContent")
|
||||||
|
:justify-items (unchecked-get shared "RawJustifyItems")
|
||||||
|
:justify-content (unchecked-get shared "RawJustifyContent")
|
||||||
|
:justify-self (unchecked-get shared "RawJustifySelf")
|
||||||
|
:wrap-type (unchecked-get shared "RawWrapType")
|
||||||
|
:grid-track-type (unchecked-get shared "RawGridTrackType")
|
||||||
|
:shadow-style (unchecked-get shared "RawShadowStyle")
|
||||||
|
:stroke-style (unchecked-get shared "RawStrokeStyle")
|
||||||
|
:stroke-cap (unchecked-get shared "RawStrokeCap")
|
||||||
|
:shape-type (unchecked-get shared "RawShapeType")
|
||||||
|
:constraint-h (unchecked-get shared "RawConstraintH")
|
||||||
|
:constraint-v (unchecked-get shared "RawConstraintV")
|
||||||
|
:sizing (unchecked-get shared "RawSizing")
|
||||||
|
:vertical-align (unchecked-get shared "RawVerticalAlign")
|
||||||
|
:fill-data (unchecked-get shared "RawFillData")
|
||||||
|
:text-align (unchecked-get shared "RawTextAlign")
|
||||||
|
:text-direction (unchecked-get shared "RawTextDirection")
|
||||||
|
:text-decoration (unchecked-get shared "RawTextDecoration")
|
||||||
|
:text-transform (unchecked-get shared "RawTextTransform")
|
||||||
|
:segment-data (unchecked-get shared "RawSegmentData")
|
||||||
|
:stroke-linecap (unchecked-get shared "RawStrokeLineCap")
|
||||||
|
:stroke-linejoin (unchecked-get shared "RawStrokeLineJoin")
|
||||||
|
:fill-rule (unchecked-get shared "RawFillRule")})
|
||||||
|
|
||||||
(defonce context-initialized? false)
|
(defonce context-initialized? false)
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
(defn init
|
(defn init
|
||||||
"Return a initialized webworker instance."
|
"Return a initialized webworker instance."
|
||||||
[path on-error]
|
[path on-error]
|
||||||
(let [instance (js/Worker. path #js {:type "module"})
|
(let [instance (js/Worker. path)
|
||||||
bus (rx/subject)
|
bus (rx/subject)
|
||||||
worker (Worker. instance (rx/to-observable bus))
|
worker (Worker. instance (rx/to-observable bus))
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
|
|
||||||
(log/set-level! :trace)
|
(log/set-level! :trace)
|
||||||
|
|
||||||
|
(def ^:private ^:const thumbnail-aspect-ratio (/ 2 3))
|
||||||
|
|
||||||
(defn- handle-response
|
(defn- handle-response
|
||||||
[{:keys [body status] :as response}]
|
[{:keys [body status] :as response}]
|
||||||
(cond
|
(cond
|
||||||
@@ -64,6 +66,10 @@
|
|||||||
(rx/map http/conditional-decode-transit)
|
(rx/map http/conditional-decode-transit)
|
||||||
(rx/mapcat handle-response))))
|
(rx/mapcat handle-response))))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; SVG RENDERING (LEGACY RENDER)
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defn- render-thumbnail
|
(defn- render-thumbnail
|
||||||
[{:keys [page file-id revn] :as params}]
|
[{:keys [page file-id revn] :as params}]
|
||||||
(try
|
(try
|
||||||
@@ -98,15 +104,13 @@
|
|||||||
(->> (request-data-for-thumbnail file-id revn true)
|
(->> (request-data-for-thumbnail file-id revn true)
|
||||||
(rx/map render-thumbnail)))
|
(rx/map render-thumbnail)))
|
||||||
|
|
||||||
(def init-wasm
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(delay
|
;; WASM RENDERING
|
||||||
(let [uri (cf/resolve-static-asset "js/render-wasm.js")]
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(-> (mod/import (str uri))
|
|
||||||
(p/then #(wasm.api/init-wasm-module %))
|
|
||||||
(p/then #(set! wasm/internal-module %))))))
|
|
||||||
|
|
||||||
(mf/defc svg-wrapper
|
(mf/defc svg-wrapper*
|
||||||
[{:keys [data-uri background width height]}]
|
{::mf/private true}
|
||||||
|
[{:keys [uri background width height]}]
|
||||||
[:svg {:version "1.1"
|
[:svg {:version "1.1"
|
||||||
:xmlns "http://www.w3.org/2000/svg"
|
:xmlns "http://www.w3.org/2000/svg"
|
||||||
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
:xmlnsXlink "http://www.w3.org/1999/xlink"
|
||||||
@@ -116,85 +120,97 @@
|
|||||||
:background background}
|
:background background}
|
||||||
:fill "none"
|
:fill "none"
|
||||||
:viewBox (dm/str "0 0 " width " " height)}
|
:viewBox (dm/str "0 0 " width " " height)}
|
||||||
[:image {:xlinkHref data-uri
|
[:image {:xlinkHref uri
|
||||||
:width width
|
:width width
|
||||||
:height height}]])
|
:height height}]])
|
||||||
|
|
||||||
(defn blob->uri
|
(defn- blob->uri
|
||||||
[blob]
|
[blob]
|
||||||
(.readAsDataURL (js/FileReaderSync.) blob))
|
(.readAsDataURL (js/FileReaderSync.) blob))
|
||||||
|
|
||||||
(def thumbnail-aspect-ratio (/ 2 3))
|
(defn- render-canvas-blob
|
||||||
|
[canvas width height background]
|
||||||
|
(->> (.convertToBlob ^js canvas)
|
||||||
|
(p/fmap (fn [blob]
|
||||||
|
(rds/renderToStaticMarkup
|
||||||
|
(mf/element svg-wrapper*
|
||||||
|
#js {:uri (blob->uri blob)
|
||||||
|
:width width
|
||||||
|
:height height
|
||||||
|
:background background}))))))
|
||||||
|
|
||||||
(defn render-canvas-blob
|
(defonce ^:private wasm-module
|
||||||
[canvas width height background-color]
|
(delay
|
||||||
(-> (.convertToBlob canvas)
|
(let [module (unchecked-get js/globalThis "WasmModule")
|
||||||
(p/then
|
init-fn (unchecked-get module "default")
|
||||||
(fn [blob]
|
href (cf/resolve-href "js/render-wasm.wasm")]
|
||||||
(rds/renderToStaticMarkup
|
(->> (init-fn #js {:locateFile (constantly href)})
|
||||||
(mf/element
|
(p/fnly (fn [module cause]
|
||||||
svg-wrapper
|
(if cause
|
||||||
#js {:data-uri (blob->uri blob)
|
(js/console.error cause)
|
||||||
:width width
|
(set! wasm/internal-module module))))))))
|
||||||
:height height
|
|
||||||
:background background-color}))))))
|
|
||||||
|
|
||||||
(defn process-wasm-thumbnail
|
(defn- render-thumbnail-with-wasm
|
||||||
[{:keys [id file-id revn width] :as message}]
|
[{:keys [id file-id revn width] :as message}]
|
||||||
(->> (rx/from @init-wasm)
|
(->> (rx/from @wasm-module)
|
||||||
(rx/mapcat #(request-data-for-thumbnail file-id revn false))
|
(rx/mapcat #(request-data-for-thumbnail file-id revn false))
|
||||||
(rx/mapcat
|
(rx/mapcat
|
||||||
(fn [{:keys [page] :as file}]
|
(fn [{:keys [page] :as file}]
|
||||||
(rx/create
|
(rx/create
|
||||||
(fn [subs]
|
(fn [subs]
|
||||||
(let [background-color (or (:background page) cc/canvas)
|
(let [bgcolor (or (:background page) cc/canvas)
|
||||||
height (* width thumbnail-aspect-ratio)
|
height (* width thumbnail-aspect-ratio)
|
||||||
canvas (js/OffscreenCanvas. width height)
|
canvas (js/OffscreenCanvas. width height)
|
||||||
init? (wasm.api/init-canvas-context canvas)]
|
init? (wasm.api/init-canvas-context canvas)]
|
||||||
(if init?
|
(if init?
|
||||||
(let [objects (:objects page)
|
(let [objects (:objects page)
|
||||||
frame (some->> page :thumbnail-frame-id (get objects))
|
frame (some->> page :thumbnail-frame-id (get objects))
|
||||||
vbox (if frame
|
vbox (if frame
|
||||||
(-> (gsb/get-object-bounds objects frame)
|
(-> (gsb/get-object-bounds objects frame)
|
||||||
(grc/fix-aspect-ratio thumbnail-aspect-ratio))
|
(grc/fix-aspect-ratio thumbnail-aspect-ratio))
|
||||||
(render/calculate-dimensions objects thumbnail-aspect-ratio))
|
(render/calculate-dimensions objects thumbnail-aspect-ratio))
|
||||||
zoom (/ width (:width vbox))]
|
zoom (/ width (:width vbox))]
|
||||||
|
|
||||||
(wasm.api/initialize-viewport
|
(wasm.api/initialize-viewport
|
||||||
objects zoom vbox background-color
|
objects zoom vbox bgcolor
|
||||||
(fn []
|
(fn []
|
||||||
(if frame
|
(if frame
|
||||||
(wasm.api/render-sync-shape (:id frame))
|
(wasm.api/render-sync-shape (:id frame))
|
||||||
(wasm.api/render-sync))
|
(wasm.api/render-sync))
|
||||||
|
|
||||||
(-> (render-canvas-blob canvas width height background-color)
|
(->> (render-canvas-blob canvas width height bgcolor)
|
||||||
(p/then #(rx/push! subs {:id id :data % :file-id file-id :revn revn}))
|
(p/fnly (fn [data cause]
|
||||||
(p/catch #(rx/error! subs %))
|
(if cause
|
||||||
(p/finally #(rx/end! subs))))))
|
(rx/error! subs cause)
|
||||||
|
(rx/push! subs
|
||||||
|
{:id id
|
||||||
|
:data data
|
||||||
|
:file-id file-id
|
||||||
|
:revn revn}))
|
||||||
|
(rx/end! subs)))))))
|
||||||
(rx/end! subs))
|
(rx/end! subs))
|
||||||
|
|
||||||
nil)))))))
|
nil)))))))
|
||||||
|
|
||||||
(defonce thumbs-subject (rx/subject))
|
(defonce ^:private
|
||||||
|
thumbnails-queue
|
||||||
|
(rx/subject))
|
||||||
|
|
||||||
(defonce thumbs-stream
|
(defonce ^:private
|
||||||
(->> thumbs-subject
|
thumbnails-stream
|
||||||
(rx/mapcat process-wasm-thumbnail)
|
(->> thumbnails-queue
|
||||||
|
(rx/mapcat render-thumbnail-with-wasm)
|
||||||
(rx/share)))
|
(rx/share)))
|
||||||
|
|
||||||
(defmethod impl/handler :thumbnails/generate-for-file-wasm
|
(defmethod impl/handler :thumbnails/generate-for-file-wasm
|
||||||
[message _]
|
[message _]
|
||||||
(rx/create
|
(rx/create
|
||||||
(fn [subs]
|
(fn [subs]
|
||||||
(let [id (uuid/next)
|
(let [id (uuid/next)
|
||||||
sid
|
sid (->> thumbnails-stream
|
||||||
(->> thumbs-stream
|
(rx/filter #(= id (:id %)))
|
||||||
(rx/filter #(= id (:id %)))
|
(rx/subs!
|
||||||
(rx/subs!
|
(fn [result]
|
||||||
#(do
|
(rx/push! subs result)
|
||||||
(rx/push! subs %)
|
(rx/end! subs))))]
|
||||||
(rx/end! subs))))]
|
(rx/push! thumbnails-queue (assoc message :id id))
|
||||||
(rx/push! thumbs-subject (assoc message :id id))
|
|
||||||
|
|
||||||
#(rx/dispose! sid)))))
|
#(rx/dispose! sid)))))
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"author": "Kaleidos INC",
|
"author": "Kaleidos INC",
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538",
|
"packageManager": "yarn@4.12.0+sha512.f45ab632439a67f8bc759bf32ead036a1f413287b9042726b7cc4818b7b49e14e9423ba49b18f9e06ea4941c1ad062385b1d8760a8d5091a1a31e5f6219afca8",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/penpot/penpot"
|
"url": "https://github.com/penpot/penpot"
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
"fmt": "./scripts/fmt"
|
"fmt": "./scripts/fmt"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^20.12.7"
|
"@types/node": "^20.12.7",
|
||||||
|
"esbuild": "^0.25.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CURRENT_VERSION=${CURRENT_VERSION:-develop};
|
export CURRENT_VERSION=${CURRENT_VERSION:-develop};
|
||||||
|
|
||||||
if [ "$NODE_ENV" = "production" ]; then
|
if [ "$NODE_ENV" = "production" ]; then
|
||||||
export BUILD_MODE="release";
|
export BUILD_MODE="release";
|
||||||
@@ -8,14 +8,16 @@ else
|
|||||||
export BUILD_MODE=${1:-debug};
|
export BUILD_MODE=${1:-debug};
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_NAME="${BUILD_NAME:-render-wasm}"
|
export BUILD_NAME="${BUILD_NAME:-render-wasm}"
|
||||||
|
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
||||||
|
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.87.0/skia-binaries-e551f334ad5cbdf43abf-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
||||||
|
|
||||||
# 256 MB of initial heap to perform less
|
# 256 MB of initial heap to perform less
|
||||||
# initial calls to memory grow.
|
# initial calls to memory grow.
|
||||||
EM_INITIAL_HEAP=$((256 * 1024 * 1024))
|
export EM_INITIAL_HEAP=$((256 * 1024 * 1024))
|
||||||
|
|
||||||
# 1.0 doubles the heap on every growth.
|
# 1.0 doubles the heap on every growth.
|
||||||
EM_MEMORY_GROWTH_GEOMETRIC_STEP="0.8"
|
export EM_MEMORY_GROWTH_GEOMETRIC_STEP="0.8"
|
||||||
|
|
||||||
# Malloc implementation to use.
|
# Malloc implementation to use.
|
||||||
# - dlmalloc: a powerful general-purpose malloc.
|
# - dlmalloc: a powerful general-purpose malloc.
|
||||||
@@ -25,38 +27,63 @@ EM_MEMORY_GROWTH_GEOMETRIC_STEP="0.8"
|
|||||||
# - emmalloc-verbose: use emmalloc with assertions + verbose logging.
|
# - emmalloc-verbose: use emmalloc with assertions + verbose logging.
|
||||||
# - emmalloc-memvalidate-verbose: use emmalloc with assertions + heap consistency checking + verbose logging.
|
# - emmalloc-memvalidate-verbose: use emmalloc with assertions + heap consistency checking + verbose logging.
|
||||||
# Default: dlmalloc
|
# Default: dlmalloc
|
||||||
EM_MALLOC="dlmalloc"
|
export EM_MALLOC="dlmalloc"
|
||||||
|
|
||||||
EMCC_CFLAGS="--no-entry \
|
export EMCC_CFLAGS="--no-entry \
|
||||||
--js-library src/js/wapi.js \
|
--js-library src/js/wapi.js \
|
||||||
-sASSERTIONS=1 \
|
-sASSERTIONS=1 \
|
||||||
-sALLOW_TABLE_GROWTH=1 \
|
-sALLOW_TABLE_GROWTH=1 \
|
||||||
-sALLOW_MEMORY_GROWTH=1 \
|
-sALLOW_MEMORY_GROWTH=1 \
|
||||||
-sINITIAL_HEAP=$EM_INITIAL_HEAP \
|
-sINITIAL_HEAP=$EM_INITIAL_HEAP \
|
||||||
-sMEMORY_GROWTH_GEOMETRIC_STEP=$EM_MEMORY_GROWTH_GEOMETRIC_STEP \
|
-sMEMORY_GROWTH_GEOMETRIC_STEP=$EM_MEMORY_GROWTH_GEOMETRIC_STEP \
|
||||||
-sENVIRONMENT=web \
|
|
||||||
-sERROR_ON_UNDEFINED_SYMBOLS=0 \
|
-sERROR_ON_UNDEFINED_SYMBOLS=0 \
|
||||||
-sMAX_WEBGL_VERSION=2 \
|
-sMAX_WEBGL_VERSION=2 \
|
||||||
-sMODULARIZE=1 \
|
|
||||||
-sEXPORT_NAME=createRustSkiaModule \
|
-sEXPORT_NAME=createRustSkiaModule \
|
||||||
-sEXPORTED_RUNTIME_METHODS=GL,stringToUTF8,HEAPU8,HEAP32,HEAPU32,HEAPF32 \
|
-sEXPORTED_RUNTIME_METHODS=GL,stringToUTF8,HEAPU8,HEAP32,HEAPU32,HEAPF32 \
|
||||||
-sEXPORT_ES6=1"
|
-sENVIRONMENT=web \
|
||||||
|
-sMODULARIZE=1 \
|
||||||
|
-sEXPORT_ES6=1";
|
||||||
|
|
||||||
export EM_CACHE="/tmp/emsdk_cache";
|
export EM_CACHE="/tmp/emsdk_cache";
|
||||||
|
|
||||||
CARGO_PARAMS="${@:2}";
|
export CARGO_PARAMS="${@:2}";
|
||||||
|
|
||||||
if [ "$BUILD_MODE" = "release" ]; then
|
if [ "$BUILD_MODE" = "release" ]; then
|
||||||
CARGO_PARAMS="--release $CARGO_PARAMS"
|
export CARGO_PARAMS="--release $CARGO_PARAMS"
|
||||||
EMCC_CFLAGS="-Os $EMCC_CFLAGS"
|
export EMCC_CFLAGS="-Os $EMCC_CFLAGS"
|
||||||
else
|
else
|
||||||
# TODO: Extra parameters that could be good to look into:
|
# TODO: Extra parameters that could be good to look into:
|
||||||
# -gseparate-dwarf
|
# -gseparate-dwarf
|
||||||
# -gsplit-dwarf
|
# -gsplit-dwarf
|
||||||
# -gsource-map
|
# -gsource-map
|
||||||
EMCC_CFLAGS="-g $EMCC_CFLAGS -sVERBOSE=1 -sMALLOC=$EM_MALLOC"
|
export EMCC_CFLAGS="-g $EMCC_CFLAGS -sVERBOSE=1 -sMALLOC=$EM_MALLOC"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export EMCC_CFLAGS;
|
function clean {
|
||||||
export CARGO_PARAMS;
|
cargo clean;
|
||||||
|
}
|
||||||
|
|
||||||
|
function build {
|
||||||
|
cargo build $CARGO_PARAMS;
|
||||||
|
}
|
||||||
|
|
||||||
|
function copy_artifacts {
|
||||||
|
DEST=$1;
|
||||||
|
|
||||||
|
cp target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.js $DEST/$BUILD_NAME.js;
|
||||||
|
cp target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.wasm $DEST/$BUILD_NAME.wasm;
|
||||||
|
|
||||||
|
sed -i "s/render_wasm.wasm/$BUILD_NAME.wasm?version=$CURRENT_VERSION/g" $DEST/$BUILD_NAME.js;
|
||||||
|
|
||||||
|
npx esbuild target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.js \
|
||||||
|
--log-level=error \
|
||||||
|
--outfile=$DEST/worker/render.js \
|
||||||
|
--platform=neutral \
|
||||||
|
--format=iife \
|
||||||
|
--global-name=WasmModule;
|
||||||
|
}
|
||||||
|
|
||||||
|
function copy_shared_artifact {
|
||||||
|
SHARED_FILE=$(find target/wasm32-unknown-emscripten -name render_wasm_shared.js | head -n 1);
|
||||||
|
cp $SHARED_FILE ../frontend/src/app/render_wasm/api/shared.js;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,19 +7,12 @@ pushd $_SCRIPT_DIR;
|
|||||||
|
|
||||||
. ./_build_env
|
. ./_build_env
|
||||||
|
|
||||||
set -x
|
set -x;
|
||||||
|
|
||||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
build;
|
||||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.87.0/skia-binaries-e551f334ad5cbdf43abf-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
copy_artifacts "../frontend/resources/public/js";
|
||||||
|
copy_shared_artifact;
|
||||||
|
|
||||||
cargo build $CARGO_PARAMS
|
exit $?;
|
||||||
|
|
||||||
_SHARED_FILE=$(find target/wasm32-unknown-emscripten -name render_wasm_shared.js | head -n 1);
|
|
||||||
|
|
||||||
cat target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.js "$_SHARED_FILE" > ../frontend/resources/public/js/$BUILD_NAME.js
|
|
||||||
cp target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.wasm ../frontend/resources/public/js/$BUILD_NAME.wasm
|
|
||||||
sed -i "s/render_wasm.wasm/$BUILD_NAME.wasm?version=$CURRENT_VERSION/g" ../frontend/resources/public/js/$BUILD_NAME.js;
|
|
||||||
|
|
||||||
exit $?
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|||||||
@@ -7,20 +7,15 @@ pushd $_SCRIPT_DIR;
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
export CARGO_BUILD_TARGET=${CARGO_BUILD_TARGET:-"wasm32-unknown-emscripten"};
|
build;
|
||||||
export SKIA_BINARIES_URL=${SKIA_BINARIES_URL:-"https://github.com/penpot/skia-binaries/releases/download/0.87.0/skia-binaries-e551f334ad5cbdf43abf-wasm32-unknown-emscripten-gl-svg-textlayout-binary-cache-webp.tar.gz"}
|
copy_artifacts "../frontend/resources/public/js";
|
||||||
|
copy_shared_artifact;
|
||||||
SHARED_FILE=$(find target/wasm32-unknown-emscripten -name render_wasm_shared.js | head -n 1);
|
|
||||||
|
|
||||||
cat target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.js "$SHARED_FILE" > ../frontend/resources/public/js/$BUILD_NAME.js
|
|
||||||
cp target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.wasm ../frontend/resources/public/js/$BUILD_NAME.wasm
|
|
||||||
|
|
||||||
pushd $_SCRIPT_DIR;
|
pushd $_SCRIPT_DIR;
|
||||||
|
|
||||||
cargo watch \
|
cargo watch \
|
||||||
-x "build $CARGO_PARAMS" \
|
-x "build $CARGO_PARAMS" \
|
||||||
-s "cat target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.js \"$SHARED_FILE\" > ../frontend/resources/public/js/$BUILD_NAME.js" \
|
-s "./build" \
|
||||||
-s "cp target/wasm32-unknown-emscripten/$BUILD_MODE/render_wasm.wasm ../frontend/resources/public/js/$BUILD_NAME.wasm" \
|
|
||||||
-s "sed -i 's/render_wasm.wasm/$BUILD_NAME.wasm?version=$CURRENT_VERSION/g' ../frontend/resources/public/js/$BUILD_NAME.js" \
|
|
||||||
-s "echo 'DONE\n'";
|
-s "echo 'DONE\n'";
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|||||||
272
yarn.lock
272
yarn.lock
@@ -5,6 +5,188 @@ __metadata:
|
|||||||
version: 8
|
version: 8
|
||||||
cacheKey: 10c0
|
cacheKey: 10c0
|
||||||
|
|
||||||
|
"@esbuild/aix-ppc64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/aix-ppc64@npm:0.25.12"
|
||||||
|
conditions: os=aix & cpu=ppc64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/android-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/android-arm64@npm:0.25.12"
|
||||||
|
conditions: os=android & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/android-arm@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/android-arm@npm:0.25.12"
|
||||||
|
conditions: os=android & cpu=arm
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/android-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/android-x64@npm:0.25.12"
|
||||||
|
conditions: os=android & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/darwin-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/darwin-arm64@npm:0.25.12"
|
||||||
|
conditions: os=darwin & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/darwin-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/darwin-x64@npm:0.25.12"
|
||||||
|
conditions: os=darwin & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/freebsd-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/freebsd-arm64@npm:0.25.12"
|
||||||
|
conditions: os=freebsd & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/freebsd-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/freebsd-x64@npm:0.25.12"
|
||||||
|
conditions: os=freebsd & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-arm64@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-arm@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-arm@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=arm
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-ia32@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-ia32@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=ia32
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-loong64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-loong64@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=loong64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-mips64el@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-mips64el@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=mips64el
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-ppc64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-ppc64@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=ppc64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-riscv64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-riscv64@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=riscv64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-s390x@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-s390x@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=s390x
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/linux-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/linux-x64@npm:0.25.12"
|
||||||
|
conditions: os=linux & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/netbsd-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/netbsd-arm64@npm:0.25.12"
|
||||||
|
conditions: os=netbsd & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/netbsd-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/netbsd-x64@npm:0.25.12"
|
||||||
|
conditions: os=netbsd & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/openbsd-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/openbsd-arm64@npm:0.25.12"
|
||||||
|
conditions: os=openbsd & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/openbsd-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/openbsd-x64@npm:0.25.12"
|
||||||
|
conditions: os=openbsd & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/openharmony-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/openharmony-arm64@npm:0.25.12"
|
||||||
|
conditions: os=openharmony & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/sunos-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/sunos-x64@npm:0.25.12"
|
||||||
|
conditions: os=sunos & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/win32-arm64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/win32-arm64@npm:0.25.12"
|
||||||
|
conditions: os=win32 & cpu=arm64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/win32-ia32@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/win32-ia32@npm:0.25.12"
|
||||||
|
conditions: os=win32 & cpu=ia32
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
|
"@esbuild/win32-x64@npm:0.25.12":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "@esbuild/win32-x64@npm:0.25.12"
|
||||||
|
conditions: os=win32 & cpu=x64
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@types/node@npm:^20.12.7":
|
"@types/node@npm:^20.12.7":
|
||||||
version: 20.12.12
|
version: 20.12.12
|
||||||
resolution: "@types/node@npm:20.12.12"
|
resolution: "@types/node@npm:20.12.12"
|
||||||
@@ -14,11 +196,101 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"esbuild@npm:^0.25.9":
|
||||||
|
version: 0.25.12
|
||||||
|
resolution: "esbuild@npm:0.25.12"
|
||||||
|
dependencies:
|
||||||
|
"@esbuild/aix-ppc64": "npm:0.25.12"
|
||||||
|
"@esbuild/android-arm": "npm:0.25.12"
|
||||||
|
"@esbuild/android-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/android-x64": "npm:0.25.12"
|
||||||
|
"@esbuild/darwin-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/darwin-x64": "npm:0.25.12"
|
||||||
|
"@esbuild/freebsd-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/freebsd-x64": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-arm": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-ia32": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-loong64": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-mips64el": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-ppc64": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-riscv64": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-s390x": "npm:0.25.12"
|
||||||
|
"@esbuild/linux-x64": "npm:0.25.12"
|
||||||
|
"@esbuild/netbsd-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/netbsd-x64": "npm:0.25.12"
|
||||||
|
"@esbuild/openbsd-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/openbsd-x64": "npm:0.25.12"
|
||||||
|
"@esbuild/openharmony-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/sunos-x64": "npm:0.25.12"
|
||||||
|
"@esbuild/win32-arm64": "npm:0.25.12"
|
||||||
|
"@esbuild/win32-ia32": "npm:0.25.12"
|
||||||
|
"@esbuild/win32-x64": "npm:0.25.12"
|
||||||
|
dependenciesMeta:
|
||||||
|
"@esbuild/aix-ppc64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/android-arm":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/android-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/android-x64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/darwin-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/darwin-x64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/freebsd-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/freebsd-x64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-arm":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-ia32":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-loong64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-mips64el":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-ppc64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-riscv64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-s390x":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/linux-x64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/netbsd-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/netbsd-x64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/openbsd-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/openbsd-x64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/openharmony-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/sunos-x64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/win32-arm64":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/win32-ia32":
|
||||||
|
optional: true
|
||||||
|
"@esbuild/win32-x64":
|
||||||
|
optional: true
|
||||||
|
bin:
|
||||||
|
esbuild: bin/esbuild
|
||||||
|
checksum: 10c0/c205357531423220a9de8e1e6c6514242bc9b1666e762cd67ccdf8fdfdc3f1d0bd76f8d9383958b97ad4c953efdb7b6e8c1f9ca5951cd2b7c5235e8755b34a6b
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"penpot@workspace:.":
|
"penpot@workspace:.":
|
||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "penpot@workspace:."
|
resolution: "penpot@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node": "npm:^20.12.7"
|
"@types/node": "npm:^20.12.7"
|
||||||
|
esbuild: "npm:^0.25.9"
|
||||||
languageName: unknown
|
languageName: unknown
|
||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user