shaders 2.3.63 → 2.3.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/telemetry/collector.d.ts +3 -1
- package/dist/core/telemetry/collector.d.ts.map +1 -1
- package/dist/core/telemetry/index.d.ts +4 -1
- package/dist/core/telemetry/index.d.ts.map +1 -1
- package/dist/core/telemetry/index.js +14 -4
- package/dist/core/telemetry/types.d.ts +1 -0
- package/dist/core/telemetry/types.d.ts.map +1 -1
- package/dist/react/AngularBlur.js +1 -1
- package/dist/react/Ascii.js +1 -1
- package/dist/react/Aurora.js +1 -1
- package/dist/react/Beam.js +1 -1
- package/dist/react/Blob.js +1 -1
- package/dist/react/Blur.js +1 -1
- package/dist/react/BrightnessContrast.js +1 -1
- package/dist/react/Bulge.js +1 -1
- package/dist/react/CRTScreen.js +1 -1
- package/dist/react/ChannelBlur.js +1 -1
- package/dist/react/Checkerboard.js +1 -1
- package/dist/react/ChromaFlow.js +1 -1
- package/dist/react/ChromaticAberration.js +1 -1
- package/dist/react/Circle.js +1 -1
- package/dist/react/ConcentricSpin.js +1 -1
- package/dist/react/ContourLines.js +1 -1
- package/dist/react/CursorRipples.js +1 -1
- package/dist/react/CursorTrail.js +1 -1
- package/dist/react/DiffuseBlur.js +1 -1
- package/dist/react/Dither.js +1 -1
- package/dist/react/DotGrid.js +1 -1
- package/dist/react/Duotone.js +1 -1
- package/dist/react/FilmGrain.js +1 -1
- package/dist/react/FloatingParticles.js +1 -1
- package/dist/react/FlowField.js +1 -1
- package/dist/react/GlassTiles.js +1 -1
- package/dist/react/Glitch.js +1 -1
- package/dist/react/Glow.js +1 -1
- package/dist/react/Godrays.js +1 -1
- package/dist/react/Grayscale.js +1 -1
- package/dist/react/Grid.js +1 -1
- package/dist/react/GridDistortion.js +1 -1
- package/dist/react/Group.js +1 -1
- package/dist/react/Halftone.js +1 -1
- package/dist/react/HueShift.js +1 -1
- package/dist/react/ImageTexture.js +1 -1
- package/dist/react/Invert.js +1 -1
- package/dist/react/Kaleidoscope.js +1 -1
- package/dist/react/LensFlare.js +1 -1
- package/dist/react/LinearBlur.js +1 -1
- package/dist/react/LinearGradient.js +1 -1
- package/dist/react/Liquify.js +1 -1
- package/dist/react/Mirror.js +1 -1
- package/dist/react/Perspective.js +1 -1
- package/dist/react/Pixelate.js +1 -1
- package/dist/react/Plasma.js +1 -1
- package/dist/react/PolarCoordinates.js +1 -1
- package/dist/react/Posterize.js +1 -1
- package/dist/react/Preview.js +210 -0
- package/dist/react/ProgressiveBlur.js +1 -1
- package/dist/react/RadialGradient.js +1 -1
- package/dist/react/RectangularCoordinates.js +1 -1
- package/dist/react/Ripples.js +1 -1
- package/dist/react/Saturation.js +1 -1
- package/dist/react/Shader.js +7 -6
- package/dist/react/Sharpness.js +1 -1
- package/dist/react/Shatter.js +1 -1
- package/dist/react/SimplexNoise.js +1 -1
- package/dist/react/SineWave.js +1 -1
- package/dist/react/SolidColor.js +1 -1
- package/dist/react/Spherize.js +1 -1
- package/dist/react/Spiral.js +1 -1
- package/dist/react/Strands.js +1 -1
- package/dist/react/Stretch.js +1 -1
- package/dist/react/Stripes.js +1 -1
- package/dist/react/StudioBackground.js +1 -1
- package/dist/react/Swirl.js +1 -1
- package/dist/react/TiltShift.js +1 -1
- package/dist/react/Tint.js +1 -1
- package/dist/react/Tritone.js +1 -1
- package/dist/react/Twirl.js +1 -1
- package/dist/react/Vibrance.js +1 -1
- package/dist/react/VideoTexture.js +1 -1
- package/dist/react/WaveDistortion.js +1 -1
- package/dist/react/WebcamTexture.js +1 -1
- package/dist/react/ZoomBlur.js +1 -1
- package/dist/react/engine/Preview.d.ts +31 -0
- package/dist/react/engine/Preview.d.ts.map +1 -0
- package/dist/react/engine/Shader.d.ts +1 -0
- package/dist/react/engine/Shader.d.ts.map +1 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +2 -1
- package/dist/solid/engine/Preview.d.ts +13 -0
- package/dist/solid/engine/Preview.d.ts.map +1 -0
- package/dist/solid/engine/Preview.js +316 -0
- package/dist/solid/engine/Shader.d.ts +1 -0
- package/dist/solid/engine/Shader.d.ts.map +1 -1
- package/dist/solid/engine/Shader.js +8 -5
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +2 -0
- package/dist/svelte/engine/Preview.svelte.d.ts +26 -0
- package/dist/svelte/engine/PreviewRenderComponent.svelte.d.ts +22 -0
- package/dist/svelte/engine/Shader.svelte.d.ts +1 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +327 -8
- package/dist/vue/Preview.js +3 -0
- package/dist/vue/Preview.vue_vue_type_script_setup_true_lang.js +301 -0
- package/dist/vue/Shader.vue_vue_type_script_setup_true_lang.js +10 -5
- package/dist/vue/engine/Shader.vue.d.ts +4 -0
- package/dist/vue/engine/Shader.vue.d.ts.map +1 -1
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +2 -1
- package/package.json +1 -1
package/dist/svelte/index.js
CHANGED
|
@@ -79,7 +79,8 @@ import { componentDefinition as componentDefinition$71 } from "../core/shaders/W
|
|
|
79
79
|
import { componentDefinition as componentDefinition$72 } from "../core/shaders/WebcamTexture/index.js";
|
|
80
80
|
import { componentDefinition as componentDefinition$73 } from "../core/shaders/ZoomBlur/index.js";
|
|
81
81
|
import { vec4 } from "three/tsl";
|
|
82
|
-
import {
|
|
82
|
+
import { isExternalUser, shouldCollectTelemetry, startTelemetry } from "../core/telemetry/index.js";
|
|
83
|
+
import "svelte/internal/flags/legacy";
|
|
83
84
|
var root$74 = $.from_html(`<span style="display:contents"><!></span>`);
|
|
84
85
|
function AngularBlur($$anchor, $$props) {
|
|
85
86
|
$.push($$props, true);
|
|
@@ -9774,16 +9775,17 @@ function ZoomBlur($$anchor, $$props) {
|
|
|
9774
9775
|
$.append($$anchor, span);
|
|
9775
9776
|
$.pop();
|
|
9776
9777
|
}
|
|
9777
|
-
var root_1 = $.from_html(`<canvas data-renderer="shaders" style="width: 100%; height: 100%; display: block;"></canvas> <!>`, 1);
|
|
9778
|
+
var root_1$1 = $.from_html(`<canvas data-renderer="shaders" style="width: 100%; height: 100%; display: block;"></canvas> <!>`, 1);
|
|
9778
9779
|
var root = $.from_html(`<div><!></div>`);
|
|
9779
9780
|
function Shader($$anchor, $$props) {
|
|
9780
9781
|
$.push($$props, true);
|
|
9781
|
-
const disableTelemetry = $.prop($$props, "disableTelemetry", 3, false), colorSpace = $.prop($$props, "colorSpace", 3, "p3-linear"), rest = $.rest_props($$props, [
|
|
9782
|
+
const disableTelemetry = $.prop($$props, "disableTelemetry", 3, false), colorSpace = $.prop($$props, "colorSpace", 3, "p3-linear"), isPreview = $.prop($$props, "isPreview", 3, false), rest = $.rest_props($$props, [
|
|
9782
9783
|
"$$slots",
|
|
9783
9784
|
"$$events",
|
|
9784
9785
|
"$$legacy",
|
|
9785
9786
|
"disableTelemetry",
|
|
9786
9787
|
"colorSpace",
|
|
9788
|
+
"isPreview",
|
|
9787
9789
|
"children"
|
|
9788
9790
|
]);
|
|
9789
9791
|
let containerRef;
|
|
@@ -9815,8 +9817,8 @@ function Shader($$anchor, $$props) {
|
|
|
9815
9817
|
const checkRendering = () => {
|
|
9816
9818
|
if (!rendererInstance) return;
|
|
9817
9819
|
if (rendererInstance.getPerformanceStats().fps > 0) {
|
|
9818
|
-
telemetryCollector =
|
|
9819
|
-
telemetryCollector.start();
|
|
9820
|
+
telemetryCollector = startTelemetry(rendererInstance, typeof __SHADERS_VERSION__ !== "undefined" ? __SHADERS_VERSION__ : "unknown", disableTelemetry(), isPreview());
|
|
9821
|
+
if (telemetryCollector) telemetryCollector.start();
|
|
9820
9822
|
telemetryStartTimeout = null;
|
|
9821
9823
|
} else telemetryStartTimeout = window.setTimeout(checkRendering, 500);
|
|
9822
9824
|
};
|
|
@@ -9830,7 +9832,7 @@ function Shader($$anchor, $$props) {
|
|
|
9830
9832
|
colorSpace: colorSpace()
|
|
9831
9833
|
});
|
|
9832
9834
|
rendererInstance.registerNode(rootId, ({ childNode }) => childNode || vec4(0, 0, 0, 0), null, null, {});
|
|
9833
|
-
if (shouldSendTelemetry === null) shouldSendTelemetry = isExternalUser() && shouldCollectTelemetry(disableTelemetry());
|
|
9835
|
+
if (shouldSendTelemetry === null) shouldSendTelemetry = isExternalUser() && shouldCollectTelemetry(disableTelemetry(), isPreview());
|
|
9834
9836
|
if (shouldSendTelemetry && !telemetryCollector) startTelemetryWhenReady();
|
|
9835
9837
|
} catch (err) {
|
|
9836
9838
|
console.error("[Shader] Initialization failed:", err);
|
|
@@ -9911,7 +9913,7 @@ function Shader($$anchor, $$props) {
|
|
|
9911
9913
|
}));
|
|
9912
9914
|
var node = $.child(div);
|
|
9913
9915
|
var consequent = ($$anchor$1) => {
|
|
9914
|
-
var fragment = root_1();
|
|
9916
|
+
var fragment = root_1$1();
|
|
9915
9917
|
var canvas = $.first_child(fragment);
|
|
9916
9918
|
$.bind_this(canvas, ($$value) => canvasRef = $$value, () => canvasRef);
|
|
9917
9919
|
var node_1 = $.sibling(canvas, 2);
|
|
@@ -9926,4 +9928,321 @@ function Shader($$anchor, $$props) {
|
|
|
9926
9928
|
$.append($$anchor, div);
|
|
9927
9929
|
$.pop();
|
|
9928
9930
|
}
|
|
9929
|
-
|
|
9931
|
+
function PreviewRenderComponent($$anchor, $$props) {
|
|
9932
|
+
$.push($$props, false);
|
|
9933
|
+
const Component = $.mutable_source();
|
|
9934
|
+
const componentProps = $.mutable_source();
|
|
9935
|
+
let config = $.prop($$props, "config", 8);
|
|
9936
|
+
let componentMap = $.prop($$props, "componentMap", 8);
|
|
9937
|
+
let structureVersion = $.prop($$props, "structureVersion", 8, void 0);
|
|
9938
|
+
$.legacy_pre_effect(() => ($.deep_read_state(componentMap()), $.deep_read_state(config())), () => {
|
|
9939
|
+
$.set(Component, componentMap()[config().type]);
|
|
9940
|
+
});
|
|
9941
|
+
$.legacy_pre_effect(() => $.deep_read_state(config()), () => {
|
|
9942
|
+
$.set(componentProps, config().props ? { ...config().props } : {});
|
|
9943
|
+
});
|
|
9944
|
+
$.legacy_pre_effect_reset();
|
|
9945
|
+
$.init();
|
|
9946
|
+
var fragment = $.comment();
|
|
9947
|
+
var node = $.first_child(fragment);
|
|
9948
|
+
var consequent_1 = ($$anchor$1) => {
|
|
9949
|
+
var fragment_1 = $.comment();
|
|
9950
|
+
var node_1 = $.first_child(fragment_1);
|
|
9951
|
+
$.component(node_1, () => $.get(Component), ($$anchor$2, $$component) => {
|
|
9952
|
+
$$component($$anchor$2, $.spread_props({
|
|
9953
|
+
get id() {
|
|
9954
|
+
return $.deep_read_state(config()), $.untrack(() => config().id);
|
|
9955
|
+
},
|
|
9956
|
+
get renderOrder() {
|
|
9957
|
+
return $.deep_read_state(config()), $.untrack(() => config().renderOrder);
|
|
9958
|
+
}
|
|
9959
|
+
}, () => $.get(componentProps), {
|
|
9960
|
+
children: ($$anchor$3, $$slotProps) => {
|
|
9961
|
+
var fragment_2 = $.comment();
|
|
9962
|
+
var node_2 = $.first_child(fragment_2);
|
|
9963
|
+
var consequent = ($$anchor$4) => {
|
|
9964
|
+
var fragment_3 = $.comment();
|
|
9965
|
+
var node_3 = $.first_child(fragment_3);
|
|
9966
|
+
$.each(node_3, 3, () => ($.deep_read_state(config()), $.untrack(() => config().children)), (child, index) => child.id || `child_${index}_v${structureVersion() || 0}`, ($$anchor$5, child, index) => {
|
|
9967
|
+
var fragment_4 = $.comment();
|
|
9968
|
+
var node_4 = $.first_child(fragment_4);
|
|
9969
|
+
{
|
|
9970
|
+
let $0 = $.derived_safe_equal(() => ($.get(child), $.deep_read_state($.get(index)), $.untrack(() => ({
|
|
9971
|
+
...$.get(child),
|
|
9972
|
+
renderOrder: $.get(child).renderOrder ?? $.get(index)
|
|
9973
|
+
}))));
|
|
9974
|
+
PreviewRenderComponent(node_4, {
|
|
9975
|
+
get config() {
|
|
9976
|
+
return $.get($0);
|
|
9977
|
+
},
|
|
9978
|
+
get componentMap() {
|
|
9979
|
+
return componentMap();
|
|
9980
|
+
},
|
|
9981
|
+
get structureVersion() {
|
|
9982
|
+
return structureVersion();
|
|
9983
|
+
}
|
|
9984
|
+
});
|
|
9985
|
+
}
|
|
9986
|
+
$.append($$anchor$5, fragment_4);
|
|
9987
|
+
});
|
|
9988
|
+
$.append($$anchor$4, fragment_3);
|
|
9989
|
+
};
|
|
9990
|
+
$.if(node_2, ($$render) => {
|
|
9991
|
+
if ($.deep_read_state(config()), $.untrack(() => config().children)) $$render(consequent);
|
|
9992
|
+
});
|
|
9993
|
+
$.append($$anchor$3, fragment_2);
|
|
9994
|
+
},
|
|
9995
|
+
$$slots: { default: true }
|
|
9996
|
+
}));
|
|
9997
|
+
});
|
|
9998
|
+
$.append($$anchor$1, fragment_1);
|
|
9999
|
+
};
|
|
10000
|
+
$.if(node, ($$render) => {
|
|
10001
|
+
if ($.get(Component)) $$render(consequent_1);
|
|
10002
|
+
});
|
|
10003
|
+
$.append($$anchor, fragment);
|
|
10004
|
+
$.pop();
|
|
10005
|
+
}
|
|
10006
|
+
var root_4 = $.from_html(`<a target="_blank" rel="noopener noreferrer"> </a>`);
|
|
10007
|
+
var root_1 = $.from_html(`<div><!> <!></div>`);
|
|
10008
|
+
function Preview($$anchor, $$props) {
|
|
10009
|
+
const $$sanitized_props = $.legacy_rest_props($$props, [
|
|
10010
|
+
"children",
|
|
10011
|
+
"$$slots",
|
|
10012
|
+
"$$events",
|
|
10013
|
+
"$$legacy"
|
|
10014
|
+
]);
|
|
10015
|
+
const $$restProps = $.legacy_rest_props($$sanitized_props, [
|
|
10016
|
+
"shader",
|
|
10017
|
+
"presetId",
|
|
10018
|
+
"apiBaseUrl",
|
|
10019
|
+
"obfuscationKey",
|
|
10020
|
+
"watermarkText",
|
|
10021
|
+
"watermarkLink"
|
|
10022
|
+
]);
|
|
10023
|
+
$.push($$props, false);
|
|
10024
|
+
const componentMap = {
|
|
10025
|
+
AngularBlur,
|
|
10026
|
+
Ascii,
|
|
10027
|
+
Aurora,
|
|
10028
|
+
Beam,
|
|
10029
|
+
Blob,
|
|
10030
|
+
Blur,
|
|
10031
|
+
BrightnessContrast,
|
|
10032
|
+
Bulge,
|
|
10033
|
+
CRTScreen,
|
|
10034
|
+
ChannelBlur,
|
|
10035
|
+
Checkerboard,
|
|
10036
|
+
ChromaFlow,
|
|
10037
|
+
ChromaticAberration,
|
|
10038
|
+
Circle,
|
|
10039
|
+
ConcentricSpin,
|
|
10040
|
+
ContourLines,
|
|
10041
|
+
CursorRipples,
|
|
10042
|
+
CursorTrail,
|
|
10043
|
+
DiffuseBlur,
|
|
10044
|
+
Dither,
|
|
10045
|
+
DotGrid,
|
|
10046
|
+
Duotone,
|
|
10047
|
+
FilmGrain,
|
|
10048
|
+
FloatingParticles,
|
|
10049
|
+
FlowField,
|
|
10050
|
+
GlassTiles,
|
|
10051
|
+
Glitch,
|
|
10052
|
+
Glow,
|
|
10053
|
+
Godrays,
|
|
10054
|
+
Grayscale,
|
|
10055
|
+
Grid,
|
|
10056
|
+
GridDistortion,
|
|
10057
|
+
Group,
|
|
10058
|
+
Halftone,
|
|
10059
|
+
HueShift,
|
|
10060
|
+
ImageTexture,
|
|
10061
|
+
Invert,
|
|
10062
|
+
Kaleidoscope,
|
|
10063
|
+
LensFlare,
|
|
10064
|
+
LinearBlur,
|
|
10065
|
+
LinearGradient,
|
|
10066
|
+
Liquify,
|
|
10067
|
+
Mirror,
|
|
10068
|
+
Perspective,
|
|
10069
|
+
Pixelate,
|
|
10070
|
+
Plasma,
|
|
10071
|
+
PolarCoordinates,
|
|
10072
|
+
Posterize,
|
|
10073
|
+
ProgressiveBlur,
|
|
10074
|
+
RadialGradient,
|
|
10075
|
+
RectangularCoordinates,
|
|
10076
|
+
Ripples,
|
|
10077
|
+
Saturation,
|
|
10078
|
+
Sharpness,
|
|
10079
|
+
Shatter,
|
|
10080
|
+
SimplexNoise,
|
|
10081
|
+
SineWave,
|
|
10082
|
+
SolidColor,
|
|
10083
|
+
Spherize,
|
|
10084
|
+
Spiral,
|
|
10085
|
+
Strands,
|
|
10086
|
+
Stretch,
|
|
10087
|
+
Stripes,
|
|
10088
|
+
StudioBackground,
|
|
10089
|
+
Swirl,
|
|
10090
|
+
TiltShift,
|
|
10091
|
+
Tint,
|
|
10092
|
+
Tritone,
|
|
10093
|
+
Twirl,
|
|
10094
|
+
Vibrance,
|
|
10095
|
+
VideoTexture,
|
|
10096
|
+
WaveDistortion,
|
|
10097
|
+
WebcamTexture,
|
|
10098
|
+
ZoomBlur
|
|
10099
|
+
};
|
|
10100
|
+
function xorCrypt(data, key) {
|
|
10101
|
+
const keyBytes = new TextEncoder().encode(key);
|
|
10102
|
+
const result = new Uint8Array(data.length);
|
|
10103
|
+
for (let i = 0; i < data.length; i++) result[i] = data[i] ^ keyBytes[i % keyBytes.length];
|
|
10104
|
+
return result;
|
|
10105
|
+
}
|
|
10106
|
+
function decodePreviewDefinition(encoded, key) {
|
|
10107
|
+
const binaryString = atob(encoded);
|
|
10108
|
+
const encrypted = new Uint8Array(binaryString.length);
|
|
10109
|
+
for (let i = 0; i < binaryString.length; i++) encrypted[i] = binaryString.charCodeAt(i);
|
|
10110
|
+
const decrypted = xorCrypt(encrypted, key);
|
|
10111
|
+
const json = new TextDecoder().decode(decrypted);
|
|
10112
|
+
try {
|
|
10113
|
+
return JSON.parse(json);
|
|
10114
|
+
} catch {
|
|
10115
|
+
throw new Error("Failed to decode shader definition: invalid data or incorrect key");
|
|
10116
|
+
}
|
|
10117
|
+
}
|
|
10118
|
+
function fetchAndDecode(url, key) {
|
|
10119
|
+
return fetch(url).then((res) => {
|
|
10120
|
+
if (!res.ok) throw new Error(`Failed to fetch: ${res.status}`);
|
|
10121
|
+
return res.json();
|
|
10122
|
+
}).then((data) => {
|
|
10123
|
+
const item = data.preset || data.shader;
|
|
10124
|
+
if (item?.definition && typeof item.definition === "string") return decodePreviewDefinition(item.definition, key);
|
|
10125
|
+
return null;
|
|
10126
|
+
}).catch((err) => {
|
|
10127
|
+
console.error("[Shaders Preview] Failed to fetch preview:", err);
|
|
10128
|
+
return null;
|
|
10129
|
+
});
|
|
10130
|
+
}
|
|
10131
|
+
let shader = $.prop($$props, "shader", 8, void 0);
|
|
10132
|
+
let presetId = $.prop($$props, "presetId", 8, void 0);
|
|
10133
|
+
let apiBaseUrl = $.prop($$props, "apiBaseUrl", 8, "https://shaders.com");
|
|
10134
|
+
let obfuscationKey = $.prop($$props, "obfuscationKey", 8, "shaders-preview-key");
|
|
10135
|
+
let watermarkText = $.prop($$props, "watermarkText", 8, "Unlock your Shaders Pro license");
|
|
10136
|
+
let watermarkLink = $.prop($$props, "watermarkLink", 8, "https://shaders.com/dashboard?pricing=true");
|
|
10137
|
+
let resolvedDefinition = $.mutable_source(null);
|
|
10138
|
+
let fetchedDefinition = $.mutable_source(null);
|
|
10139
|
+
let watermarkHovered = $.mutable_source(false);
|
|
10140
|
+
onMount(() => {
|
|
10141
|
+
console.warn("[Shaders] Preview component is intended for use with a Shaders license. Visit https://shaders.com for more information.");
|
|
10142
|
+
});
|
|
10143
|
+
$.legacy_pre_effect(() => ($.deep_read_state(shader()), $.deep_read_state(apiBaseUrl()), $.deep_read_state(obfuscationKey()), $.deep_read_state(presetId())), () => {
|
|
10144
|
+
if (shader()) {
|
|
10145
|
+
$.set(fetchedDefinition, null);
|
|
10146
|
+
fetchAndDecode(`${apiBaseUrl()}/api/preview/shader/${shader()}`, obfuscationKey()).then((def) => {
|
|
10147
|
+
$.set(fetchedDefinition, def);
|
|
10148
|
+
});
|
|
10149
|
+
} else if (!presetId()) $.set(fetchedDefinition, null);
|
|
10150
|
+
});
|
|
10151
|
+
$.legacy_pre_effect(() => ($.deep_read_state(presetId()), $.deep_read_state(apiBaseUrl()), $.deep_read_state(obfuscationKey()), $.deep_read_state(shader())), () => {
|
|
10152
|
+
if (presetId()) {
|
|
10153
|
+
$.set(fetchedDefinition, null);
|
|
10154
|
+
fetchAndDecode(`${apiBaseUrl()}/api/preview/preset/${presetId()}`, obfuscationKey()).then((def) => {
|
|
10155
|
+
$.set(fetchedDefinition, def);
|
|
10156
|
+
});
|
|
10157
|
+
} else if (!shader()) $.set(fetchedDefinition, null);
|
|
10158
|
+
});
|
|
10159
|
+
$.legacy_pre_effect(() => $.get(fetchedDefinition), () => {
|
|
10160
|
+
$.set(resolvedDefinition, $.get(fetchedDefinition) ?? null);
|
|
10161
|
+
});
|
|
10162
|
+
$.legacy_pre_effect_reset();
|
|
10163
|
+
$.init();
|
|
10164
|
+
var fragment = $.comment();
|
|
10165
|
+
var node = $.first_child(fragment);
|
|
10166
|
+
var consequent_1 = ($$anchor$1) => {
|
|
10167
|
+
var div = root_1();
|
|
10168
|
+
$.attribute_effect(div, () => ({
|
|
10169
|
+
class: "shaders-preview",
|
|
10170
|
+
style: "position: relative; width: 100%; height: 100%;",
|
|
10171
|
+
...$$restProps
|
|
10172
|
+
}));
|
|
10173
|
+
var node_1 = $.child(div);
|
|
10174
|
+
{
|
|
10175
|
+
let $0 = $.derived_safe_equal(() => ($.get(resolvedDefinition), $.untrack(() => $.get(resolvedDefinition).colorSpace || "p3-linear")));
|
|
10176
|
+
Shader(node_1, {
|
|
10177
|
+
get colorSpace() {
|
|
10178
|
+
return $.get($0);
|
|
10179
|
+
},
|
|
10180
|
+
isPreview: true,
|
|
10181
|
+
enablePerformanceTracking: true,
|
|
10182
|
+
style: "width: 100%; height: 100%;",
|
|
10183
|
+
children: ($$anchor$2, $$slotProps) => {
|
|
10184
|
+
var fragment_1 = $.comment();
|
|
10185
|
+
var node_2 = $.first_child(fragment_1);
|
|
10186
|
+
$.each(node_2, 3, () => ($.get(resolvedDefinition), $.untrack(() => $.get(resolvedDefinition).components)), (config, index) => config.id || `root_${index}_v${$.get(resolvedDefinition).structureVersion || 0}`, ($$anchor$3, config, index) => {
|
|
10187
|
+
{
|
|
10188
|
+
let $0$1 = $.derived_safe_equal(() => ($.get(config), $.deep_read_state($.get(index)), $.untrack(() => ({
|
|
10189
|
+
...$.get(config),
|
|
10190
|
+
renderOrder: $.get(config).renderOrder ?? $.get(index)
|
|
10191
|
+
}))));
|
|
10192
|
+
PreviewRenderComponent($$anchor$3, {
|
|
10193
|
+
get config() {
|
|
10194
|
+
return $.get($0$1);
|
|
10195
|
+
},
|
|
10196
|
+
get componentMap() {
|
|
10197
|
+
return componentMap;
|
|
10198
|
+
},
|
|
10199
|
+
get structureVersion() {
|
|
10200
|
+
return $.get(resolvedDefinition), $.untrack(() => $.get(resolvedDefinition).structureVersion);
|
|
10201
|
+
}
|
|
10202
|
+
});
|
|
10203
|
+
}
|
|
10204
|
+
});
|
|
10205
|
+
$.append($$anchor$2, fragment_1);
|
|
10206
|
+
},
|
|
10207
|
+
$$slots: { default: true }
|
|
10208
|
+
});
|
|
10209
|
+
}
|
|
10210
|
+
var node_3 = $.sibling(node_1, 2);
|
|
10211
|
+
var consequent = ($$anchor$2) => {
|
|
10212
|
+
var a = root_4();
|
|
10213
|
+
var text = $.child(a, true);
|
|
10214
|
+
$.reset(a);
|
|
10215
|
+
$.template_effect(() => {
|
|
10216
|
+
$.set_attribute(a, "href", watermarkLink());
|
|
10217
|
+
$.set_style(a, `
|
|
10218
|
+
position: absolute;
|
|
10219
|
+
bottom: 8px;
|
|
10220
|
+
right: 12px;
|
|
10221
|
+
font-size: 11px;
|
|
10222
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
10223
|
+
color: ${$.get(watermarkHovered) ? "rgba(255, 255, 255, 0.8)" : "rgba(255, 255, 255, 0.5)"};
|
|
10224
|
+
text-decoration: none;
|
|
10225
|
+
pointer-events: auto;
|
|
10226
|
+
z-index: 10;
|
|
10227
|
+
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
|
|
10228
|
+
transition: color 0.2s ease;
|
|
10229
|
+
`);
|
|
10230
|
+
$.set_text(text, watermarkText());
|
|
10231
|
+
});
|
|
10232
|
+
$.event("mouseenter", a, () => $.set(watermarkHovered, true));
|
|
10233
|
+
$.event("mouseleave", a, () => $.set(watermarkHovered, false));
|
|
10234
|
+
$.append($$anchor$2, a);
|
|
10235
|
+
};
|
|
10236
|
+
$.if(node_3, ($$render) => {
|
|
10237
|
+
if (watermarkText()) $$render(consequent);
|
|
10238
|
+
});
|
|
10239
|
+
$.reset(div);
|
|
10240
|
+
$.append($$anchor$1, div);
|
|
10241
|
+
};
|
|
10242
|
+
$.if(node, ($$render) => {
|
|
10243
|
+
if ($.get(resolvedDefinition)) $$render(consequent_1);
|
|
10244
|
+
});
|
|
10245
|
+
$.append($$anchor, fragment);
|
|
10246
|
+
$.pop();
|
|
10247
|
+
}
|
|
10248
|
+
export { AngularBlur, Ascii, Aurora, Beam, Blob, Blur, BrightnessContrast, Bulge, CRTScreen, ChannelBlur, Checkerboard, ChromaFlow, ChromaticAberration, Circle, ConcentricSpin, ContourLines, CursorRipples, CursorTrail, DiffuseBlur, Dither, DotGrid, Duotone, FilmGrain, FloatingParticles, FlowField, GlassTiles, Glitch, Glow, Godrays, Grayscale, Grid, GridDistortion, Group, Halftone, HueShift, ImageTexture, Invert, Kaleidoscope, LensFlare, LinearBlur, LinearGradient, Liquify, Mirror, Perspective, Pixelate, Plasma, PolarCoordinates, Posterize, Preview, ProgressiveBlur, RadialGradient, RectangularCoordinates, Ripples, Saturation, Shader, Sharpness, Shatter, SimplexNoise, SineWave, SolidColor, Spherize, Spiral, Strands, Stretch, Stripes, StudioBackground, Swirl, TiltShift, Tint, Tritone, Twirl, Vibrance, VideoTexture, WaveDistortion, WebcamTexture, ZoomBlur, generatePresetCode };
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import AngularBlur_default from "./AngularBlur.js";
|
|
2
|
+
import Ascii_default from "./Ascii.js";
|
|
3
|
+
import Aurora_default from "./Aurora.js";
|
|
4
|
+
import Beam_default from "./Beam.js";
|
|
5
|
+
import Blob_default from "./Blob.js";
|
|
6
|
+
import Blur_default from "./Blur.js";
|
|
7
|
+
import BrightnessContrast_default from "./BrightnessContrast.js";
|
|
8
|
+
import Bulge_default from "./Bulge.js";
|
|
9
|
+
import CRTScreen_default from "./CRTScreen.js";
|
|
10
|
+
import ChannelBlur_default from "./ChannelBlur.js";
|
|
11
|
+
import Checkerboard_default from "./Checkerboard.js";
|
|
12
|
+
import ChromaFlow_default from "./ChromaFlow.js";
|
|
13
|
+
import ChromaticAberration_default from "./ChromaticAberration.js";
|
|
14
|
+
import Circle_default from "./Circle.js";
|
|
15
|
+
import ConcentricSpin_default from "./ConcentricSpin.js";
|
|
16
|
+
import ContourLines_default from "./ContourLines.js";
|
|
17
|
+
import CursorRipples_default from "./CursorRipples.js";
|
|
18
|
+
import CursorTrail_default from "./CursorTrail.js";
|
|
19
|
+
import DiffuseBlur_default from "./DiffuseBlur.js";
|
|
20
|
+
import Dither_default from "./Dither.js";
|
|
21
|
+
import DotGrid_default from "./DotGrid.js";
|
|
22
|
+
import Duotone_default from "./Duotone.js";
|
|
23
|
+
import FilmGrain_default from "./FilmGrain.js";
|
|
24
|
+
import FloatingParticles_default from "./FloatingParticles.js";
|
|
25
|
+
import FlowField_default from "./FlowField.js";
|
|
26
|
+
import GlassTiles_default from "./GlassTiles.js";
|
|
27
|
+
import Glitch_default from "./Glitch.js";
|
|
28
|
+
import Glow_default from "./Glow.js";
|
|
29
|
+
import Godrays_default from "./Godrays.js";
|
|
30
|
+
import Grayscale_default from "./Grayscale.js";
|
|
31
|
+
import Grid_default from "./Grid.js";
|
|
32
|
+
import GridDistortion_default from "./GridDistortion.js";
|
|
33
|
+
import Group_default from "./Group.js";
|
|
34
|
+
import Halftone_default from "./Halftone.js";
|
|
35
|
+
import HueShift_default from "./HueShift.js";
|
|
36
|
+
import ImageTexture_default from "./ImageTexture.js";
|
|
37
|
+
import Invert_default from "./Invert.js";
|
|
38
|
+
import Kaleidoscope_default from "./Kaleidoscope.js";
|
|
39
|
+
import LensFlare_default from "./LensFlare.js";
|
|
40
|
+
import LinearBlur_default from "./LinearBlur.js";
|
|
41
|
+
import LinearGradient_default from "./LinearGradient.js";
|
|
42
|
+
import Liquify_default from "./Liquify.js";
|
|
43
|
+
import Mirror_default from "./Mirror.js";
|
|
44
|
+
import Perspective_default from "./Perspective.js";
|
|
45
|
+
import Pixelate_default from "./Pixelate.js";
|
|
46
|
+
import Plasma_default from "./Plasma.js";
|
|
47
|
+
import PolarCoordinates_default from "./PolarCoordinates.js";
|
|
48
|
+
import Posterize_default from "./Posterize.js";
|
|
49
|
+
import ProgressiveBlur_default from "./ProgressiveBlur.js";
|
|
50
|
+
import RadialGradient_default from "./RadialGradient.js";
|
|
51
|
+
import RectangularCoordinates_default from "./RectangularCoordinates.js";
|
|
52
|
+
import Ripples_default from "./Ripples.js";
|
|
53
|
+
import Saturation_default from "./Saturation.js";
|
|
54
|
+
import Sharpness_default from "./Sharpness.js";
|
|
55
|
+
import Shatter_default from "./Shatter.js";
|
|
56
|
+
import SimplexNoise_default from "./SimplexNoise.js";
|
|
57
|
+
import SineWave_default from "./SineWave.js";
|
|
58
|
+
import SolidColor_default from "./SolidColor.js";
|
|
59
|
+
import Spherize_default from "./Spherize.js";
|
|
60
|
+
import Spiral_default from "./Spiral.js";
|
|
61
|
+
import Strands_default from "./Strands.js";
|
|
62
|
+
import Stretch_default from "./Stretch.js";
|
|
63
|
+
import Stripes_default from "./Stripes.js";
|
|
64
|
+
import StudioBackground_default from "./StudioBackground.js";
|
|
65
|
+
import Swirl_default from "./Swirl.js";
|
|
66
|
+
import TiltShift_default from "./TiltShift.js";
|
|
67
|
+
import Tint_default from "./Tint.js";
|
|
68
|
+
import Tritone_default from "./Tritone.js";
|
|
69
|
+
import Twirl_default from "./Twirl.js";
|
|
70
|
+
import Vibrance_default from "./Vibrance.js";
|
|
71
|
+
import VideoTexture_default from "./VideoTexture.js";
|
|
72
|
+
import WaveDistortion_default from "./WaveDistortion.js";
|
|
73
|
+
import WebcamTexture_default from "./WebcamTexture.js";
|
|
74
|
+
import ZoomBlur_default from "./ZoomBlur.js";
|
|
75
|
+
import Shader_default from "./Shader.js";
|
|
76
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, h, mergeProps, onMounted, openBlock, ref, renderList, toDisplayString, watch, withCtx } from "vue";
|
|
77
|
+
var _hoisted_1 = {
|
|
78
|
+
key: 0,
|
|
79
|
+
class: "shaders-preview",
|
|
80
|
+
style: {
|
|
81
|
+
"position": "relative",
|
|
82
|
+
"width": "100%",
|
|
83
|
+
"height": "100%"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var _hoisted_2 = ["href"];
|
|
87
|
+
var RenderComponent = {
|
|
88
|
+
name: "RenderComponent",
|
|
89
|
+
props: [
|
|
90
|
+
"config",
|
|
91
|
+
"componentMap",
|
|
92
|
+
"structureVersion"
|
|
93
|
+
],
|
|
94
|
+
setup(props) {
|
|
95
|
+
return () => {
|
|
96
|
+
const { config, componentMap } = props;
|
|
97
|
+
const Component = componentMap[config.type];
|
|
98
|
+
if (!Component) return null;
|
|
99
|
+
const componentProps = config.props ? { ...config.props } : {};
|
|
100
|
+
const childVNodes = config.children?.map((child, index) => h(RenderComponent, {
|
|
101
|
+
key: `${child.id || "child"}_${index}_v${props.structureVersion || 0}`,
|
|
102
|
+
config: {
|
|
103
|
+
...child,
|
|
104
|
+
renderOrder: child.renderOrder ?? index
|
|
105
|
+
},
|
|
106
|
+
componentMap,
|
|
107
|
+
structureVersion: props.structureVersion
|
|
108
|
+
}));
|
|
109
|
+
const slots = childVNodes && childVNodes.length > 0 ? { default: () => childVNodes } : void 0;
|
|
110
|
+
return h(Component, {
|
|
111
|
+
id: config.id,
|
|
112
|
+
...componentProps,
|
|
113
|
+
renderOrder: config.renderOrder
|
|
114
|
+
}, slots);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
var Preview_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
119
|
+
__name: "Preview",
|
|
120
|
+
props: {
|
|
121
|
+
shader: {},
|
|
122
|
+
presetId: {},
|
|
123
|
+
apiBaseUrl: { default: "https://shaders.com" },
|
|
124
|
+
obfuscationKey: { default: "shaders-preview-key" },
|
|
125
|
+
watermarkText: { default: "Unlock your Shaders Pro license" },
|
|
126
|
+
watermarkLink: { default: "https://shaders.com/dashboard?pricing=true" }
|
|
127
|
+
},
|
|
128
|
+
setup(__props) {
|
|
129
|
+
const componentMap = {
|
|
130
|
+
AngularBlur: AngularBlur_default,
|
|
131
|
+
Ascii: Ascii_default,
|
|
132
|
+
Aurora: Aurora_default,
|
|
133
|
+
Beam: Beam_default,
|
|
134
|
+
Blob: Blob_default,
|
|
135
|
+
Blur: Blur_default,
|
|
136
|
+
BrightnessContrast: BrightnessContrast_default,
|
|
137
|
+
Bulge: Bulge_default,
|
|
138
|
+
CRTScreen: CRTScreen_default,
|
|
139
|
+
ChannelBlur: ChannelBlur_default,
|
|
140
|
+
Checkerboard: Checkerboard_default,
|
|
141
|
+
ChromaFlow: ChromaFlow_default,
|
|
142
|
+
ChromaticAberration: ChromaticAberration_default,
|
|
143
|
+
Circle: Circle_default,
|
|
144
|
+
ConcentricSpin: ConcentricSpin_default,
|
|
145
|
+
ContourLines: ContourLines_default,
|
|
146
|
+
CursorRipples: CursorRipples_default,
|
|
147
|
+
CursorTrail: CursorTrail_default,
|
|
148
|
+
DiffuseBlur: DiffuseBlur_default,
|
|
149
|
+
Dither: Dither_default,
|
|
150
|
+
DotGrid: DotGrid_default,
|
|
151
|
+
Duotone: Duotone_default,
|
|
152
|
+
FilmGrain: FilmGrain_default,
|
|
153
|
+
FloatingParticles: FloatingParticles_default,
|
|
154
|
+
FlowField: FlowField_default,
|
|
155
|
+
GlassTiles: GlassTiles_default,
|
|
156
|
+
Glitch: Glitch_default,
|
|
157
|
+
Glow: Glow_default,
|
|
158
|
+
Godrays: Godrays_default,
|
|
159
|
+
Grayscale: Grayscale_default,
|
|
160
|
+
Grid: Grid_default,
|
|
161
|
+
GridDistortion: GridDistortion_default,
|
|
162
|
+
Group: Group_default,
|
|
163
|
+
Halftone: Halftone_default,
|
|
164
|
+
HueShift: HueShift_default,
|
|
165
|
+
ImageTexture: ImageTexture_default,
|
|
166
|
+
Invert: Invert_default,
|
|
167
|
+
Kaleidoscope: Kaleidoscope_default,
|
|
168
|
+
LensFlare: LensFlare_default,
|
|
169
|
+
LinearBlur: LinearBlur_default,
|
|
170
|
+
LinearGradient: LinearGradient_default,
|
|
171
|
+
Liquify: Liquify_default,
|
|
172
|
+
Mirror: Mirror_default,
|
|
173
|
+
Perspective: Perspective_default,
|
|
174
|
+
Pixelate: Pixelate_default,
|
|
175
|
+
Plasma: Plasma_default,
|
|
176
|
+
PolarCoordinates: PolarCoordinates_default,
|
|
177
|
+
Posterize: Posterize_default,
|
|
178
|
+
ProgressiveBlur: ProgressiveBlur_default,
|
|
179
|
+
RadialGradient: RadialGradient_default,
|
|
180
|
+
RectangularCoordinates: RectangularCoordinates_default,
|
|
181
|
+
Ripples: Ripples_default,
|
|
182
|
+
Saturation: Saturation_default,
|
|
183
|
+
Sharpness: Sharpness_default,
|
|
184
|
+
Shatter: Shatter_default,
|
|
185
|
+
SimplexNoise: SimplexNoise_default,
|
|
186
|
+
SineWave: SineWave_default,
|
|
187
|
+
SolidColor: SolidColor_default,
|
|
188
|
+
Spherize: Spherize_default,
|
|
189
|
+
Spiral: Spiral_default,
|
|
190
|
+
Strands: Strands_default,
|
|
191
|
+
Stretch: Stretch_default,
|
|
192
|
+
Stripes: Stripes_default,
|
|
193
|
+
StudioBackground: StudioBackground_default,
|
|
194
|
+
Swirl: Swirl_default,
|
|
195
|
+
TiltShift: TiltShift_default,
|
|
196
|
+
Tint: Tint_default,
|
|
197
|
+
Tritone: Tritone_default,
|
|
198
|
+
Twirl: Twirl_default,
|
|
199
|
+
Vibrance: Vibrance_default,
|
|
200
|
+
VideoTexture: VideoTexture_default,
|
|
201
|
+
WaveDistortion: WaveDistortion_default,
|
|
202
|
+
WebcamTexture: WebcamTexture_default,
|
|
203
|
+
ZoomBlur: ZoomBlur_default
|
|
204
|
+
};
|
|
205
|
+
function xorCrypt(data, key) {
|
|
206
|
+
const keyBytes = new TextEncoder().encode(key);
|
|
207
|
+
const result = new Uint8Array(data.length);
|
|
208
|
+
for (let i = 0; i < data.length; i++) result[i] = data[i] ^ keyBytes[i % keyBytes.length];
|
|
209
|
+
return result;
|
|
210
|
+
}
|
|
211
|
+
function decodePreviewDefinition(encoded, key) {
|
|
212
|
+
const binaryString = atob(encoded);
|
|
213
|
+
const encrypted = new Uint8Array(binaryString.length);
|
|
214
|
+
for (let i = 0; i < binaryString.length; i++) encrypted[i] = binaryString.charCodeAt(i);
|
|
215
|
+
const decrypted = xorCrypt(encrypted, key);
|
|
216
|
+
const json = new TextDecoder().decode(decrypted);
|
|
217
|
+
try {
|
|
218
|
+
return JSON.parse(json);
|
|
219
|
+
} catch {
|
|
220
|
+
throw new Error("Failed to decode shader definition: invalid data or incorrect key");
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
const props = __props;
|
|
224
|
+
const fetchedDefinition = ref(null);
|
|
225
|
+
const resolvedDefinition = computed(() => {
|
|
226
|
+
if (fetchedDefinition.value) return fetchedDefinition.value;
|
|
227
|
+
return null;
|
|
228
|
+
});
|
|
229
|
+
async function fetchAndDecode(url) {
|
|
230
|
+
try {
|
|
231
|
+
const response = await fetch(url);
|
|
232
|
+
if (!response.ok) throw new Error(`Failed to fetch: ${response.status}`);
|
|
233
|
+
const data = await response.json();
|
|
234
|
+
const item = data.preset || data.shader;
|
|
235
|
+
if (item?.definition && typeof item.definition === "string") fetchedDefinition.value = decodePreviewDefinition(item.definition, props.obfuscationKey);
|
|
236
|
+
} catch (e) {
|
|
237
|
+
console.error("[Shaders Preview] Failed to fetch preview:", e);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
watch(() => props.shader, (token) => {
|
|
241
|
+
if (token) {
|
|
242
|
+
fetchedDefinition.value = null;
|
|
243
|
+
fetchAndDecode(`${props.apiBaseUrl}/api/preview/shader/${token}`);
|
|
244
|
+
} else if (!props.presetId) fetchedDefinition.value = null;
|
|
245
|
+
}, { immediate: true });
|
|
246
|
+
watch(() => props.presetId, (id) => {
|
|
247
|
+
if (id) {
|
|
248
|
+
fetchedDefinition.value = null;
|
|
249
|
+
fetchAndDecode(`${props.apiBaseUrl}/api/preview/preset/${id}`);
|
|
250
|
+
} else if (!props.shader) fetchedDefinition.value = null;
|
|
251
|
+
}, { immediate: true });
|
|
252
|
+
onMounted(() => {
|
|
253
|
+
console.warn("[Shaders] Preview component is intended for use with a Shaders license. Visit https://shaders.com for more information.");
|
|
254
|
+
});
|
|
255
|
+
return (_ctx, _cache) => {
|
|
256
|
+
return resolvedDefinition.value ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(Shader_default, mergeProps({
|
|
257
|
+
"color-space": resolvedDefinition.value.colorSpace || "p3-linear",
|
|
258
|
+
"enable-performance-tracking": true,
|
|
259
|
+
"is-preview": true,
|
|
260
|
+
style: {
|
|
261
|
+
"width": "100%",
|
|
262
|
+
"height": "100%"
|
|
263
|
+
}
|
|
264
|
+
}, _ctx.$attrs), {
|
|
265
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(resolvedDefinition.value.components, (config, index) => {
|
|
266
|
+
return openBlock(), createBlock(RenderComponent, {
|
|
267
|
+
key: `${config.id || "root"}_${index}_v${resolvedDefinition.value.structureVersion || 0}`,
|
|
268
|
+
config: {
|
|
269
|
+
...config,
|
|
270
|
+
renderOrder: config.renderOrder ?? index
|
|
271
|
+
},
|
|
272
|
+
"component-map": componentMap,
|
|
273
|
+
"structure-version": resolvedDefinition.value.structureVersion
|
|
274
|
+
}, null, 8, ["config", "structure-version"]);
|
|
275
|
+
}), 128))]),
|
|
276
|
+
_: 1
|
|
277
|
+
}, 16, ["color-space"]), __props.watermarkText ? (openBlock(), createElementBlock("a", {
|
|
278
|
+
key: 0,
|
|
279
|
+
href: __props.watermarkLink,
|
|
280
|
+
target: "_blank",
|
|
281
|
+
rel: "noopener noreferrer",
|
|
282
|
+
style: {
|
|
283
|
+
"position": "absolute",
|
|
284
|
+
"bottom": "8px",
|
|
285
|
+
"right": "12px",
|
|
286
|
+
"font-size": "11px",
|
|
287
|
+
"font-family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
288
|
+
"color": "rgba(255, 255, 255, 0.5)",
|
|
289
|
+
"text-decoration": "none",
|
|
290
|
+
"pointer-events": "auto",
|
|
291
|
+
"z-index": "10",
|
|
292
|
+
"text-shadow": "0 1px 3px rgba(0, 0, 0, 0.4)",
|
|
293
|
+
"transition": "color 0.2s ease"
|
|
294
|
+
},
|
|
295
|
+
onMouseenter: _cache[0] || (_cache[0] = ($event) => $event.target.style.color = "rgba(255, 255, 255, 0.8)"),
|
|
296
|
+
onMouseleave: _cache[1] || (_cache[1] = ($event) => $event.target.style.color = "rgba(255, 255, 255, 0.5)")
|
|
297
|
+
}, toDisplayString(__props.watermarkText), 41, _hoisted_2)) : createCommentVNode("", true)])) : createCommentVNode("", true);
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
export { Preview_vue_vue_type_script_setup_true_lang_default as default };
|