@luna-park/plugin 2.3.0 → 2.5.0
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/components.d.mts +10 -0
- package/dist/components.mjs +40 -0
- package/dist/extractor.d.mts +1 -1
- package/dist/index-CFhhfAj1.d.mts +1236 -0
- package/dist/{index-Dz0vJvpL.d.mts → index-D7gCzkm1.d.mts} +2 -1
- package/dist/index.d.mts +3 -1214
- package/dist/index.mjs +186 -99
- package/package.json +15 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { u as TSecrets } from "./index-CFhhfAj1.mjs";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
secrets?: TSecrets;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export { _default as LSecretInput };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createBlock, defineComponent, openBlock, ref, unref, watch } from "vue";
|
|
2
|
+
import { LInput } from "@luna-park/design";
|
|
3
|
+
// src/components/LSecretInput.vue
|
|
4
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
5
|
+
__name: "LSecretInput",
|
|
6
|
+
props: {
|
|
7
|
+
label: {},
|
|
8
|
+
name: {},
|
|
9
|
+
placeholder: {},
|
|
10
|
+
secrets: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const props = __props;
|
|
14
|
+
const value = ref("");
|
|
15
|
+
watch(() => props.secrets?.values[props.name], (saved) => {
|
|
16
|
+
value.value = saved ?? "";
|
|
17
|
+
}, { immediate: true });
|
|
18
|
+
async function save() {
|
|
19
|
+
if (props.secrets?.available && value.value !== (props.secrets.values[props.name] ?? "")) await props.secrets.set(props.name, value.value);
|
|
20
|
+
}
|
|
21
|
+
return (_ctx, _cache) => {
|
|
22
|
+
return openBlock(), createBlock(unref(LInput), {
|
|
23
|
+
modelValue: value.value,
|
|
24
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
|
|
25
|
+
disabled: !__props.secrets?.available,
|
|
26
|
+
label: __props.label,
|
|
27
|
+
placeholder: __props.placeholder,
|
|
28
|
+
title: "Stored in the project secrets and kept out of the project files.",
|
|
29
|
+
type: "password",
|
|
30
|
+
onFocusout: save
|
|
31
|
+
}, null, 8, [
|
|
32
|
+
"modelValue",
|
|
33
|
+
"disabled",
|
|
34
|
+
"label",
|
|
35
|
+
"placeholder"
|
|
36
|
+
]);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export { _sfc_main as LSecretInput };
|
package/dist/extractor.d.mts
CHANGED