@thehammer/template-verification 0.2.22 → 0.2.23
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/VerifiedField.vue.d.ts +22 -0
- package/dist/style.css +1 -1
- package/dist/template-verification.js +119 -114
- package/package.json +1 -1
|
@@ -119,6 +119,28 @@ type __VLS_Props = {
|
|
|
119
119
|
field?: string;
|
|
120
120
|
original?: string | number | null;
|
|
121
121
|
format?: (value: unknown) => string;
|
|
122
|
+
/**
|
|
123
|
+
* SG-974: text to render, styled as an italic placeholder, in place of the
|
|
124
|
+
* default-slot fallback when this field has no value. Rendered INSIDE
|
|
125
|
+
* `.tv-field-value` — the same box the real value would occupy — rather
|
|
126
|
+
* than left for the host template to draw beside `<VerifiedField>` as its
|
|
127
|
+
* own separate markup.
|
|
128
|
+
*
|
|
129
|
+
* That distinction is the whole point, not a style preference. The mark's
|
|
130
|
+
* anchor is a zero-size box glued to the trailing edge of whatever
|
|
131
|
+
* `.tv-field-value` rendered (see the header docblock's "ANCHORING"
|
|
132
|
+
* section) — when there is no value, that box renders NOTHING and
|
|
133
|
+
* collapses to zero width, so the anchor lands at the field's own
|
|
134
|
+
* starting point. A placeholder a host template draws AFTER
|
|
135
|
+
* `<VerifiedField>` as a sibling (`v-if="!value"`) therefore renders
|
|
136
|
+
* AFTER that zero-width point too, putting the mark to the LEFT of the
|
|
137
|
+
* placeholder it is supposed to trail — exactly the reported bug (SG-974).
|
|
138
|
+
* Accepting the placeholder text here and rendering it as the value
|
|
139
|
+
* box's own content puts it before the anchor in the same inline flow
|
|
140
|
+
* the anchor already tracks, so the mark lands to its right in every
|
|
141
|
+
* state, the same guarantee a real value already gets.
|
|
142
|
+
*/
|
|
143
|
+
placeholder?: string;
|
|
122
144
|
};
|
|
123
145
|
declare const _default: __VLS_WithSlots<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>, {
|
|
124
146
|
default?: ((props: {
|