Skip to content

Commit f6baa72

Browse files
pcintaragithub-actions[bot]
authored andcommitted
style: apply prettier formatting [auto-commit]
1 parent ff4395a commit f6baa72

195 files changed

Lines changed: 1072 additions & 1378 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.vitepress/theme/components/ComponentViewer.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,13 @@ onMounted(() => {
9393
})
9494
9595
// Watch for prop changes and highlighter availability
96-
watch([() => props.rawCode, () => props.filePath, highlighter], () => {
97-
loadCode()
98-
}, { immediate: true })
96+
watch(
97+
[() => props.rawCode, () => props.filePath, highlighter],
98+
() => {
99+
loadCode()
100+
},
101+
{ immediate: true }
102+
)
99103
</script>
100104

101105
<template>
@@ -159,7 +163,12 @@ watch([() => props.rawCode, () => props.filePath, highlighter], () => {
159163
value="preview"
160164
class="relative after:absolute after:inset-0 after:right-3 after:z-0 after:rounded-lg after:bg-muted h-[--height] px-0"
161165
>
162-
<ResizablePanelGroup v-if="responsive" id="block-resizable" direction="horizontal" class="relative z-10 bg-background">
166+
<ResizablePanelGroup
167+
v-if="responsive"
168+
id="block-resizable"
169+
direction="horizontal"
170+
class="relative z-10 bg-background"
171+
>
163172
<ResizablePanel id="block-resizable-panel-1" ref="resizableRef" :default-size="100" :min-size="30" as-child>
164173
<div :class="['w-full border-1 border-gray-200 rounded-lg', previewClasses]" :style="{ height: height }">
165174
<slot />

docs/api.md

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ The following functions are available when using `useViewAPI`:
6464
data without including parent block data.
6565
- `queryStepData`, `queryStepDataLeaf`: See
6666
[Data Query Methods](#data-query-methods).
67-
- `dataAlongPath`: Getter for the raw data array of all steps in the current path.
68-
This is useful when you need to access the raw data structure of the path.
67+
- `dataAlongPath`: Getter for the raw data array of all steps in the current
68+
path. This is useful when you need to access the raw data structure of the
69+
path.
6970
- `stepIndex`: Returns the current step index among leaf nodes.
7071
- `blockIndex`: Returns the current block index.
7172
- `pathString`: Returns the current path as a string.
@@ -244,10 +245,14 @@ api.goToStep('trial/block1/step2', false)
244245
in use until the next route.
245246
- `randomAssignCondition(conditionObject)`: Randomly assigns a condition based
246247
on the provided condition object. Supports weighted randomization.
247-
- `randomInt(min, max)`: Generate a random integer between min and max (inclusive).
248-
- `shuffle(array)`: Randomly reorder elements in an array using Fisher-Yates algorithm.
249-
- `sampleWithReplacement(array, n, weights)`: Sample elements from an array with replacement.
250-
- `sampleWithoutReplacement(array, n)`: Sample elements from an array without replacement.
248+
- `randomInt(min, max)`: Generate a random integer between min and max
249+
(inclusive).
250+
- `shuffle(array)`: Randomly reorder elements in an array using Fisher-Yates
251+
algorithm.
252+
- `sampleWithReplacement(array, n, weights)`: Sample elements from an array with
253+
replacement.
254+
- `sampleWithoutReplacement(array, n)`: Sample elements from an array without
255+
replacement.
251256
- `faker`: Collection of faker distributions for generating random data.
252257

253258
## Logging and Debugging
@@ -331,8 +336,10 @@ const trialData = api.queryStepDataLeaf('trial/block*')
331336

332337
The difference between these methods:
333338

334-
- `queryStepData()` returns the merged data for each leaf node (including parent block data)
335-
- `queryStepDataLeaf()` returns only the data directly from each leaf node (without parent block data)
339+
- `queryStepData()` returns the merged data for each leaf node (including parent
340+
block data)
341+
- `queryStepDataLeaf()` returns only the data directly from each leaf node
342+
(without parent block data)
336343

337344
Example:
338345

@@ -343,14 +350,11 @@ Example:
343350
// trial2 (response: 'B')
344351

345352
// queryStepData() returns (merged data):
346-
[
353+
;[
347354
{ blockType: 'practice', response: 'A' },
348-
{ blockType: 'practice', response: 'B' }
349-
]
350-
351-
// queryStepDataLeaf() returns (leaf data only):
352-
[
353-
{ response: 'A' },
354-
{ response: 'B' }
355+
{ blockType: 'practice', response: 'B' },
356+
][
357+
// queryStepDataLeaf() returns (leaf data only):
358+
({ response: 'A' }, { response: 'B' })
355359
]
356360
```

docs/coding/components/SimpleButton.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ const count = ref(0)
44
</script>
55

66
<template>
7-
<Button @click="count++">Count is: {{ count }}</Button>
7+
<Button @click="count++">Count is: {{ count }}</Button>
88
</template>
99

10-
<style scoped>
11-
</style>
10+
<style scoped></style>

docs/coding/components/TextInput.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const text = ref('')
55

66
<template>
77
<div class="border-1 border-gray-800 rounded-md p-2 w-[200px]">
8-
<input v-model="text" placeholder="Type here" />
8+
<input v-model="text" placeholder="Type here" />
99
</div>
1010
<p><b>You typed: </b>{{ text }}</p>
1111
</template>

docs/examples/BadgeExample.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111

1212
<script setup>
1313
import { Badge } from '@/uikit/components/ui/badge'
14-
</script>
14+
</script>

docs/examples/ButtonColorVariantsExample.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
<script setup>
2121
import { Button } from '@/uikit/components/ui/button'
22-
</script>
22+
</script>

docs/examples/ButtonIconsExample.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
<script setup>
1717
import { Button } from '@/uikit/components/ui/button'
1818
import { Plus, Download, Check, AlertTriangle, Trash, Info, Settings, Edit } from 'lucide-vue-next'
19-
</script>
19+
</script>

docs/examples/ButtonSizesExample.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414

1515
<script setup>
1616
import { Button } from '@/uikit/components/ui/button'
17-
</script>
17+
</script>

docs/examples/ButtonVariantsExample.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313

1414
<script setup>
1515
import { Button } from '@/uikit/components/ui/button'
16-
</script>
16+
</script>
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
<template>
22
<CenteredContent class="bg-gray-50 min-h-[300px]">
33
<div class="bg-purple-100 border-2 border-purple-300 rounded p-8 flex items-center justify-center">
4-
<div class="text-purple-800 font-medium">
5-
Centered Content (Custom Classes)
6-
</div>
4+
<div class="text-purple-800 font-medium">Centered Content (Custom Classes)</div>
75
</div>
86
</CenteredContent>
97
</template>
108

119
<script setup>
1210
import { CenteredContent } from '@/uikit/layouts'
13-
</script>
11+
</script>

0 commit comments

Comments
 (0)