Skip to content

Commit

Permalink
feat(bundle): added PURE annotations for exported helper components
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Mar 6, 2025
1 parent b62dc64 commit 6ed644c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/deep-buses-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@formwerk/core': patch
---

feat(bundle): added PURE annotations for exported helper components
5 changes: 4 additions & 1 deletion packages/core/src/useCalendar/useCalendarCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ export function useCalendarCell(_props: Reactivify<CalendarCellProps>) {
};
}

export const CalendarCell = defineComponent({
/**
* A helper component that renders a calendar cell. You can build your own with `useCalendarCell`.
*/
export const CalendarCell = /*#__PURE__*/ defineComponent({
name: 'CalendarCell',
inheritAttrs: true,
props: ['value', 'selected', 'disabled', 'focused', 'label', 'type', 'monthOfYear', 'year'],
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/useDateTimeField/useDateTimeSegment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ export function useDateTimeSegment(_props: Reactivify<DateTimeSegmentProps>) {
};
}

export const DateTimeSegment = defineComponent<DateTimeSegmentProps>({
/**
* A helper component that renders a datetime segment. You can build your own with `useDateTimeSegment`.
*/
export const DateTimeSegment = /*#__PURE__*/ defineComponent<DateTimeSegmentProps>({
name: 'DateTimeSegment',
props: ['type', 'value', 'disabled', 'readonly'],
setup(props) {
Expand Down
5 changes: 4 additions & 1 deletion packages/core/src/useHiddenField/HiddenField.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { defineComponent } from 'vue';
import { useHiddenField, type HiddenFieldProps } from './useHiddenField';

export const HiddenField = defineComponent<HiddenFieldProps>({
/**
* A helper component that renders a hidden field. You can build your own with `useHiddenField`.
*/
export const HiddenField = /*#__PURE__*/ defineComponent<HiddenFieldProps>({
name: 'HiddenField',
props: { name: String, value: null, disabled: Boolean },
setup(props) {
Expand Down

0 comments on commit 6ed644c

Please sign in to comment.