elm-pages 3.0.0-beta.27 → 3.0.0-beta.29
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/README.md +1 -1
- package/codegen/elm-pages-codegen.cjs +231 -650
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/elm-stuff/0.19.1/Pages-Review-DeadCodeEliminateDataTest.elmo +0 -0
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/elm-stuff/0.19.1/d.dat +0 -0
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/js/Runner.elm.js +7 -7
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/js/node_runner.js +1 -1
- package/generator/dead-code-review/elm-stuff/tests-0.19.1/js/node_supervisor.js +1 -1
- package/generator/dead-code-review/tests/Pages/Review/DeadCodeEliminateDataTest.elm +7 -7
- package/generator/review/elm-stuff/tests-0.19.1/elm-stuff/0.19.1/d.dat +0 -0
- package/generator/review/elm-stuff/tests-0.19.1/js/node_runner.js +1 -1
- package/generator/review/elm-stuff/tests-0.19.1/js/node_supervisor.js +1 -1
- package/generator/src/RouteBuilder.elm +43 -51
- package/generator/src/compatibility-key.js +2 -2
- package/generator/template/app/Route/Index.elm +3 -3
- package/package.json +2 -2
- package/src/Form.elm +178 -306
- package/src/Head.elm +2 -2
- package/src/Pages/Internal/Platform/CompatibilityKey.elm +1 -1
- package/src/Pages/Internal/Platform.elm +2 -2
- package/src/Pages/PageUrl.elm +11 -8
- package/src/PagesMsg.elm +2 -3
- package/src/Path.elm +16 -19
- package/src/QueryParams.elm +17 -158
- package/src/Scaffold/Route.elm +140 -237
- package/src/Server/Request.elm +0 -3
package/src/Scaffold/Route.elm
CHANGED
|
@@ -161,7 +161,7 @@ single input =
|
|
|
161
161
|
|
|
162
162
|
{-| -}
|
|
163
163
|
buildNoState :
|
|
164
|
-
{ view : {
|
|
164
|
+
{ view : { shared : Elm.Expression, app : Elm.Expression } -> Elm.Expression
|
|
165
165
|
}
|
|
166
166
|
-> Builder
|
|
167
167
|
-> { path : String, body : String }
|
|
@@ -170,10 +170,9 @@ buildNoState definitions builder_ =
|
|
|
170
170
|
ServerRender declarations builder ->
|
|
171
171
|
userFunction builder.moduleName
|
|
172
172
|
{ view =
|
|
173
|
-
\
|
|
173
|
+
\app shared _ ->
|
|
174
174
|
definitions.view
|
|
175
|
-
{
|
|
176
|
-
, sharedModel = sharedModel
|
|
175
|
+
{ shared = shared
|
|
177
176
|
, app = app
|
|
178
177
|
}
|
|
179
178
|
, localState = Nothing
|
|
@@ -192,10 +191,9 @@ buildNoState definitions builder_ =
|
|
|
192
191
|
PreRender declarations builder ->
|
|
193
192
|
userFunction builder.moduleName
|
|
194
193
|
{ view =
|
|
195
|
-
\
|
|
194
|
+
\app shared _ ->
|
|
196
195
|
definitions.view
|
|
197
|
-
{
|
|
198
|
-
, sharedModel = sharedModel
|
|
196
|
+
{ shared = shared
|
|
199
197
|
, app = app
|
|
200
198
|
}
|
|
201
199
|
, localState = Nothing
|
|
@@ -229,26 +227,23 @@ addDeclarations declarations builder =
|
|
|
229
227
|
{-| -}
|
|
230
228
|
buildWithLocalState :
|
|
231
229
|
{ view :
|
|
232
|
-
{
|
|
230
|
+
{ shared : Elm.Expression, model : Elm.Expression, app : Elm.Expression } -> Elm.Expression
|
|
233
231
|
, update :
|
|
234
|
-
{
|
|
235
|
-
, sharedModel : Elm.Expression
|
|
232
|
+
{ shared : Elm.Expression
|
|
236
233
|
, app : Elm.Expression
|
|
237
234
|
, msg : Elm.Expression
|
|
238
235
|
, model : Elm.Expression
|
|
239
236
|
}
|
|
240
237
|
-> Elm.Expression
|
|
241
238
|
, init :
|
|
242
|
-
{
|
|
243
|
-
, sharedModel : Elm.Expression
|
|
239
|
+
{ shared : Elm.Expression
|
|
244
240
|
, app : Elm.Expression
|
|
245
241
|
}
|
|
246
242
|
-> Elm.Expression
|
|
247
243
|
, subscriptions :
|
|
248
|
-
{
|
|
249
|
-
, routeParams : Elm.Expression
|
|
244
|
+
{ routeParams : Elm.Expression
|
|
250
245
|
, path : Elm.Expression
|
|
251
|
-
,
|
|
246
|
+
, shared : Elm.Expression
|
|
252
247
|
, model : Elm.Expression
|
|
253
248
|
}
|
|
254
249
|
-> Elm.Expression
|
|
@@ -262,38 +257,34 @@ buildWithLocalState definitions builder_ =
|
|
|
262
257
|
ServerRender declarations builder ->
|
|
263
258
|
userFunction builder.moduleName
|
|
264
259
|
{ view =
|
|
265
|
-
\
|
|
260
|
+
\app shared model ->
|
|
266
261
|
definitions.view
|
|
267
|
-
{
|
|
268
|
-
, sharedModel = sharedModel
|
|
262
|
+
{ shared = shared
|
|
269
263
|
, model = model
|
|
270
264
|
, app = app
|
|
271
265
|
}
|
|
272
266
|
, localState =
|
|
273
267
|
Just
|
|
274
268
|
{ update =
|
|
275
|
-
\
|
|
269
|
+
\app shared msg model ->
|
|
276
270
|
definitions.update
|
|
277
|
-
{
|
|
278
|
-
, sharedModel = sharedModel
|
|
271
|
+
{ shared = shared
|
|
279
272
|
, app = app
|
|
280
273
|
, msg = msg
|
|
281
274
|
, model = model
|
|
282
275
|
}
|
|
283
276
|
, init =
|
|
284
|
-
\
|
|
277
|
+
\app shared ->
|
|
285
278
|
definitions.init
|
|
286
|
-
{
|
|
287
|
-
, sharedModel = sharedModel
|
|
279
|
+
{ shared = shared
|
|
288
280
|
, app = app
|
|
289
281
|
}
|
|
290
282
|
, subscriptions =
|
|
291
|
-
\
|
|
283
|
+
\routeParams path shared model ->
|
|
292
284
|
definitions.subscriptions
|
|
293
|
-
{
|
|
294
|
-
, routeParams = routeParams
|
|
285
|
+
{ routeParams = routeParams
|
|
295
286
|
, path = path
|
|
296
|
-
,
|
|
287
|
+
, shared = shared
|
|
297
288
|
, model = model
|
|
298
289
|
}
|
|
299
290
|
, state = LocalState
|
|
@@ -313,38 +304,34 @@ buildWithLocalState definitions builder_ =
|
|
|
313
304
|
PreRender declarations builder ->
|
|
314
305
|
userFunction builder.moduleName
|
|
315
306
|
{ view =
|
|
316
|
-
\
|
|
307
|
+
\app shared model ->
|
|
317
308
|
definitions.view
|
|
318
|
-
{
|
|
319
|
-
, sharedModel = sharedModel
|
|
309
|
+
{ shared = shared
|
|
320
310
|
, model = model
|
|
321
311
|
, app = app
|
|
322
312
|
}
|
|
323
313
|
, localState =
|
|
324
314
|
Just
|
|
325
315
|
{ update =
|
|
326
|
-
\
|
|
316
|
+
\app shared msg model ->
|
|
327
317
|
definitions.update
|
|
328
|
-
{
|
|
329
|
-
, sharedModel = sharedModel
|
|
318
|
+
{ shared = shared
|
|
330
319
|
, app = app
|
|
331
320
|
, msg = msg
|
|
332
321
|
, model = model
|
|
333
322
|
}
|
|
334
323
|
, init =
|
|
335
|
-
\
|
|
324
|
+
\app shared ->
|
|
336
325
|
definitions.init
|
|
337
|
-
{
|
|
338
|
-
, sharedModel = sharedModel
|
|
326
|
+
{ shared = shared
|
|
339
327
|
, app = app
|
|
340
328
|
}
|
|
341
329
|
, subscriptions =
|
|
342
|
-
\
|
|
330
|
+
\routeParams path shared model ->
|
|
343
331
|
definitions.subscriptions
|
|
344
|
-
{
|
|
345
|
-
, routeParams = routeParams
|
|
332
|
+
{ routeParams = routeParams
|
|
346
333
|
, path = path
|
|
347
|
-
,
|
|
334
|
+
, shared = shared
|
|
348
335
|
, model = model
|
|
349
336
|
}
|
|
350
337
|
, state = LocalState
|
|
@@ -368,26 +355,23 @@ buildWithLocalState definitions builder_ =
|
|
|
368
355
|
{-| -}
|
|
369
356
|
buildWithSharedState :
|
|
370
357
|
{ view :
|
|
371
|
-
{
|
|
358
|
+
{ shared : Elm.Expression, model : Elm.Expression, app : Elm.Expression } -> Elm.Expression
|
|
372
359
|
, update :
|
|
373
|
-
{
|
|
374
|
-
, sharedModel : Elm.Expression
|
|
360
|
+
{ shared : Elm.Expression
|
|
375
361
|
, app : Elm.Expression
|
|
376
362
|
, msg : Elm.Expression
|
|
377
363
|
, model : Elm.Expression
|
|
378
364
|
}
|
|
379
365
|
-> Elm.Expression
|
|
380
366
|
, init :
|
|
381
|
-
{
|
|
382
|
-
, sharedModel : Elm.Expression
|
|
367
|
+
{ shared : Elm.Expression
|
|
383
368
|
, app : Elm.Expression
|
|
384
369
|
}
|
|
385
370
|
-> Elm.Expression
|
|
386
371
|
, subscriptions :
|
|
387
|
-
{
|
|
388
|
-
, routeParams : Elm.Expression
|
|
372
|
+
{ routeParams : Elm.Expression
|
|
389
373
|
, path : Elm.Expression
|
|
390
|
-
,
|
|
374
|
+
, shared : Elm.Expression
|
|
391
375
|
, model : Elm.Expression
|
|
392
376
|
}
|
|
393
377
|
-> Elm.Expression
|
|
@@ -401,38 +385,34 @@ buildWithSharedState definitions builder_ =
|
|
|
401
385
|
ServerRender declarations builder ->
|
|
402
386
|
userFunction builder.moduleName
|
|
403
387
|
{ view =
|
|
404
|
-
\
|
|
388
|
+
\app shared model ->
|
|
405
389
|
definitions.view
|
|
406
|
-
{
|
|
407
|
-
, sharedModel = sharedModel
|
|
390
|
+
{ shared = shared
|
|
408
391
|
, model = model
|
|
409
392
|
, app = app
|
|
410
393
|
}
|
|
411
394
|
, localState =
|
|
412
395
|
Just
|
|
413
396
|
{ update =
|
|
414
|
-
\
|
|
397
|
+
\app shared msg model ->
|
|
415
398
|
definitions.update
|
|
416
|
-
{
|
|
417
|
-
, sharedModel = sharedModel
|
|
399
|
+
{ shared = shared
|
|
418
400
|
, app = app
|
|
419
401
|
, msg = msg
|
|
420
402
|
, model = model
|
|
421
403
|
}
|
|
422
404
|
, init =
|
|
423
|
-
\
|
|
405
|
+
\app shared ->
|
|
424
406
|
definitions.init
|
|
425
|
-
{
|
|
426
|
-
, sharedModel = sharedModel
|
|
407
|
+
{ shared = shared
|
|
427
408
|
, app = app
|
|
428
409
|
}
|
|
429
410
|
, subscriptions =
|
|
430
|
-
\
|
|
411
|
+
\routeParams path shared model ->
|
|
431
412
|
definitions.subscriptions
|
|
432
|
-
{
|
|
433
|
-
, routeParams = routeParams
|
|
413
|
+
{ routeParams = routeParams
|
|
434
414
|
, path = path
|
|
435
|
-
,
|
|
415
|
+
, shared = shared
|
|
436
416
|
, model = model
|
|
437
417
|
}
|
|
438
418
|
, state = SharedState
|
|
@@ -452,38 +432,34 @@ buildWithSharedState definitions builder_ =
|
|
|
452
432
|
PreRender declarations builder ->
|
|
453
433
|
userFunction builder.moduleName
|
|
454
434
|
{ view =
|
|
455
|
-
\
|
|
435
|
+
\app shared model ->
|
|
456
436
|
definitions.view
|
|
457
|
-
{
|
|
458
|
-
, sharedModel = sharedModel
|
|
437
|
+
{ shared = shared
|
|
459
438
|
, model = model
|
|
460
439
|
, app = app
|
|
461
440
|
}
|
|
462
441
|
, localState =
|
|
463
442
|
Just
|
|
464
443
|
{ update =
|
|
465
|
-
\
|
|
444
|
+
\app shared msg model ->
|
|
466
445
|
definitions.update
|
|
467
|
-
{
|
|
468
|
-
, sharedModel = sharedModel
|
|
446
|
+
{ shared = shared
|
|
469
447
|
, app = app
|
|
470
448
|
, msg = msg
|
|
471
449
|
, model = model
|
|
472
450
|
}
|
|
473
451
|
, init =
|
|
474
|
-
\
|
|
452
|
+
\app shared ->
|
|
475
453
|
definitions.init
|
|
476
|
-
{
|
|
477
|
-
, sharedModel = sharedModel
|
|
454
|
+
{ shared = shared
|
|
478
455
|
, app = app
|
|
479
456
|
}
|
|
480
457
|
, subscriptions =
|
|
481
|
-
\
|
|
458
|
+
\routeParams path shared model ->
|
|
482
459
|
definitions.subscriptions
|
|
483
|
-
{
|
|
484
|
-
, routeParams = routeParams
|
|
460
|
+
{ routeParams = routeParams
|
|
485
461
|
, path = path
|
|
486
|
-
,
|
|
462
|
+
, shared = shared
|
|
487
463
|
, model = model
|
|
488
464
|
}
|
|
489
465
|
, state = SharedState
|
|
@@ -518,12 +494,12 @@ type ActionOrPages
|
|
|
518
494
|
userFunction :
|
|
519
495
|
List String
|
|
520
496
|
->
|
|
521
|
-
{ view : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
497
|
+
{ view : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
522
498
|
, localState :
|
|
523
499
|
Maybe
|
|
524
|
-
{ update : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
525
|
-
, init : Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
526
|
-
, subscriptions : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
500
|
+
{ update : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
501
|
+
, init : Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
502
|
+
, subscriptions : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
527
503
|
, state : State
|
|
528
504
|
}
|
|
529
505
|
, data : Elm.Expression -> Elm.Expression
|
|
@@ -537,31 +513,25 @@ userFunction moduleName definitions =
|
|
|
537
513
|
let
|
|
538
514
|
viewFn :
|
|
539
515
|
{ declaration : Elm.Declaration
|
|
540
|
-
, call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
541
|
-
, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
516
|
+
, call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
517
|
+
, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
542
518
|
}
|
|
543
519
|
viewFn =
|
|
544
520
|
case definitions.localState of
|
|
545
521
|
Just _ ->
|
|
546
|
-
Elm.Declare.
|
|
547
|
-
( "
|
|
548
|
-
|
|
549
|
-
|> Elm.Annotation.named [ "Pages", "PageUrl" ]
|
|
550
|
-
|> Elm.Annotation.maybe
|
|
551
|
-
|> Just
|
|
552
|
-
)
|
|
553
|
-
( "sharedModel"
|
|
522
|
+
Elm.Declare.fn3 "view"
|
|
523
|
+
( "app", Just appType )
|
|
524
|
+
( "shared"
|
|
554
525
|
, Just (Elm.Annotation.named [ "Shared" ] "Model")
|
|
555
526
|
)
|
|
556
527
|
( "model", Just (Elm.Annotation.named [] "Model") )
|
|
557
|
-
(
|
|
558
|
-
|
|
559
|
-
definitions.view maybeUrl sharedModel model app
|
|
528
|
+
(\app shared model ->
|
|
529
|
+
definitions.view app shared model
|
|
560
530
|
|> Elm.withType
|
|
561
531
|
(Elm.Annotation.namedWith [ "View" ]
|
|
562
532
|
"View"
|
|
563
|
-
[ Elm.Annotation.namedWith [ "
|
|
564
|
-
"
|
|
533
|
+
[ Elm.Annotation.namedWith [ "PagesMsg" ]
|
|
534
|
+
"PagesMsg"
|
|
565
535
|
[ localType "Msg"
|
|
566
536
|
]
|
|
567
537
|
]
|
|
@@ -572,25 +542,30 @@ userFunction moduleName definitions =
|
|
|
572
542
|
let
|
|
573
543
|
viewDeclaration :
|
|
574
544
|
{ declaration : Elm.Declaration
|
|
575
|
-
, call : Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
576
|
-
, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
545
|
+
, call : Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
546
|
+
, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
577
547
|
}
|
|
578
548
|
viewDeclaration =
|
|
579
|
-
Elm.Declare.
|
|
580
|
-
( "
|
|
581
|
-
|
|
582
|
-
|> Elm.Annotation.named [ "Pages", "PageUrl" ]
|
|
583
|
-
|> Elm.Annotation.maybe
|
|
584
|
-
|> Just
|
|
585
|
-
)
|
|
586
|
-
( "sharedModel"
|
|
549
|
+
Elm.Declare.fn2 "view"
|
|
550
|
+
( "app", Just appType )
|
|
551
|
+
( "shared"
|
|
587
552
|
, Just (Elm.Annotation.named [ "Shared" ] "Model")
|
|
588
553
|
)
|
|
589
|
-
(
|
|
590
|
-
|
|
554
|
+
(\app shared ->
|
|
555
|
+
definitions.view app shared Elm.unit
|
|
556
|
+
|> Elm.withType
|
|
557
|
+
(Elm.Annotation.namedWith [ "View" ]
|
|
558
|
+
"View"
|
|
559
|
+
[ Elm.Annotation.namedWith [ "PagesMsg" ]
|
|
560
|
+
"PagesMsg"
|
|
561
|
+
[ localType "Msg"
|
|
562
|
+
]
|
|
563
|
+
]
|
|
564
|
+
)
|
|
565
|
+
)
|
|
591
566
|
in
|
|
592
567
|
{ declaration = viewDeclaration.declaration
|
|
593
|
-
, call = \_ -> viewDeclaration.call
|
|
568
|
+
, call = \app shared _ -> viewDeclaration.call app shared
|
|
594
569
|
, callFrom = \a _ c d -> viewDeclaration.callFrom a c d
|
|
595
570
|
}
|
|
596
571
|
|
|
@@ -598,11 +573,11 @@ userFunction moduleName definitions =
|
|
|
598
573
|
Maybe
|
|
599
574
|
{ updateFn :
|
|
600
575
|
{ declaration : Elm.Declaration
|
|
601
|
-
, call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
602
|
-
, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
576
|
+
, call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
577
|
+
, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
603
578
|
}
|
|
604
|
-
, initFn : { declaration : Elm.Declaration, call : Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
605
|
-
, subscriptionsFn : { declaration : Elm.Declaration, call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
579
|
+
, initFn : { declaration : Elm.Declaration, call : Elm.Expression -> Elm.Expression -> Elm.Expression, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression }
|
|
580
|
+
, subscriptionsFn : { declaration : Elm.Declaration, call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression, callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression }
|
|
606
581
|
, state : State
|
|
607
582
|
}
|
|
608
583
|
localDefinitions =
|
|
@@ -610,29 +585,18 @@ userFunction moduleName definitions =
|
|
|
610
585
|
|> Maybe.map
|
|
611
586
|
(\localState ->
|
|
612
587
|
{ updateFn =
|
|
613
|
-
Elm.Declare.
|
|
614
|
-
( "pageUrl"
|
|
615
|
-
, "PageUrl"
|
|
616
|
-
|> Elm.Annotation.named [ "Pages", "PageUrl" ]
|
|
617
|
-
|> Just
|
|
618
|
-
)
|
|
619
|
-
( "sharedModel", Just (Elm.Annotation.named [ "Shared" ] "Model") )
|
|
588
|
+
Elm.Declare.fn4 "update"
|
|
620
589
|
( "app", Just appType )
|
|
590
|
+
( "shared", Just (Elm.Annotation.named [ "Shared" ] "Model") )
|
|
621
591
|
( "msg", Just (Elm.Annotation.named [] "Msg") )
|
|
622
592
|
( "model", Just (Elm.Annotation.named [] "Model") )
|
|
623
593
|
localState.update
|
|
624
594
|
, initFn =
|
|
625
|
-
Elm.Declare.
|
|
626
|
-
( "pageUrl"
|
|
627
|
-
, "PageUrl"
|
|
628
|
-
|> Elm.Annotation.named [ "Pages", "PageUrl" ]
|
|
629
|
-
|> Elm.Annotation.maybe
|
|
630
|
-
|> Just
|
|
631
|
-
)
|
|
632
|
-
( "sharedModel", Just (Elm.Annotation.named [ "Shared" ] "Model") )
|
|
595
|
+
Elm.Declare.fn2 "init"
|
|
633
596
|
( "app", Just appType )
|
|
634
|
-
(
|
|
635
|
-
|
|
597
|
+
( "shared", Just (Elm.Annotation.named [ "Shared" ] "Model") )
|
|
598
|
+
(\shared app ->
|
|
599
|
+
localState.init app shared
|
|
636
600
|
|> Elm.withType
|
|
637
601
|
(Elm.Annotation.tuple
|
|
638
602
|
(localType "Model")
|
|
@@ -640,20 +604,14 @@ userFunction moduleName definitions =
|
|
|
640
604
|
)
|
|
641
605
|
)
|
|
642
606
|
, subscriptionsFn =
|
|
643
|
-
Elm.Declare.
|
|
607
|
+
Elm.Declare.fn4
|
|
644
608
|
"subscriptions"
|
|
645
|
-
( "maybePageUrl"
|
|
646
|
-
, "PageUrl"
|
|
647
|
-
|> Elm.Annotation.named [ "Pages", "PageUrl" ]
|
|
648
|
-
|> Elm.Annotation.maybe
|
|
649
|
-
|> Just
|
|
650
|
-
)
|
|
651
609
|
( "routeParams", "RouteParams" |> Elm.Annotation.named [] |> Just )
|
|
652
610
|
( "path", Elm.Annotation.namedWith [ "Path" ] "Path" [] |> Just )
|
|
653
|
-
( "
|
|
611
|
+
( "shared", Just (Elm.Annotation.named [ "Shared" ] "Model") )
|
|
654
612
|
( "model", localType "Model" |> Just )
|
|
655
|
-
(\
|
|
656
|
-
localState.subscriptions
|
|
613
|
+
(\routeParams path shared model ->
|
|
614
|
+
localState.subscriptions routeParams path shared model
|
|
657
615
|
|> Elm.withType (Elm.Annotation.namedWith [] "Sub" [ localType "Msg" ])
|
|
658
616
|
)
|
|
659
617
|
, state = localState.state
|
|
@@ -822,7 +780,7 @@ userFunction moduleName definitions =
|
|
|
822
780
|
|
|
823
781
|
Nothing ->
|
|
824
782
|
buildNoState_
|
|
825
|
-
{ view = viewFn.call Elm.unit
|
|
783
|
+
{ view = \app shared -> viewFn.call app shared Elm.unit
|
|
826
784
|
}
|
|
827
785
|
>> Elm.withType
|
|
828
786
|
(Elm.Annotation.namedWith [ "RouteBuilder" ]
|
|
@@ -887,7 +845,7 @@ myType dataType =
|
|
|
887
845
|
appType : Elm.Annotation.Annotation
|
|
888
846
|
appType =
|
|
889
847
|
Elm.Annotation.namedWith [ "RouteBuilder" ]
|
|
890
|
-
"
|
|
848
|
+
"App"
|
|
891
849
|
[ Elm.Annotation.named [] "Data"
|
|
892
850
|
, Elm.Annotation.named [] "ActionData"
|
|
893
851
|
, Elm.Annotation.named [] "RouteParams"
|
|
@@ -953,7 +911,7 @@ serverRender_ serverRenderArg =
|
|
|
953
911
|
, Elm.Annotation.function
|
|
954
912
|
[ Elm.Annotation.namedWith
|
|
955
913
|
[ "RouteBuilder" ]
|
|
956
|
-
"
|
|
914
|
+
"App"
|
|
957
915
|
[ Elm.Annotation.var "data"
|
|
958
916
|
, Elm.Annotation.var "action"
|
|
959
917
|
, Elm.Annotation.var "routeParams"
|
|
@@ -1018,7 +976,7 @@ preRender_ serverRenderArg =
|
|
|
1018
976
|
, Elm.Annotation.function
|
|
1019
977
|
[ Elm.Annotation.namedWith
|
|
1020
978
|
[ "RouteBuilder" ]
|
|
1021
|
-
"
|
|
979
|
+
"App"
|
|
1022
980
|
[ Elm.Annotation.var "data"
|
|
1023
981
|
, Elm.Annotation.var "action"
|
|
1024
982
|
, Elm.Annotation.var "routeParams"
|
|
@@ -1070,7 +1028,7 @@ single_ serverRenderArg =
|
|
|
1070
1028
|
, Elm.Annotation.function
|
|
1071
1029
|
[ Elm.Annotation.namedWith
|
|
1072
1030
|
[ "RouteBuilder" ]
|
|
1073
|
-
"
|
|
1031
|
+
"App"
|
|
1074
1032
|
[ Elm.Annotation.var "data"
|
|
1075
1033
|
, Elm.Annotation.var "action"
|
|
1076
1034
|
, Elm.Annotation.var "routeParams"
|
|
@@ -1106,23 +1064,20 @@ buildWithLocalState_ :
|
|
|
1106
1064
|
-> Elm.Expression
|
|
1107
1065
|
-> Elm.Expression
|
|
1108
1066
|
-> Elm.Expression
|
|
1109
|
-
-> Elm.Expression
|
|
1110
1067
|
, init :
|
|
1111
|
-
Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
1068
|
+
Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
1112
1069
|
, update :
|
|
1113
1070
|
Elm.Expression
|
|
1114
1071
|
-> Elm.Expression
|
|
1115
1072
|
-> Elm.Expression
|
|
1116
1073
|
-> Elm.Expression
|
|
1117
1074
|
-> Elm.Expression
|
|
1118
|
-
-> Elm.Expression
|
|
1119
1075
|
, subscriptions :
|
|
1120
1076
|
Elm.Expression
|
|
1121
1077
|
-> Elm.Expression
|
|
1122
1078
|
-> Elm.Expression
|
|
1123
1079
|
-> Elm.Expression
|
|
1124
1080
|
-> Elm.Expression
|
|
1125
|
-
-> Elm.Expression
|
|
1126
1081
|
, state : State
|
|
1127
1082
|
}
|
|
1128
1083
|
-> Elm.Expression
|
|
@@ -1144,17 +1099,11 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1144
1099
|
[ Elm.Annotation.record
|
|
1145
1100
|
[ ( "view"
|
|
1146
1101
|
, Elm.Annotation.function
|
|
1147
|
-
[ Elm.Annotation.
|
|
1148
|
-
(Elm.Annotation.namedWith
|
|
1149
|
-
[ "Pages", "PageUrl" ]
|
|
1150
|
-
"PageUrl"
|
|
1151
|
-
[]
|
|
1152
|
-
)
|
|
1153
|
-
, Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1102
|
+
[ Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1154
1103
|
, Elm.Annotation.var "model"
|
|
1155
1104
|
, Elm.Annotation.namedWith
|
|
1156
1105
|
[ "RouteBuilder" ]
|
|
1157
|
-
"
|
|
1106
|
+
"App"
|
|
1158
1107
|
[ Elm.Annotation.var "data"
|
|
1159
1108
|
, Elm.Annotation.var "action"
|
|
1160
1109
|
, Elm.Annotation.var "routeParams"
|
|
@@ -1164,24 +1113,18 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1164
1113
|
[ "View" ]
|
|
1165
1114
|
"View"
|
|
1166
1115
|
[ Elm.Annotation.namedWith
|
|
1167
|
-
[ "
|
|
1168
|
-
"
|
|
1169
|
-
[ Elm.Annotation.
|
|
1116
|
+
[ "PagesMsg" ]
|
|
1117
|
+
"PagesMsg"
|
|
1118
|
+
[ Elm.Annotation.named [] "Msg" ]
|
|
1170
1119
|
]
|
|
1171
1120
|
)
|
|
1172
1121
|
)
|
|
1173
1122
|
, ( "init"
|
|
1174
1123
|
, Elm.Annotation.function
|
|
1175
|
-
[ Elm.Annotation.
|
|
1176
|
-
(Elm.Annotation.namedWith
|
|
1177
|
-
[ "Pages", "PageUrl" ]
|
|
1178
|
-
"PageUrl"
|
|
1179
|
-
[]
|
|
1180
|
-
)
|
|
1181
|
-
, Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1124
|
+
[ Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1182
1125
|
, Elm.Annotation.namedWith
|
|
1183
1126
|
[ "RouteBuilder" ]
|
|
1184
|
-
"
|
|
1127
|
+
"App"
|
|
1185
1128
|
[ Elm.Annotation.var "data"
|
|
1186
1129
|
, Elm.Annotation.var "action"
|
|
1187
1130
|
, Elm.Annotation.var "routeParams"
|
|
@@ -1198,14 +1141,10 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1198
1141
|
)
|
|
1199
1142
|
, ( "update"
|
|
1200
1143
|
, Elm.Annotation.function
|
|
1201
|
-
[ Elm.Annotation.namedWith
|
|
1202
|
-
[ "Pages", "PageUrl" ]
|
|
1203
|
-
"PageUrl"
|
|
1204
|
-
[]
|
|
1205
|
-
, Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1144
|
+
[ Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1206
1145
|
, Elm.Annotation.namedWith
|
|
1207
1146
|
[ "RouteBuilder" ]
|
|
1208
|
-
"
|
|
1147
|
+
"App"
|
|
1209
1148
|
[ localType "Data"
|
|
1210
1149
|
, localType "ActionData"
|
|
1211
1150
|
, localType "RouteParams"
|
|
@@ -1236,13 +1175,7 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1236
1175
|
)
|
|
1237
1176
|
, ( "subscriptions"
|
|
1238
1177
|
, Elm.Annotation.function
|
|
1239
|
-
[ Elm.Annotation.
|
|
1240
|
-
(Elm.Annotation.namedWith
|
|
1241
|
-
[ "Pages", "PageUrl" ]
|
|
1242
|
-
"PageUrl"
|
|
1243
|
-
[]
|
|
1244
|
-
)
|
|
1245
|
-
, Elm.Annotation.var "routeParams"
|
|
1178
|
+
[ Elm.Annotation.var "routeParams"
|
|
1246
1179
|
, Elm.Annotation.namedWith [ "Path" ] "Path" []
|
|
1247
1180
|
, Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1248
1181
|
, Elm.Annotation.var "model"
|
|
@@ -1279,17 +1212,12 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1279
1212
|
(\functionReducedUnpack ->
|
|
1280
1213
|
Elm.functionReduced
|
|
1281
1214
|
"unpack"
|
|
1282
|
-
(\
|
|
1215
|
+
(\functionReducedUnpack_2_1_2_0_2_2_0_1_0_2_0_0 ->
|
|
1283
1216
|
Elm.functionReduced
|
|
1284
1217
|
"unpack"
|
|
1285
|
-
(
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
(buildWithLocalStateArg.view
|
|
1289
|
-
functionReducedUnpack
|
|
1290
|
-
functionReducedUnpack0
|
|
1291
|
-
functionReducedUnpack_2_1_2_0_2_2_0_1_0_2_0_0
|
|
1292
|
-
)
|
|
1218
|
+
(buildWithLocalStateArg.view
|
|
1219
|
+
functionReducedUnpack
|
|
1220
|
+
functionReducedUnpack_2_1_2_0_2_2_0_1_0_2_0_0
|
|
1293
1221
|
)
|
|
1294
1222
|
)
|
|
1295
1223
|
)
|
|
@@ -1301,13 +1229,8 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1301
1229
|
(\functionReducedUnpack ->
|
|
1302
1230
|
Elm.functionReduced
|
|
1303
1231
|
"unpack"
|
|
1304
|
-
(
|
|
1305
|
-
|
|
1306
|
-
"unpack"
|
|
1307
|
-
(buildWithLocalStateArg.init
|
|
1308
|
-
functionReducedUnpack
|
|
1309
|
-
functionReducedUnpack0
|
|
1310
|
-
)
|
|
1232
|
+
(buildWithLocalStateArg.init
|
|
1233
|
+
functionReducedUnpack
|
|
1311
1234
|
)
|
|
1312
1235
|
)
|
|
1313
1236
|
)
|
|
@@ -1318,21 +1241,16 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1318
1241
|
(\functionReducedUnpack ->
|
|
1319
1242
|
Elm.functionReduced
|
|
1320
1243
|
"unpack"
|
|
1321
|
-
(\
|
|
1244
|
+
(\functionReducedUnpack_2_1_2_0_2_2_2_1_0_2_0_0 ->
|
|
1322
1245
|
Elm.functionReduced
|
|
1323
1246
|
"unpack"
|
|
1324
|
-
(\
|
|
1247
|
+
(\functionReducedUnpack_2_1_2_1_2_0_2_2_2_1_0_2_0_0 ->
|
|
1325
1248
|
Elm.functionReduced
|
|
1326
1249
|
"unpack"
|
|
1327
|
-
(
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
functionReducedUnpack
|
|
1332
|
-
functionReducedUnpack0
|
|
1333
|
-
functionReducedUnpack_2_1_2_0_2_2_2_1_0_2_0_0
|
|
1334
|
-
functionReducedUnpack_2_1_2_1_2_0_2_2_2_1_0_2_0_0
|
|
1335
|
-
)
|
|
1250
|
+
(buildWithLocalStateArg.update
|
|
1251
|
+
functionReducedUnpack
|
|
1252
|
+
functionReducedUnpack_2_1_2_0_2_2_2_1_0_2_0_0
|
|
1253
|
+
functionReducedUnpack_2_1_2_1_2_0_2_2_2_1_0_2_0_0
|
|
1336
1254
|
)
|
|
1337
1255
|
)
|
|
1338
1256
|
)
|
|
@@ -1345,21 +1263,16 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1345
1263
|
(\functionReducedUnpack ->
|
|
1346
1264
|
Elm.functionReduced
|
|
1347
1265
|
"unpack"
|
|
1348
|
-
(\
|
|
1266
|
+
(\functionReducedUnpack_2_1_2_0_2_2_3_1_0_2_0_0 ->
|
|
1349
1267
|
Elm.functionReduced
|
|
1350
1268
|
"unpack"
|
|
1351
|
-
(\
|
|
1269
|
+
(\functionReducedUnpack_2_1_2_1_2_0_2_2_3_1_0_2_0_0 ->
|
|
1352
1270
|
Elm.functionReduced
|
|
1353
1271
|
"unpack"
|
|
1354
|
-
(
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
functionReducedUnpack
|
|
1359
|
-
functionReducedUnpack0
|
|
1360
|
-
functionReducedUnpack_2_1_2_0_2_2_3_1_0_2_0_0
|
|
1361
|
-
functionReducedUnpack_2_1_2_1_2_0_2_2_3_1_0_2_0_0
|
|
1362
|
-
)
|
|
1272
|
+
(buildWithLocalStateArg.subscriptions
|
|
1273
|
+
functionReducedUnpack
|
|
1274
|
+
functionReducedUnpack_2_1_2_0_2_2_3_1_0_2_0_0
|
|
1275
|
+
functionReducedUnpack_2_1_2_1_2_0_2_2_3_1_0_2_0_0
|
|
1363
1276
|
)
|
|
1364
1277
|
)
|
|
1365
1278
|
)
|
|
@@ -1372,7 +1285,7 @@ buildWithLocalState_ buildWithLocalStateArg buildWithLocalStateArg0 =
|
|
|
1372
1285
|
|
|
1373
1286
|
buildNoState_ :
|
|
1374
1287
|
{ view :
|
|
1375
|
-
Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
1288
|
+
Elm.Expression -> Elm.Expression -> Elm.Expression
|
|
1376
1289
|
}
|
|
1377
1290
|
-> Elm.Expression
|
|
1378
1291
|
-> Elm.Expression
|
|
@@ -1387,16 +1300,10 @@ buildNoState_ buildNoStateArg buildNoStateArg0 =
|
|
|
1387
1300
|
[ Elm.Annotation.record
|
|
1388
1301
|
[ ( "view"
|
|
1389
1302
|
, Elm.Annotation.function
|
|
1390
|
-
[ Elm.Annotation.
|
|
1391
|
-
(Elm.Annotation.namedWith
|
|
1392
|
-
[ "Pages", "PageUrl" ]
|
|
1393
|
-
"PageUrl"
|
|
1394
|
-
[]
|
|
1395
|
-
)
|
|
1396
|
-
, Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1303
|
+
[ Elm.Annotation.namedWith [ "Shared" ] "Model" []
|
|
1397
1304
|
, Elm.Annotation.namedWith
|
|
1398
1305
|
[ "RouteBuilder" ]
|
|
1399
|
-
"
|
|
1306
|
+
"App"
|
|
1400
1307
|
[ Elm.Annotation.named [] "Data"
|
|
1401
1308
|
, Elm.Annotation.named [] "ActionData"
|
|
1402
1309
|
, Elm.Annotation.named [] "RouteParams"
|
|
@@ -1406,9 +1313,9 @@ buildNoState_ buildNoStateArg buildNoStateArg0 =
|
|
|
1406
1313
|
[ "View" ]
|
|
1407
1314
|
"View"
|
|
1408
1315
|
[ Elm.Annotation.namedWith
|
|
1409
|
-
[ "
|
|
1410
|
-
"
|
|
1411
|
-
[ Elm.Annotation.
|
|
1316
|
+
[ "PagesMsg" ]
|
|
1317
|
+
"PagesMsg"
|
|
1318
|
+
[ Elm.Annotation.named [] "Msg" ]
|
|
1412
1319
|
]
|
|
1413
1320
|
)
|
|
1414
1321
|
)
|
|
@@ -1438,16 +1345,12 @@ buildNoState_ buildNoStateArg buildNoStateArg0 =
|
|
|
1438
1345
|
[ Tuple.pair
|
|
1439
1346
|
"view"
|
|
1440
1347
|
(Elm.functionReduced
|
|
1441
|
-
"
|
|
1442
|
-
(\
|
|
1348
|
+
"unpack"
|
|
1349
|
+
(\functionReducedUnpack0 ->
|
|
1443
1350
|
Elm.functionReduced
|
|
1444
1351
|
"unpack"
|
|
1445
|
-
(
|
|
1446
|
-
|
|
1447
|
-
"unpack"
|
|
1448
|
-
(buildNoStateArg.view functionReducedUnpack
|
|
1449
|
-
functionReducedUnpack0
|
|
1450
|
-
)
|
|
1352
|
+
(buildNoStateArg.view
|
|
1353
|
+
functionReducedUnpack0
|
|
1451
1354
|
)
|
|
1452
1355
|
)
|
|
1453
1356
|
)
|