-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefaultSpreads.js
160 lines (142 loc) · 5.32 KB
/
defaultSpreads.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import { Spread, SpreadCard } from './models/spread'
function slugify(text) {
text = text.replace(/\s/g, '-')
text = text.replace(/[^\w-]/g, '')
text = text.toLowerCase()
return text
}
function simpleNCardSpreadGenerator(cards, group) {
let spread = {
id: slugify(cards.join(' ')),
group: group,
// name: `${card1}, ${card2} &</i> ${card3}`,
cards: cards.map((card, index) => {
return {
number: index + 1,
name: card,
position: {
x: index + 1,
y: 1,
},
}
})
}
return spread
}
let threeCardSpreads = [
['Past', 'Present', 'Future'],
['Nature', 'Cause', 'Solution'],
['Current Situation', 'Obstacle', 'Advice'],
['Situation', 'Action', 'Outcome'],
['Context', 'Where To Focus', 'Outcome'],
['What I Think', 'What I Feel', 'What I Do'],
].map(a => simpleNCardSpreadGenerator(a))
let spreads = []
spreads.push(simpleNCardSpreadGenerator(['Past', 'Present', 'Future']))
spreads.push(simpleNCardSpreadGenerator(['Nature', 'Cause', 'Solution']))
spreads.push(simpleNCardSpreadGenerator(['Current Situation', 'Obstacle', 'Advice']))
spreads.push(simpleNCardSpreadGenerator(['Situation', 'Action', 'Outcome']))
spreads.push(simpleNCardSpreadGenerator(['Context', 'Where To Focus', 'Outcome']))
spreads.push(simpleNCardSpreadGenerator(['What I Think', 'What I Feel', 'What I Do']))
spreads.push(simpleNCardSpreadGenerator(['Where you stand now', 'What you aspire to', 'How to get there']))
spreads.push(simpleNCardSpreadGenerator(['What you aspire to', 'What is standing in your way', 'How you can overcome this']))
spreads.push(simpleNCardSpreadGenerator(['What will help you', 'What will hinder you', 'What is your unrealised potential']))
spreads.push(simpleNCardSpreadGenerator(['What you can change', 'What you can\'t change', 'What you may not be aware of']))
spreads.push(simpleNCardSpreadGenerator(['What worked well', 'What didn\'t work well', 'Key learnings']))
spreads.push(simpleNCardSpreadGenerator(['Strengths', 'Weaknesses', 'Advice']))
spreads.push(simpleNCardSpreadGenerator(['Opportunities', 'Challenges', 'Outcome']))
spreads.push(simpleNCardSpreadGenerator(['Option 1', 'Option 2', 'Option 3']))
spreads.push(simpleNCardSpreadGenerator(['Option 1', 'Option 2', 'What you need to know to make a decision']))
spreads.push(simpleNCardSpreadGenerator(['A solution', 'An alternate solution', 'How to choose']))
function simple3CardBalancedGenerator(card1, card2, card3) {
return {
id: slugify(`${card1} ${card2} ${card3}`),
// name: `Balanced Spread`,
group: 'Balanced',
cards: [
{
number: 1,
name: card1,
position: {
x: 2,
y: 1,
},
},
{
number: 2,
name: card2,
rotation: 225,
position: {
x: 1,
y: 2,
},
},
{
number: 3,
name: card3,
rotation: 135,
position: {
x: 3,
y: 2,
},
}
]
}
}
spreads.push(simple3CardBalancedGenerator('Mind', 'Body', 'Soul'))
spreads.push(simple3CardBalancedGenerator('Physical State', 'Emotional State', 'Spiritual State'))
spreads.push(simple3CardBalancedGenerator('Subconscious', 'Conscious', 'Super Conscious'))
spreads.push(simple3CardBalancedGenerator('Option 1', 'Option 2', 'Option 3'))
spreads.push(simple3CardBalancedGenerator('What I Think', 'What I Feel', 'What I Do'))
spreads.push({
id: slugify(`single card reading`),
name: `Draw a single card`,
cards: [
{
number: 1,
name: 'Card',
position: {
x: 1,
y: 0,
},
}
]
})
function simple2CardCrossGenerator(card1, card2) {
return {
id: slugify(`${card1}, ${card2}`),
group: `Cross`,
cards: [
{
number: 1,
name: card1,
position: {
x: 1,
y: 1,
},
},
{
number: 2,
name: card2,
position: {
x: 1,
y: 1,
},
rotation: 90,
layer: 1,
}
]
}
}
spreads.push(simpleNCardSpreadGenerator(['Situation', 'Advice']))
spreads.push(simpleNCardSpreadGenerator(['Yes', 'No']))
spreads.push(simpleNCardSpreadGenerator(['Option 1', 'Option 2']))
spreads.push(simpleNCardSpreadGenerator(['Accept', 'Reject']))
spreads.push(simple2CardCrossGenerator('Situation', 'Challenge'))
spreads.push(simple2CardCrossGenerator('Aim', 'Blockage'))
spreads.push(simple2CardCrossGenerator('Blockage', 'Solution'))
spreads.push(simple2CardCrossGenerator('Ideal', 'Settling for'))
spreads.push(simple2CardCrossGenerator('Situation', 'Extra Info'))
spreads.push(simple2CardCrossGenerator('Querent', 'Adversary'))
spreads.push(simpleNCardSpreadGenerator(['Positive', 'Negative', 'Result', 'Advice']))
module.exports = spreads.map(spread => Spread.fromObject(spread))